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/system/Inline.h>
59 #include <blaze/util/Assert.h>
60 #include <blaze/util/EmptyType.h>
61 #include <blaze/util/EnableIf.h>
63 #include <blaze/util/SelectType.h>
64 #include <blaze/util/Types.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DVECTRANSEXPR
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
82 template< typename VT // Type of the dense vector
83  , bool TF > // Transpose flag
84 class DVecTransExpr : public DenseVector< DVecTransExpr<VT,TF>, TF >
85  , private VecTransExpr
86  , private SelectType< IsComputation<VT>::value, Computation, EmptyType >::Type
87 {
88  private:
89  //**Type definitions****************************************************************************
90  typedef typename VT::CompositeType CT;
91  //**********************************************************************************************
92 
93  //**Serial evaluation strategy******************************************************************
95 
101  enum { useAssign = RequiresEvaluation<VT>::value };
102 
104  template< typename VT2 >
106  struct UseAssign {
107  enum { value = useAssign };
108  };
110  //**********************************************************************************************
111 
112  //**Parallel evaluation strategy****************************************************************
114 
119  template< typename VT2 >
120  struct UseSMPAssign {
121  enum { value = VT2::smpAssignable && useAssign };
122  };
124  //**********************************************************************************************
125 
126  public:
127  //**Type definitions****************************************************************************
129  typedef typename VT::TransposeType ResultType;
130  typedef typename VT::ResultType TransposeType;
131  typedef typename VT::ElementType ElementType;
132  typedef typename VT::ReturnType ReturnType;
133 
136 
139 
141  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type Operand;
142  //**********************************************************************************************
143 
144  //**ConstIterator class definition**************************************************************
148  {
149  public:
150  //**Type definitions*************************************************************************
151  typedef std::random_access_iterator_tag IteratorCategory;
152  typedef ElementType ValueType;
153  typedef ElementType* PointerType;
154  typedef ElementType& ReferenceType;
156 
157  // STL iterator requirements
158  typedef IteratorCategory iterator_category;
159  typedef ValueType value_type;
160  typedef PointerType pointer;
161  typedef ReferenceType reference;
162  typedef DifferenceType difference_type;
163 
165  typedef typename VT::ConstIterator IteratorType;
166  //*******************************************************************************************
167 
168  //**Constructor******************************************************************************
173  explicit inline ConstIterator( IteratorType iterator )
174  : iterator_( iterator ) // Iterator to the current element
175  {}
176  //*******************************************************************************************
177 
178  //**Addition assignment operator*************************************************************
184  inline ConstIterator& operator+=( size_t inc ) {
185  iterator_ += inc;
186  return *this;
187  }
188  //*******************************************************************************************
189 
190  //**Subtraction assignment operator**********************************************************
196  inline ConstIterator& operator-=( size_t dec ) {
197  iterator_ -= dec;
198  return *this;
199  }
200  //*******************************************************************************************
201 
202  //**Prefix increment operator****************************************************************
208  ++iterator_;
209  return *this;
210  }
211  //*******************************************************************************************
212 
213  //**Postfix increment operator***************************************************************
218  inline const ConstIterator operator++( int ) {
219  return ConstIterator( iterator_++ );
220  }
221  //*******************************************************************************************
222 
223  //**Prefix decrement operator****************************************************************
229  --iterator_;
230  return *this;
231  }
232  //*******************************************************************************************
233 
234  //**Postfix decrement operator***************************************************************
239  inline const ConstIterator operator--( int ) {
240  return ConstIterator( iterator_-- );
241  }
242  //*******************************************************************************************
243 
244  //**Element access operator******************************************************************
249  inline ReturnType operator*() const {
250  return *iterator_;
251  }
252  //*******************************************************************************************
253 
254  //**Load function****************************************************************************
259  inline IntrinsicType load() const {
260  return iterator_.load();
261  }
262  //*******************************************************************************************
263 
264  //**Equality operator************************************************************************
270  inline bool operator==( const ConstIterator& rhs ) const {
271  return iterator_ == rhs.iterator_;
272  }
273  //*******************************************************************************************
274 
275  //**Inequality operator**********************************************************************
281  inline bool operator!=( const ConstIterator& rhs ) const {
282  return iterator_ != rhs.iterator_;
283  }
284  //*******************************************************************************************
285 
286  //**Less-than operator***********************************************************************
292  inline bool operator<( const ConstIterator& rhs ) const {
293  return iterator_ < rhs.iterator_;
294  }
295  //*******************************************************************************************
296 
297  //**Greater-than operator********************************************************************
303  inline bool operator>( const ConstIterator& rhs ) const {
304  return iterator_ > rhs.iterator_;
305  }
306  //*******************************************************************************************
307 
308  //**Less-or-equal-than operator**************************************************************
314  inline bool operator<=( const ConstIterator& rhs ) const {
315  return iterator_ <= rhs.iterator_;
316  }
317  //*******************************************************************************************
318 
319  //**Greater-or-equal-than operator***********************************************************
325  inline bool operator>=( const ConstIterator& rhs ) const {
326  return iterator_ >= rhs.iterator_;
327  }
328  //*******************************************************************************************
329 
330  //**Subtraction operator*********************************************************************
336  inline DifferenceType operator-( const ConstIterator& rhs ) const {
337  return iterator_ - rhs.iterator_;
338  }
339  //*******************************************************************************************
340 
341  //**Addition operator************************************************************************
348  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
349  return ConstIterator( it.iterator_ + inc );
350  }
351  //*******************************************************************************************
352 
353  //**Addition operator************************************************************************
360  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
361  return ConstIterator( it.iterator_ + inc );
362  }
363  //*******************************************************************************************
364 
365  //**Subtraction operator*********************************************************************
372  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
373  return ConstIterator( it.iterator_ - dec );
374  }
375  //*******************************************************************************************
376 
377  private:
378  //**Member variables*************************************************************************
379  IteratorType iterator_;
380  //*******************************************************************************************
381  };
382  //**********************************************************************************************
383 
384  //**Compilation flags***************************************************************************
386  enum { vectorizable = VT::vectorizable };
387 
389  enum { smpAssignable = VT::smpAssignable };
390  //**********************************************************************************************
391 
392  //**Constructor*********************************************************************************
397  explicit inline DVecTransExpr( const VT& dv )
398  : dv_( dv ) // Dense vector of the transposition expression
399  {}
400  //**********************************************************************************************
401 
402  //**Subscript operator**************************************************************************
408  inline ReturnType operator[]( size_t index ) const {
409  BLAZE_INTERNAL_ASSERT( index < dv_.size(), "Invalid vector access index" );
410  return dv_[index];
411  }
412  //**********************************************************************************************
413 
414  //**Load function*******************************************************************************
420  BLAZE_ALWAYS_INLINE IntrinsicType load( size_t index ) const {
421  typedef IntrinsicTrait<ElementType> IT;
422  BLAZE_INTERNAL_ASSERT( index < dv_.size() , "Invalid vector access index" );
423  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL , "Invalid vector access index" );
424  return dv_.load( index );
425  }
426  //**********************************************************************************************
427 
428  //**Low-level data access***********************************************************************
433  inline const ElementType* data() const {
434  return dv_.data();
435  }
436  //**********************************************************************************************
437 
438  //**Begin function******************************************************************************
443  inline ConstIterator begin() const {
444  return ConstIterator( dv_.begin() );
445  }
446  //**********************************************************************************************
447 
448  //**End function********************************************************************************
453  inline ConstIterator end() const {
454  return ConstIterator( dv_.end() );
455  }
456  //**********************************************************************************************
457 
458  //**Size function*******************************************************************************
463  inline size_t size() const {
464  return dv_.size();
465  }
466  //**********************************************************************************************
467 
468  //**Operand access******************************************************************************
473  inline Operand operand() const {
474  return dv_;
475  }
476  //**********************************************************************************************
477 
478  //**********************************************************************************************
484  template< typename T >
485  inline bool canAlias( const T* alias ) const {
486  return dv_.canAlias( alias );
487  }
488  //**********************************************************************************************
489 
490  //**********************************************************************************************
496  template< typename T >
497  inline bool isAliased( const T* alias ) const {
498  return dv_.isAliased( alias );
499  }
500  //**********************************************************************************************
501 
502  //**********************************************************************************************
507  inline bool isAligned() const {
508  return dv_.isAligned();
509  }
510  //**********************************************************************************************
511 
512  //**********************************************************************************************
517  inline bool canSMPAssign() const {
518  return dv_.canSMPAssign();
519  }
520  //**********************************************************************************************
521 
522  private:
523  //**Member variables****************************************************************************
524  Operand dv_;
525  //**********************************************************************************************
526 
527  //**Assignment to dense vectors*****************************************************************
541  template< typename VT2 > // Type of the target dense vector
542  friend inline typename EnableIf< UseAssign<VT2> >::Type
543  assign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
544  {
546 
547  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
548 
549  DVecTransposer<VT2,!TF> tmp( ~lhs );
550  assign( tmp, rhs.dv_ );
551  }
553  //**********************************************************************************************
554 
555  //**Assignment to sparse vectors****************************************************************
569  template< typename VT2 > // Type of the target sparse vector
570  friend inline typename EnableIf< UseAssign<VT2> >::Type
571  assign( SparseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
572  {
574 
575  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
576 
577  SVecTransposer<VT2,!TF> tmp( ~lhs );
578  assign( tmp, rhs.dv_ );
579  }
581  //**********************************************************************************************
582 
583  //**Addition assignment to dense vectors********************************************************
597  template< typename VT2 > // Type of the target dense vector
598  friend inline typename EnableIf< UseAssign<VT2> >::Type
599  addAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
600  {
602 
603  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
604 
605  DVecTransposer<VT2,!TF> tmp( ~lhs );
606  addAssign( tmp, rhs.dv_ );
607  }
609  //**********************************************************************************************
610 
611  //**Addition assignment to sparse vectors*******************************************************
612  // No special implementation for the addition assignment to sparse vectors.
613  //**********************************************************************************************
614 
615  //**Subtraction assignment to dense vectors*****************************************************
629  template< typename VT2 > // Type of the target dense vector
630  friend inline typename EnableIf< UseAssign<VT2> >::Type
631  subAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
632  {
634 
635  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
636 
637  DVecTransposer<VT2,!TF> tmp( ~lhs );
638  subAssign( tmp, rhs.dv_ );
639  }
641  //**********************************************************************************************
642 
643  //**Subtraction assignment to sparse vectors****************************************************
644  // No special implementation for the subtraction assignment to sparse vectors.
645  //**********************************************************************************************
646 
647  //**Multiplication assignment to dense vectors**************************************************
661  template< typename VT2 > // Type of the target dense vector
662  friend inline typename EnableIf< UseAssign<VT2> >::Type
663  multAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
664  {
666 
667  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
668 
669  DVecTransposer<VT2,!TF> tmp( ~lhs );
670  multAssign( tmp, rhs.dv_ );
671  }
673  //**********************************************************************************************
674 
675  //**Multiplication assignment to sparse vectors*************************************************
676  // No special implementation for the multiplication assignment to sparse vectors.
677  //**********************************************************************************************
678 
679  //**SMP assignment to dense vectors*************************************************************
693  template< typename VT2 > // Type of the target dense vector
694  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
695  smpAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
696  {
698 
699  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
700 
701  DVecTransposer<VT2,!TF> tmp( ~lhs );
702  smpAssign( tmp, rhs.dv_ );
703  }
705  //**********************************************************************************************
706 
707  //**SMP assignment to sparse vectors************************************************************
721  template< typename VT2 > // Type of the target sparse vector
722  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
723  smpAssign( SparseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
724  {
726 
727  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
728 
729  SVecTransposer<VT2,!TF> tmp( ~lhs );
730  smpAssign( tmp, rhs.dv_ );
731  }
733  //**********************************************************************************************
734 
735  //**SMP addition assignment to dense vectors****************************************************
749  template< typename VT2 > // Type of the target dense vector
750  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
751  smpAddAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
752  {
754 
755  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
756 
757  DVecTransposer<VT2,!TF> tmp( ~lhs );
758  smpAddAssign( tmp, rhs.dv_ );
759  }
761  //**********************************************************************************************
762 
763  //**SMP addition assignment to sparse vectors***************************************************
764  // No special implementation for the SMP addition assignment to sparse vectors.
765  //**********************************************************************************************
766 
767  //**SMP subtraction assignment to dense vectors*************************************************
781  template< typename VT2 > // Type of the target dense vector
782  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
783  smpSubAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
784  {
786 
787  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
788 
789  DVecTransposer<VT2,!TF> tmp( ~lhs );
790  smpSubAssign( tmp, rhs.dv_ );
791  }
793  //**********************************************************************************************
794 
795  //**SMP subtraction assignment to sparse vectors************************************************
796  // No special implementation for the SMP subtraction assignment to sparse vectors.
797  //**********************************************************************************************
798 
799  //**SMP multiplication assignment to dense vectors**********************************************
813  template< typename VT2 > // Type of the target dense vector
814  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
815  smpMultAssign( DenseVector<VT2,TF>& lhs, const DVecTransExpr& rhs )
816  {
818 
819  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
820 
821  DVecTransposer<VT2,!TF> tmp( ~lhs );
822  smpMultAssign( tmp, rhs.dv_ );
823  }
825  //**********************************************************************************************
826 
827  //**SMP multiplication assignment to sparse vectors*********************************************
828  // No special implementation for the SMP multiplication assignment to sparse vectors.
829  //**********************************************************************************************
830 
831  //**Trans function******************************************************************************
849  template< typename VT2 // Type of the dense vector
850  , bool TF2 > // Transpose flag of the dense vector
851  friend inline Operand trans( const DVecTransExpr<VT2,TF2>& dv )
852  {
854 
855  return dv.dv_;
856  }
858  //**********************************************************************************************
859 
860  //**Compile time checks*************************************************************************
865  //**********************************************************************************************
866 };
867 //*************************************************************************************************
868 
869 
870 
871 
872 //=================================================================================================
873 //
874 // GLOBAL OPERATORS
875 //
876 //=================================================================================================
877 
878 //*************************************************************************************************
897 template< typename VT // Type of the dense vector
898  , bool TF > // Transpose flag
900 {
902 
903  return DVecTransExpr<VT,!TF>( ~dv );
904 }
905 //*************************************************************************************************
906 
907 
908 
909 
910 //=================================================================================================
911 //
912 // SIZE SPECIALIZATIONS
913 //
914 //=================================================================================================
915 
916 //*************************************************************************************************
918 template< typename VT, bool TF >
919 struct Size< DVecTransExpr<VT,TF> >
920  : public Size<VT>
921 {};
923 //*************************************************************************************************
924 
925 
926 
927 
928 //=================================================================================================
929 //
930 // EXPRESSION TRAIT SPECIALIZATIONS
931 //
932 //=================================================================================================
933 
934 //*************************************************************************************************
936 template< typename VT, bool TF, bool AF >
937 struct SubvectorExprTrait< DVecTransExpr<VT,TF>, AF >
938 {
939  public:
940  //**********************************************************************************************
941  typedef typename TransExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
942  //**********************************************************************************************
943 };
945 //*************************************************************************************************
946 
947 } // namespace blaze
948 
949 #endif
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecTransExpr.h:497
Pointer difference type of the Blaze library.
VT::TransposeType ResultType
Result type for expression template evaluations.
Definition: DVecTransExpr.h:129
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:154
const ElementType * data() const
Low-level data access to the vector elements.
Definition: DVecTransExpr.h:433
Base class for all vector transposition expression templates.The VecTransExpr class serves as a tag f...
Definition: VecTransExpr.h:65
Header file for basic type definitions.
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecTransExpr.h:218
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
VT::ConstIterator IteratorType
ConstIterator type of the dense vector expression.
Definition: DVecTransExpr.h:165
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecTransExpr.h:151
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecTransExpr.h:453
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecTransExpr.h:228
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecTransExpr.h:184
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:360
Header file for the Computation base class.
Iterator over the elements of the dense vector.
Definition: DVecTransExpr.h:147
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecTransExpr.h:135
Header file for the RequiresEvaluation type trait.
SelectType< useAssign, const ResultType, const DVecTransExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecTransExpr.h:138
ConstIterator(IteratorType iterator)
Constructor for the ConstIterator class.
Definition: DVecTransExpr.h:173
Expression object for the transposition of a dense vector.The DVecTransposer class is a wrapper objec...
Definition: DVecTransposer.h:72
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecTransExpr.h:420
Operand dv_
Dense vector of the transposition expression.
Definition: DVecTransExpr.h:524
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DVecTransExpr.h:132
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:141
ReferenceType reference
Reference return type.
Definition: DVecTransExpr.h:161
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
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
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecTransExpr.h:259
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:281
ElementType ValueType
Type of the underlying elements.
Definition: DVecTransExpr.h:152
Header file for the dense vector transposer.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DVecTransExpr.h:517
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecTransExpr.h:196
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
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:130
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:485
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:303
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecTransExpr.h:155
Constraint on the data type.
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:325
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2504
Constraint on the data type.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecTransExpr.h:249
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:270
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:336
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:314
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:2506
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:131
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecTransExpr.h:348
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:160
Header file for the TransExprTrait class template.
VT::CompositeType CT
Composite type of the dense vector expression.
Definition: DVecTransExpr.h:90
DVecTransExpr(const VT &dv)
Constructor for the DVecTransExpr class.
Definition: DVecTransExpr.h:397
DifferenceType difference_type
Difference between two iterators.
Definition: DVecTransExpr.h:162
ElementType * PointerType
Pointer return type.
Definition: DVecTransExpr.h:153
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecTransExpr.h:239
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:207
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:937
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecTransExpr.h:507
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:2502
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecTransExpr.h:292
IteratorCategory iterator_category
The iterator category.
Definition: DVecTransExpr.h:158
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecTransExpr.h:463
Header file for the SubvectorExprTrait class template.
Expression object for dense vector transpositions.The DVecTransExpr class represents the compile time...
Definition: DVecTransExpr.h:84
IteratorType iterator_
Iterator to the current element.
Definition: DVecTransExpr.h:379
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecTransExpr.h:408
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecTransExpr.h:443
Header file for the empty type.
ValueType value_type
Type of the underlying elements.
Definition: DVecTransExpr.h:159
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecTransExpr.h:372
System settings for the inline keywords.
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:473
#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:128
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