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

Expression object for the transposition of a dense vector.The DVecTransposer class is a wrapper object for the temporary transposition of a dense vector. More...

#include <DVecTransposer.h>

Inherits blaze::DenseVector< DVecTransposer< VT, TF >, TF >.

Public Types

using This = DVecTransposer< VT, TF >
 Type of this DVecTransposer instance.
 
using BaseType = DenseVector< This, TF >
 Base type of this DVecTransposer instance.
 
using ResultType = TransposeType_t< VT >
 Result type for expression template evaluations.
 
using TransposeType = ResultType_t< VT >
 Transpose type for expression template evaluations.
 
using ElementType = ElementType_t< VT >
 Type of the vector elements.
 
using SIMDType = SIMDTrait_t< ElementType >
 SIMD type of the vector elements.
 
using ReturnType = ReturnType_t< VT >
 Return type for expression template evaluations.
 
using CompositeType = const This &
 Data type for composite expression templates.
 
using Reference = Reference_t< VT >
 Reference to a non-constant vector value.
 
using ConstReference = ConstReference_t< VT >
 Reference to a constant vector value.
 
using Pointer = Pointer_t< VT >
 Pointer to a non-constant vector value.
 
using ConstPointer = ConstPointer_t< VT >
 Pointer to a constant vector value.
 
using Iterator = Iterator_t< VT >
 Iterator over non-constant elements.
 
using ConstIterator = ConstIterator_t< VT >
 Iterator over constant elements.
 
using VectorType = VT
 Type of the vector.
 

Public Member Functions

 DVecTransposer (VT &dv) noexcept
 Constructor for the DVecTransposer class. More...
 
Reference operator[] (size_t index)
 Subscript operator for the direct access to the vector elements. More...
 
ConstReference operator[] (size_t index) const
 Subscript operator for the direct access to the vector elements. More...
 
Reference at (size_t index)
 Checked access to the vector elements. More...
 
ConstReference at (size_t index) const
 Checked access to the vector elements. More...
 
Pointer data () noexcept
 Low-level data access to the vector elements. More...
 
ConstPointer data () const noexcept
 Low-level data access to the vector elements. More...
 
Iterator begin ()
 Returns an iterator to the first element of the dense vector. More...
 
ConstIterator begin () const
 Returns an iterator to the first element of the dense vector. More...
 
ConstIterator cbegin () const
 Returns an iterator to the first element of the dense vector. More...
 
Iterator end ()
 Returns an iterator just past the last element of the dense vector. More...
 
ConstIterator end () const
 Returns an iterator just past the last element of the dense vector. More...
 
ConstIterator cend () const
 Returns an iterator just past the last element of the dense vector. More...
 
size_t size () const noexcept
 Returns the current size/dimension of the vector. More...
 
void reset ()
 Resets the vector elements. More...
 
bool isIntact () const noexcept
 Returns whether the invariants of the vector are intact. More...
 
template<typename Other >
bool canAlias (const Other *alias) const noexcept
 Returns whether the vector can alias with the given address alias. More...
 
template<typename Other >
bool isAliased (const Other *alias) const noexcept
 Returns whether the vector is aliased with the given address alias. More...
 
bool isAligned () const noexcept
 Returns whether the vector is properly aligned in memory. More...
 
bool canSMPAssign () const noexcept
 Returns whether the vector can be used in SMP assignments. More...
 
BLAZE_ALWAYS_INLINE SIMDType load (size_t index) const noexcept
 Load of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE SIMDType loada (size_t index) const noexcept
 Aligned load of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE SIMDType loadu (size_t index) const noexcept
 Unaligned load of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void store (size_t index, const SIMDType &value) noexcept
 Store of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void storea (size_t index, const SIMDType &value) noexcept
 Aligned store of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void storeu (size_t index, const SIMDType &value) noexcept
 Unaligned store of a SIMD element of the vector. More...
 
BLAZE_ALWAYS_INLINE void stream (size_t index, const SIMDType &value) noexcept
 Aligned, non-temporal store of a SIMD element of the vector. More...
 
template<typename VT2 >
void assign (const Vector< VT2, TF > &rhs)
 Implementation of the transpose assignment of a vector. More...
 
template<typename VT2 >
void addAssign (const Vector< VT2, TF > &rhs)
 Implementation of the transpose addition assignment of a vector. More...
 
template<typename VT2 >
void subAssign (const Vector< VT2, TF > &rhs)
 Implementation of the transpose subtraction assignment of a vector. More...
 
