Go to the documentation of this file.
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,1> \
51 Index rows, Index cols, \
52 const EIGTYPE* _lhs, Index lhsStride, \
53 const EIGTYPE* _rhs, Index rhsStride, \
54 EIGTYPE* res, Index resIncr, Index resStride, \
55 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \
57 EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \
58 eigen_assert(resIncr == 1); \
59 char side='L', uplo='L'; \
60 BlasIndex m, n, lda, ldb, ldc; \
61 const EIGTYPE *a, *b; \
63 MatrixX##EIGPREFIX b_tmp; \
67 m = convert_index<BlasIndex>(rows); \
68 n = convert_index<BlasIndex>(cols); \
71 lda = convert_index<BlasIndex>(lhsStride); \
72 ldb = convert_index<BlasIndex>(rhsStride); \
73 ldc = convert_index<BlasIndex>(resStride); \
76 if (LhsStorageOrder==RowMajor) uplo='U'; \
79 if (RhsStorageOrder==RowMajor) { \
80 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \
81 b_tmp = rhs.adjoint(); \
83 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \
86 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); \
92 #define EIGEN_BLAS_HEMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \
93 template <typename Index, \
94 int LhsStorageOrder, bool ConjugateLhs, \
95 int RhsStorageOrder, bool ConjugateRhs> \
96 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,true,ConjugateLhs,RhsStorageOrder,false,ConjugateRhs,ColMajor,1> \
99 Index rows, Index cols, \
100 const EIGTYPE* _lhs, Index lhsStride, \
101 const EIGTYPE* _rhs, Index rhsStride, \
102 EIGTYPE* res, Index resIncr, Index resStride, \
103 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \
105 EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \
106 eigen_assert(resIncr == 1); \
107 char side='L', uplo='L'; \
108 BlasIndex m, n, lda, ldb, ldc; \
109 const EIGTYPE *a, *b; \
111 MatrixX##EIGPREFIX b_tmp; \
112 Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder> a_tmp; \
116 m = convert_index<BlasIndex>(rows); \
117 n = convert_index<BlasIndex>(cols); \
120 lda = convert_index<BlasIndex>(lhsStride); \
121 ldb = convert_index<BlasIndex>(rhsStride); \
122 ldc = convert_index<BlasIndex>(resStride); \
125 if (((LhsStorageOrder==ColMajor) && ConjugateLhs) || ((LhsStorageOrder==RowMajor) && (!ConjugateLhs))) { \
126 Map<const Matrix<EIGTYPE, Dynamic, Dynamic, LhsStorageOrder>, 0, OuterStride<> > lhs(_lhs,m,m,OuterStride<>(lhsStride)); \
127 a_tmp = lhs.conjugate(); \
129 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \
131 if (LhsStorageOrder==RowMajor) uplo='U'; \
133 if (RhsStorageOrder==ColMajor && (!ConjugateRhs)) { \
136 if (RhsStorageOrder==ColMajor && ConjugateRhs) { \
137 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,m,n,OuterStride<>(rhsStride)); \
138 b_tmp = rhs.conjugate(); \
140 if (ConjugateRhs) { \
141 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \
142 b_tmp = rhs.adjoint(); \
144 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > rhs(_rhs,n,m,OuterStride<>(rhsStride)); \
145 b_tmp = rhs.transpose(); \
148 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \
151 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); \
170 #define EIGEN_BLAS_SYMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \
171 template <typename Index, \
172 int LhsStorageOrder, bool ConjugateLhs, \
173 int RhsStorageOrder, bool ConjugateRhs> \
174 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,false,ConjugateLhs,RhsStorageOrder,true,ConjugateRhs,ColMajor,1> \
178 Index rows, Index cols, \
179 const EIGTYPE* _lhs, Index lhsStride, \
180 const EIGTYPE* _rhs, Index rhsStride, \
181 EIGTYPE* res, Index resIncr, Index resStride, \
182 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \
184 EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \
185 eigen_assert(resIncr == 1); \
186 char side='R', uplo='L'; \
187 BlasIndex m, n, lda, ldb, ldc; \
188 const EIGTYPE *a, *b; \
190 MatrixX##EIGPREFIX b_tmp; \
193 m = convert_index<BlasIndex>(rows); \
194 n = convert_index<BlasIndex>(cols); \
197 lda = convert_index<BlasIndex>(rhsStride); \
198 ldb = convert_index<BlasIndex>(lhsStride); \
199 ldc = convert_index<BlasIndex>(resStride); \
202 if (RhsStorageOrder==RowMajor) uplo='U'; \
205 if (LhsStorageOrder==RowMajor) { \
206 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(rhsStride)); \
207 b_tmp = lhs.adjoint(); \
209 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \
212 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); \
218 #define EIGEN_BLAS_HEMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC) \
219 template <typename Index, \
220 int LhsStorageOrder, bool ConjugateLhs, \
221 int RhsStorageOrder, bool ConjugateRhs> \
222 struct product_selfadjoint_matrix<EIGTYPE,Index,LhsStorageOrder,false,ConjugateLhs,RhsStorageOrder,true,ConjugateRhs,ColMajor,1> \
225 Index rows, Index cols, \
226 const EIGTYPE* _lhs, Index lhsStride, \
227 const EIGTYPE* _rhs, Index rhsStride, \
228 EIGTYPE* res, Index resIncr, Index resStride, \
229 EIGTYPE alpha, level3_blocking<EIGTYPE, EIGTYPE>& ) \
231 EIGEN_ONLY_USED_FOR_DEBUG(resIncr); \
232 eigen_assert(resIncr == 1); \
233 char side='R', uplo='L'; \
234 BlasIndex m, n, lda, ldb, ldc; \
235 const EIGTYPE *a, *b; \
237 MatrixX##EIGPREFIX b_tmp; \
238 Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder> a_tmp; \
241 m = convert_index<BlasIndex>(rows); \
242 n = convert_index<BlasIndex>(cols); \
245 lda = convert_index<BlasIndex>(rhsStride); \
246 ldb = convert_index<BlasIndex>(lhsStride); \
247 ldc = convert_index<BlasIndex>(resStride); \
250 if (((RhsStorageOrder==ColMajor) && ConjugateRhs) || ((RhsStorageOrder==RowMajor) && (!ConjugateRhs))) { \
251 Map<const Matrix<EIGTYPE, Dynamic, Dynamic, RhsStorageOrder>, 0, OuterStride<> > rhs(_rhs,n,n,OuterStride<>(rhsStride)); \
252 a_tmp = rhs.conjugate(); \
254 lda = convert_index<BlasIndex>(a_tmp.outerStride()); \
256 if (RhsStorageOrder==RowMajor) uplo='U'; \
258 if (LhsStorageOrder==ColMajor && (!ConjugateLhs)) { \
261 if (LhsStorageOrder==ColMajor && ConjugateLhs) { \
262 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,m,n,OuterStride<>(lhsStride)); \
263 b_tmp = lhs.conjugate(); \
265 if (ConjugateLhs) { \
266 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \
267 b_tmp = lhs.adjoint(); \
269 Map<const MatrixX##EIGPREFIX, 0, OuterStride<> > lhs(_lhs,n,m,OuterStride<>(lhsStride)); \
270 b_tmp = lhs.transpose(); \
273 ldb = convert_index<BlasIndex>(b_tmp.outerStride()); \
276 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); \
295 #endif // EIGEN_SELFADJOINT_MATRIX_MATRIX_BLAS_H
Namespace containing all symbols from the Eigen library.
static const double d[K][N]
#define EIGEN_BLAS_SYMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
#define EIGEN_BLAS_HEMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
#define EIGEN_BLAS_SYMM_R(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
int BLASFUNC() chemm(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *)
std::complex< float > scomplex
std::complex< double > dcomplex
int BLASFUNC() zhemm(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *)
int BLASFUNC() dsymm(char *, char *, int *, int *, double *, double *, int *, double *, int *, double *, double *, int *)
int BLASFUNC() ssymm(char *, char *, int *, int *, float *, float *, int *, float *, int *, float *, float *, int *)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
#define EIGEN_BLAS_HEMM_L(EIGTYPE, BLASTYPE, EIGPREFIX, BLASFUNC)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:03