35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECTRANSPOSER_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECTRANSPOSER_H_
98 enum { vectorizable = VT::vectorizable };
104 enum { smpAssignable = VT::smpAssignable };
218 template<
typename Other >
235 template<
typename Other >
271 template<
typename Other >
274 return dv_.canAlias( alias );
284 template<
typename Other >
287 return dv_.isAliased( alias );
298 return dv_.isAligned();
309 return dv_.canSMPAssign();
325 return dv_.load( index );
341 return dv_.loadu( index );
358 dv_.store( index, value );
375 dv_.storeu( index, value );
392 dv_.stream( index, value );
407 template<
typename VT2 >
414 const size_t n(
size() );
417 const size_t iend( n &
size_t(-2) );
419 for(
size_t i=0UL; i<iend; i+=2UL ) {
420 dv_[i ] = (~rhs)[i ];
421 dv_[i+1UL] = (~rhs)[i+1UL];
424 dv_[iend] = (~rhs)[iend];
439 template<
typename VT2 >
448 for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).
end(); ++element )
449 dv_[element->index()] = element->value();
464 template<
typename VT2 >
471 const size_t n(
size() );
474 const size_t iend( n &
size_t(-2) );
476 for(
size_t i=0UL; i<iend; i+=2UL ) {
477 dv_[i ] += (~rhs)[i ];
478 dv_[i+1UL] += (~rhs)[i+1UL];
481 dv_[iend] += (~rhs)[iend];
496 template<
typename VT2 >
505 for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).
end(); ++element )
506 dv_[element->index()] += element->value();
521 template<
typename VT2 >
528 const size_t n(
size() );
531 const size_t iend( n &
size_t(-2) );
533 for(
size_t i=0UL; i<iend; i+=2UL ) {
534 dv_[i ] -= (~rhs)[i ];
535 dv_[i+1UL] -= (~rhs)[i+1UL];
538 dv_[iend] -= (~rhs)[iend];
553 template<
typename VT2 >
562 for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).
end(); ++element )
563 dv_[element->index()] -= element->value();
578 template<
typename VT2 >
585 const size_t n(
size() );
588 const size_t iend( n &
size_t(-2) );
590 for(
size_t i=0UL; i<iend; i+=2UL ) {
591 dv_[i ] *= (~rhs)[i ];
592 dv_[i+1UL] *= (~rhs)[i+1UL];
595 dv_[iend] *= (~rhs)[iend];
610 template<
typename VT2 >
622 for( RhsConstIterator element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
623 dv_[element->index()] = tmp[element->index()] * element->value();
659 template<
typename VT
679 template<
typename VT,
bool TF >
680 struct SubvectorTrait< DVecTransposer<VT,TF> >
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: DVecTransposer.h:123
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the dense vector.
Definition: DVecTransposer.h:156
bool isAliased(const Other *alias) const
Returns whether the vector is aliased with the given address alias.
Definition: DVecTransposer.h:285
VT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DVecTransposer.h:90
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecTransposer.h:250
VT::Iterator Iterator
Iterator over non-constant elements.
Definition: DVecTransposer.h:89
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i...
Definition: Computation.h:118
bool canSMPAssign() const
Returns whether the vector can be used in SMP assignments.
Definition: DVecTransposer.h:307
void subAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose subtraction assignment of a dense vector.
Definition: DVecTransposer.h:522
VT::ConstReference ConstReference
Reference to a constant matrix value.
Definition: DVecTransposer.h:88
ConstIterator cend() const
Returns an iterator just past the last element of the dense vector.
Definition: DVecTransposer.h:206
void multAssign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose multiplication assignment of a sparse vector.
Definition: DVecTransposer.h:611
Header file for the DenseVector base class.
ConstReference operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecTransposer.h:135
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: DVecTransposer.h:272
ConstIterator begin() const
Returns an iterator to the first element of the dense vector.
Definition: DVecTransposer.h:166
VT::ElementType ElementType
Type of the vector elements.
Definition: DVecTransposer.h:83
Header file for the intrinsic trait.
Expression object for the transposition of a dense vector.The DVecTransposer class is a wrapper objec...
Definition: DVecTransposer.h:71
VT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: DVecTransposer.h:82
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: DVecTransposer.h:296
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DVecTransposer.h:85
IntrinsicTrait< typename VT::ElementType > IT
Intrinsic trait for the vector element type.
Definition: DVecTransposer.h:75
DVecTransposer(VT &dv)
Constructor for the DVecTransposer class.
Definition: DVecTransposer.h:112
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
Header file for the subvector trait.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Constraint on the data type.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2475
Constraint on the data type.
VT::Reference Reference
Reference to a non-constant matrix value.
Definition: DVecTransposer.h:87
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2480
Header file for the EnableIf class template.
void reset()
Resets the vector elements.
Definition: DVecTransposer.h:260
Header file for the IsNumeric type trait.
DVecTransposer< VT, TF > This
Type of this DVecTransposer instance.
Definition: DVecTransposer.h:80
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2477
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
Header file for run time assertion macros.
const This & CompositeType
Data type for composite expression templates.
Definition: DVecTransposer.h:86
Iterator end()
Returns an iterator just past the last element of the dense vector.
Definition: DVecTransposer.h:186
void addAssign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose addition assignment of a sparse vector.
Definition: DVecTransposer.h:497
void store(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the vector.
Definition: DVecTransposer.h:356
IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: DVecTransposer.h:323
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
void addAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose addition assignment of a dense vector.
Definition: DVecTransposer.h:465
ConstIterator end() const
Returns an iterator just past the last element of the dense vector.
Definition: DVecTransposer.h:196
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: DVecTransposer.h:84
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2481
void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the vector.
Definition: DVecTransposer.h:373
void subAssign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose subtraction assignment of a sparse vector.
Definition: DVecTransposer.h:554
BLAZE_ALWAYS_INLINE void reset(const NonNumericProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: NonNumericProxy.h:833
void assign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose assignment of a sparse vector.
Definition: DVecTransposer.h:440
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:79
VT::TransposeType ResultType
Result type for expression template evaluations.
Definition: DVecTransposer.h:81
void assign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose assignment of a dense vector.
Definition: DVecTransposer.h:408
EnableIf< IsNumeric< Other >, DVecTransposer >::Type & operator/=(Other rhs)
Division assignment operator for the division of a vector by a scalar value ( ).
Definition: DVecTransposer.h:236
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
ElementType * data()
Low-level data access to the vector elements.
Definition: DVecTransposer.h:146
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2473
EnableIf< IsNumeric< Other >, DVecTransposer >::Type & operator*=(Other rhs)
Multiplication assignment operator for the multiplication between a vector and a scalar value ( )...
Definition: DVecTransposer.h:219
Header file for basic type definitions.
void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the vector.
Definition: DVecTransposer.h:390
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2479
IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: DVecTransposer.h:339
void multAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose multiplication assignment of a dense vector.
Definition: DVecTransposer.h:579
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:238
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
ConstIterator cbegin() const
Returns an iterator to the first element of the dense vector.
Definition: DVecTransposer.h:176
VT & dv_
The dense vector operand.
Definition: DVecTransposer.h:629