33 #ifndef EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_MKL_H 34 #define EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_MKL_H 40 template <
typename Index,
typename Scalar,
int AStorageOrder,
bool ConjugateA,
int ResStorageOrder,
int UpLo>
43 Index,Scalar,AStorageOrder,ConjugateA,Scalar,AStorageOrder,ConjugateA,ResStorageOrder,UpLo,BuiltIn> {};
47 #define EIGEN_MKL_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,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 resStride, Scalar alpha) \ 56 general_matrix_matrix_rankupdate<Index,Scalar,LhsStorageOrder,ConjugateLhs,ColMajor,UpLo> \ 57 ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resStride,alpha); \ 59 general_matrix_matrix_triangular_product<Index, \ 60 Scalar, LhsStorageOrder, ConjugateLhs, \ 61 Scalar, RhsStorageOrder, ConjugateRhs, \ 62 ColMajor, UpLo, BuiltIn> \ 63 ::run(size,depth,lhs,lhsStride,rhs,rhsStride,res,resStride,alpha); \ 74 #define EIGEN_MKL_RANKUPDATE_R(EIGTYPE, MKLTYPE, MKLFUNC) \ 75 template <typename Index, int AStorageOrder, bool ConjugateA, int UpLo> \ 76 struct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,ColMajor,UpLo> { \ 78 IsLower = (UpLo&Lower) == Lower, \ 79 LowUp = IsLower ? Lower : Upper, \ 80 conjA = ((AStorageOrder==ColMajor) && ConjugateA) ? 1 : 0 \ 82 static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \ 83 const EIGTYPE* rhs, Index rhsStride, EIGTYPE* res, Index resStride, EIGTYPE alpha) \ 87 MKL_INT lda=lhsStride, ldc=resStride, n=size, k=depth; \ 88 char uplo=(IsLower) ? 'L' : 'U', trans=(AStorageOrder==RowMajor) ? 'T':'N'; \ 89 MKLTYPE alpha_, beta_; \ 92 assign_scalar_eig2mkl<MKLTYPE, EIGTYPE>(alpha_, alpha); \ 93 assign_scalar_eig2mkl<MKLTYPE, EIGTYPE>(beta_, EIGTYPE(1)); \ 94 MKLFUNC(&uplo, &trans, &n, &k, &alpha_, lhs, &lda, &beta_, res, &ldc); \ 99 #define EIGEN_MKL_RANKUPDATE_C(EIGTYPE, MKLTYPE, RTYPE, MKLFUNC) \ 100 template <typename Index, int AStorageOrder, bool ConjugateA, int UpLo> \ 101 struct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,ColMajor,UpLo> { \ 103 IsLower = (UpLo&Lower) == Lower, \ 104 LowUp = IsLower ? Lower : Upper, \ 105 conjA = (((AStorageOrder==ColMajor) && ConjugateA) || ((AStorageOrder==RowMajor) && !ConjugateA)) ? 1 : 0 \ 107 static EIGEN_STRONG_INLINE void run(Index size, Index depth,const EIGTYPE* lhs, Index lhsStride, \ 108 const EIGTYPE* rhs, Index rhsStride, EIGTYPE* res, Index resStride, EIGTYPE alpha) \ 110 typedef Matrix<EIGTYPE, Dynamic, Dynamic, AStorageOrder> MatrixType; \ 112 MKL_INT lda=lhsStride, ldc=resStride, n=size, k=depth; \ 113 char uplo=(IsLower) ? 'L' : 'U', trans=(AStorageOrder==RowMajor) ? 'C':'N'; \ 114 RTYPE alpha_, beta_; \ 115 const EIGTYPE* a_ptr; \ 120 alpha_ = alpha.real(); \ 125 Map<const MatrixType, 0, OuterStride<> > mapA(lhs,n,k,OuterStride<>(lhsStride)); \ 126 a = mapA.conjugate(); \ 127 lda = a.outerStride(); \ 130 MKLFUNC(&uplo, &trans, &n, &k, &alpha_, (MKLTYPE*)a_ptr, &lda, &beta_, (MKLTYPE*)res, &ldc); \ 146 #endif // EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_MKL_H
iterative scaling algorithm to equilibrate rows and column norms in matrices
#define EIGEN_MKL_RANKUPDATE_R(EIGTYPE, MKLTYPE, MKLFUNC)
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 *)
#define EIGEN_MKL_RANKUPDATE_SPECIALIZE(Scalar)