33 #ifndef EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H 34 #define EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H 43 #define EIGEN_BLAS_SYMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \ 44 template <typename Index, \ 45 int LhsStorageOrder, bool ConjugateLhs, \ 46 int RhsStorageOrder, bool ConjugateRhs> \ 47 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,true,ConjugateLhs,RhsStorageOrder,false,ConjugateRhs,ColMajor> \ 51 Index rows, Index cols, \ 52 const EIGTYPE* _lhs, Index lhsStride, \ 53 const EIGTYPE* _rhs, Index rhsStride, \ 54 EIGTYPE* res, Index resStride, \ 55 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \ 57 char side='L', uplo='L'; \ 58 BlasIndex m, n, lda, ldb, ldc; \ 59 const EIGTYPE *a, *b; \ 61 MatrixX##EIGPREFIX b_tmp; \ 65 m = convert_index<BlasIndex>(rows); \ 66 n = convert_index<BlasIndex>(cols); \ 69 lda = convert_index<BlasIndex>(lhsStride); \ 70 ldb = convert_index<BlasIndex>(rhsStride); \ 71 ldc = convert_index<BlasIndex>(resStride); \ 74 if (LhsStorageOrder==RowMajor) uplo='U'; \ 77 if (RhsStorageOrder==RowMajor) { \ 78 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \ 79 b_tmp = rhs.adjoint(); \ 81 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \ 84 BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ 90 #define EIGEN_BLAS_HEMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \ 91 template <typename Index, \ 92 int LhsStorageOrder, bool ConjugateLhs, \ 93 int RhsStorageOrder, bool ConjugateRhs> \ 94 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,true,ConjugateLhs,RhsStorageOrder,false,ConjugateRhs,ColMajor> \ 97 Index rows, Index cols, \ 98 const EIGTYPE* _lhs, Index lhsStride, \ 99 const EIGTYPE* _rhs, Index rhsStride, \ 100 EIGTYPE* res, Index resStride, \ 101 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \ 103 char side='L', uplo='L'; \ 104 BlasIndex m, n, lda, ldb, ldc; \ 105 const EIGTYPE *a, *b; \ 107 MatrixX##EIGPREFIX b_tmp; \ 108 Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder> a_tmp; \ 112 m = convert_index<BlasIndex>(rows); \ 113 n = convert_index<BlasIndex>(cols); \ 116 lda = convert_index<BlasIndex>(lhsStride); \ 117 ldb = convert_index<BlasIndex>(rhsStride); \ 118 ldc = convert_index<BlasIndex>(resStride); \ 121 if (((LhsStorageOrder==ColMajor) && ConjugateLhs) || ((LhsStorageOrder==RowMajor) && (!ConjugateLhs))) { \ 122 Map<const Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder>, 0, OuterStride<> > lhs(_lhs,m,m,OuterStride<>(lhsStride)); \ 123 a_tmp = lhs.conjugate(); \ 125 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \ 127 if (LhsStorageOrder==RowMajor) uplo='U'; \ 129 if (RhsStorageOrder==ColMajor && (!ConjugateRhs)) { \ 132 if (RhsStorageOrder==ColMajor && ConjugateRhs) { \ 133 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,m,n,OuterStride<>(rhsStride)); \ 134 b_tmp = rhs.conjugate(); \ 136 if (ConjugateRhs) { \ 137 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \ 138 b_tmp = rhs.adjoint(); \ 140 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \ 141 b_tmp = rhs.transpose(); \ 144 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \ 147 BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ 166 #define EIGEN_BLAS_SYMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \ 167 template <typename Index, \ 168 int LhsStorageOrder, bool ConjugateLhs, \ 169 int RhsStorageOrder, bool ConjugateRhs> \ 170 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,false,ConjugateLhs,RhsStorageOrder,true,ConjugateRhs,ColMajor> \ 174 Index rows, Index cols, \ 175 const EIGTYPE* _lhs, Index lhsStride, \ 176 const EIGTYPE* _rhs, Index rhsStride, \ 177 EIGTYPE* res, Index resStride, \ 178 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \ 180 char side='R', uplo='L'; \ 181 BlasIndex m, n, lda, ldb, ldc; \ 182 const EIGTYPE *a, *b; \ 184 MatrixX##EIGPREFIX b_tmp; \ 187 m = convert_index<BlasIndex>(rows); \ 188 n = convert_index<BlasIndex>(cols); \ 191 lda = convert_index<BlasIndex>(rhsStride); \ 192 ldb = convert_index<BlasIndex>(lhsStride); \ 193 ldc = convert_index<BlasIndex>(resStride); \ 196 if (RhsStorageOrder==RowMajor) uplo='U'; \ 199 if (LhsStorageOrder==RowMajor) { \ 200 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(rhsStride)); \ 201 b_tmp = lhs.adjoint(); \ 203 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \ 206 BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ 212 #define EIGEN_BLAS_HEMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \ 213 template <typename Index, \ 214 int LhsStorageOrder, bool ConjugateLhs, \ 215 int RhsStorageOrder, bool ConjugateRhs> \ 216 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,false,ConjugateLhs,RhsStorageOrder,true,ConjugateRhs,ColMajor> \ 219 Index rows, Index cols, \ 220 const EIGTYPE* _lhs, Index lhsStride, \ 221 const EIGTYPE* _rhs, Index rhsStride, \ 222 EIGTYPE* res, Index resStride, \ 223 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \ 225 char side='R', uplo='L'; \ 226 BlasIndex m, n, lda, ldb, ldc; \ 227 const EIGTYPE *a, *b; \ 229 MatrixX##EIGPREFIX b_tmp; \ 230 Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder> a_tmp; \ 233 m = convert_index<BlasIndex>(rows); \ 234 n = convert_index<BlasIndex>(cols); \ 237 lda = convert_index<BlasIndex>(rhsStride); \ 238 ldb = convert_index<BlasIndex>(lhsStride); \ 239 ldc = convert_index<BlasIndex>(resStride); \ 242 if (((RhsStorageOrder==ColMajor) && ConjugateRhs) || ((RhsStorageOrder==RowMajor) && (!ConjugateRhs))) { \ 243 Map<const Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder>, 0, OuterStride<> > rhs(_rhs,n,n,OuterStride<>(rhsStride)); \ 244 a_tmp = rhs.conjugate(); \ 246 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \ 248 if (RhsStorageOrder==RowMajor) uplo='U'; \ 250 if (LhsStorageOrder==ColMajor && (!ConjugateLhs)) { \ 253 if (LhsStorageOrder==ColMajor && ConjugateLhs) { \ 254 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,m,n,OuterStride<>(lhsStride)); \ 255 b_tmp = lhs.conjugate(); \ 257 if (ConjugateLhs) { \ 258 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \ 259 b_tmp = lhs.adjoint(); \ 261 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \ 262 b_tmp = lhs.transpose(); \ 265 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \ 268 BLASFUNC(&side, &uplo, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (const BLASTYPE*)b, &ldb, (const BLASTYPE*)&numext::real_ref(beta), (BLASTYPE*)res, &ldc); \ 287 #endif // EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H
int BLASFUNC() dsymm(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *)
#define EIGEN_BLAS_SYMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
Namespace containing all symbols from the Eigen library.
#define EIGEN_BLAS_HEMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
std::complex< float > scomplex
std::complex< double > dcomplex
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
#define EIGEN_BLAS_HEMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
int BLASFUNC() zhemm(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *)
#define EIGEN_BLAS_SYMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
int BLASFUNC() chemm(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *)
int BLASFUNC() ssymm(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *)