33 #ifndef EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H 34 #define EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H 49 #define GEMM_SPECIALIZATION(EIGTYPE, EIGPREFIX, BLASTYPE, BLASPREFIX) \ 52 int LhsStorageOrder, bool ConjugateLhs, \ 53 int RhsStorageOrder, bool ConjugateRhs> \ 54 struct general_matrix_matrix_product<Index,EIGTYPE,LhsStorageOrder,ConjugateLhs,EIGTYPE,RhsStorageOrder,ConjugateRhs,ColMajor> \ 56 typedef gebp_traits<EIGTYPE,EIGTYPE> Traits; \ 58 static void run(Index rows, Index cols, Index depth, \ 59 const EIGTYPE* _lhs, Index lhsStride, \ 60 const EIGTYPE* _rhs, Index rhsStride, \ 61 EIGTYPE* res, Index resStride, \ 63 level3_blocking<EIGTYPE, EIGTYPE>& , \ 64 GemmParallelInfo<Index>* ) \ 68 char transa, transb; \ 69 BlasIndex m, n, k, lda, ldb, ldc; \ 70 const EIGTYPE *a, *b; \ 72 MatrixX##EIGPREFIX a_tmp, b_tmp; \ 75 transa = (LhsStorageOrder==RowMajor) ? ((ConjugateLhs) ? 'C' : 'T') : 'N'; \ 76 transb = (RhsStorageOrder==RowMajor) ? ((ConjugateRhs) ? 'C' : 'T') : 'N'; \ 79 m = convert_index<BlasIndex>(rows); \ 80 n = convert_index<BlasIndex>(cols); \ 81 k = convert_index<BlasIndex>(depth); \ 84 lda = convert_index<BlasIndex>(lhsStride); \ 85 ldb = convert_index<BlasIndex>(rhsStride); \ 86 ldc = convert_index<BlasIndex>(resStride); \ 89 if ((LhsStorageOrder==ColMajor) && (ConjugateLhs)) { \ 90 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,m,k,OuterStride<>(lhsStride)); \ 91 a_tmp = lhs.conjugate(); \ 93 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \ 96 if ((RhsStorageOrder==ColMajor) && (ConjugateRhs)) { \ 97 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,k,n,OuterStride<>(rhsStride)); \ 98 b_tmp = rhs.conjugate(); \ 100 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \ 103 BLASPREFIX##gemm_(&transa, &transb, &m, &n, &k, &numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, &numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ 115 #endif // EIGEN_GENERAL_MATRIX_MATRIX_BLAS_H static int f(const TensorMap< Tensor< int, 3 > > &tensor)
std::complex< float > scomplex
std::complex< double > dcomplex
#define GEMM_SPECIALIZATION(EIGTYPE, EIGPREFIX, BLASTYPE, BLASPREFIX)