35#ifndef _BLAZE_MATH_EXPRESSIONS_TDVECTSMATMULTEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_TDVECTSMATMULTEXPR_H_
95 :
public TVecMatMultExpr< DenseVector< TDVecTSMatMultExpr<VT,MT>, true > >
130 template<
typename VT2 >
131 static constexpr bool UseAssign_v =
useAssign;
141 template<
typename T1 >
142 static constexpr bool UseSMPAssign_v =
useAssign;
215 if( index >=
mat_.columns() ) {
218 return (*
this)[index];
227 inline size_t size() const noexcept {
228 return mat_.columns();
258 template<
typename T >
259 inline bool canAlias(
const T* alias )
const noexcept {
260 return (
vec_.isAliased( alias ) ||
mat_.isAliased( alias ) );
270 template<
typename T >
271 inline bool isAliased(
const T* alias )
const noexcept {
272 return (
vec_.isAliased( alias ) ||
mat_.isAliased( alias ) );
282 return vec_.isAligned();
292 return (
size() > SMP_TDVECTSMATMULT_THRESHOLD );
317 template<
typename VT2 >
325 if( rhs.mat_.rows() == 0UL ) {
357 template<
typename VT2 >
389 template<
typename VT2 >
397 if( rhs.mat_.rows() == 0UL ) {
432 template<
typename VT2 >
440 if( rhs.mat_.rows() == 0UL ) {
475 template<
typename VT2 >
511 template<
typename VT2 >
546 template<
typename VT2 >
554 if( rhs.mat_.rows() == 0UL ) {
585 template<
typename VT2 >
616 template<
typename VT2 >
624 if( rhs.mat_.rows() == 0UL ) {
658 template<
typename VT2 >
666 if( rhs.mat_.rows() == 0UL ) {
700 template<
typename VT2 >
735 template<
typename VT2 >
796inline const TDVecTSMatMultExpr<VT,MT>
797 tdvectsmatmult(
const DenseVector<VT,true>& vec,
const SparseMatrix<MT,true>& mat )
872 return ReturnType( (*mat).columns() );
918 if( (*vec).size() != (*mat).rows() ) {
922 return tdvectsmatmult( *vec, *mat );
937template<
typename VT,
typename MT >
938struct IsAligned< TDVecTSMatMultExpr<VT,MT> >
939 :
public IsAligned<VT>
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition Aliases.h:550
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for run time assertion macros.
Header file for the blaze::checked and blaze::unchecked instances.
Constraints on the storage order of matrix types.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the If class template.
Header file for the IsAligned type trait.
Header file for the IsComputation type trait class.
Header file for the IsExpression type trait class.
Header file for the IsIdentity type trait.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Constraint on the transpose flag of vector types.
Constraint on the data type.
Base class for N-dimensional dense vectors.
Definition DenseVector.h:77
Base class for sparse matrices.
Definition SparseMatrix.h:77
Base class for sparse vectors.
Definition SparseVector.h:72
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition TDVecTSMatMultExpr.h:180
If_t< IsExpression_v< VT >, const VT, const VT & > LeftOperand
Composite type of the left-hand side dense vector expression.
Definition TDVecTSMatMultExpr.h:163
If_t< evaluateVector, const VRT, VCT > LT
Composite type of the left-hand side dense vector expression.
Definition TDVecTSMatMultExpr.h:169
CompositeType_t< VT > VCT
Composite type of the left-hand side dense vector expression.
Definition TDVecTSMatMultExpr.h:102
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition TDVecTSMatMultExpr.h:237
CompositeType_t< MT > MCT
Composite type of the right-hand side sparse matrix expression.
Definition TDVecTSMatMultExpr.h:103
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition TDVecTSMatMultExpr.h:281
static constexpr bool evaluateMatrix
Compilation switch for the composite type of the right-hand side sparse matrix expression.
Definition TDVecTSMatMultExpr.h:113
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition TDVecTSMatMultExpr.h:214
If_t< evaluateMatrix, const MRT, MCT > RT
Composite type of the right-hand side sparse matrix expression.
Definition TDVecTSMatMultExpr.h:172
ElementType_t< ResultType > ElementType
Resulting element type.
Definition TDVecTSMatMultExpr.h:156
const ElementType ReturnType
Return type for expression template evaluations.
Definition TDVecTSMatMultExpr.h:157
static constexpr bool useAssign
Compilation switch for the evaluation strategy of the multiplication expression.
Definition TDVecTSMatMultExpr.h:124
static constexpr bool evaluateVector
Compilation switch for the composite type of the left-hand side dense vector expression.
Definition TDVecTSMatMultExpr.h:108
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition TDVecTSMatMultExpr.h:271
ResultType_t< VT > VRT
Result type of the left-hand side dense vector expression.
Definition TDVecTSMatMultExpr.h:100
MultTrait_t< VRT, MRT > ResultType
Result type for expression template evaluations.
Definition TDVecTSMatMultExpr.h:154
If_t< IsExpression_v< MT >, const MT, const MT & > RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition TDVecTSMatMultExpr.h:166
If_t< useAssign, const ResultType, const TDVecTSMatMultExpr & > CompositeType
Data type for composite expression templates.
Definition TDVecTSMatMultExpr.h:160
TDVecTSMatMultExpr(const VT &vec, const MT &mat) noexcept
Constructor for the TDVecTSMatMultExpr class.
Definition TDVecTSMatMultExpr.h:187
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition TDVecTSMatMultExpr.h:201
TVecMatMultExpr< DenseVector< This, true > > BaseType
Base type of this TDVecTSMatMultExpr instance.
Definition TDVecTSMatMultExpr.h:152
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition TDVecTSMatMultExpr.h:291
TDVecTSMatMultExpr< VT, MT > This
Type of this TDVecTSMatMultExpr instance.
Definition TDVecTSMatMultExpr.h:149
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition TDVecTSMatMultExpr.h:155
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition TDVecTSMatMultExpr.h:177
RightOperand rightOperand() const noexcept
Returns the right-hand side transpose sparse matrix operand.
Definition TDVecTSMatMultExpr.h:247
RightOperand mat_
Right-hand side sparse matrix of the multiplication expression.
Definition TDVecTSMatMultExpr.h:299
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition TDVecTSMatMultExpr.h:259
LeftOperand vec_
Left-hand side dense vector of the multiplication expression.
Definition TDVecTSMatMultExpr.h:298
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition TDVecTSMatMultExpr.h:227
ResultType_t< MT > MRT
Result type of the right-hand side sparse matrix expression.
Definition TDVecTSMatMultExpr.h:101
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseVector base class.
Header file for the TVecMatMultExpr base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition Column.h:137
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition DMatSerialExpr.h:812
friend auto addAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Addition assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vec...
Definition TDVecTSMatMultExpr.h:390
friend auto smpAddAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP addition assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense...
Definition TDVecTSMatMultExpr.h:617
friend auto assign(SparseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Assignment of a transpose dense vector-transpose sparse matrix multiplication to a sparse vector ( ).
Definition TDVecTSMatMultExpr.h:358
friend auto divAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Division assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vec...
Definition TDVecTSMatMultExpr.h:512
friend auto smpAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vector (...
Definition TDVecTSMatMultExpr.h:547
friend auto subAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Subtraction assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense ...
Definition TDVecTSMatMultExpr.h:433
friend auto smpDivAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP division assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense...
Definition TDVecTSMatMultExpr.h:736
friend auto assign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Assignment of a transpose dense vector-transpose sparse matrix multiplication to a dense vector ( ).
Definition TDVecTSMatMultExpr.h:318
friend auto multAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseAssign_v< VT2 > >
Multiplication assignment of a transpose dense vector-transpose sparse matrix multiplication to a den...
Definition TDVecTSMatMultExpr.h:476
friend auto smpMultAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP multiplication assignment of a transpose dense vector-transpose sparse matrix multiplication to a...
Definition TDVecTSMatMultExpr.h:701
friend auto smpSubAssign(DenseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP subtraction assignment of a transpose dense vector-transpose sparse matrix multiplication to a de...
Definition TDVecTSMatMultExpr.h:659
friend auto smpAssign(SparseVector< VT2, true > &lhs, const TDVecTSMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
SMP assignment of a transpose dense vector-transpose sparse matrix multiplication to a sparse vector ...
Definition TDVecTSMatMultExpr.h:586
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_TVECMATMULTEXPR(T1, T2)
Constraint on the data type.
Definition TVecMatMultExpr.h:104
#define BLAZE_CONSTRAINT_MUST_NOT_BE_MATMATMULTEXPR_TYPE(T)
Constraint on the data type.
Definition MatMatMultExpr.h:83
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition Zero.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition SparseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.
Definition RowVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition ColumnMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.
Definition Zero.h:61
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition MultTrait.h:165
constexpr bool RequiresEvaluation_v
Auxiliary variable template for the RequiresEvaluation type trait.
Definition RequiresEvaluation.h:91
constexpr bool IsComputation_v
Auxiliary variable template for the IsComputation type trait.
Definition IsComputation.h:90
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.
Definition IsZero.h:166
constexpr bool IsIdentity_v
Auxiliary variable template for the IsIdentity type trait.
Definition IsIdentity.h:137
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition Matrix.h:806
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition IsSame.h:159
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition If.h:108
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
constexpr Unchecked unchecked
Global Unchecked instance.
Definition Check.h:146
Header file for the exception macros of the math module.
Header file for all forward declarations for expression class templates.
Header file for the reset shim.
Header file for the serial shim.
Base class for all compute expression templates.
Definition Computation.h:68
Base class for all vector/matrix multiplication expression templates.
Definition TVecMatMultExpr.h:69
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the IsZero type trait.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.