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

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

#include <TSVecTDMatMultExpr.h>

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

Public Types

enum  { vectorizable = 0 }
 Compilation switch for the expression template evaluation strategy.
 
enum  { smpAssignable }
 Compilation switch for the expression template assignment strategy.
 
typedef TSVecTDMatMultExpr< VT, MT > This
 Type of this TSVecTDMatMultExpr instance.
 
typedef MultTrait< VRT, MRT >::Type ResultType
 Result type for expression template evaluations.
 
typedef ResultType::TransposeType TransposeType
 Transpose type for expression template evaluations.
 
typedef ResultType::ElementType ElementType
 Resulting element type.
 
typedef const ElementType ReturnType
 Return type for expression template evaluations.
 
typedef SelectType< useAssign, const ResultType, const TSVecTDMatMultExpr & >::Type CompositeType
 Data type for composite expression templates.
 
typedef SelectType< IsExpression< VT >::value, const VT, const VT & >::Type LeftOperand
 Composite type of the left-hand side sparse vector expression.
 
typedef SelectType< IsExpression< MT >::value, const MT, const MT & >::Type RightOperand
 Composite type of the right-hand side sparse matrix expression.
 
typedef SelectType< evaluateVector, const VRT, VCT >::Type LT
 Type for the assignment of the left-hand side sparse vector operand.
 
typedef SelectType< evaluateMatrix, const MRT, MCT >::Type RT
 Type for the assignment of the left-hand side dense matrix operand.
 
typedef VT VectorType
 Type of the vector.
 

Public Member Functions

 TSVecTDMatMultExpr (const VT &vec, const MT &mat)
 Constructor for the TSVecTDMatMultExpr 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
 Returns the current size/dimension of the vector. More...
 
LeftOperand leftOperand () const
 Returns the left-hand side sparse vector operand. More...
 
RightOperand rightOperand () const
 Returns the right-hand side transpose dense matrix operand. More...
 
template<typename T >
bool canAlias (const T *alias) const
 Returns whether the expression can alias with the given address alias. More...
 
template<typename T >
bool isAliased (const T *alias) const
 Returns whether the expression is aliased with the given address alias. More...
 
bool isAligned () const
 Returns whether the operands of the expression are properly aligned in memory. More...
 
bool canSMPAssign () const
 Returns whether the expression can be used in SMP assignments. More...
 
BLAZE_ALWAYS_INLINE VectorTypeoperator~ ()
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE const VectorTypeoperator~ () const
 Conversion operator for constant vectors. More...
 

Private Types

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

Friends

template<typename VT2 >
EnableIf< UseAssign< VT2 > >::Type addAssign (DenseVector< VT2, true > &lhs, const TSVecTDMatMultExpr &rhs)
 Addition assignment of a transpose sparse vector-transpose dense matrix multiplication to a dense vector ( $ \vec{y}^T+=\vec{x}^T*A $). More...
 
template<typename VT2 >
EnableIf< UseAssign< VT2 > >::Type subAssign (DenseVector< VT2, true > &lhs, const TSVecTDMatMultExpr &rhs)
 Subtraction assignment of a transpose sparse vector-transpose dense matrix multiplication to a dense vector ( $ \vec{y}^T-=\vec{x}^T*A $). More...
 
template<typename VT2 >
EnableIf< UseAssign< VT2 > >::Type multAssign (DenseVector< VT2, true > &lhs, const TSVecTDMatMultExpr &rhs)
 Multiplication assignment of a transpose sparse vector-transpose dense matrix multiplication to a dense vector ( $ \vec{y}^T*=\vec{x}^T*A $). More...
 
template<typename VT2 >
EnableIf< UseSMPAssign< VT2 > >::Type smpAddAssign (DenseVector< VT2, true > &lhs, const TSVecTDMatMultExpr &rhs)
 SMP addition assignment of a transpose sparse vector-transpose dense matrix multiplication to a dense vector ( $ \vec{y}^T+=\vec{x}^T*A $). More...
 
template<typename VT2 >
EnableIf< UseSMPAssign< VT2 > >::Type smpSubAssign (DenseVector< VT2, true > &lhs, const TSVecTDMatMultExpr &rhs)
 SMP subtraction assignment of a transpose sparse vector-transpose dense matrix multiplication to a dense vector ( $ \vec{y}^T-=\vec{x}^T*A $). More...
 
template<typename VT2 >
EnableIf< UseSMPAssign< VT2 > >::Type smpMultAssign (DenseVector< VT2, true > &lhs, const TSVecTDMatMultExpr &rhs)
 SMP multiplication assignment of a transpose sparse vector-transpose dense matrix multiplication to a dense vector ( $ \vec{y}^T*=\vec{x}^T*A $). More...
 

Detailed Description

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

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

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

Member Enumeration Documentation

template<typename VT , typename MT >
anonymous enum
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 vector or the matrix operand requires an intermediate evaluation or the sparse 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 VT , typename MT >
blaze::TSVecTDMatMultExpr< VT, MT >::TSVecTDMatMultExpr ( const VT &  vec,
const MT &  mat 
)
inlineexplicit

Constructor for the TSVecTDMatMultExpr 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

template<typename VT , typename MT >
ReturnType blaze::TSVecTDMatMultExpr< 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.
template<typename VT , typename MT >
template<typename T >
bool blaze::TSVecTDMatMultExpr< VT, MT >::canAlias ( const T *  alias) const
inline

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 VT , typename MT >
bool blaze::TSVecTDMatMultExpr< VT, MT >::canSMPAssign ( ) const
inline

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 VT , typename MT >
template<typename T >
bool blaze::TSVecTDMatMultExpr< VT, MT >::isAliased ( const T *  alias) const
inline

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 VT , typename MT >
bool blaze::TSVecTDMatMultExpr< VT, MT >::isAligned ( ) const
inline

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 VT , typename MT >
LeftOperand blaze::TSVecTDMatMultExpr< VT, MT >::leftOperand ( ) const
inline

Returns the left-hand side sparse vector operand.

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

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
inlineinherited

Conversion operator for constant vectors.

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

Returns the right-hand side transpose dense matrix operand.

Returns
The right-hand side transpose dense matrix operand.
template<typename VT , typename MT >
size_t blaze::TSVecTDMatMultExpr< VT, MT >::size ( ) const
inline

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: