10 #ifndef EIGEN_SPARSEPRODUCT_H
11 #define EIGEN_SPARSEPRODUCT_H
29 template <
typename Derived>
30 template <
typename OtherDerived>
39 template <
typename Lhs,
typename Rhs,
int ProductType>
41 template <
typename Dest>
47 template <
typename Dest,
typename ActualLhs>
48 static void addTo(Dest& dst,
const ActualLhs& lhs,
const Rhs& rhs,
52 LhsNested lhsNested(lhs);
53 RhsNested rhsNested(rhs);
55 lhsNested, rhsNested, dst);
59 template <
typename Dest>
62 addTo(dst, -lhs, rhs);
67 template <
typename Dest>
71 LhsNested lhsNested(lhs);
72 RhsNested rhsNested(rhs);
74 lhsNested, rhsNested, dst);
78 template <
typename Dest>
86 template <
typename Lhs,
typename Rhs,
int ProductType>
91 template <
typename Lhs,
typename Rhs,
int ProductType>
96 template <
typename DstXprType,
typename Lhs,
typename Rhs>
99 internal::
assign_op<typename DstXprType::Scalar, typename Product<Lhs, Rhs, AliasFreeProduct>::Scalar>,
106 if ((dst.rows() != dstRows) || (dst.cols() != dstCols)) dst.resize(dstRows, dstCols);
113 template <
typename DstXprType,
typename Lhs,
typename Rhs>
116 internal::
add_assign_op<typename DstXprType::Scalar, typename Product<Lhs, Rhs, AliasFreeProduct>::Scalar>,
126 template <
typename DstXprType,
typename Lhs,
typename Rhs>
129 internal::
sub_assign_op<typename DstXprType::Scalar, typename Product<Lhs, Rhs, AliasFreeProduct>::Scalar>,
138 template <
typename Lhs,
typename Rhs,
int Options>
140 :
public evaluator<typename Product<Lhs, Rhs, DefaultProduct>::PlainObject> {
147 internal::construct_at<Base>(
this, m_result);
165 template <
typename Scalar,
int Options_,
typename StorageIndex_>
166 template <
typename Lhs,
typename Rhs>
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:202
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: Product.h:227
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const LhsNestedCleaned & lhs() const
Definition: Product.h:230
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const RhsNestedCleaned & rhs() const
Definition: Product.h:231
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: Product.h:228
SparseMatrix< Scalar_, Options_, StorageIndex_ > & operator=(const SparseMatrix< Scalar_, Options_, StorageIndex_ > &other)
Definition: SparseAssign.h:43
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:30
const Product< Derived, OtherDerived > operator*(const DiagonalBase< OtherDerived > &other) const
Definition: SparseMatrixBase.h:296
const Derived & derived() const
Definition: SparseMatrixBase.h:144
A versatible sparse matrix representation.
Definition: SparseMatrix.h:121
Expression of a dense or sparse matrix with zero or too small values removed.
Definition: SparseView.h:45
Scalar reference() const
Definition: SparseView.h:67
const internal::remove_all_t< MatrixTypeNested > & nestedExpression() const
Definition: SparseView.h:65
RealScalar epsilon() const
Definition: SparseView.h:68
@ AliasFreeProduct
Definition: Constants.h:505
@ Lhs
Definition: TensorContractionMapper.h:20
@ Rhs
Definition: TensorContractionMapper.h:20
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
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
squared absolute value
Definition: GlobalFunctions.h:87
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t< std::is_base_of< DenseBase< std::decay_t< DerivedA > >, std::decay_t< DerivedA > >::value &&std::is_base_of< DenseBase< std::decay_t< DerivedB > >, std::decay_t< DerivedB > >::value, void > swap(DerivedA &&a, DerivedB &&b)
Definition: DenseBase.h:655
Definition: Eigen_Colamd.h:49
Definition: Constants.h:540
Definition: Constants.h:570
Product< Lhs, Rhs, AliasFreeProduct > SrcXprType
Definition: SparseProduct.h:131
static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: SparseProduct.h:132
static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: SparseProduct.h:119
Product< Lhs, Rhs, AliasFreeProduct > SrcXprType
Definition: SparseProduct.h:118
Product< Lhs, Rhs, AliasFreeProduct > SrcXprType
Definition: SparseProduct.h:101
static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: SparseProduct.h:102
Definition: AssignEvaluator.h:773
Definition: Constants.h:580
Definition: SparseAssign.h:61
Definition: SparseUtil.h:152
Template functor for scalar/packet assignment with addition.
Definition: AssignmentFunctors.h:52
Template functor for scalar/packet assignment.
Definition: AssignmentFunctors.h:25
Definition: ConservativeSparseSparseProduct.h:121
storage_kind_to_shape< typename traits< T >::StorageKind >::Shape Shape
Definition: CoreEvaluators.h:90
Definition: CoreEvaluators.h:104
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, DenseShape)
Definition: SparseProduct.h:79
static void addTo(Dest &dst, const ActualLhs &lhs, const Rhs &rhs, std::enable_if_t< is_same< typename evaluator_traits< Dest >::Shape, DenseShape >::value, int * > *=0)
Definition: SparseProduct.h:48
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, SparseShape)
Definition: SparseProduct.h:68
static void subTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, std::enable_if_t< is_same< typename evaluator_traits< Dest >::Shape, DenseShape >::value, int * > *=0)
Definition: SparseProduct.h:60
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Definition: SparseProduct.h:42
Definition: ProductEvaluators.h:78
std::conditional_t< Evaluate, PlainObject, typename ref_selector< T >::type > type
Definition: XprHelper.h:549
Definition: SparseSparseProductWithPruning.h:83
Definition: ConservativeSparseSparseProduct.h:269
Template functor for scalar/packet assignment with subtraction.
Definition: AssignmentFunctors.h:73
evaluator< PlainObject > Base
Definition: SparseProduct.h:143
SparseView< Product< Lhs, Rhs, Options > > XprType
Definition: SparseProduct.h:141
XprType::PlainObject PlainObject
Definition: SparseProduct.h:142
unary_evaluator(const XprType &xpr)
Definition: SparseProduct.h:145
PlainObject m_result
Definition: SparseProduct.h:159
Definition: CoreEvaluators.h:82