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

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

#include <TDMatSVecMultExpr.h>

Inherits blaze::MatVecMultExpr< DenseVector< TDMatSVecMultExpr< MT, VT >, false > >, and blaze::Computation.

Public Types

using This = TDMatSVecMultExpr< MT, VT >
 Type of this TDMatSVecMultExpr instance.
 
using BaseType = MatVecMultExpr< DenseVector< This, false > >
 Base type of this TDMatSVecMultExpr instance.
 
using ResultType = MultTrait_t< MRT, VRT >
 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< MT >, const MT, const MT & >
 Composite type of the left-hand side dense matrix expression.
 
using RightOperand = If_t< IsExpression_v< VT >, const VT, const VT & >
 Composite type of the right-hand side dense vector expression.
 
using LT = If_t< evaluateMatrix, const MRT, MCT >
 Type for the assignment of the left-hand side dense matrix operand.
 
using RT = If_t< evaluateVector, const VRT, CompositeType_t< VT > >
 Type for the assignment of the right-hand side dense matrix operand.
 
using VectorType = TDMatSVecMultExpr< MT, VT >
 Type of the vector.
 

Public Member Functions

 TDMatSVecMultExpr (const MT &mat, const VT &vec) noexcept
 Constructor for the TDMatSVecMultExpr 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 transpose dense matrix operand. More...
 
RightOperand rightOperand () const noexcept
 Returns the right-hand side sparse vector 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...
 
Conversion operators
BLAZE_ALWAYS_INLINE constexpr TDMatSVecMultExpr< MT, VT > & operator~ () noexcept
 CRTP-based conversion operation for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE constexpr const TDMatSVecMultExpr< MT, VT > & operator~ () const noexcept
 CRTP-based conversion operation for constant vectors. More...
 
constexpr TDMatSVecMultExpr< MT, VT > & operator* () noexcept
 CRTP-based conversion operation for non-constant vectors. More...
 
constexpr const TDMatSVecMultExpr< MT, VT > & operator* () const noexcept
 CRTP-based conversion operation 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
 Transpose flag of the vector.
 

Private Types

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

Private Attributes

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

Static Private Attributes

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

Detailed Description

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

Expression object for transpose dense matrix-sparse vector multiplications.

The TDMatSVecMultExpr class represents the compile time expression for multiplications between column-major dense matrices and sparse vectors.

Constructor & Destructor Documentation

◆ TDMatSVecMultExpr()

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

Constructor for the TDMatSVecMultExpr class.

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

Member Function Documentation

◆ at()

template<typename MT , typename VT >
ReturnType blaze::TDMatSVecMultExpr< MT, VT >::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 MT , typename VT >
template<typename T >
bool blaze::TDMatSVecMultExpr< MT, VT >::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 MT , typename VT >
bool blaze::TDMatSVecMultExpr< MT, VT >::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 MT , typename VT >
template<typename T >
bool blaze::TDMatSVecMultExpr< MT, VT >::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 MT , typename VT >
bool blaze::TDMatSVecMultExpr< MT, VT >::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 MT , typename VT >
LeftOperand blaze::TDMatSVecMultExpr< MT, VT >::leftOperand ( ) const
inlinenoexcept

Returns the left-hand side transpose dense matrix operand.

Returns
The left-hand side transpose dense matrix operand.

◆ operator*() [1/2]

BLAZE_ALWAYS_INLINE constexpr const TDMatSVecMultExpr< MT, VT > & blaze::Vector< TDMatSVecMultExpr< MT, VT > , 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 TDMatSVecMultExpr< MT, VT > & blaze::Vector< TDMatSVecMultExpr< MT, VT > , 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 MT , typename VT >
ReturnType blaze::TDMatSVecMultExpr< MT, VT >::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 TDMatSVecMultExpr< MT, VT > & blaze::Vector< TDMatSVecMultExpr< MT, VT > , 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 TDMatSVecMultExpr< MT, VT > & blaze::Vector< TDMatSVecMultExpr< MT, VT > , 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 MT , typename VT >
RightOperand blaze::TDMatSVecMultExpr< MT, VT >::rightOperand ( ) const
inlinenoexcept

Returns the right-hand side sparse vector operand.

Returns
The right-hand side sparse vector operand.

◆ size()

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

Returns the current size/dimension of the vector.

Returns
The size of the vector.

Member Data Documentation

◆ simdEnabled

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

Compilation switch for the expression template evaluation strategy.

◆ smpAssignable

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

Compilation switch for the expression template assignment strategy.


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