 See the License for the specific language governing permissions and
 limitations under the License. */
 
+#include <cmath>
+#include <string.h>
 #include <paddle/utils/Logging.h>
-#include <string.h>
-#include <cmath>
 #include "BaseMatrix.h"
+#include "hl_matrix_ops.cuh"
+#include "hl_matrix_base.cuh"
+#include "hl_matrix_apply.cuh"
+#include "SIMDFunctions.h"
 #include "MathFunctions.h"
-#include "SIMDFunctions.h"
-#include "hl_matrix_apply.cuh"
-#include "hl_matrix_base.cuh"
-#include "hl_matrix_ops.cuh"
 
 namespace paddle {
 
 const char* SPARSE_SUPPORT_ERROR = "Sparse Matrix/Vector is not supported.";
 
-template <class T>
+template<class T>
 template <class Op>
 int BaseMatrixT<T>::applyUnary(Op op) {
   MatrixOffset offset(0, 0);

}

DEFINE_MATRIX_BINARY_OP(DeepSwap, T tmp = a; a = b; b = tmp);
template <class T>
void BaseMatrixT<T>::deepSwap(BaseMatrixT& b) {
  applyBinary(binary::DeepSwap<T>(), b);
}

template <>
void BaseMatrixT<real>::rowDotMul(size_t destCol,
                                  BaseMatrixT& b,
                                  BaseMatrixT& c) {
  int numRows = b.height_;
  int numCols = b.width_;
  MatrixOffset offset(destCol, 0, 0, 0, 0, 0);
  aggregate(aggregate::sum(),
            base::binary::mul(),
            base::binary::add(),
            b,
            c,
            numRows,
            numCols,
            offset,
            false_type(),
            true_type() /*aAsColVector*/);
}

template <class T>
void BaseMatrixT<T>::rowDotMul2(size_t destCol,
                                BaseMatrixT& b,
                                BaseMatrixT& c) {

  return 0;
}

template<>
template <class Agg>
int BaseMatrixT<real>::applyCol(Agg agg, BaseMatrixT& b) {
  MatrixOffset offset(0, 0, 0, 0, 0, 0);
