35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECTRANSEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECTRANSEXPR_H_
91 :
public VecTransExpr< DenseVector< DVecTransExpr<VT,TF>, TF > >
92 ,
private If_t< IsComputation_v<VT>, Computation, Transformation >
112 template<
typename VT2 >
113 static constexpr bool UseAssign_v =
useAssign;
125 template<
typename VT2 >
126 static constexpr bool UseSMPAssign_v = ( VT2::smpAssignable &&
useAssign );
196 if( index >=
dv_.size() ) {
199 return (*
this)[index];
212 return dv_.load( index );
251 inline size_t size() const noexcept {
272 template<
typename T >
273 inline bool canAlias(
const T* alias )
const noexcept {
274 return dv_.canAlias( alias );
284 template<
typename T >
285 inline bool isAliased(
const T* alias )
const noexcept {
286 return dv_.isAliased( alias );
296 return dv_.isAligned();
306 return dv_.canSMPAssign();
329 template<
typename VT2 >
338 assign( tmp, rhs.
dv_ );
357 template<
typename VT2 >
366 assign( tmp, rhs.dv_ );
385 template<
typename VT2 >
386 friend inline auto addAssign( DenseVector<VT2,TF>& lhs,
const DVecTransExpr& rhs )
393 DVecTransposer<VT2,!TF> tmp( *lhs );
394 addAssign( tmp, rhs.dv_ );
417 template<
typename VT2 >
418 friend inline auto subAssign( DenseVector<VT2,TF>& lhs,
const DVecTransExpr& rhs )
425 DVecTransposer<VT2,!TF> tmp( *lhs );
426 subAssign( tmp, rhs.dv_ );
449 template<
typename VT2 >
450 friend inline auto multAssign( DenseVector<VT2,TF>& lhs,
const DVecTransExpr& rhs )
457 DVecTransposer<VT2,!TF> tmp( *lhs );
458 multAssign( tmp, rhs.dv_ );
481 template<
typename VT2 >
482 friend inline auto divAssign( DenseVector<VT2,TF>& lhs,
const DVecTransExpr& rhs )
489 DVecTransposer<VT2,!TF> tmp( *lhs );
490 divAssign( tmp, rhs.dv_ );
513 template<
typename VT2 >
521 DVecTransposer<VT2,!TF> tmp( *lhs );
541 template<
typename VT2 >
549 SVecTransposer<VT2,!TF> tmp( *lhs );
569 template<
typename VT2 >
577 DVecTransposer<VT2,!TF> tmp( *lhs );
601 template<
typename VT2 >
609 DVecTransposer<VT2,!TF> tmp( *lhs );
633 template<
typename VT2 >
641 DVecTransposer<VT2,!TF> tmp( *lhs );
665 template<
typename VT2 >
673 DVecTransposer<VT2,!TF> tmp( *lhs );
727 return ReturnType( *dv );
742inline decltype(
auto) transTo_backend(
const DenseVector<VT,TF>& dv,
FalseType )
800template<
typename VT,
bool TF >
801struct HasConstDataAccess< DVecTransExpr<VT,TF> >
802 :
public HasConstDataAccess<VT>
818template<
typename VT,
bool TF >
836template<
typename VT,
bool TF >
Header file for auxiliary alias declarations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition Aliases.h:470
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition Aliases.h:550
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for run time assertion macros.
Header file for the dense vector transposer.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the GetMemberType type trait.
Header file for the HasConstDataAccess type trait.
Header file for the If class template.
Header file for the IntegralConstant class template.
Utility type for generic codes.
Header file for the IsAligned type trait.
Header file for the IsComputation type trait class.
Header file for the IsExpression type trait class.
Header file for the IsPadded type trait.
Deactivation of problematic macros.
Header file for all SIMD functionality.
Header file for the sparse vector transposer.
Expression object for dense vector transpositions.
Definition DVecTransExpr.h:93
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition DVecTransExpr.h:285
const ElementType * data() const noexcept
Low-level data access to the vector elements.
Definition DVecTransExpr.h:221
ReturnType_t< VT > ReturnType
Return type for expression template evaluations.
Definition DVecTransExpr.h:141
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition DVecTransExpr.h:305
Operand dv_
Dense vector of the transposition expression.
Definition DVecTransExpr.h:312
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition DVecTransExpr.h:155
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition DVecTransExpr.h:163
VecTransExpr< DenseVector< This, TF > > BaseType
Base type of this DVecTransExpr instance.
Definition DVecTransExpr.h:136
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition DVecTransExpr.h:273
ResultType_t< VT > TransposeType
Transpose type for expression template evaluations.
Definition DVecTransExpr.h:139
DVecTransExpr(const VT &dv) noexcept
Constructor for the DVecTransExpr class.
Definition DVecTransExpr.h:171
ElementType_t< VT > ElementType
Resulting element type.
Definition DVecTransExpr.h:140
TransposeType_t< VT > ResultType
Result type for expression template evaluations.
Definition DVecTransExpr.h:138
Operand operand() const noexcept
Returns the dense vector operand.
Definition DVecTransExpr.h:261
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition DVecTransExpr.h:251
If_t< useAssign, const ResultType, const DVecTransExpr & > CompositeType
Data type for composite expression templates.
Definition DVecTransExpr.h:144
If_t< IsExpression_v< VT >, const VT, const VT & > Operand
Composite data type of the dense vector expression.
Definition DVecTransExpr.h:150
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
GetConstIterator_t< VT > ConstIterator
Iterator over the elements of the dense vector.
Definition DVecTransExpr.h:147
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the transposition expression.
Definition DVecTransExpr.h:108
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition DVecTransExpr.h:158
BLAZE_ALWAYS_INLINE auto load(size_t index) const noexcept
Access to the SIMD elements of the vector.
Definition DVecTransExpr.h:209
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition DVecTransExpr.h:241
DVecTransExpr< VT, TF > This
Type of this DVecTransExpr instance.
Definition DVecTransExpr.h:133
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition DVecTransExpr.h:195
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition DVecTransExpr.h:231
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition DVecTransExpr.h:182
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition DVecTransExpr.h:295
Expression object for the transposition of a dense vector.
Definition DVecTransposer.h:81
VT & dv_
The dense vector operand.
Definition DVecTransposer.h:556
Base class for N-dimensional dense vectors.
Definition DenseVector.h:77
SIMD characteristics of data types.
Definition SIMDTrait.h:297
Expression object for the transposition of a sparse vector.
Definition SVecTransposer.h:77
Base class for sparse vectors.
Definition SparseVector.h:72
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseVector base class.
Header file for the VecTransExpr base class.
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition DMatTransExpr.h:766
decltype(auto) transTo(const DenseVector< VT, TF > &dv)
Conditional calculation of the transpose of the given dense vector.
Definition DVecTransExpr.h:783
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition DenseVector.h:61
constexpr bool RequiresEvaluation_v
Auxiliary variable template for the RequiresEvaluation type trait.
Definition RequiresEvaluation.h:91
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
auto smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition DenseVector.h:221
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition DenseMatrix.h:162
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition DenseMatrix.h:100
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector.
Definition DenseVector.h:192
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition DenseMatrix.h:131
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
BoolConstant< false > FalseType
Type/value traits base class.
Definition IntegralConstant.h:121
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition If.h:108
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition IntegralConstant.h:110
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Compile time check for data types with padding.
Definition IsPadded.h:77
Base class for all vector transposition expression templates.
Definition VecTransExpr.h:69
System settings for the inline keywords.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.