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

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

#include <DMatReduceExpr.h>

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

Classes

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

Public Types

using This = DMatReduceExpr< MT, OP, rowwise >
 Type of this DMatReduceExpr instance.
 
using BaseType = DenseVector< This, false >
 Base type of this DMatReduceExpr instance.
 
using ResultType = ReduceTrait_t< RT, OP, 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 SIMDType = SIMDTrait_t< ElementType >
 Resulting SIMD element type.
 
using ReturnType = const ElementType
 Return type for expression template evaluations.
 
using CompositeType = If_t< useAssign, const ResultType, const DMatReduceExpr & >
 Data type for composite expression templates.
 
using Operand = If_t< IsExpression_v< MT >, const MT, const MT & >
 Composite type of the left-hand side dense matrix expression.
 
using Operation = OP
 Data type of the custom unary operation.
 
using VectorType = VT
 Type of the vector.
 

Public Member Functions

 DMatReduceExpr (const MT &dm, OP op) noexcept
 Constructor for the DMatReduceExpr 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 dense 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 dense matrix expression.
 
using ET = ElementType_t< MT >
 Element type of the dense matrix expression.
 

Private Attributes

Operand dm_
 Dense matrix of the reduction expression.
 
Operation op_
 The reduction operation.
 

Static Private Attributes

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

Detailed Description

template<typename MT, typename OP>
class blaze::DMatReduceExpr< MT, OP, rowwise >

Expression object for row-wise row-major dense matrix reduction operations.

This specialization of the DMatReduceExpr class template represents the compile time expression for row-wise reduction operations of row-major dense matrices.

Constructor & Destructor Documentation

◆ DMatReduceExpr()

template<typename MT , typename OP >
blaze::DMatReduceExpr< MT, OP, rowwise >::DMatReduceExpr ( const MT &  dm,
OP  op 
)
inlineexplicitnoexcept

Constructor for the DMatReduceExpr class.

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

Member Function Documentation

◆ at()

template<typename MT , typename OP >
ReturnType blaze::DMatReduceExpr< MT, OP, 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 , typename OP >
ConstIterator blaze::DMatReduceExpr< MT, OP, 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 , typename OP >
template<typename T >
bool blaze::DMatReduceExpr< MT, OP, 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.

◆ canSMPAssign()

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

◆ end()

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

Returns the dense matrix operand.

Returns
The dense matrix operand.

◆ operation()

template<typename MT , typename OP >
Operation blaze::DMatReduceExpr< MT, OP, rowwise >::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::DMatReduceExpr< MT, OP, 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]

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::DMatReduceExpr< MT, OP, 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 , typename OP >
constexpr bool blaze::DMatReduceExpr< MT, OP, rowwise >::useAssign = RequiresEvaluation_v<MT>
staticprivate

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

The useAssign compile time constant expression represents a compilation switch for the serial evaluation strategy of the reduction expression. In case the dense matrix operand requires an intermediate evaluation, useAssign will be set to 1 and the reduction 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: