33 #ifndef EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H 34 #define EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H 40 template <
typename Index,
typename Scalar,
int AStorageOrder,
bool ConjugateA,
int ResStorageOrder,
int UpLo>
43 Index,Scalar,AStorageOrder,ConjugateA,Scalar,AStorageOrder,ConjugateA,ResStorageOrder,1,UpLo,BuiltIn> {};
47 #define EIGEN_BLAS_RANKUPDATE_SPECIALIZE(Scalar) \ 48 template <typename Index, int LhsStorageOrder, bool ConjugateLhs, \ 49 int RhsStorageOrder, bool ConjugateRhs, int UpLo> \ 50 struct general_matrix_matrix_triangular_product<Index,Scalar,LhsStorageOrder,ConjugateLhs, \ 51 Scalar,RhsStorageOrder,ConjugateRhs,ColMajor,1,UpLo,Specialized> { \ 52 static EIGEN_STRONG_INLINE void run(Index size, Index depth,const Scalar* lhs, Index lhsStride, \ 53 const Scalar* rhs, Index rhsStride, Scalar* res, Index resIncr, Index resStride, Scalar alpha, level3_blocking<Scalar, Scalar>& blocking) \ 55 if ( lhs==rhs && ((UpLo&(Lower|Upper))==UpLo) ) { \ 56 general_matrix_matrix_rankupdate<Index,Scalar,LhsStorageOrder,ConjugateLhs,ColMajor,UpLo> \ 57 ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resStride,alpha,blocking); \ 59 general_matrix_matrix_triangular_product<Index, \ 60 Scalar, LhsStorageOrder, ConjugateLhs, \ 61 Scalar, RhsStorageOrder, ConjugateRhs, \ 62 ColMajor, 1, UpLo, BuiltIn> \ 63 ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resIncr,resStride,alpha,blocking); \ 75 #define EIGEN_BLAS_RANKUPDATE_R(EIGTYPE, BLASTYPE, BLASFUNC) \ 76 template <typename Index, int AStorageOrder, bool ConjugateA, int UpLo> \ 77 struct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,ColMajor,UpLo> { \ 79 IsLower = (UpLo&Lower) == Lower, \ 80 LowUp = IsLower ? Lower : Upper, \ 81 conjA = ((AStorageOrder==ColMajor) && ConjugateA) ? 1 : 0 \ 83 static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \ 84 const EIGTYPE* , Index , EIGTYPE* res, Index resStride, EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \ 88 BlasIndex lda=convert_index<BlasIndex>(lhsStride), ldc=convert_index<BlasIndex>(resStride), n=convert_index<BlasIndex>(size), k=convert_index<BlasIndex>(depth); \ 89 char uplo=((IsLower) ? 'L' : 'U'), trans=((AStorageOrder==RowMajor) ? 'T':'N'); \ 91 BLASFUNC(&uplo, &trans, &n, &k, (const BLASTYPE*)&numext::real_ref(alpha), lhs, &lda, (const BLASTYPE*)&numext::real_ref(beta), res, &ldc); \ 96 #define EIGEN_BLAS_RANKUPDATE_C(EIGTYPE, BLASTYPE, RTYPE, BLASFUNC) \ 97 template <typename Index, int AStorageOrder, bool ConjugateA, int UpLo> \ 98 struct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,ColMajor,UpLo> { \ 100 IsLower = (UpLo&Lower) == Lower, \ 101 LowUp = IsLower ? Lower : Upper, \ 102 conjA = (((AStorageOrder==ColMajor) && ConjugateA) || ((AStorageOrder==RowMajor) && !ConjugateA)) ? 1 : 0 \ 104 static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \ 105 const EIGTYPE* , Index , EIGTYPE* res, Index resStride, EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \ 107 typedef Matrix<EIGTYPE, Dynamic, Dynamic, AStorageOrder> MatrixType; \ 109 BlasIndex lda=convert_index<BlasIndex>(lhsStride), ldc=convert_index<BlasIndex>(resStride), n=convert_index<BlasIndex>(size), k=convert_index<BlasIndex>(depth); \ 110 char uplo=((IsLower) ? 'L' : 'U'), trans=((AStorageOrder==RowMajor) ? 'C':'N'); \ 111 RTYPE alpha_, beta_; \ 112 const EIGTYPE* a_ptr; \ 114 alpha_ = alpha.real(); \ 119 Map<const MatrixType, 0, OuterStride<> > mapA(lhs,n,k,OuterStride<>(lhsStride)); \ 120 a = mapA.conjugate(); \ 121 lda = a.outerStride(); \ 124 BLASFUNC(&uplo, &trans, &n, &k, &alpha_, (BLASTYPE*)a_ptr, &lda, &beta_, (BLASTYPE*)res, &ldc); \ 145 #endif // EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_BLAS_H int BLASFUNC() dsyrk(char *, char *, int *, int *, double *, double *, int *, double *, double *, int *)
int BLASFUNC() ssyrk(char *, char *, int *, int *, float *, float *, int *, float *, float *, int *)
Namespace containing all symbols from the Eigen library.
#define EIGEN_BLAS_RANKUPDATE_R(EIGTYPE, BLASTYPE, BLASFUNC)
#define EIGEN_BLAS_RANKUPDATE_SPECIALIZE(Scalar)