aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/bench_gemm.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/bench/bench_gemm.cpp b/bench/bench_gemm.cpp
index 65fe4da1e..b1932968f 100644
--- a/bench/bench_gemm.cpp
+++ b/bench/bench_gemm.cpp
@@ -53,6 +53,17 @@ void blas_gemm(const MatrixXf& a, const MatrixXf& b, MatrixXf& c)
c.data(),&ldc);
}
+EIGEN_DONT_INLINE void blas_gemm(const MatrixXd& a, const MatrixXd& b, MatrixXd& c)
+{
+ int M = c.rows(); int N = c.cols(); int K = a.cols();
+ int lda = a.rows(); int ldb = b.rows(); int ldc = c.rows();
+
+ dgemm_(&notrans,&notrans,&M,&N,&K,&done,
+ const_cast<double*>(a.data()),&lda,
+ const_cast<double*>(b.data()),&ldb,&done,
+ c.data(),&ldc);
+}
+
void blas_gemm(const MatrixXcf& a, const MatrixXcf& b, MatrixXcf& c)
{
int M = c.rows(); int N = c.cols(); int K = a.cols();
@@ -75,16 +86,7 @@ void blas_gemm(const MatrixXcd& a, const MatrixXcd& b, MatrixXcd& c)
(double*)c.data(),&ldc);
}
-void blas_gemm(const MatrixXd& a, const MatrixXd& b, MatrixXd& c)
-{
- int M = c.rows(); int N = c.cols(); int K = a.cols();
- int lda = a.rows(); int ldb = b.rows(); int ldc = c.rows();
- dgemm_(&notrans,&notrans,&M,&N,&K,&done,
- const_cast<double*>(a.data()),&lda,
- const_cast<double*>(b.data()),&ldb,&done,
- c.data(),&ldc);
-}
#endif