Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Static Private Attributes | Friends | List of all members
blaze::TSVecDMatMultExpr< VT, MT > Class Template Reference

Expression object for transpose sparse vector-dense matrix multiplications.The TSVecDMatMultExpr class represents the compile time expression for multiplications between transpose sparse vectors and row-major dense matrices. More...

#include <TSVecDMatMultExpr.h>

Inherits blaze::TVecMatMultExpr< DenseVector< TSVecDMatMultExpr< VT, MT >, true > >, and blaze::Computation.

Public Types

using This = TSVecDMatMultExpr< VT, MT >
 Type of this TSVecDMatMultExpr instance.
 
using BaseType = DenseVector< This, true >
 Base type of this TSVecDMatMultExpr instance.
 
using ResultType = MultTrait_t< VRT, MRT >
 Result type for expression template evaluations.
 
using TransposeType = TransposeType_t< ResultType >
 Transpose type for expression template evaluations.
 
using ElementType = ElementType_t< ResultType >
 Resulting element type.
 
using SIMDType = SIMDTrait_t< ElementType >
 Resulting SIMD element type.
 
using ReturnType = const ElementType
 Return type for expression template evaluations.
 
using CompositeType = const ResultType
 Data type for composite expression templates.
 
using LeftOperand = If_t< IsExpression_v< VT >, const VT, const VT &>
 Composite type of the left-hand side sparse vector expression.
 
using RightOperand = If_t< IsExpression_v< MT >, const MT, const MT &>
 Composite type of the right-hand side sparse matrix expression.
 
using LT = If_t< evaluateVector, const VRT, VCT >
 Type for the assignment of the left-hand side sparse vector operand.
 
using RT = If_t< evaluateMatrix, const MRT, MCT >
 Type for the assignment of the right-hand side dense matrix operand.
 
using VectorType = VT
 Type of the vector.
 

Public Member Functions

 TSVecDMatMultExpr (const VT &vec, const MT &mat) noexcept
 Constructor for the TSVecDMatMultExpr class. More...
 
ReturnType operator[] (size_t index) const
 Subscript operator for the direct access to the vector elements. More...
 
ReturnType at (size_t index) const
 Checked access to the vector elements. More...
 
size_t size () const noexcept
 Returns the current size/dimension of the vector. More...
 
LeftOperand leftOperand () const noexcept
 Returns the left-hand side sparse vector operand. More...
 
RightOperand rightOperand () const noexcept
 Returns the right-hand side dense matrix operand. More...
 
template<typename T >
bool canAlias (const T *alias) const noexcept
 Returns whether the expression can alias with the given address alias. More...
 
template<typename T >
bool isAliased (const T *alias) const noexcept
 Returns whether the expression is aliased with the given address alias. More...
 
bool isAligned () const noexcept
 Returns whether the operands of the expression are properly aligned in memory. More...
 
bool canSMPAssign () const noexcept
 Returns whether the expression can be used in SMP assignments. More...
 
BLAZE_ALWAYS_INLINE constexpr VectorTypeoperator~ () noexcept
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE constexpr const VectorTypeoperator~ () const noexcept
 Conversion operator for constant vectors. More...
 

Static Public Attributes

static constexpr bool simdEnabled
 Compilation switch for the expression template evaluation strategy. More...
 
static constexpr bool smpAssignable
 Compilation switch for the expression template assignment strategy. More...
 
static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size
 The number of elements packed within a single SIMD element.
 
static constexpr bool transposeFlag = TF
 Transpose flag of the vector.
 

Private Types

using VRT = ResultType_t< VT >
 Result type of the left-hand side sparse vector expression.
 
using MRT = ResultType_t< MT >
 Result type of the right-hand side dense matrix expression.
 
using VET = ElementType_t< VRT >
 Element type of the left-hand side sparse vector expression.
 
using MET = ElementType_t< MRT >
 Element type of the right-hand side dense matrix expression.
 
using VCT = CompositeType_t< VT >
 Composite type of the left-hand side sparse vector expression.
 
using MCT = CompositeType_t< MT >
 Composite type of the right-hand side dense matrix expression.
 

Private Attributes

LeftOperand vec_
 Left-hand side sparse vector of the multiplication expression.
 
RightOperand mat_
 Right-hand side dense matrix of the multiplication expression.
 

Static Private Attributes

static constexpr bool evaluateVector = ( IsComputation_v<VT> || RequiresEvaluation_v<VT> )
 Compilation switch for the composite type of the left-hand side sparse vector expression.
 
static constexpr bool evaluateMatrix = RequiresEvaluation_v<MT>
 Compilation switch for the composite type of the right-hand side dense matrix expression.
 

Friends

template<typename VT2 >
void addAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
 Addition assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T+=\vec{x}^T*A $). More...
 
template<typename VT2 >
void subAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
 Subtraction assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T-=\vec{x}^T*A $). More...
 
template<typename VT2 >
void multAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
 Multiplication assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T*=\vec{x}^T*A $). More...
 
template<typename VT2 >
void divAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs)
 Division assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T/=\vec{x}^T*A $). More...
 
