33 #ifndef EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H 34 #define EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H 41 #define EIGEN_BLAS_TRSM_L(EIGTYPE, BLASTYPE, BLASFUNC) \ 42 template <typename Index, int Mode, bool Conjugate, int TriStorageOrder> \ 43 struct triangular_solve_matrix<EIGTYPE,Index,OnTheLeft,Mode,Conjugate,TriStorageOrder,ColMajor,1> \ 46 IsLower = (Mode&Lower) == Lower, \ 47 IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ 48 IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ 49 conjA = ((TriStorageOrder==ColMajor) && Conjugate) ? 1 : 0 \ 52 Index size, Index otherSize, \ 53 const EIGTYPE* _tri, Index triStride, \ 54 EIGTYPE* _other, Index otherIncr, Index otherStride, level3_blocking<EIGTYPE,EIGTYPE>& ) \ 56 EIGEN_ONLY_USED_FOR_DEBUG(otherIncr); \ 57 eigen_assert(otherIncr == 1); \ 58 BlasIndex m = convert_index<BlasIndex>(size), n = convert_index<BlasIndex>(otherSize), lda, ldb; \ 59 char side = 'L', uplo, diag='N', transa; \ 62 ldb = convert_index<BlasIndex>(otherStride);\ 66 transa = (TriStorageOrder==RowMajor) ? ((Conjugate) ? 'C' : 'T') : 'N'; \ 68 uplo = IsLower ? 'L' : 'U'; \ 69 if (TriStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \ 71 typedef Matrix<EIGTYPE, Dynamic, Dynamic, TriStorageOrder> MatrixTri; \ 72 Map<const MatrixTri, 0, OuterStride<> > tri(_tri,size,size,OuterStride<>(triStride)); \ 76 a_tmp = tri.conjugate(); \ 78 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \ 81 lda = convert_index<BlasIndex>(triStride); \ 83 if (IsUnitDiag) diag='U'; \ 85 BLASFUNC(&side, &uplo, &transa, &diag, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)_other, &ldb); \ 102 #define EIGEN_BLAS_TRSM_R(EIGTYPE, BLASTYPE, BLASFUNC) \ 103 template <typename Index, int Mode, bool Conjugate, int TriStorageOrder> \ 104 struct triangular_solve_matrix<EIGTYPE,Index,OnTheRight,Mode,Conjugate,TriStorageOrder,ColMajor,1> \ 107 IsLower = (Mode&Lower) == Lower, \ 108 IsUnitDiag = (Mode&UnitDiag) ? 1 : 0, \ 109 IsZeroDiag = (Mode&ZeroDiag) ? 1 : 0, \ 110 conjA = ((TriStorageOrder==ColMajor) && Conjugate) ? 1 : 0 \ 113 Index size, Index otherSize, \ 114 const EIGTYPE* _tri, Index triStride, \ 115 EIGTYPE* _other, Index otherIncr, Index otherStride, level3_blocking<EIGTYPE,EIGTYPE>& ) \ 117 EIGEN_ONLY_USED_FOR_DEBUG(otherIncr); \ 118 eigen_assert(otherIncr == 1); \ 119 BlasIndex m = convert_index<BlasIndex>(otherSize), n = convert_index<BlasIndex>(size), lda, ldb; \ 120 char side = 'R', uplo, diag='N', transa; \ 123 ldb = convert_index<BlasIndex>(otherStride);\ 127 transa = (TriStorageOrder==RowMajor) ? ((Conjugate) ? 'C' : 'T') : 'N'; \ 129 uplo = IsLower ? 'L' : 'U'; \ 130 if (TriStorageOrder==RowMajor) uplo = (uplo == 'L') ? 'U' : 'L'; \ 132 typedef Matrix<EIGTYPE, Dynamic, Dynamic, TriStorageOrder> MatrixTri; \ 133 Map<const MatrixTri, 0, OuterStride<> > tri(_tri,size,size,OuterStride<>(triStride)); \ 137 a_tmp = tri.conjugate(); \ 139 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \ 142 lda = convert_index<BlasIndex>(triStride); \ 144 if (IsUnitDiag) diag='U'; \ 146 BLASFUNC(&side, &uplo, &transa, &diag, &m, &n, (const BLASTYPE*)&numext::real_ref(alpha), (const BLASTYPE*)a, &lda, (BLASTYPE*)_other, &ldb); \ 167 #endif // EIGEN_TRIANGULAR_SOLVER_MATRIX_BLAS_H int BLASFUNC() ztrsm(char *, char *, char *, char *, int *, int *, double *, double *, int *, double *, int *)
Namespace containing all symbols from the Eigen library.
int BLASFUNC() ctrsm(char *, char *, char *, char *, int *, int *, float *, float *, int *, float *, int *)
#define EIGEN_BLAS_TRSM_R(EIGTYPE, BLASTYPE, BLASFUNC)
std::complex< float > scomplex
std::complex< double > dcomplex
int BLASFUNC() dtrsm(char *, char *, char *, char *, int *, int *, double *, double *, int *, double *, int *)
#define EIGEN_BLAS_TRSM_L(EIGTYPE, BLASTYPE, BLASFUNC)
int BLASFUNC() strsm(char *, char *, char *, char *, int *, int *, float *, float *, int *, float *, int *)