template<typename VT2 >
void multAssign (const Vector< VT2, TF > &rhs)
 Implementation of the transpose multiplication assignment of a vector. More...
 
template<typename VT2 >
void divAssign (const DenseVector< VT2, TF > &rhs)
 Implementation of the transpose division assignment of a dense vector. 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 = VT::simdEnabled
 Compilation flag for SIMD optimization. More...
 
static constexpr bool smpAssignable = VT::smpAssignable
 Compilation flag for SMP assignments. More...
 
static constexpr bool transposeFlag = TF
 Transpose flag of the vector.
 

Private Attributes

VT & dv_
 The dense vector operand.
 

Detailed Description

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

Expression object for the transposition of a dense vector.

The DVecTransposer class is a wrapper object for the temporary transposition of a dense vector.

Constructor & Destructor Documentation

◆ DVecTransposer()

template<typename VT, bool TF>
blaze::DVecTransposer< VT, TF >::DVecTransposer ( VT &  dv)
inlineexplicitnoexcept

Constructor for the DVecTransposer class.

Parameters
dvThe dense vector operand.

Member Function Documentation

◆ addAssign()

template<typename VT, bool TF>
template<typename VT2 >
void blaze::DVecTransposer< VT, TF >::addAssign ( const Vector< VT2, TF > &  rhs)
inline

Implementation of the transpose addition assignment of a vector.

Parameters
rhsThe right-hand side vector to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ assign()

template<typename VT, bool TF>
template<typename VT2 >
void blaze::DVecTransposer< VT, TF >::assign ( const Vector< VT2, TF > &  rhs)
inline

Implementation of the transpose assignment of a vector.

Parameters
rhsThe right-hand side vector to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ at() [1/2]

template<typename VT, bool TF>
Reference blaze::DVecTransposer< VT, TF >::at ( size_t  index)
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.

◆ at() [2/2]

template<typename VT, bool TF>
ConstReference blaze::DVecTransposer< VT, TF >::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() [1/2]

template<typename VT, bool TF>
Iterator blaze::DVecTransposer< VT, TF >::begin ( )
inline

Returns an iterator to the first element of the dense vector.

Returns
Iterator to the first element of the dense vector.

◆ begin() [2/2]

template<typename VT, bool TF>
ConstIterator blaze::DVecTransposer< VT, TF >::begin ( ) const
inline

Returns an iterator to the first element of the dense vector.

Returns
Iterator to the first element of the dense vector.

◆ canAlias()

template<typename VT, bool TF>
template<typename Other >
bool blaze::DVecTransposer< VT, TF >::canAlias ( const Other *  alias) const
inlinenoexcept

Returns whether the vector can alias with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the alias corresponds to this vector, false if not.

◆ canSMPAssign()

template<typename VT, bool TF>
bool blaze::DVecTransposer< VT, TF >::canSMPAssign ( ) const
inlinenoexcept

Returns whether the vector can be used in SMP assignments.

Returns
true in case the vector can be used in SMP assignments, false if not.

◆ cbegin()

template<typename VT, bool TF>
ConstIterator blaze::DVecTransposer< VT, TF >::cbegin ( ) const
inline

Returns an iterator to the first element of the dense vector.

Returns
Iterator to the first element of the dense vector.

◆ cend()

template<typename VT, bool TF>
ConstIterator blaze::DVecTransposer< VT, TF >::cend ( ) const
inline

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

Returns
Iterator just past the last element of the dense vector.

◆ data() [1/2]

template<typename VT, bool TF>
Pointer blaze::DVecTransposer< VT, TF >::data ( )
inlinenoexcept

Low-level data access to the vector elements.

Returns
Pointer to the internal element storage.

◆ data() [2/2]

template<typename VT, bool TF>
ConstPointer blaze::DVecTransposer< VT, TF >::data ( ) const
inlinenoexcept

Low-level data access to the vector elements.

Returns
Pointer to the internal element storage.

◆ divAssign()

template<typename VT, bool TF>
template<typename VT2 >
void blaze::DVecTransposer< VT, TF >::divAssign ( const DenseVector< VT2, TF > &  rhs)
inline

Implementation of the transpose division assignment of a dense vector.

Parameters
rhsThe right-hand side dense vector divisor.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ end() [1/2]

template<typename VT, bool TF>
Iterator blaze::DVecTransposer< VT, TF >::end ( )
inline

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

Returns
Iterator just past the last element of the dense vector.

◆ end() [2/2]

