10 #ifndef EIGEN_SELFADJOINTRANK2UPTADE_H 11 #define EIGEN_SELFADJOINTRANK2UPTADE_H 21 template<
typename Scalar,
typename Index,
typename UType,
typename VType,
int UpLo>
24 template<
typename Scalar,
typename Index,
typename UType,
typename VType>
27 static void run(Scalar* mat,
Index stride,
const UType& u,
const VType& v,
const Scalar& alpha)
29 const Index size = u.size();
30 for (
Index i=0; i<size; ++i)
33 (numext::conj(alpha) * numext::conj(u.coeff(i))) * v.tail(size-i)
34 + (alpha * numext::conj(v.coeff(i))) * u.tail(size-i);
39 template<
typename Scalar,
typename Index,
typename UType,
typename VType>
42 static void run(Scalar* mat,
Index stride,
const UType& u,
const VType& v,
const Scalar& alpha)
44 const Index size = u.size();
45 for (
Index i=0; i<size; ++i)
47 (numext::conj(alpha) * numext::conj(u.coeff(i))) * v.head(i+1)
48 + (alpha * numext::conj(v.coeff(i))) * u.head(i+1);
54 CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T> > {};
58 template<
typename MatrixType,
unsigned int UpLo>
59 template<
typename DerivedU,
typename DerivedV>
64 typedef typename UBlasTraits::DirectLinearAccessType ActualUType;
69 typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
77 Scalar actualAlpha = alpha * UBlasTraits::extractScalarFactor(u.derived())
78 * numext::conj(VBlasTraits::extractScalarFactor(v.derived()));
80 actualAlpha = numext::conj(actualAlpha);
86 ::run(_expression().const_cast_derived().data(),_expression().outerStride(),UType(actualU),VType(actualV),actualAlpha);
93 #endif // EIGEN_SELFADJOINTRANK2UPTADE_H Definition: BlasUtil.h:269
Definition: SelfadjointRank2Update.h:52
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:88
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:61
View matrix as a lower triangular matrix.
Definition: Constants.h:204
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:49
Definition: SelfadjointRank2Update.h:22
EIGEN_DEVICE_FUNC 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: .
View matrix as an upper triangular matrix.
Definition: Constants.h:206
Definition: BandTriangularSolver.h:13
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17