Public Types | Public Member Functions | 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

enum  : bool { simdEnabled = VT::simdEnabled }
 Compilation flag for SIMD optimization. More...
 
enum  : bool { smpAssignable = VT::smpAssignable }
 Compilation flag for SMP assignments. More...
 
typedef DVecTransposer< VT, TF > This
 Type of this DVecTransposer instance.
 
typedef TransposeType_< VT > ResultType
 Result type for expression template evaluations.
 
typedef ResultType_< VT > TransposeType
 Transpose type for expression template evaluations.
 
typedef ElementType_< VT > ElementType
 Type of the vector elements.
 
typedef SIMDTrait_< ElementTypeSIMDType
 SIMD type of the vector elements.
 
typedef ReturnType_< VT > ReturnType
 Return type for expression template evaluations.
 
typedef const ThisCompositeType
 Data type for composite expression templates.
 
typedef Reference_< VT > Reference
 Reference to a non-constant vector value.
 
typedef ConstReference_< VT > ConstReference
 Reference to a constant vector value.
 
typedef Pointer_< VT > Pointer
 Pointer to a non-constant vector value.
 
typedef ConstPointer_< VT > ConstPointer
 Pointer to a constant vector value.
 
typedef Iterator_< VT > Iterator
 Iterator over non-constant elements.
 
typedef ConstIterator_< VT > ConstIterator
 Iterator over constant elements.
 
typedef VT VectorType
 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...
 
template<typename Other >
EnableIf_< IsNumeric< Other >, DVecTransposer > & operator*= (Other rhs)
 Multiplication assignment operator for the multiplication between a vector and a scalar value ( $ \vec{a}*=s $). More...
 
template<typename Other >
EnableIf_< IsNumeric< Other >, DVecTransposer > & operator/= (Other rhs)
 Division assignment operator for the division of a vector by a scalar value ( $ \vec{a}/=s $). More...
 
size_t size () const noexcept
 Returns the current size/dimension of the vector. More...
 
void reset ()
 Resets the vector elements. 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 DenseVector< VT2, TF > &rhs)
 Implementation of the transpose assignment of a dense vector. More...
 
template<typename VT2 >
void assign (const SparseVector< VT2, TF > &rhs)
 Implementation of the transpose assignment of a sparse vector. More...
 
template<typename VT2 >
void addAssign (const DenseVector< VT2, TF > &rhs)
 Implementation of the transpose addition assignment of a dense vector. More...
 
template<typename VT2 >
void addAssign (const SparseVector< VT2, TF > &rhs)
 Implementation of the transpose addition assignment of a sparse vector. More...
 
template<typename VT2 >
void subAssign (const DenseVector< VT2, TF > &rhs)
 Implementation of the transpose subtraction assignment of a dense vector. More...
 
template<typename VT2 >
void subAssign (const SparseVector< VT2, TF > &rhs)
 Implementation of the transpose subtraction assignment of a sparse vector. More...
 
template<typename VT2 >
void multAssign (const DenseVector< VT2, TF > &rhs)
 Implementation of the transpose multiplication assignment of a dense vector. More...
 
template<typename VT2 >
void multAssign (const SparseVector< VT2, TF > &rhs)
 Implementation of the transpose multiplication assignment of a sparse 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 VectorTypeoperator~ () noexcept
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE const VectorTypeoperator~ () const noexcept
 Conversion operator for constant vectors. More...
 

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.

Member Enumeration Documentation

template<typename VT, bool TF>
anonymous enum : bool

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.

template<typename VT, bool TF>
anonymous enum : bool

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).

Constructor & Destructor Documentation

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

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

Implementation of the transpose addition assignment of a dense vector.

Parameters
rhsThe right-hand side dense 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.

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

Implementation of the transpose addition assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse 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.

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

Implementation of the transpose assignment of a dense vector.

Parameters
rhsThe right-hand side dense 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.

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

Implementation of the transpose assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse 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.

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.

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.
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.
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.
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.
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.

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.

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.

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

Implementation of the transpose multiplication assignment of a dense vector.

Parameters
rhsThe right-hand side dense 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.

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

Implementation of the transpose multiplication assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse 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.

template<typename VT, bool TF>
template<typename Other >
EnableIf_< IsNumeric<Other>, DVecTransposer >& blaze::DVecTransposer< VT, TF >::operator*= ( Other  rhs)
inline

Multiplication assignment operator for the multiplication between a vector and a scalar value ( $ \vec{a}*=s $).

Parameters
rhsThe right-hand side scalar value for the multiplication.
Returns
Reference to this DVecTransposer.
template<typename VT, bool TF>
template<typename Other >
EnableIf_< IsNumeric<Other>, DVecTransposer >& blaze::DVecTransposer< VT, TF >::operator/= ( Other  rhs)
inline

Division assignment operator for the division of a vector by a scalar value ( $ \vec{a}/=s $).

Parameters
rhsThe right-hand side scalar value for the division.
Returns
Reference to this DVecTransposer.
Note
A division by zero is only checked by an user assert.
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.
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.
template<typename VT, bool TF>
BLAZE_ALWAYS_INLINE VectorType& blaze::Vector< VT, TF >::operator~ ( )
inlinenoexceptinherited

Conversion operator for non-constant vectors.

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

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.
template<typename VT, bool TF>
void blaze::DVecTransposer< VT, TF >::reset ( )
inline

Resets the vector elements.

Returns
void
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.
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.

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.

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.

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.

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

Implementation of the transpose subtraction assignment of a dense vector.

Parameters
rhsThe right-hand side dense 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.

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

Implementation of the transpose subtraction assignment of a sparse vector.

Parameters
rhsThe right-hand side sparse 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.


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