All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
blaze::DMatSVecMultExpr< MT, VT > Class Template Reference

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

#include <DMatSVecMultExpr.h>

Inherits blaze::DenseVector< DMatSVecMultExpr< MT, VT >, false >, blaze::Expression, and blaze::Computation.

Public Types

enum  { vectorizable = 0 }
 Compilation switch for the expression template evaluation strategy.
 
typedef DMatSVecMultExpr< MT, VT > This
 Type of this DMatSVecMultExpr instance.
 
typedef MultTrait< MRT, VRT >::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
DMatSVecMultExpr & >::Type 
CompositeType
 Data type for composite expression templates.
 
typedef SelectType
< IsExpression< MT >::value,
const MT, const MT & >::Type 
LeftOperand
 Composite type of the left-hand side dense matrix expression.
 
typedef SelectType
< IsExpression< VT >::value,
const VT, const VT & >::Type 
RightOperand
 Composite type of the right-hand side dense vector expression.
 
typedef MCT LT
 Type for the assignment of the left-hand side dense matrix operand.
 
typedef SelectType
< IsComputation< VT >::value,
const VRT, VCT >::Type 
RT
 Type for the assignment of the right-hand side dense matrix operand.
 
typedef VT VectorType
 Type of the vector.
 

Public Member Functions

 DMatSVecMultExpr (const MT &mat, const VT &vec)
 Constructor for the DMatSVecMultExpr class. More...
 
ReturnType operator[] (size_t index) const
 Subscript operator for the direct 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 dense matrix operand. More...
 
RightOperand rightOperand () const
 Returns the right-hand side sparse vector 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...
 
VectorTypeoperator~ ()
 Conversion operator for non-constant vectors. More...
 
const VectorTypeoperator~ () const
 Conversion operator for constant vectors. More...
 

Private Types

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

Detailed Description

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

Expression object for dense matrix-sparse vector multiplications.

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

Member Enumeration Documentation

template<typename MT, typename VT>
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 the dense matrix expression requires an intermediate evaluation or the sparse vector expression is a compound expression, useAssign will be set to true and the addition 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::DMatSVecMultExpr< MT, VT >::DMatSVecMultExpr ( const MT &  mat,
const VT &  vec 
)
inlineexplicit

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

template<typename MT, typename VT>
template<typename T >
bool blaze::DMatSVecMultExpr< MT, VT >::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 given alias is contained in this expression, false if not.
template<typename MT, typename VT>
template<typename T >
bool blaze::DMatSVecMultExpr< MT, VT >::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 the given alias is contained in this expression, false if not.
template<typename MT, typename VT>
LeftOperand blaze::DMatSVecMultExpr< MT, VT >::leftOperand ( ) const
inline

Returns the left-hand side dense matrix operand.

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

Conversion operator for non-constant vectors.

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

Conversion operator for constant vectors.

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

Returns the right-hand side sparse vector operand.

Returns
The right-hand side sparse vector operand.
template<typename MT, typename VT>
size_t blaze::DMatSVecMultExpr< MT, VT >::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 file: