10 #ifndef EIGEN_SELFADJOINT_PRODUCT_H 11 #define EIGEN_SELFADJOINT_PRODUCT_H 22 template<
typename Scalar,
typename Index,
int UpLo,
bool ConjLhs,
bool ConjRhs>
25 static void run(Index
size, Scalar* mat, Index stride,
const Scalar* vecX,
const Scalar* vecY,
const Scalar& alpha)
30 for (Index i=0; i<
size; ++i)
33 += (alpha * cj(vecY[i])) * ConjLhsType(OtherMap(vecX+(UpLo==
Lower ? i : 0),UpLo==
Lower ? size-i : (i+1)));
38 template<
typename Scalar,
typename Index,
int UpLo,
bool ConjLhs,
bool ConjRhs>
41 static void run(Index
size, Scalar* mat, Index stride,
const Scalar* vecX,
const Scalar* vecY,
const Scalar& alpha)
43 selfadjoint_rank1_update<Scalar,Index,ColMajor,UpLo==Lower?Upper:Lower,ConjRhs,ConjLhs>::run(size,mat,stride,vecY,vecX,alpha);
47 template<
typename MatrixType,
typename OtherType,
int UpLo,
bool OtherIsVector = OtherType::IsVectorAtCompileTime>
50 template<
typename MatrixType,
typename OtherType,
int UpLo>
56 typedef typename MatrixType::Index Index;
58 typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;
62 Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());
66 UseOtherDirectly = _ActualOtherType::InnerStrideAtCompileTime==1
70 ei_declare_aligned_stack_constructed_variable(Scalar, actualOtherPtr, other.size(),
71 (UseOtherDirectly ?
const_cast<Scalar*
>(actualOther.data()) : static_other.data()));
78 (!OtherBlasTraits::NeedToConjugate) && NumTraits<Scalar>::IsComplex>
79 ::run(other.size(), mat.data(), mat.outerStride(), actualOtherPtr, actualOtherPtr, actualAlpha);
83 template<
typename MatrixType,
typename OtherType,
int UpLo>
89 typedef typename MatrixType::Index Index;
91 typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;
95 Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());
103 ::run(mat.cols(), actualOther.cols(),
104 &actualOther.coeffRef(0,0), actualOther.outerStride(), &actualOther.coeffRef(0,0), actualOther.outerStride(),
105 mat.data(), mat.outerStride(), actualAlpha);
111 template<
typename MatrixType,
unsigned int UpLo>
112 template<
typename DerivedU>
123 #endif // EIGEN_SELFADJOINT_PRODUCT_H Definition: BlasUtil.h:151
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:104
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Definition: GeneralMatrixMatrixTriangular.h:16
Holds information about the various numeric (i.e.
Definition: NumTraits.h:88
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:53
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:264
Definition: BlasUtil.h:41
Definition: GeneralMatrixMatrixTriangular.h:36
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:53
Definition: GeneralProduct.h:370
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:266
Definition: SelfadjointProduct.h:48
View matrix as a lower triangular matrix.
Definition: Constants.h:167
SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1))
Perform a symmetric rank 2 update of the selfadjoint matrix *this: .
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48