template<typename VT, bool TF>
ConstIterator blaze::DVecTransposer< VT, TF >::end ( ) const
inline

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

Returns
Iterator just past the last element of the dense vector.

◆ isAliased()

template<typename VT, bool TF>
template<typename Other >
bool blaze::DVecTransposer< VT, TF >::isAliased ( const Other *  alias) const
inlinenoexcept

Returns whether the vector is aliased with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the alias corresponds to this vector, false if not.

◆ isAligned()

template<typename VT, bool TF>
bool blaze::DVecTransposer< VT, TF >::isAligned ( ) const
inlinenoexcept

Returns whether the vector is properly aligned in memory.

Returns
true in case the vector is aligned, false if not.

◆ isIntact()

template<typename VT, bool TF>
bool blaze::DVecTransposer< VT, TF >::isIntact ( ) const
inlinenoexcept

Returns whether the invariants of the vector are intact.

Returns
true in case the vector's invariants are intact, false otherwise.

◆ load()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE SIMDType blaze::DVecTransposer< VT, TF >::load ( size_t  index) const
inlinenoexcept

Load of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
Returns
The loaded SIMD element.

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ loada()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE SIMDType blaze::DVecTransposer< VT, TF >::loada ( size_t  index) const
inlinenoexcept

Aligned load of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
Returns
The loaded SIMD element.

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ loadu()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE SIMDType blaze::DVecTransposer< VT, TF >::loadu ( size_t  index) const
inlinenoexcept

Unaligned load of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
Returns
The loaded SIMD element.

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ multAssign()

template<typename VT, bool TF>
template<typename VT2 >
void blaze::DVecTransposer< VT, TF >::multAssign ( const Vector< VT2, TF > &  rhs)
inline

Implementation of the transpose multiplication assignment of a vector.

Parameters
rhsThe right-hand side vector to be multiplied.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

◆ operator[]() [1/2]

template<typename VT, bool TF>
Reference blaze::DVecTransposer< VT, TF >::operator[] ( size_t  index)
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
Reference to the accessed value.

◆ operator[]() [2/2]

template<typename VT, bool TF>
ConstReference blaze::DVecTransposer< 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
Reference to the accessed 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.

◆ reset()

template<typename VT, bool TF>
void blaze::DVecTransposer< VT, TF >::reset ( )
inline

Resets the vector elements.

Returns
void

◆ size()

template<typename VT, bool TF>
size_t blaze::DVecTransposer< VT, TF >::size ( ) const
inlinenoexcept

Returns the current size/dimension of the vector.

Returns
The size of the vector.

◆ store()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE void blaze::DVecTransposer< VT, TF >::store ( size_t  index,
const SIMDType value 
)
inlinenoexcept

Store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ storea()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE void blaze::DVecTransposer< VT, TF >::storea ( size_t  index,
const SIMDType value 
)
inlinenoexcept

Aligned store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ storeu()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE void blaze::DVecTransposer< VT, TF >::storeu ( size_t  index,
const SIMDType value 
)
inlinenoexcept

Unaligned store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ stream()

template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE void blaze::DVecTransposer< VT, TF >::stream ( size_t  index,
const SIMDType value 
)
inlinenoexcept

Aligned, non-temporal store of a SIMD element of the vector.

Parameters
indexAccess index. The index must be smaller than the number of vector elements.
valueThe SIMD element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

◆ subAssign()

template<typename VT, bool TF>
template<typename VT2 >
void blaze::DVecTransposer< VT, TF >::subAssign ( const Vector< VT2, TF > &  rhs)
inline

Implementation of the transpose subtraction assignment of a vector.

Parameters
rhsThe right-hand side vector to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

Member Data Documentation

◆ simdEnabled

template<typename VT, bool TF>
constexpr bool blaze::DVecTransposer< VT, TF >::simdEnabled = VT::simdEnabled
static

Compilation flag for SIMD optimization.

The simdEnabled compilation flag indicates whether expressions the vector is involved in can be optimized via SIMD operations. In case the dense vector operand is vectorizable, the simdEnabled compilation flag is set to true, otherwise it is set to false.

◆ smpAssignable

template<typename VT, bool TF>
constexpr bool blaze::DVecTransposer< VT, TF >::smpAssignable = VT::smpAssignable
static

Compilation flag for SMP assignments.

The smpAssignable compilation flag indicates whether the vector can be used in SMP (shared memory parallel) assignments (both on the left-hand and right-hand side of the assignment).


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