All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecTransExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECTRANSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECTRANSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
51 #include <blaze/math/Intrinsics.h>
58 #include <blaze/util/Assert.h>
59 #include <blaze/util/EmptyType.h>
60 #include <blaze/util/EnableIf.h>
62 #include <blaze/util/SelectType.h>
63 #include <blaze/util/Types.h>
64 
65 
66 namespace blaze {
67 
68 //=================================================================================================
69 //
70 // CLASS DVECTRANSEXPR
71 //
72 //=================================================================================================
73 
74 //*************************************************************************************************
81 template< typename VT // Type of the dense vector
82  , bool TF > // Transpose flag
83 class DVecTransExpr : public DenseVector< DVecTransExpr<VT,TF>, TF >
84  , private VecTransExpr
85  , private SelectType< IsComputation<VT>::value, Computation, EmptyType >::Type
86 {
87  private:
88  //**Type definitions****************************************************************************
89  typedef typename VT::CompositeType CT;
90  //**********************************************************************************************
91 
92  //**Serial evaluation strategy******************************************************************
94 
100  enum { useAssign = RequiresEvaluation<VT>::value };
101 
103  template< typename VT2 >
105  struct UseAssign {
106  enum { value = useAssign };
107  };
109  //**********************************************************************************************
110 
111  //**Parallel evaluation strategy****************************************************************
113 
118  template< typename VT2 >
119  struct UseSMPAssign {
120  enum { value = VT2::smpAssignable && useAssign };
121  };
123  //**********************************************************************************************
124 
125  public:
126  //**Type definitions****************************************************************************
128  typedef typename VT::TransposeType ResultType;
129  typedef typename VT::ResultType TransposeType;
130  typedef typename VT::ElementType ElementType;
131  typedef typename VT::ReturnType ReturnType;
132 
135 
138 
140  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type Operand;
141  //**********************************************************************************************
142 
143  //**ConstIterator class definition**************************************************************
147  {
148  public:
149  //**Type definitions*************************************************************************
150  typedef std::random_access_iterator_tag IteratorCategory;
155 
156  // STL iterator requirements
162 
164  typedef typename VT::ConstIterator IteratorType;
165  //*******************************************************************************************
166 
167  //**Constructor******************************************************************************
172  explicit inline ConstIterator( IteratorType iterator )
173  : iterator_( iterator ) // Iterator to the current element
174  {}
175  //*******************************************************************************************
176 
177  //**Addition assignment operator*************************************************************
183  inline ConstIterator& operator+=( size_t inc ) {
184  iterator_ += inc;
185  return *this;
186  }
187  //*******************************************************************************************
188 
189  //**Subtraction assignment operator**********************************************************
195  inline ConstIterator& operator-=( size_t dec ) {
196  iterator_ -= dec;
197  return *this;
198  }
199  //*******************************************************************************************
200 
201  //**Prefix increment operator****************************************************************
207  ++iterator_;
208  return *this;
209  }
210  //*******************************************************************************************
211 
212  //**Postfix increment operator***************************************************************
217  inline const ConstIterator operator++( int ) {
218  return ConstIterator( iterator_++ );
219  }
220  //*******************************************************************************************
221 
222  //**Prefix decrement operator****************************************************************
228  --iterator_;
229  return *this;
230  }
231  //*******************************************************************************************
232 
233  //**Postfix decrement operator***************************************************************
238  inline const ConstIterator operator--( int ) {
239  return ConstIterator( iterator_-- );
240  }
241  //*******************************************************************************************
242 
243  //**Element access operator******************************************************************
248  inline ReturnType operator*() const {
249  return *iterator_;
250  }
251  //*******************************************************************************************
252 
253  //**Load function****************************************************************************
258  inline IntrinsicType load() const {
259  return iterator_.load();
260  }
261  //*******************************************************************************************
262 
263  //**Equality operator************************************************************************
269  inline bool operator==( const ConstIterator& rhs ) const {
270  return iterator_ == rhs.iterator_;
271  }
272  //*******************************************************************************************
273 
274  //**Inequality operator**********************************************************************
280  inline bool operator!=( const ConstIterator& rhs ) const {
281  return iterator_ != rhs.iterator_;
282  }
283  //*******************************************************************************************
284 
285  //**Less-than operator***********************************************************************
291  inline bool operator<( const ConstIterator& rhs ) const {
292  return iterator_ < rhs.iterator_;
293  }
294  //*******************************************************************************************
295 
296  //**Greater-than operator********************************************************************
302  inline bool operator>( const ConstIterator& rhs ) const {
303  return iterator_ > rhs.iterator_;
304  }
305  //*******************************************************************************************
306 
307  //**Less-or-equal-than operator**************************************************************
313  inline bool operator<=( const ConstIterator& rhs ) const {
314  return iterator_ <= rhs.iterator_;
315  }
316  //*******************************************************************************************
317 
318  //**Greater-or-equal-than operator***********************************************************
324  inline bool operator>=( const ConstIterator& rhs ) const {
325  return iterator_ >= rhs.iterator_;
326  }
327  //*******************************************************************************************
328 
329  //**Subtraction operator*********************************************************************
335  inline DifferenceType operator-( const ConstIterator& rhs ) const {
336  return iterator_ - rhs.iterator_;
337  }
338  //*******************************************************************************************
339 
340  //**Addition operator************************************************************************
347  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
348  return ConstIterator( it.iterator_ + inc );
349  }
350  //*******************************************************************************************
351 
352  //**Addition operator************************************************************************
359  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
360  return ConstIterator( it.iterator_ + inc );
361  }
362  //*******************************************************************************************
363 
364  //**Subtraction operator*********************************************************************
371  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
372  return ConstIterator( it.iterator_ - dec );
373  }
374  //*******************************************************************************************
375 
376  private:
377  //**Member variables*************************************************************************
379  //*******************************************************************************************
380  };
381  //**********************************************************************************************
382 
383  //**Compilation flags***************************************************************************
385  enum { vectorizable = VT::vectorizable };
386 
388  enum { smpAssignable = VT::smpAssignable };
389  //**********************************************************************************************
390 
391  //**Constructor*********************************************************************************
396  explicit inline DVecTransExpr( const VT& dv )
397  : dv_( dv ) // Dense vector of the transposition expression
398  {}
399  //**********************************************************************************************
400 
401  //**Subscript operator**************************************************************************
407  inline ReturnType operator[]( size_t index ) const {
408  BLAZE_INTERNAL_ASSERT( index < dv_.size(), "Invalid vector access index" );
409  return dv_[index];
410  }
411  //**********************************************************************************************
412 
413  //**Load function*******************************************************************************
419  inline IntrinsicType load( size_t index ) const {
420  typedef IntrinsicTrait<ElementType> IT;
421  BLAZE_INTERNAL_ASSERT( index < dv_.size() , "Invalid vector access index" );
422  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL , "Invalid vector access index" );
423  return dv_.load( index );
424  }
425  //**********************************************************************************************
426 
427  //**Low-level data access***********************************************************************
432  inline const ElementType* data() const {
433  return dv_.data();
434  }
435  //**********************************************************************************************
436 
437  //**Begin function******************************************************************************
442  inline ConstIterator begin() const {
443  return ConstIterator( dv_.begin() );
444  }
445  //**********************************************************************************************
446 
447  //**End function********************************************************************************
452  inline ConstIterator end() const {
453  return ConstIterator( dv_.end() );
454  }
455  //**********************************************************************************************
456 
457  //**Size function*******************************************************************************
462  inline size_t size() const {
463  return dv_.size();
464  }
465  //**********************************************************************************************
466 
467  //**Operand access******************************************************************************
472  inline Operand operand() const {
473  return dv_;
474  }
475  //**********************************************************************************************
476 
477  //**********************************************************************************************
483  template< typename T >
484  inline bool canAlias( const T* alias ) const {
485  return dv_.canAlias( alias );
486  }
487  //**********************************************************************************************
488 
489  //**********************************************************************************************
495  template< typename T >
496  inline bool isAliased( const T* alias ) const {
497  return dv_.isAliased( alias );
498  }
499  //**********************************************************************************************
500 
501  //**********************************************************************************************
506  inline bool isAligned() const {
507  return dv_.isAligned();
508  }
509  //**********************************************************************************************
510 
511  //**********************************************************************************************
516  inline bool canSMPAssign() const {
517  return dv_.canSMPAssign();
518  }
519  //**********************************************************************************************
520 
521  private:
522  //**Member variables****************************************************************************
524  //**********************************************************************************************
525 
526  //**Assignment to dense vectors*****************************************************************
540  template< typename VT2 > // Type of the target dense vector
541  friend inline typename EnableIf< UseAssign<VT2> >::Type
542  assign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
543  {
545 
546  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
547 
548  DVecTransposer<VT2,!TF> tmp( ~lhs );
549  assign( tmp, rhs.dv_ );
550  }
552  //**********************************************************************************************
553 
554  //**Assignment to sparse vectors****************************************************************
568  template< typename VT2 > // Type of the target sparse vector
569  friend inline typename EnableIf< UseAssign<VT2> >::Type
570  assign( SparseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
571  {
573 
574  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
575 
576  SVecTransposer<VT2,!TF> tmp( ~lhs );
577  assign( tmp, rhs.dv_ );
578  }
580  //**********************************************************************************************
581 
582  //**Addition assignment to dense vectors********************************************************
596  template< typename VT2 > // Type of the target dense vector
597  friend inline typename EnableIf< UseAssign<VT2> >::Type
598  addAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
599  {
601 
602  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
603 
604  DVecTransposer<VT2,!TF> tmp( ~lhs );
605  addAssign( tmp, rhs.dv_ );
606  }
608  //**********************************************************************************************
609 
610  //**Addition assignment to sparse vectors*******************************************************
611  // No special implementation for the addition assignment to sparse vectors.
612  //**********************************************************************************************
613 
614  //**Subtraction assignment to dense vectors*****************************************************
628  template< typename VT2 > // Type of the target dense vector
629  friend inline typename EnableIf< UseAssign<VT2> >::Type
630  subAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
631  {
633 
634  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
635 
636  DVecTransposer<VT2,!TF> tmp( ~lhs );
637  subAssign( tmp, rhs.dv_ );
638  }
640  //**********************************************************************************************
641 
642  //**Subtraction assignment to sparse vectors****************************************************
643  // No special implementation for the subtraction assignment to sparse vectors.
644  //**********************************************************************************************
645 
646  //**Multiplication assignment to dense vectors**************************************************
660  template< typename VT2 > // Type of the target dense vector
661  friend inline typename EnableIf< UseAssign<VT2> >::Type
662  multAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
663  {
665 
666  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
667 
668  DVecTransposer<VT2,!TF> tmp( ~lhs );
669  multAssign( tmp, rhs.dv_ );
670  }
672  //**********************************************************************************************
673 
674  //**Multiplication assignment to sparse vectors*************************************************
675  // No special implementation for the multiplication assignment to sparse vectors.
676  //**********************************************************************************************
677 
678  //**SMP assignment to dense vectors*************************************************************
692  template< typename VT2 > // Type of the target dense vector
693  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
694  smpAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
695  {
697 
698  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
699 
700  DVecTransposer<VT2,!TF> tmp( ~lhs );
701  smpAssign( tmp, rhs.dv_ );
702  }
704  //**********************************************************************************************
705 
706  //**SMP assignment to sparse vectors************************************************************
720  template< typename VT2 > // Type of the target sparse vector
721  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
722  smpAssign( SparseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
723  {
725 
726  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
727 
728  SVecTransposer<VT2,!TF> tmp( ~lhs );
729  smpAssign( tmp, rhs.dv_ );
730  }
732  //**********************************************************************************************
733 
734  //**SMP addition assignment to dense vectors****************************************************
748  template< typename VT2 > // Type of the target dense vector
749  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
750  smpAddAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
751  {
753 
754  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
755 
756  DVecTransposer<VT2,!TF> tmp( ~lhs );
757  smpAddAssign( tmp, rhs.dv_ );
758  }
760  //**********************************************************************************************
761 
762  //**SMP addition assignment to sparse vectors***************************************************
763  // No special implementation for the SMP addition assignment to sparse vectors.
764  //**********************************************************************************************
765 
766  //**SMP subtraction assignment to dense vectors*************************************************
780  template< typename VT2 > // Type of the target dense vector
781  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
782  smpSubAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
783  {
785 
786  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
787 
788  DVecTransposer<VT2,!TF> tmp( ~lhs );
789  smpSubAssign( tmp, rhs.dv_ );
790  }
792  //**********************************************************************************************
793 
794  //**SMP subtraction assignment to sparse vectors************************************************
795  // No special implementation for the SMP subtraction assignment to sparse vectors.
796  //**********************************************************************************************
797 
798  //**SMP multiplication assignment to dense vectors**********************************************
812  template< typename VT2 > // Type of the target dense vector
813  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
814  smpMultAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
815  {
817 
818  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
819 
820  DVecTransposer<VT2,!TF> tmp( ~lhs );
821  smpMultAssign( tmp, rhs.dv_ );
822  }
824  //**********************************************************************************************
825 
826  //**SMP multiplication assignment to sparse vectors*********************************************
827  // No special implementation for the SMP multiplication assignment to sparse vectors.
828  //**********************************************************************************************
829 
830  //**Trans function******************************************************************************
848  template< typename VT2 // Type of the dense vector
849  , bool TF2 > // Transpose flag of the dense vector
850  friend inline Operand trans( const DVecTransExpr<VT2,TF2>& dv )
851  {
853 
854  return dv.dv_;
855  }
857  //**********************************************************************************************
858 
859  //**Compile time checks*************************************************************************
864  //**********************************************************************************************
865 };
866 //*************************************************************************************************
867 
868 
869 
870 
871 //=================================================================================================
872 //
873 // GLOBAL OPERATORS
874 //
875 //=================================================================================================
876 
877 //*************************************************************************************************
896 template< typename VT // Type of the dense vector
897  , bool TF > // Transpose flag
899 {
901 
902  return DVecTransExpr<VT,!TF>( ~dv );
903 }
904 //*************************************************************************************************
905 
906 
907 
908 
909 //=================================================================================================
910 //
911 // SIZE SPECIALIZATIONS
912 //
913 //=================================================================================================
914 
915 //*************************************************************************************************
917 template< typename VT, bool TF >
918 struct Size< DVecTransExpr<VT,TF> >
919  : public Size<VT>
920 {};
922 //*************************************************************************************************
923 
924 
925 
926 
927 //=================================================================================================
928 //
929 // EXPRESSION TRAIT SPECIALIZATIONS
930 //
931 //=================================================================================================
932 
933 //*************************************************************************************************
935 template< typename VT, bool TF, bool AF >
936 struct SubvectorExprTrait< DVecTransExpr<VT,TF>, AF >
937 {
938  public:
939  //**********************************************************************************************
940  typedef typename TransExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
941  //**********************************************************************************************
942 };
944 //*************************************************************************************************
945 
946 } // namespace blaze
947 
948 #endif
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecTransExpr.h:496
Pointer difference type of the Blaze library.
VT::TransposeType ResultType
Result type for expression template evaluations.
Definition: DVecTransExpr.h:128
BLAZE_ALWAYS_INLINE void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:879
ElementType & ReferenceType
Reference return type.
Definition: DVecTransExpr.h:153
const ElementType * data() const
Low-level data access to the vector elements.
Definition: DVecTransExpr.h:432
Base class for all vector transposition expression templates.The VecTransExpr class serves as a tag f...
Definition: VecTransExpr.h:65
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecTransExpr.h:217
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:258
VT::ConstIterator IteratorType
ConstIterator type of the dense vector expression.
Definition: DVecTransExpr.h:164
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecTransExpr.h:150
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2478
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecTransExpr.h:452
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecTransExpr.h:227
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecTransExpr.h:183
Header file for the DenseVector base class.
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecTransExpr.h:359
Header file for the Computation base class.
Iterator over the elements of the dense vector.
Definition: DVecTransExpr.h:146
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecTransExpr.h:134
Header file for the RequiresEvaluation type trait.
SelectType< useAssign, const ResultType, const DVecTransExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecTransExpr.h:137
ConstIterator(IteratorType iterator)
Constructor for the ConstIterator class.
Definition: DVecTransExpr.h:172
IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecTransExpr.h:419
Expression object for the transposition of a dense vector.The DVecTransposer class is a wrapper objec...
Definition: DVecTransposer.h:71
Operand dv_
Dense vector of the transposition expression.
Definition: DVecTransExpr.h:523
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DVecTransExpr.h:131
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the dense vector expression.
Definition: DVecTransExpr.h:140
ReferenceType reference
Reference return type.
Definition: DVecTransExpr.h:160
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecTransExpr.h:258
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:280
ElementType ValueType
Type of the underlying elements.
Definition: DVecTransExpr.h:151
Header file for the dense vector transposer.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DVecTransExpr.h:516
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecTransExpr.h:195
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
BLAZE_ALWAYS_INLINE void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:635
VT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: DVecTransExpr.h:129
Expression object for the transposition of a sparse vector.The SVecTransposer class is a wrapper obje...
Definition: Forward.h:123
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecTransExpr.h:484
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:302
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecTransExpr.h:154
Constraint on the data type.
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:324
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2475
Constraint on the data type.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecTransExpr.h:248
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:269
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecTransExpr.h:335
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:313
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2477
Header file for the VecTransExpr base class.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
BLAZE_ALWAYS_INLINE void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:742
VT::ElementType ElementType
Resulting element type.
Definition: DVecTransExpr.h:130
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecTransExpr.h:347
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
PointerType pointer
Pointer return type.
Definition: DVecTransExpr.h:159
Header file for the TransExprTrait class template.
VT::CompositeType CT
Composite type of the dense vector expression.
Definition: DVecTransExpr.h:89
DVecTransExpr(const VT &dv)
Constructor for the DVecTransExpr class.
Definition: DVecTransExpr.h:396
DifferenceType difference_type
Difference between two iterators.
Definition: DVecTransExpr.h:161
ElementType * PointerType
Pointer return type.
Definition: DVecTransExpr.h:152
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecTransExpr.h:238
Header file for all intrinsic functionality.
#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
Header file for the sparse vector transposer.
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecTransExpr.h:206
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:932
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecTransExpr.h:506
Header file for the IsComputation type trait class.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2473
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:291
IteratorCategory iterator_category
The iterator category.
Definition: DVecTransExpr.h:157
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecTransExpr.h:462
Header file for basic type definitions.
Header file for the SubvectorExprTrait class template.
Expression object for dense vector transpositions.The DVecTransExpr class represents the compile time...
Definition: DVecTransExpr.h:83
IteratorType iterator_
Iterator to the current element.
Definition: DVecTransExpr.h:378
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecTransExpr.h:407
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecTransExpr.h:442
Header file for the empty type.
ValueType value_type
Type of the underlying elements.
Definition: DVecTransExpr.h:158
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecTransExpr.h:371
EnableIf< IsDenseVector< VT1 > >::Type smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:189
Header file for the Size type trait.
#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
Operand operand() const
Returns the dense vector operand.
Definition: DVecTransExpr.h:472
#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
DVecTransExpr< VT, TF > This
Type of this DVecTransExpr instance.
Definition: DVecTransExpr.h:127
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:849