DVecTransposer.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECTRANSPOSER_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECTRANSPOSER_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
47 #include <blaze/math/Exception.h>
53 #include <blaze/system/Inline.h>
54 #include <blaze/util/Assert.h>
55 #include <blaze/util/EnableIf.h>
57 #include <blaze/util/Types.h>
59 
60 
61 namespace blaze {
62 
63 //=================================================================================================
64 //
65 // CLASS DVECTRANSPOSER
66 //
67 //=================================================================================================
68 
69 //*************************************************************************************************
75 template< typename VT // Type of the dense vector
76  , bool TF > // Transpose flag
78  : public DenseVector< DVecTransposer<VT,TF>, TF >
79 {
80  public:
81  //**Type definitions****************************************************************************
88  using CompositeType = const This&;
95  //**********************************************************************************************
96 
97  //**Compilation flags***************************************************************************
99 
102  enum : bool { simdEnabled = VT::simdEnabled };
103 
105 
108  enum : bool { smpAssignable = VT::smpAssignable };
109  //**********************************************************************************************
110 
111  //**Constructor*********************************************************************************
116  explicit inline DVecTransposer( VT& dv ) noexcept
117  : dv_( dv ) // The dense vector operand
118  {}
119  //**********************************************************************************************
120 
121  //**Subscript operator**************************************************************************
127  inline Reference operator[]( size_t index ) {
128  BLAZE_USER_ASSERT( index < dv_.size(), "Invalid vector access index" );
129  return dv_[index];
130  }
131  //**********************************************************************************************
132 
133  //**Subscript operator**************************************************************************
139  inline ConstReference operator[]( size_t index ) const {
140  BLAZE_USER_ASSERT( index < dv_.size(), "Invalid vector access index" );
141  return dv_[index];
142  }
143  //**********************************************************************************************
144 
145  //**At function*********************************************************************************
152  inline Reference at( size_t index ) {
153  if( index >= dv_.size() ) {
154  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
155  }
156  return (*this)[index];
157  }
158  //**********************************************************************************************
159 
160  //**At function*********************************************************************************
167  inline ConstReference at( size_t index ) const {
168  if( index >= dv_.size() ) {
169  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
170  }
171  return (*this)[index];
172  }
173  //**********************************************************************************************
174 
175  //**Low-level data access***********************************************************************
180  inline Pointer data() noexcept {
181  return dv_.data();
182  }
183  //**********************************************************************************************
184 
185  //**Low-level data access***********************************************************************
190  inline ConstPointer data() const noexcept {
191  return dv_.data();
192  }
193  //**********************************************************************************************
194 
195  //**Begin function******************************************************************************
200  inline Iterator begin() {
201  return dv_.begin();
202  }
203  //**********************************************************************************************
204 
205  //**Begin function******************************************************************************
210  inline ConstIterator begin() const {
211  return dv_.cbegin();
212  }
213  //**********************************************************************************************
214 
215  //**Cbegin function*****************************************************************************
220  inline ConstIterator cbegin() const {
221  return dv_.cbegin();
222  }
223  //**********************************************************************************************
224 
225  //**End function********************************************************************************
230  inline Iterator end() {
231  return dv_.end();
232  }
233  //**********************************************************************************************
234 
235  //**End function********************************************************************************
240  inline ConstIterator end() const {
241  return dv_.cend();
242  }
243  //**********************************************************************************************
244 
245  //**Cend function*******************************************************************************
250  inline ConstIterator cend() const {
251  return dv_.cend();
252  }
253  //**********************************************************************************************
254 
255  //**Multiplication assignment operator**********************************************************
262  template< typename Other > // Data type of the right-hand side scalar
264  {
265  (~dv_) *= rhs;
266  return *this;
267  }
268  //**********************************************************************************************
269 
270  //**Division assignment operator****************************************************************
279  template< typename Other > // Data type of the right-hand side scalar
281  {
282  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
283 
284  (~dv_) /= rhs;
285  return *this;
286  }
287  //**********************************************************************************************
288 
289  //**Size function*******************************************************************************
294  inline size_t size() const noexcept {
295  return dv_.size();
296  }
297  //**********************************************************************************************
298 
299  //**Reset function******************************************************************************
304  inline void reset() {
305  return dv_.reset();
306  }
307  //**********************************************************************************************
308 
309  //**CanAliased function*************************************************************************
315  template< typename Other > // Data type of the foreign expression
316  inline bool canAlias( const Other* alias ) const noexcept
317  {
318  return dv_.canAlias( alias );
319  }
320  //**********************************************************************************************
321 
322  //**IsAliased function**************************************************************************
328  template< typename Other > // Data type of the foreign expression
329  inline bool isAliased( const Other* alias ) const noexcept
330  {
331  return dv_.isAliased( alias );
332  }
333  //**********************************************************************************************
334 
335  //**IsAligned function**************************************************************************
340  inline bool isAligned() const noexcept
341  {
342  return dv_.isAligned();
343  }
344  //**********************************************************************************************
345 
346  //**CanSMPAssign function***********************************************************************
351  inline bool canSMPAssign() const noexcept
352  {
353  return dv_.canSMPAssign();
354  }
355  //**********************************************************************************************
356 
357  //**Load function*******************************************************************************
367  BLAZE_ALWAYS_INLINE SIMDType load( size_t index ) const noexcept
368  {
369  return dv_.load( index );
370  }
371  //**********************************************************************************************
372 
373  //**Loada function******************************************************************************
383  BLAZE_ALWAYS_INLINE SIMDType loada( size_t index ) const noexcept
384  {
385  return dv_.loada( index );
386  }
387  //**********************************************************************************************
388 
389  //**Loadu function******************************************************************************
399  BLAZE_ALWAYS_INLINE SIMDType loadu( size_t index ) const noexcept
400  {
401  return dv_.loadu( index );
402  }
403  //**********************************************************************************************
404 
405  //**Store function******************************************************************************
416  BLAZE_ALWAYS_INLINE void store( size_t index, const SIMDType& value ) noexcept
417  {
418  dv_.store( index, value );
419  }
420  //**********************************************************************************************
421 
422  //**Storea function******************************************************************************
433  BLAZE_ALWAYS_INLINE void storea( size_t index, const SIMDType& value ) noexcept
434  {
435  dv_.storea( index, value );
436  }
437  //**********************************************************************************************
438 
439  //**Storeu function*****************************************************************************
450  BLAZE_ALWAYS_INLINE void storeu( size_t index, const SIMDType& value ) noexcept
451  {
452  dv_.storeu( index, value );
453  }
454  //**********************************************************************************************
455 
456  //**Stream function*****************************************************************************
467  BLAZE_ALWAYS_INLINE void stream( size_t index, const SIMDType& value ) noexcept
468  {
469  dv_.stream( index, value );
470  }
471  //**********************************************************************************************
472 
473  //**Transpose assignment of dense vectors*******************************************************
484  template< typename VT2 > // Type of the right-hand side dense vector
485  inline void assign( const DenseVector<VT2,TF>& rhs )
486  {
488 
489  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
490 
491  const size_t n( size() );
492 
493  const size_t ipos( n & size_t(-2) );
494  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ipos, "Invalid end calculation" );
495 
496  for( size_t i=0UL; i<ipos; i+=2UL ) {
497  dv_[i ] = (~rhs)[i ];
498  dv_[i+1UL] = (~rhs)[i+1UL];
499  }
500  if( ipos < n )
501  dv_[ipos] = (~rhs)[ipos];
502  }
503  //**********************************************************************************************
504 
505  //**Transpose assignment of sparse vectors******************************************************
516  template< typename VT2 > // Type of the right-hand side sparse vector
517  inline void assign( const SparseVector<VT2,TF>& rhs )
518  {
520 
521  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
522 
523  using RhsConstIterator = ConstIterator_<VT2>;
524 
525  for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
526  dv_[element->index()] = element->value();
527  }
528  //**********************************************************************************************
529 
530  //**Transpose addition assignment of dense vectors**********************************************
541  template< typename VT2 > // Type of the right-hand side dense vector
542  inline void addAssign( const DenseVector<VT2,TF>& rhs )
543  {
545 
546  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
547 
548  const size_t n( size() );
549 
550  const size_t ipos( n & size_t(-2) );
551  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ipos, "Invalid end calculation" );
552 
553  for( size_t i=0UL; i<ipos; i+=2UL ) {
554  dv_[i ] += (~rhs)[i ];
555  dv_[i+1UL] += (~rhs)[i+1UL];
556  }
557  if( ipos < n )
558  dv_[ipos] += (~rhs)[ipos];
559  }
560  //**********************************************************************************************
561 
562  //**Transpose addition assignment of sparse vectors*********************************************
573  template< typename VT2 > // Type of the right-hand side sparse vector
574  inline void addAssign( const SparseVector<VT2,TF>& rhs )
575  {
577 
578  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
579 
580  using RhsConstIterator = ConstIterator_<VT2>;
581 
582  for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
583  dv_[element->index()] += element->value();
584  }
585  //**********************************************************************************************
586 
587  //**Transpose subtraction assignment of dense vectors*******************************************
598  template< typename VT2 > // Type of the right-hand side dense vector
599  inline void subAssign( const DenseVector<VT2,TF>& rhs )
600  {
602 
603  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
604 
605  const size_t n( size() );
606 
607  const size_t ipos( n & size_t(-2) );
608  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ipos, "Invalid end calculation" );
609 
610  for( size_t i=0UL; i<ipos; i+=2UL ) {
611  dv_[i ] -= (~rhs)[i ];
612  dv_[i+1UL] -= (~rhs)[i+1UL];
613  }
614  if( ipos < n )
615  dv_[ipos] -= (~rhs)[ipos];
616  }
617  //**********************************************************************************************
618 
619  //**Transpose subtraction assignment of sparse vectors******************************************
630  template< typename VT2 > // Type of the right-hand side sparse vector
631  inline void subAssign( const SparseVector<VT2,TF>& rhs )
632  {
634 
635  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
636 
637  using RhsConstIterator = ConstIterator_<VT2>;
638 
639  for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
640  dv_[element->index()] -= element->value();
641  }
642  //**********************************************************************************************
643 
644  //**Transpose multiplication assignment of dense vectors****************************************
655  template< typename VT2 > // Type of the right-hand side dense vector
656  inline void multAssign( const DenseVector<VT2,TF>& rhs )
657  {
659 
660  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
661 
662  const size_t n( size() );
663 
664  const size_t ipos( n & size_t(-2) );
665  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ipos, "Invalid end calculation" );
666 
667  for( size_t i=0UL; i<ipos; i+=2UL ) {
668  dv_[i ] *= (~rhs)[i ];
669  dv_[i+1UL] *= (~rhs)[i+1UL];
670  }
671  if( ipos < n )
672  dv_[ipos] *= (~rhs)[ipos];
673  }
674  //**********************************************************************************************
675 
676  //**Transpose multiplication assignment of sparse vectors***************************************
687  template< typename VT2 > // Type of the right-hand side dense vector
688  inline void multAssign( const SparseVector<VT2,TF>& rhs )
689  {
691 
692  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
693 
694  using RhsConstIterator = ConstIterator_<VT2>;
695 
696  const VT tmp( dv_ );
697  dv_.reset();
698 
699  for( RhsConstIterator element=(~rhs).begin(); element!=(~rhs).end(); ++element )
700  dv_[element->index()] = tmp[element->index()] * element->value();
701  }
702  //**********************************************************************************************
703 
704  //**Transpose division assignment of dense vectors**********************************************
715  template< typename VT2 > // Type of the right-hand side dense vector
716  inline void divAssign( const DenseVector<VT2,TF>& rhs )
717  {
719 
720  BLAZE_INTERNAL_ASSERT( dv_.size() == (~rhs).size(), "Invalid vector sizes" );
721 
722  const size_t n( size() );
723 
724  const size_t ipos( n & size_t(-2) );
725  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == ipos, "Invalid end calculation" );
726 
727  for( size_t i=0UL; i<ipos; i+=2UL ) {
728  dv_[i ] /= (~rhs)[i ];
729  dv_[i+1UL] /= (~rhs)[i+1UL];
730  }
731  if( ipos < n )
732  dv_[ipos] /= (~rhs)[ipos];
733  }
734  //**********************************************************************************************
735 
736  private:
737  //**Member variables****************************************************************************
738  VT& dv_;
739  //**********************************************************************************************
740 
741  //**Compile time checks*************************************************************************
747  //**********************************************************************************************
748 };
749 //*************************************************************************************************
750 
751 
752 
753 
754 //=================================================================================================
755 //
756 // GLOBAL OPERATORS
757 //
758 //=================================================================================================
759 
760 //*************************************************************************************************
768 template< typename VT // Type of the dense vector
769  , bool TF > // Transpose flag
770 inline void reset( DVecTransposer<VT,TF>& v )
771 {
772  v.reset();
773 }
775 //*************************************************************************************************
776 
777 
778 
779 
780 //=================================================================================================
781 //
782 // ISALIGNED SPECIALIZATIONS
783 //
784 //=================================================================================================
785 
786 //*************************************************************************************************
788 template< typename VT, bool TF >
789 struct IsAligned< DVecTransposer<VT,TF> >
790  : public BoolConstant< IsAligned<VT>::value >
791 {};
793 //*************************************************************************************************
794 
795 
796 
797 
798 //=================================================================================================
799 //
800 // ISPADDED SPECIALIZATIONS
801 //
802 //=================================================================================================
803 
804 //*************************************************************************************************
806 template< typename VT, bool TF >
807 struct IsPadded< DVecTransposer<VT,TF> >
808  : public BoolConstant< IsPadded<VT>::value >
809 {};
811 //*************************************************************************************************
812 
813 
814 
815 
816 //=================================================================================================
817 //
818 // SUBVECTORTRAIT SPECIALIZATIONS
819 //
820 //=================================================================================================
821 
822 //*************************************************************************************************
824 template< typename VT, bool TF >
825 struct SubvectorTrait< DVecTransposer<VT,TF> >
826 {
828 };
830 //*************************************************************************************************
831 
832 } // namespace blaze
833 
834 #endif
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: DVecTransposer.h:127
Constraint on the data type.
Iterator begin()
Returns an iterator to the first element of the dense vector.
Definition: DVecTransposer.h:200
Header file for auxiliary alias declarations.
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: DVecTransposer.h:329
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t index) const noexcept
Unaligned load of a SIMD element of the vector.
Definition: DVecTransposer.h:399
#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
Header file for basic type definitions.
bool isAligned() const noexcept
Returns whether the vector is properly aligned in memory.
Definition: DVecTransposer.h:340
#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:81
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
ConstPointer data() const noexcept
Low-level data access to the vector elements.
Definition: DVecTransposer.h:190
ConstReference_< VT > ConstReference
Reference to a constant vector value.
Definition: DVecTransposer.h:90
void subAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose subtraction assignment of a dense vector.
Definition: DVecTransposer.h:599
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:316
EnableIf_< IsNumeric< Other >, DVecTransposer > & operator*=(Other rhs)
Multiplication assignment operator for the multiplication between a vector and a scalar value ( )...
Definition: DVecTransposer.h:263
void multAssign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose multiplication assignment of a sparse vector.
Definition: DVecTransposer.h:688
Header file for the DenseVector base class.
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
Load of a SIMD element of the vector.
Definition: DVecTransposer.h:367
SIMDTrait_< ElementType > SIMDType
SIMD type of the vector elements.
Definition: DVecTransposer.h:86
Header file for the SIMD trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
ConstPointer_< VT > ConstPointer
Pointer to a constant vector value.
Definition: DVecTransposer.h:92
Expression object for the transposition of a dense vector.The DVecTransposer class is a wrapper objec...
Definition: DVecTransposer.h:77
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:363
Base template for the SubvectorTrait class.
Definition: SubvectorTrait.h:120
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
bool canSMPAssign() const noexcept
Returns whether the vector can be used in SMP assignments.
Definition: DVecTransposer.h:351
BLAZE_ALWAYS_INLINE void store(size_t index, const SIMDType &value) noexcept
Store of a SIMD element of the vector.
Definition: DVecTransposer.h:416
typename T::Pointer Pointer_
Alias declaration for nested Pointer type definitions.The Pointer_ alias declaration provides a conve...
Definition: Aliases.h:283
EnableIf_< IsNumeric< Other >, DVecTransposer > & operator/=(Other rhs)
Division assignment operator for the division of a vector by a scalar value ( ).
Definition: DVecTransposer.h:280
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
DVecTransposer(VT &dv) noexcept
Constructor for the DVecTransposer class.
Definition: DVecTransposer.h:116
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
typename SubvectorTrait< VT >::Type SubvectorTrait_
Auxiliary alias declaration for the SubvectorTrait type trait.The SubvectorTrait_ alias declaration p...
Definition: SubvectorTrait.h:155
Header file for the subvector trait.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Reference at(size_t index)
Checked access to the vector elements.
Definition: DVecTransposer.h:152
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Header file for the IsAligned type trait.
BLAZE_ALWAYS_INLINE void storeu(size_t index, const SIMDType &value) noexcept
Unaligned store of a SIMD element of the vector.
Definition: DVecTransposer.h:450
Constraint on the data type.
ConstIterator cend() const
Returns an iterator just past the last element of the dense vector.
Definition: DVecTransposer.h:250
Constraint on the data type.
Header file for the exception macros of the math module.
BLAZE_ALWAYS_INLINE void storea(size_t index, const SIMDType &value) noexcept
Aligned store of a SIMD element of the vector.
Definition: DVecTransposer.h:433
typename T::Reference Reference_
Alias declaration for nested Reference type definitions.The Reference_ alias declaration provides a c...
Definition: Aliases.h:303
TransposeType_< VT > ResultType
Result type for expression template evaluations.
Definition: DVecTransposer.h:83
Header file for the EnableIf class template.
Header file for the IsPadded type trait.
void reset()
Resets the vector elements.
Definition: DVecTransposer.h:304
BLAZE_ALWAYS_INLINE SIMDType loada(size_t index) const noexcept
Aligned load of a SIMD element of the vector.
Definition: DVecTransposer.h:383
ConstIterator begin() const
Returns an iterator to the first element of the dense vector.
Definition: DVecTransposer.h:210
Header file for the IsNumeric type trait.
ConstIterator_< VT > ConstIterator
Iterator over constant elements.
Definition: DVecTransposer.h:94
Header file for run time assertion macros.
Iterator end()
Returns an iterator just past the last element of the dense vector.
Definition: DVecTransposer.h:230
void addAssign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose addition assignment of a sparse vector.
Definition: DVecTransposer.h:574
BLAZE_ALWAYS_INLINE void stream(size_t index, const SIMDType &value) noexcept
Aligned, non-temporal store of a SIMD element of the vector.
Definition: DVecTransposer.h:467
void addAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose addition assignment of a dense vector.
Definition: DVecTransposer.h:542
Pointer data() noexcept
Low-level data access to the vector elements.
Definition: DVecTransposer.h:180
void subAssign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose subtraction assignment of a sparse vector.
Definition: DVecTransposer.h:631
void divAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose division assignment of a dense vector.
Definition: DVecTransposer.h:716
void assign(const SparseVector< VT2, TF > &rhs)
Implementation of the transpose assignment of a sparse vector.
Definition: DVecTransposer.h:517
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
typename T::Iterator Iterator_
Alias declaration for nested Iterator type definitions.The Iterator_ alias declaration provides a con...
Definition: Aliases.h:183
typename T::ConstPointer ConstPointer_
Alias declaration for nested ConstPointer type definitions.The ConstPointer_ alias declaration provid...
Definition: Aliases.h:123
typename T::ConstReference ConstReference_
Alias declaration for nested ConstReference type definitions.The ConstReference_ alias declaration pr...
Definition: Aliases.h:143
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#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:61
void assign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose assignment of a dense vector.
Definition: DVecTransposer.h:485
ConstIterator end() const
Returns an iterator just past the last element of the dense vector.
Definition: DVecTransposer.h:240
ConstReference operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecTransposer.h:139
ElementType_< VT > ElementType
Type of the vector elements.
Definition: DVecTransposer.h:85
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
Reference_< VT > Reference
Reference to a non-constant vector value.
Definition: DVecTransposer.h:89
Header file for the IntegralConstant class template.
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
ResultType_< VT > TransposeType
Transpose type for expression template evaluations.
Definition: DVecTransposer.h:84
bool canAlias(const Other *alias) const noexcept
Returns whether the vector can alias with the given address alias.
Definition: DVecTransposer.h:316
Pointer_< VT > Pointer
Pointer to a non-constant vector value.
Definition: DVecTransposer.h:91
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: DVecTransposer.h:294
System settings for the inline keywords.
void multAssign(const DenseVector< VT2, TF > &rhs)
Implementation of the transpose multiplication assignment of a dense vector.
Definition: DVecTransposer.h:656
#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:63
Iterator_< VT > Iterator
Iterator over non-constant elements.
Definition: DVecTransposer.h:93
#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
ConstReference at(size_t index) const
Checked access to the vector elements.
Definition: DVecTransposer.h:167
ReturnType_< VT > ReturnType
Return type for expression template evaluations.
Definition: DVecTransposer.h:87
VT & dv_
The dense vector operand.
Definition: DVecTransposer.h:738
ConstIterator cbegin() const
Returns an iterator to the first element of the dense vector.
Definition: DVecTransposer.h:220