10 #ifndef EIGEN_SELFADJOINT_PRODUCT_H
11 #define EIGEN_SELFADJOINT_PRODUCT_H
20 #include "../InternalHeaderCheck.h"
24 template <
typename Scalar,
typename Index,
int UpLo,
bool ConjLhs,
bool ConjRhs>
29 typedef std::conditional_t<ConjLhs, typename OtherMap::ConjugateReturnType, const OtherMap&> ConjLhsType;
34 ConjLhsType(OtherMap(vecX + (UpLo ==
Lower ?
i : 0), UpLo ==
Lower ?
size -
i : (
i + 1)));
39 template <
typename Scalar,
typename Index,
int UpLo,
bool ConjLhs,
bool ConjRhs>
47 template <
typename MatrixType,
typename OtherType,
int UpLo,
bool OtherIsVector = OtherType::IsVectorAtCompileTime>
50 template <
typename MatrixType,
typename OtherType,
int UpLo>
55 typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;
59 Scalar actualAlpha =
alpha * OtherBlasTraits::extractScalarFactor(other.derived());
63 UseOtherDirectly = ActualOtherType_::InnerStrideAtCompileTime == 1
70 Scalar, actualOtherPtr, other.size(),
71 (UseOtherDirectly ?
const_cast<Scalar*
>(actualOther.data()) : static_other.data()));
73 if (!UseOtherDirectly)
79 mat.outerStride(), actualOtherPtr,
80 actualOtherPtr, actualAlpha);
84 template <
typename MatrixType,
typename OtherType,
int UpLo>
89 typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;
93 Scalar actualAlpha =
alpha * OtherBlasTraits::extractScalarFactor(other.derived());
97 OtherIsRowMajor = ActualOtherType_::Flags &
RowMajorBit ? 1 : 0
101 Index depth = actualOther.cols();
104 MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime,
105 ActualOtherType_::MaxColsAtCompileTime>
108 BlockingType blocking(
size,
size, depth, 1,
false);
114 MatrixType::InnerStrideAtCompileTime, UpLo>::
run(
size, depth, actualOther.data(), actualOther.outerStride(),
115 actualOther.data(), actualOther.outerStride(),
mat.
data(),
116 mat.innerStride(),
mat.outerStride(), actualAlpha, blocking);
122 template <
typename MatrixType,
unsigned int UpLo>
123 template <
typename DerivedU>
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define ei_declare_aligned_stack_constructed_variable(TYPE, NAME, SIZE, BUFFER)
Definition: Memory.h:806
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:51
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
Definition: SelfAdjointView.h:62
EIGEN_DEVICE_FUNC SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1))
Index cols() const
Definition: SparseMatrix.h:161
constexpr Storage & data()
Definition: SparseMatrix.h:205
Definition: GeneralMatrixMatrix.h:223
@ Lower
Definition: Constants.h:211
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
const unsigned int RowMajorBit
Definition: Constants.h:70
RealScalar alpha
Definition: level1_cplx_impl.h:151
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
typename add_const_on_value_type< T >::type add_const_on_value_type_t
Definition: Meta.h:274
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: BlasUtil.h:459
Definition: ConjHelper.h:42
Definition: GeneralProduct.h:228
Definition: GeneralMatrixMatrixTriangular.h:39
Definition: ForwardDeclarations.h:21
static void run(MatrixType &mat, const OtherType &other, const typename MatrixType::Scalar &alpha)
Definition: SelfadjointProduct.h:86
static void run(MatrixType &mat, const OtherType &other, const typename MatrixType::Scalar &alpha)
Definition: SelfadjointProduct.h:52
Definition: SelfadjointProduct.h:48
static void run(Index size, Scalar *mat, Index stride, const Scalar *vecX, const Scalar *vecY, const Scalar &alpha)
Definition: SelfadjointProduct.h:26
static void run(Index size, Scalar *mat, Index stride, const Scalar *vecX, const Scalar *vecY, const Scalar &alpha)
Definition: SelfadjointProduct.h:41
Definition: GeneralMatrixMatrixTriangular.h:19
void run(const string &dir_name, LinearSolver *linear_solver_pt, const unsigned nel_1d, bool mess_up_order)
Definition: two_d_poisson_compare_solvers.cc:317