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

Expression object for the row-wise variance function on row-major sparse matrices. More...

#include <SMatVarExpr.h>

Inherits blaze::MatReduceExpr< DenseVector< SMatVarExpr< MT, rowwise >, false >, rowwise >, and blaze::Computation.

Classes

class  ConstIterator
 Iterator over the elements of the dense vector. More...
 

Public Types

using This = SMatVarExpr< MT, rowwise >
 Type of this SMatVarExpr instance.
 
using BaseType = MatReduceExpr< DenseVector< This, false >, rowwise >
 Base type of this SMatVarExpr instance.
 
using ResultType = ReduceTrait_t< RT, InvAdd, rowwise >
 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 ReturnType = const ElementType
 Return type for expression template evaluations.
 
using CompositeType = If_t< useAssign, const ResultType, const SMatVarExpr & >
 Data type for composite expression templates.
 
using Operand = If_t< IsExpression_v< MT >, const MT, const MT & >
 Composite type of the left-hand side sparse matrix expression.
 
using VectorType = SMatVarExpr< MT, rowwise >
 Type of the vector.
 

Public Member Functions

 SMatVarExpr (const MT &sm) noexcept
 Constructor for the SMatVarExpr 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...
 
ConstIterator begin () const
 Returns an iterator to the first non-zero element of the dense vector. More...
 
ConstIterator end () const
 Returns an iterator just past the last non-zero element of the dense vector. More...
 
size_t size () const noexcept
 Returns the current size/dimension of the vector. More...
 
Operand operand () const noexcept
 Returns the sparse matrix 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...
 
Conversion operators
BLAZE_ALWAYS_INLINE constexpr SMatVarExpr< MT, rowwise > & operator~ () noexcept
 CRTP-based conversion operation for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE constexpr const SMatVarExpr< MT, rowwise > & operator~ () const noexcept
 CRTP-based conversion operation for constant vectors. More...
 
constexpr SMatVarExpr< MT, rowwise > & operator* () noexcept
 CRTP-based conversion operation for non-constant vectors. More...
 
constexpr const SMatVarExpr< MT, rowwise > & operator* () const noexcept
 CRTP-based conversion operation for constant vectors. More...
 

Static Public Attributes

static constexpr bool simdEnabled = false
 Compilation switch for the expression template evaluation strategy.
 
static constexpr bool smpAssignable = false
 Compilation switch for the expression template assignment strategy.
 
static constexpr bool transposeFlag
 Transpose flag of the vector.
 

Private Types

using RT = ResultType_t< MT >
 Result type of the sparse matrix expression.
 

Private Attributes

Operand sm_
 Sparse matrix of the variance expression.
 

Static Private Attributes

static constexpr bool useAssign = RequiresEvaluation_v<MT>
 Compilation switch for the serial evaluation strategy of the variance expression. More...
 

Detailed Description

template<typename MT>
class blaze::SMatVarExpr< MT, rowwise >

Expression object for the row-wise variance function on row-major sparse matrices.

This specialization of the SMatVarExpr class template represents the compile time expression for the row-wise variance function on row-major sparse matrices.

Constructor & Destructor Documentation

◆ SMatVarExpr()

template<typename MT >
blaze::SMatVarExpr< MT, rowwise >::SMatVarExpr ( const MT &  sm)
inlineexplicitnoexcept

Constructor for the SMatVarExpr class.

Parameters
smThe matrix operand of the variance expression.

Member Function Documentation

◆ at()

template<typename MT >
ReturnType blaze::SMatVarExpr< MT, rowwise >::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.

◆ begin()

template<typename MT >
ConstIterator blaze::SMatVarExpr< MT, rowwise >::begin ( ) const
inline

Returns an iterator to the first non-zero element of the dense vector.

Returns
Iterator to the first non-zero element of the dense vector.

◆ canAlias()

template<typename MT >
template<typename T >
bool blaze::SMatVarExpr< MT, rowwise >::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 an aliasing effect is possible, false if not.

◆ end()

template<typename MT >
ConstIterator blaze::SMatVarExpr< MT, rowwise >::end ( ) const
inline

Returns an iterator just past the last non-zero element of the dense vector.

Returns
Iterator just past the last non-zero element of the dense vector.

◆ isAliased()

template<typename MT >
template<typename T >
bool blaze::SMatVarExpr< MT, rowwise >::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 the given alias is contained in this expression, false if not.

◆ isAligned()

template<typename MT >
bool blaze::SMatVarExpr< MT, rowwise >::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.

◆ operand()

template<typename MT >
Operand blaze::SMatVarExpr< MT, rowwise >::operand ( ) const
inlinenoexcept

Returns the sparse matrix operand.

Returns
The sparse matrix operand.

◆ operator*() [1/2]

BLAZE_ALWAYS_INLINE constexpr const SMatVarExpr< MT, rowwise > & blaze::Vector< SMatVarExpr< MT, rowwise > , 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 SMatVarExpr< MT, rowwise > & blaze::Vector< SMatVarExpr< MT, rowwise > , 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 >
ReturnType blaze::SMatVarExpr< MT, rowwise >::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 SMatVarExpr< MT, rowwise > & blaze::Vector< SMatVarExpr< MT, rowwise > , 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 SMatVarExpr< MT, rowwise > & blaze::Vector< SMatVarExpr< MT, rowwise > , 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.

◆ size()

template<typename MT >
size_t blaze::SMatVarExpr< MT, rowwise >::size ( ) const
inlinenoexcept

Returns the current size/dimension of the vector.

Returns
The size of the vector.

Member Data Documentation

◆ useAssign

template<typename MT >
constexpr bool blaze::SMatVarExpr< MT, rowwise >::useAssign = RequiresEvaluation_v<MT>
staticconstexprprivate

Compilation switch for the serial evaluation strategy of the variance expression.

The useAssign compile time constant expression represents a compilation switch for the serial evaluation strategy of the variance expression. In case the sparse matrix operand requires an intermediate evaluation, useAssign will be set to 1 and the variance expression will be evaluated via the assign function family. Otherwise useAssign will be set to 0 and the expression will be evaluated via the subscript operator.


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