Blaze  3.6
Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | List of all members
blaze::SMatReduceExpr< MT, OP, columnwise > Class Template Reference

Expression object for column-wise row-major sparse matrix reduction operations.This specialization of the SMatReduceExpr class template represents the compile time expression for column-wise reduction operations of row-major sparse matrices. More...

#include <SMatReduceExpr.h>

Inherits blaze::MatReduceExpr< DenseVector< SMatReduceExpr< MT, OP, columnwise >, true >, columnwise >, and blaze::Computation.

Public Types

using This = SMatReduceExpr< MT, OP, columnwise >
 Type of this SMatReduceExpr instance.
 
using BaseType = DenseVector< This, true >
 Base type of this SMatReduceExpr instance.
 
using ResultType = ReduceTrait_t< RT, OP, columnwise >
 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 SIMDType = SIMDTrait_t< ElementType >
 Resulting SIMD element type.
 
using ReturnType = const ElementType
 Return type for expression template evaluations.
 
using CompositeType = const ResultType
 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 Operation = OP
 Data type of the custom unary operation.
 
using VectorType = VT
 Type of the vector.
 

Public Member Functions

 SMatReduceExpr (const MT &sm, OP op) noexcept
 Constructor for the SMatReduceExpr 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...
 
Operand operand () const noexcept
 Returns the sparse matrix operand. More...
 
Operation operation () const
 Returns a copy of the reduction operation. 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 constexpr VectorTypeoperator~ () noexcept
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE constexpr const VectorTypeoperator~ () const noexcept
 Conversion operator for constant vectors. More...
 

Static Public Attributes

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

Private Types

using RT = ResultType_t< MT >
 Result type of the sparse matrix expression.
 
using OT = OppositeType_t< MT >
 Opposite type of the sparse matrix expression.
 
using ET = ElementType_t< MT >
 Element type of the sparse matrix expression.
 
using CT = CompositeType_t< MT >
 Composite type of the sparse matrix expression.
 

Private Attributes

Operand sm_
 Sparse matrix of the reduction expression.
 
Operation op_
 The reduction operation.
 

Detailed Description

template<typename MT, typename OP>
class blaze::SMatReduceExpr< MT, OP, columnwise >

Expression object for column-wise row-major sparse matrix reduction operations.

This specialization of the SMatReduceExpr class template represents the compile time expression for column-wise reduction operations of row-major sparse matrices.

Constructor & Destructor Documentation

◆ SMatReduceExpr()

template<typename MT , typename OP >
blaze::SMatReduceExpr< MT, OP, columnwise >::SMatReduceExpr ( const MT &  sm,
OP  op 
)
inlineexplicitnoexcept

Constructor for the SMatReduceExpr class.

Parameters
smThe matrix operand of the reduction expression.
opThe reduction operation.

Member Function Documentation

◆ at()

template<typename MT , typename OP >
ReturnType blaze::SMatReduceExpr< MT, OP, columnwise >::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.

◆ canAlias()

template<typename MT , typename OP >
template<typename T >
bool blaze::SMatReduceExpr< MT, OP, columnwise >::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.

◆ canSMPAssign()

template<typename MT , typename OP >
bool blaze::SMatReduceExpr< MT, OP, columnwise >::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.

◆ isAliased()

template<typename MT , typename OP >
template<typename T >
bool blaze::SMatReduceExpr< MT, OP, columnwise >::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 , typename OP >
bool blaze::SMatReduceExpr< MT, OP, columnwise >::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 , typename OP >
Operand blaze::SMatReduceExpr< MT, OP, columnwise >::operand ( ) const
inlinenoexcept

Returns the sparse matrix operand.

Returns
The sparse matrix operand.

◆ operation()

template<typename MT , typename OP >
Operation blaze::SMatReduceExpr< MT, OP, columnwise >::operation ( ) const
inline

Returns a copy of the reduction operation.

Returns
A copy of the reduction operation.

◆ operator[]()

template<typename MT , typename OP >
ReturnType blaze::SMatReduceExpr< MT, OP, columnwise >::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]

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE constexpr VectorType& blaze::Vector< VT, TF >::operator~ ( )
inlinenoexceptinherited

Conversion operator for non-constant vectors.

Returns
Reference of the actual type of the vector.

◆ operator~() [2/2]

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE constexpr const VectorType& blaze::Vector< VT, TF >::operator~ ( ) const
inlinenoexceptinherited

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.

◆ size()

template<typename MT , typename OP >
size_t blaze::SMatReduceExpr< MT, OP, columnwise >::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 file: