31 #ifndef REMORA_KERNELS_GEMM_HPP 32 #define REMORA_KERNELS_GEMM_HPP 35 #ifdef REMORA_USE_CBLAS 41 #include "../detail/matrix_proxy_classes.hpp" 47 template <
class E1,
class E2,
class Mat,
class Orientation1,
class Orientation2>
49 matrix_expression<E1, cpu_tag>
const& e1,
50 matrix_expression<E2, cpu_tag>
const& e2,
51 matrix_expression<Mat, cpu_tag>& m,
52 typename Mat::value_type alpha,
53 row_major, Orientation1, Orientation2,
56 dense_gemm(e1,e2,m,alpha);
59 template<
class M,
class E1,
class E2,
class Orientation1,
class Orientation2,
class Tag1,
class Tag2>
61 matrix_expression<E1, cpu_tag>
const& e1,
62 matrix_expression<E2, cpu_tag>
const& e2,
63 matrix_expression<M, cpu_tag>& m,
64 typename M::value_type alpha,
65 column_major, Orientation1, Orientation2,
68 matrix_transpose<M> transposedM(m());
69 typedef typename Orientation1::transposed_orientation transpO1;
70 typedef typename Orientation2::transposed_orientation transpO2;
71 matrix_transpose<E1 const> e1trans(e1());
72 matrix_transpose<E2 const> e2trans(e2());
73 gemm(e2trans,e1trans,transposedM,alpha,row_major(),transpO2(),transpO1(), Tag2(),Tag1());
87 template<
class M,
class E1,
class E2>
89 matrix_expression<E1, cpu_tag>
const& e1,
90 matrix_expression<E2, cpu_tag>
const& e2,
91 matrix_expression<M, cpu_tag>& m,
92 typename M::value_type alpha
94 REMORA_SIZE_CHECK(m().size1() == e1().size1());
95 REMORA_SIZE_CHECK(m().size2() == e2().size2());
96 REMORA_SIZE_CHECK(e1().size2() == e2().size1());
98 typedef typename M::orientation ResultOrientation;
99 typedef typename E1::orientation E1Orientation;
100 typedef typename E2::orientation E2Orientation;
101 typedef typename E1::evaluation_category::tag E1Tag;
102 typedef typename E2::evaluation_category::tag E2Tag;
104 bindings::gemm(e1, e2, m ,alpha,
105 ResultOrientation(), E1Orientation(), E2Orientation(),
112 #ifdef REMORA_USE_CLBLAST