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

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

#include <SMatDVecMultExpr.h>

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

Public Types

enum  : bool { simdEnabled = false }
 Compilation switch for the expression template evaluation strategy.
 
enum  : bool { smpAssignable }
 Compilation switch for the expression template assignment strategy.
 
typedef SMatDVecMultExpr< MT, VT > This
 Type of this SMatDVecMultExpr instance.
 
typedef MultTrait_< MRT, VRTResultType
 Result type for expression template evaluations.
 
typedef TransposeType_< ResultTypeTransposeType
 Transpose type for expression template evaluations.
 
typedef ElementType_< ResultTypeElementType
 Resulting element type.
 
typedef const ElementType ReturnType
 Return type for expression template evaluations.
 
typedef IfTrue_< useAssign, const ResultType, const SMatDVecMultExpr & > CompositeType
 Data type for composite expression templates.
 
typedef If_< IsExpression< MT >, const MT, const MT & > LeftOperand
 Composite type of the left-hand side sparse matrix expression.
 
typedef If_< IsExpression< VT >, const VT, const VT & > RightOperand
 Composite type of the right-hand side dense vector expression.
 
typedef IfTrue_< evaluateMatrix, const MRT, MCTLT
 Type for the assignment of the left-hand side sparse matrix operand.
 
typedef IfTrue_< evaluateVector, const VRT, VCTRT
 Type for the assignment of the right-hand side dense matrix operand.
 
typedef VT VectorType
 Type of the vector.
 

Public Member Functions

 SMatDVecMultExpr (const MT &mat, const VT &vec) noexcept
 Constructor for the SMatDVecMultExpr 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 matrix operand. More...
 
RightOperand rightOperand () const noexcept
 Returns the right-hand side dense 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...
 
BLAZE_ALWAYS_INLINE VectorTypeoperator~ () noexcept
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE const VectorTypeoperator~ () const noexcept
 Conversion operator for constant vectors. More...
 

Private Types

enum  : bool { evaluateMatrix = RequiresEvaluation<MT>::value }
 Compilation switch for the composite type of the left-hand side sparse matrix expression.
 
enum  : bool { evaluateVector = IsComputation<VT>::value || RequiresEvaluation<VT>::value }
 Compilation switch for the composite type of the right-hand side dense vector expression.
 
enum  : bool { useAssign = evaluateMatrix || evaluateVector }
 Compilation switch for the evaluation strategy of the multiplication expression. More...
 
typedef ResultType_< MT > MRT
 Result type of the left-hand side sparse matrix expression.
 
typedef ResultType_< VT > VRT
 Result type of the right-hand side dense vector expression.
 
typedef CompositeType_< MT > MCT
 Composite type of the left-hand side sparse matrix expression.
 
typedef CompositeType_< VT > VCT
 Composite type of the right-hand side dense vector expression.
 

Private Attributes

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

Detailed Description

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

Expression object for sparse matrix-dense vector multiplications.

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

Member Enumeration Documentation

template<typename MT , typename VT >
anonymous enum : bool
private

Compilation switch for the evaluation strategy of the multiplication expression.

The useAssign compile time constant expression represents a compilation switch for the evaluation strategy of the multiplication expression. In case either the matrix or the vector operand requires an intermediate evaluation or the dense vector expression is a compound expression, useAssign will be set to true and the multiplication expression will be evaluated via the assign function family. Otherwise useAssign will be set to false and the expression will be evaluated via the subscript operator.

Constructor & Destructor Documentation

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

Constructor for the SMatDVecMultExpr class.

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

Member Function Documentation

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

Returns the left-hand side sparse matrix operand.

Returns
The left-hand side sparse matrix operand.
template<typename MT , typename VT >
ReturnType blaze::SMatDVecMultExpr< 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.
template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE VectorType& blaze::Vector< VT, TF >::operator~ ( )
inlinenoexceptinherited

Conversion operator for non-constant vectors.

Returns
Reference of the actual type of the vector.
template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE const VectorType& blaze::Vector< VT, TF >::operator~ ( ) const
inlinenoexceptinherited

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.
template<typename MT , typename VT >
RightOperand blaze::SMatDVecMultExpr< MT, VT >::rightOperand ( ) const
inlinenoexcept

Returns the right-hand side dense vector operand.

Returns
The right-hand side dense vector operand.
template<typename MT , typename VT >
size_t blaze::SMatDVecMultExpr< MT, VT >::size ( ) const
inlinenoexcept

Returns the current size/dimension of the vector.

Returns
The size of the vector.

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