10#ifndef EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_H
11#define EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_H
15template<
typename Scalar,
typename Index,
int StorageOrder,
int UpLo,
bool ConjLhs,
bool ConjRhs>
28template<
typename LhsScalar,
typename RhsScalar,
typename Index,
int mr,
int nr,
bool ConjLhs,
bool ConjRhs,
int UpLo>
32template <
typename Index,
44 static EIGEN_STRONG_INLINE
void run(Index size, Index depth,
const LhsScalar* lhs, Index
lhsStride,
45 const RhsScalar* rhs, Index
rhsStride, ResScalar* res, Index
resStride,
const ResScalar& alpha)
60 static EIGEN_STRONG_INLINE
void run(Index size, Index depth,
const LhsScalar*
_lhs, Index
lhsStride,
78 mc = (mc/Traits::nr)*Traits::nr;
80 ei_declare_aligned_stack_constructed_variable(LhsScalar, blockA, kc*mc, 0);
81 ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, kc*size, 0);
88 for(Index
k2=0;
k2<depth;
k2+=kc)
95 for(Index
i2=0;
i2<size;
i2+=mc)
107 (std::min)(size,
i2), alpha, -1, -1, 0, 0);
116 actual_kc, (std::max)(Index(0), size-
j2), alpha, -1, -1, 0, 0);
132template<
typename LhsScalar,
typename RhsScalar,
typename Index,
int mr,
int nr,
bool ConjLhs,
bool ConjRhs,
int UpLo>
136 typedef typename Traits::ResScalar ResScalar;
139 BlockSize = EIGEN_PLAIN_ENUM_MAX(mr,nr)
141 void operator()(ResScalar*
_res, Index
resStride,
const LhsScalar* blockA,
const RhsScalar* blockB, Index size, Index depth,
const ResScalar& alpha)
151 for (Index
j=0;
j<size;
j+=BlockSize)
154 const RhsScalar*
actual_b = blockB+
j*depth;
170 ResScalar* r = &res(i,
j +
j1);
191template<
typename MatrixType,
typename ProductType,
int UpLo,
bool IsOuterProduct>
195template<
typename MatrixType,
typename ProductType,
int UpLo>
198 static void run(MatrixType&
mat,
const ProductType& prod,
const typename MatrixType::Scalar& alpha)
200 typedef typename MatrixType::Scalar Scalar;
204 typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;
206 typename internal::add_const_on_value_type<ActualLhs>::type
actualLhs = LhsBlasTraits::extract(prod.lhs());
210 typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;
212 typename internal::add_const_on_value_type<ActualRhs>::type
actualRhs = RhsBlasTraits::extract(prod.rhs());
214 Scalar
actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived());
240template<
typename MatrixType,
typename ProductType,
int UpLo>
243 static void run(MatrixType&
mat,
const ProductType& prod,
const typename MatrixType::Scalar& alpha)
247 typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;
249 typename internal::add_const_on_value_type<ActualLhs>::type
actualLhs = LhsBlasTraits::extract(prod.lhs());
253 typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;
255 typename internal::add_const_on_value_type<ActualRhs>::type
actualRhs = RhsBlasTraits::extract(prod.rhs());
257 typename ProductType::Scalar
actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived());
269template<
typename MatrixType,
unsigned int UpLo>
270template<
typename ProductType>
273 eigen_assert(derived().nestedExpression().rows() == prod.rows() && derived().cols() == prod.cols());
Pseudo expression representing a solving operation.
Definition Solve.h:63
Definition TriangularMatrix.h:184
@ Lower
View matrix as a lower triangular matrix.
Definition Constants.h:204
@ Upper
View matrix as an upper triangular matrix.
Definition Constants.h:206
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition Constants.h:320
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition Constants.h:322
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:61
Holds information about the various numeric (i.e.
Definition NumTraits.h:108
Definition GeneralMatrixMatrixTriangular.h:192
Definition BlasUtil.h:257
Definition GeneralBlockPanelKernel.h:949
Definition GeneralProduct.h:169
Definition GeneralMatrixMatrixTriangular.h:36
Definition ForwardDeclarations.h:17
Definition GeneralMatrixMatrixTriangular.h:134
Definition GeneralMatrixMatrixTriangular.h:16