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

Expression object for sparse vector-sparse matrix multiplications. More...

#include <TSVecSMatMultExpr.h>

Inherits blaze::TVecMatMultExpr< SparseVector< TSVecSMatMultExpr< VT, MT >, true > >, and blaze::Computation.

Public Types

using This = TSVecSMatMultExpr< VT, MT >
 Type of this TSVecSMatMultExpr instance.
 
using BaseType = TVecMatMultExpr< SparseVector< This, true > >
 Base type of this TSVecSMatMultExpr 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 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 sparse matrix operand.
 
using VectorType = TSVecSMatMultExpr< VT, MT >
 Type of the vector.
 

Public Member Functions

 TSVecSMatMultExpr (const VT &vec, const MT &mat) noexcept
 Constructor for the TSVecSMatMultExpr 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...
 
size_t nonZeros () const
 Returns an estimation for the number of non-zero elements in the sparse vector. More...
 
LeftOperand leftOperand () const noexcept
 Returns the left-hand side sparse vector operand. More...
 
RightOperand rightOperand () const noexcept
 Returns the right-hand side sparse 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 canSMPAssign () const noexcept
 Returns whether the expression can be used in SMP assignments. More...
 
Conversion operators
BLAZE_ALWAYS_INLINE constexpr TSVecSMatMultExpr< VT, MT > & operator~ () noexcept
 CRTP-based conversion operation for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE constexpr const TSVecSMatMultExpr< VT, MT > & operator~ () const noexcept
 CRTP-based conversion operation for constant vectors. More...
 
constexpr TSVecSMatMultExpr< VT, MT > & operator* () noexcept
 CRTP-based conversion operation for non-constant vectors. More...
 
constexpr const TSVecSMatMultExpr< VT, MT > & operator* () const noexcept
 CRTP-based conversion operation for constant vectors. More...
 

Static Public Attributes

static constexpr bool smpAssignable
 Compilation switch for the expression template assignment strategy. More...
 
static constexpr bool transposeFlag
 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 sparse 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 sparse matrix expression.
 

Private Attributes

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

Static Private Attributes

static constexpr bool evaluateVector = IsComputation_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 sparse matrix expression.
 

Detailed Description

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

Expression object for sparse vector-sparse matrix multiplications.

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

Constructor & Destructor Documentation

◆ TSVecSMatMultExpr()

template<typename VT , typename MT >
blaze::TSVecSMatMultExpr< VT, MT >::TSVecSMatMultExpr ( const VT &  vec,
const MT &  mat 
)
inlinenoexcept

Constructor for the TSVecSMatMultExpr class.

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

Member Function Documentation

◆ at()

template<typename VT , typename MT >
ReturnType blaze::TSVecSMatMultExpr< 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::TSVecSMatMultExpr< 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::TSVecSMatMultExpr< 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::TSVecSMatMultExpr< 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.

◆ leftOperand()

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

Returns the left-hand side sparse vector operand.

Returns
The left-hand side sparse vector operand.

◆ nonZeros()

template<typename VT , typename MT >
size_t blaze::TSVecSMatMultExpr< VT, MT >::nonZeros ( ) const
inline

Returns an estimation for the number of non-zero elements in the sparse vector.

Returns
The estimate for the number of non-zero elements in the sparse vector.

◆ operator*() [1/2]

BLAZE_ALWAYS_INLINE constexpr const TSVecSMatMultExpr< VT, MT > & blaze::Vector< TSVecSMatMultExpr< VT, MT > , TF >::operator*
constexprnoexceptinherited

CRTP-based conversion operation for constant vectors.

Returns
Const reference of the actual type of the vector.

This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a constant reference to the actual type VT.

◆ operator*() [2/2]

BLAZE_ALWAYS_INLINE constexpr TSVecSMatMultExpr< VT, MT > & blaze::Vector< TSVecSMatMultExpr< VT, MT > , TF >::operator*
constexprnoexceptinherited

CRTP-based conversion operation for non-constant vectors.

Returns
Mutable reference of the actual type of the vector.

This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a mutable reference to the actual type VT.

◆ operator[]()

template<typename VT , typename MT >
ReturnType blaze::TSVecSMatMultExpr< 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]

BLAZE_ALWAYS_INLINE constexpr const TSVecSMatMultExpr< VT, MT > & blaze::Vector< TSVecSMatMultExpr< VT, MT > , TF >::operator~
constexprnoexceptinherited

CRTP-based conversion operation for constant vectors.

Returns
Constant reference of the actual type of the vector.

This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a constant reference to the actual type VT.

◆ operator~() [2/2]

BLAZE_ALWAYS_INLINE constexpr TSVecSMatMultExpr< VT, MT > & blaze::Vector< TSVecSMatMultExpr< VT, MT > , TF >::operator~
constexprnoexceptinherited

CRTP-based conversion operation for non-constant vectors.

Returns
Mutable reference of the actual type of the vector.

This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a mutable reference to the actual type VT.

◆ rightOperand()

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

Returns the right-hand side sparse matrix operand.

Returns
The right-hand side sparse matrix operand.

◆ size()

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

Returns the current size/dimension of the vector.

Returns
The size of the vector.

Member Data Documentation

◆ smpAssignable

template<typename VT , typename MT >
constexpr bool blaze::TSVecSMatMultExpr< VT, MT >::smpAssignable
staticconstexpr
Initial value:
=
( !evaluateVector && VT::smpAssignable && !evaluateMatrix && MT::smpAssignable )
static constexpr bool evaluateMatrix
Compilation switch for the composite type of the right-hand side sparse matrix expression.
Definition: TSVecSMatMultExpr.h:120
static constexpr bool evaluateVector
Compilation switch for the composite type of the left-hand side sparse vector expression.
Definition: TSVecSMatMultExpr.h:115

Compilation switch for the expression template assignment strategy.


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