16 typedef void (*functype)(
DenseIndex,
DenseIndex,
DenseIndex,
const Scalar *,
DenseIndex,
const Scalar *,
DenseIndex, Scalar *,
DenseIndex,
Scalar, internal::level3_blocking<Scalar,Scalar>&,
Eigen::internal::GemmParallelInfo<DenseIndex>*);
17 static const functype func[12] = {
41 const Scalar*
a =
reinterpret_cast<const Scalar*
>(pa);
42 const Scalar*
b =
reinterpret_cast<const Scalar*
>(pb);
43 Scalar*
c =
reinterpret_cast<Scalar*
>(
pc);
44 Scalar
alpha = *
reinterpret_cast<const Scalar*
>(
palpha);
45 Scalar beta = *
reinterpret_cast<const Scalar*
>(pbeta);
50 else if(*m<0) info = 3;
51 else if(*
n<0) info = 4;
52 else if(*k<0) info = 5;
55 else if(*ldc<
std::max(1,*m)) info = 13;
59 if (*m == 0 || *n == 0)
65 else matrix(c, *m, *n, *ldc) *= beta;
71 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,*k,1,
true);
73 int code =
OP(*opa) | (
OP(*opb) << 2);
74 func[code](*m, *
n, *k,
a, *
lda,
b, *ldb,
c, *ldc,
alpha, blocking, 0);
78 int EIGEN_BLAS_FUNC(
trsm)(
const char *side,
const char *uplo,
const char *opa,
const char *diag,
const int *m,
const int *
n,
83 static const functype func[32] = {
142 const Scalar*
a =
reinterpret_cast<const Scalar*
>(pa);
143 Scalar*
b =
reinterpret_cast<Scalar*
>(pb);
144 Scalar
alpha = *
reinterpret_cast<const Scalar*
>(
palpha);
151 else if(*m<0) info = 5;
152 else if(*
n<0) info = 6;
154 else if(*ldb<
std::max(1,*m)) info = 11;
161 int code =
OP(*opa) | (
SIDE(*side) << 2) | (
UPLO(*uplo) << 3) | (
DIAG(*diag) << 4);
165 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*m,1,
false);
166 func[code](*m, *
n,
a, *
lda,
b, *ldb, blocking);
170 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*n,1,
false);
171 func[code](*
n, *m,
a, *
lda,
b, *ldb, blocking);
183 int EIGEN_BLAS_FUNC(
trmm)(
const char *side,
const char *uplo,
const char *opa,
const char *diag,
const int *m,
const int *
n,
187 typedef void (*functype)(
DenseIndex,
DenseIndex,
DenseIndex,
const Scalar *,
DenseIndex,
const Scalar *,
DenseIndex, Scalar *,
DenseIndex,
const Scalar&, internal::level3_blocking<Scalar,Scalar>&);
188 static const functype func[32] = {
247 const Scalar*
a =
reinterpret_cast<const Scalar*
>(pa);
248 Scalar*
b =
reinterpret_cast<Scalar*
>(pb);
249 Scalar
alpha = *
reinterpret_cast<const Scalar*
>(
palpha);
256 else if(*m<0) info = 5;
257 else if(*
n<0) info = 6;
259 else if(*ldb<
std::max(1,*m)) info = 11;
263 int code =
OP(*opa) | (
SIDE(*side) << 2) | (
UPLO(*uplo) << 3) | (
DIAG(*diag) << 4);
270 matrix(b,*m,*n,*ldb).setZero();
274 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*m,1,
false);
275 func[code](*m, *
n, *m,
a, *
lda, tmp.
data(), tmp.
outerStride(),
b, *ldb,
alpha, blocking);
279 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic,4> blocking(*m,*n,*n,1,
false);
280 func[code](*m, *
n, *
n, tmp.
data(), tmp.
outerStride(),
a, *
lda,
b, *ldb,
alpha, blocking);
300 else if(*m<0) info = 3;
301 else if(*
n<0) info = 4;
303 else if(*ldb<
std::max(1,*m)) info = 9;
304 else if(*ldc<
std::max(1,*m)) info = 12;
311 else matrix(c, *m, *n, *ldc) *= beta;
326 matA.triangularView<
Lower>() =
matrix(a,size,size,*
lda).transpose();
331 matA.triangularView<
Upper>() =
matrix(a,size,size,*
lda).transpose();
334 matrix(c, *m, *n, *ldc) += alpha * matA *
matrix(b, *m, *n, *ldb);
336 matrix(c, *m, *n, *ldc) += alpha *
matrix(b, *m, *n, *ldb) * matA;
338 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,size,1,
false);
341 if(
UPLO(*uplo)==
UP)
internal::product_selfadjoint_matrix<Scalar, DenseIndex, RowMajor,true,false, ColMajor,false,false, ColMajor>::run(*m, *n, a, *
lda, b, *ldb, c, *ldc, alpha, blocking);
342 else if(
UPLO(*uplo)==
LO)
internal::product_selfadjoint_matrix<Scalar, DenseIndex, ColMajor,true,false, ColMajor,false,false, ColMajor>::run(*m, *n, a, *
lda, b, *ldb, c, *ldc, alpha, blocking);
345 if(
UPLO(*uplo)==
UP)
internal::product_selfadjoint_matrix<Scalar, DenseIndex, ColMajor,false,false, RowMajor,true,false, ColMajor>::run(*m, *n, b, *ldb, a, *
lda, c, *ldc, alpha, blocking);
346 else if(
UPLO(*uplo)==
LO)
internal::product_selfadjoint_matrix<Scalar, DenseIndex, ColMajor,false,false, ColMajor,true,false, ColMajor>::run(*m, *n, b, *ldb, a, *
lda, c, *ldc, alpha, blocking);
362 typedef void (*functype)(
DenseIndex,
DenseIndex,
const Scalar *,
DenseIndex,
const Scalar *,
DenseIndex, Scalar *,
DenseIndex,
const Scalar&, internal::level3_blocking<Scalar,Scalar>&);
363 static const functype func[8] = {
381 const Scalar*
a =
reinterpret_cast<const Scalar*
>(pa);
382 Scalar*
c =
reinterpret_cast<Scalar*
>(
pc);
383 Scalar
alpha = *
reinterpret_cast<const Scalar*
>(
palpha);
384 Scalar beta = *
reinterpret_cast<const Scalar*
>(pbeta);
389 else if(*
n<0) info = 3;
390 else if(*k<0) info = 4;
400 else matrix(c, *
n, *
n, *ldc).triangularView<
Upper>() *= beta;
403 else matrix(c, *
n, *
n, *ldc).triangularView<
Lower>() *= beta;
426 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*
n,*
n,*k,1,
false);
428 int code =
OP(*op) | (
UPLO(*uplo) << 2);
451 else if(*
n<0) info = 3;
452 else if(*k<0) info = 4;
463 else matrix(c, *
n, *
n, *ldc).triangularView<
Upper>() *= beta;
466 else matrix(c, *
n, *
n, *ldc).triangularView<
Lower>() *= beta;
519 else if(*m<0) info = 3;
520 else if(*
n<0) info = 4;
522 else if(*ldb<
std::max(1,*m)) info = 9;
523 else if(*ldc<
std::max(1,*m)) info = 12;
528 else if(beta!=
Scalar(1))
matrix(c, *m, *n, *ldc) *= beta;
536 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,size,1,
false);
541 ::run(*m, *n, a, *
lda, b, *ldb, c, *ldc, alpha, blocking);
543 ::run(*m, *n, a, *
lda, b, *ldb, c, *ldc, alpha, blocking);
550 else if(
UPLO(*uplo)==
LO) internal::product_selfadjoint_matrix<Scalar,DenseIndex,ColMajor,false,false, ColMajor,true,false, ColMajor>
551 ::
run(*m, *n, b, *ldb, a, *
lda, c, *ldc, alpha, blocking);
564 int EIGEN_BLAS_FUNC(herk)(
const char *uplo,
const char *op,
const int *
n,
const int *k,
569 typedef void (*functype)(
DenseIndex,
DenseIndex,
const Scalar *,
DenseIndex,
const Scalar *,
DenseIndex, Scalar *,
DenseIndex,
const Scalar&, internal::level3_blocking<Scalar,Scalar>&);
570 static const functype func[8] = {
585 const Scalar*
a =
reinterpret_cast<const Scalar*
>(pa);
586 Scalar*
c =
reinterpret_cast<Scalar*
>(
pc);
595 else if(*
n<0) info = 3;
596 else if(*k<0) info = 4;
602 int code =
OP(*op) | (
UPLO(*uplo) << 2);
615 matrix(c, *
n, *
n, *ldc).diagonal().real() *= beta;
616 matrix(c, *
n, *
n, *ldc).diagonal().imag().setZero();
622 internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*
n,*
n,*k,1,
false);
624 matrix(c, *n, *n, *ldc).diagonal().imag().setZero();
631 int EIGEN_BLAS_FUNC(her2k)(
const char *uplo,
const char *op,
const int *
n,
const int *k,
645 else if(*
n<0) info = 3;
646 else if(*k<0) info = 4;
664 matrix(c, *
n, *
n, *ldc).diagonal().real() *= beta;
665 matrix(c, *
n, *
n, *ldc).diagonal().imag().setZero();
668 else if(*k>0 && alpha!=
Scalar(0))
669 matrix(c, *
n, *
n, *ldc).diagonal().imag().setZero();
687 else if(
OP(*op)==
ADJ)
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
int RealScalar int RealScalar int RealScalar * pc
int EIGEN_BLAS_FUNC() trmm(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, const int *ldb)
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
int EIGEN_BLAS_FUNC() gemm(const char *opa, const char *opb, const int *m, const int *n, const int *k, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)
NumTraits< Scalar >::Real RealScalar
EIGEN_WEAK_LINKING int xerbla_(const char *msg, int *info, int)
EIGEN_DEVICE_FUNC Index outerStride() const
int EIGEN_BLAS_FUNC() trsm(const char *side, const char *uplo, const char *opa, const char *diag, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, RealScalar *pb, const int *ldb)
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
#define EIGEN_BLAS_FUNC(X)
The matrix class, also used for vectors and row-vectors.
void run(Expr &expr, Dev &dev)
int EIGEN_BLAS_FUNC() symm(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)
int EIGEN_BLAS_FUNC() syrk(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pbeta, RealScalar *pc, const int *ldc)
int EIGEN_BLAS_FUNC() syr2k(const char *uplo, const char *op, const int *n, const int *k, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)