template<typename VT2 >
auto smpAddAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
 SMP addition assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T+=\vec{x}^T*A $). More...
 
template<typename VT2 >
auto smpSubAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
 SMP subtraction assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T-=\vec{x}^T*A $). More...
 
template<typename VT2 >
auto smpMultAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
 SMP multiplication assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T*=\vec{x}^T*A $). More...
 
template<typename VT2 >
auto smpDivAssign (DenseVector< VT2, true > &lhs, const TSVecDMatMultExpr &rhs) -> EnableIf_t< UseSMPAssign_v< VT2 > >
 SMP division assignment of a transpose sparse vector-dense matrix multiplication to a dense vector ( $ \vec{y}^T/=\vec{x}^T*A $). More...
 

Detailed Description

template<typename VT, typename MT>
class blaze::TSVecDMatMultExpr< VT, MT >

Expression object for transpose sparse vector-dense matrix multiplications.

The TSVecDMatMultExpr class represents the compile time expression for multiplications between transpose sparse vectors and row-major dense matrices.

Constructor & Destructor Documentation

◆ TSVecDMatMultExpr()

template<typename VT , typename MT >
blaze::TSVecDMatMultExpr< VT, MT >::TSVecDMatMultExpr ( const VT &  vec,
const MT &  mat 
)
inlineexplicitnoexcept

Constructor for the TSVecDMatMultExpr class.

Parameters
vecThe left-hand side sparse vector operand of the multiplication expression.
matThe right-hand side dense matrix operand of the multiplication expression.

Member Function Documentation

◆ at()

template<typename VT , typename MT >
ReturnType blaze::TSVecDMatMultExpr< VT, MT >::at ( size_t  index) const
inline

Checked access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
The resulting value.
Exceptions
std::out_of_rangeInvalid vector access index.

◆ canAlias()

template<typename VT , typename MT >
template<typename T >
bool blaze::TSVecDMatMultExpr< VT, MT >::canAlias ( const T *  alias) const
inlinenoexcept

Returns whether the expression can alias with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the expression can alias, false otherwise.

◆ canSMPAssign()

template<typename VT , typename MT >
bool blaze::TSVecDMatMultExpr< VT, MT >::canSMPAssign ( ) const
inlinenoexcept

Returns whether the expression can be used in SMP assignments.

Returns
true in case the expression can be used in SMP assignments, false if not.

◆ isAliased()

template<typename VT , typename MT >
template<typename T >
bool blaze::TSVecDMatMultExpr< VT, MT >::isAliased ( const T *  alias) const
inlinenoexcept

Returns whether the expression is aliased with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case an alias effect is detected, false otherwise.

◆ isAligned()

template<typename VT , typename MT >
bool blaze::TSVecDMatMultExpr< VT, MT >::isAligned ( ) const
inlinenoexcept

Returns whether the operands of the expression are properly aligned in memory.

Returns
true in case the operands are aligned, false if not.

◆ leftOperand()

template<typename VT , typename MT >
LeftOperand blaze::TSVecDMatMultExpr< VT, MT >::leftOperand ( ) const
inlinenoexcept

Returns the left-hand side sparse vector operand.

Returns
The left-hand side sparse vector operand.

◆ operator[]()

template<typename VT , typename MT >
ReturnType blaze::TSVecDMatMultExpr< VT, MT >::operator[] ( size_t  index) const
inline

Subscript operator for the direct access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
The resulting value.

◆ operator~() [1/2]

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE constexpr VectorType& blaze::Vector< VT, TF >::operator~ ( )
inlinenoexceptinherited

Conversion operator for non-constant vectors.

Returns
Reference of the actual type of the vector.

◆ operator~() [2/2]

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE constexpr const VectorType& blaze::Vector< VT, TF >::operator~ ( ) const
inlinenoexceptinherited

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.

◆ rightOperand()

template<typename VT , typename MT >
RightOperand blaze::TSVecDMatMultExpr< VT, MT >::rightOperand ( ) const
inlinenoexcept

Returns the right-hand side dense matrix operand.

Returns
The right-hand side dense matrix operand.

◆ size()

template<typename VT , typename MT >
size_t blaze::TSVecDMatMultExpr< VT, MT >::size ( ) const
inlinenoexcept

Returns the current size/dimension of the vector.

Returns
The size of the vector.

Member Data Documentation

◆ simdEnabled

template<typename VT , typename MT >
constexpr bool blaze::TSVecDMatMultExpr< VT, MT >::simdEnabled
static
Initial value:
=
( !IsDiagonal_v<MT> &&
MT::simdEnabled &&
HasSIMDAdd_v<VET,MET> &&
HasSIMDMult_v<VET,MET> )

Compilation switch for the expression template evaluation strategy.

◆ smpAssignable

template<typename VT , typename MT >
constexpr bool blaze::TSVecDMatMultExpr< VT, MT >::smpAssignable
static
Initial value:

Compilation switch for the expression template assignment strategy.


The documentation for this class was generated from the following files: