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

Expression object for the forced serial evaluation of sparse vectors.The SVecSerialExpr class represents the compile time expression for the forced serial evaluation of a sparse vector. More...

#include <SVecSerialExpr.h>

Inherits blaze::SparseVector< SVecSerialExpr< VT, TF >, TF >, blaze::VecSerialExpr, and blaze::Computation.

Public Types

enum  { smpAssignable = VT::smpAssignable }
 Compilation switch for the expression template assignment strategy.
 
typedef SVecSerialExpr< VT, TF > This
 Type of this SVecSerialExpr instance.
 
typedef VT::ResultType ResultType
 Result type for expression template evaluations.
 
typedef VT::TransposeType TransposeType
 Transpose type for expression template evaluations.
 
typedef VT::ElementType ElementType
 Resulting element type.
 
typedef VT::ReturnType ReturnType
 Return type for expression template evaluations.
 
typedef const ResultType CompositeType
 Data type for composite expression templates.
 
typedef SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
 Composite data type of the sparse vector expression.
 
typedef SVecSerialExpr< VT, TF > VectorType
 Type of the vector.
 

Public Member Functions

 SVecSerialExpr (const VT &sv)
 Constructor for the SVecSerialExpr 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...
 
size_t nonZeros () const
 Returns the number of non-zero elements in the sparse vector. More...
 
Operand operand () const
 Returns the sparse vector operand. More...
 
 operator Operand () const
 Conversion to the type of the 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...
 
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 Attributes

Operand sv_
 Sparse vector of the serial evaluation expression.
 

Detailed Description

template<typename VT, bool TF>
class blaze::SVecSerialExpr< VT, TF >

Expression object for the forced serial evaluation of sparse vectors.

The SVecSerialExpr class represents the compile time expression for the forced serial evaluation of a sparse vector.

Constructor & Destructor Documentation

template<typename VT , bool TF>
blaze::SVecSerialExpr< VT, TF >::SVecSerialExpr ( const VT &  sv)
inlineexplicit

Constructor for the SVecSerialExpr class.

Parameters
svThe sparse vector operand of the serial evaluation expression.

Member Function Documentation

template<typename VT , bool TF>
template<typename T >
bool blaze::SVecSerialExpr< VT, TF >::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 , bool TF>
bool blaze::SVecSerialExpr< VT, TF >::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 , bool TF>
template<typename T >
bool blaze::SVecSerialExpr< VT, TF >::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 , bool TF>
size_t blaze::SVecSerialExpr< VT, TF >::nonZeros ( ) const
inline

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

Returns
The number of non-zero elements in the sparse vector.
template<typename VT , bool TF>
Operand blaze::SVecSerialExpr< VT, TF >::operand ( ) const
inline

Returns the sparse vector operand.

Returns
The sparse vector operand.
template<typename VT , bool TF>
blaze::SVecSerialExpr< VT, TF >::operator Operand ( ) const
inline

Conversion to the type of the sparse vector operand.

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

Conversion operator for non-constant vectors.

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

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.
template<typename VT , bool TF>
size_t blaze::SVecSerialExpr< VT, TF >::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: