All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecDVecAddExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECDVECADDEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECDVECADDEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
50 #include <blaze/math/Intrinsics.h>
58 #include <blaze/util/Assert.h>
62 #include <blaze/util/EnableIf.h>
64 #include <blaze/util/SelectType.h>
65 #include <blaze/util/Types.h>
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // CLASS DVECDVECADDEXPR
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
84 template< typename VT1 // Type of the left-hand side dense vector
85  , typename VT2 // Type of the right-hand side dense vector
86  , bool TF > // Transpose flag
87 class DVecDVecAddExpr : public DenseVector< DVecDVecAddExpr<VT1,VT2,TF>, TF >
88  , private VecVecAddExpr
89  , private Computation
90 {
91  private:
92  //**Type definitions****************************************************************************
93  typedef typename VT1::ResultType RE1;
94  typedef typename VT2::ResultType RE2;
95  typedef typename VT1::ReturnType RN1;
96  typedef typename VT2::ReturnType RN2;
97  typedef typename VT1::CompositeType CT1;
98  typedef typename VT2::CompositeType CT2;
99  typedef typename VT1::ElementType ET1;
100  typedef typename VT2::ElementType ET2;
101  //**********************************************************************************************
102 
103  //**Return type evaluation**********************************************************************
105 
110  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
111 
114  //**********************************************************************************************
115 
116  //**Evaluation strategy*************************************************************************
118 
124  enum { useAssign = ( RequiresEvaluation<VT1>::value || RequiresEvaluation<VT2>::value || !returnExpr ) };
125 
127  template< typename VT >
129  struct UseAssign {
130  enum { value = useAssign };
131  };
133  //**********************************************************************************************
134 
135  public:
136  //**Type definitions****************************************************************************
142 
145 
148 
150  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
151 
153  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
154  //**********************************************************************************************
155 
156  //**ConstIterator class definition**************************************************************
160  {
161  public:
162  //**Type definitions*************************************************************************
163  typedef std::random_access_iterator_tag IteratorCategory;
164  typedef ElementType ValueType;
165  typedef ElementType* PointerType;
166  typedef ElementType& ReferenceType;
168 
169  // STL iterator requirements
175 
178 
181  //*******************************************************************************************
182 
183  //**Constructor******************************************************************************
189  explicit inline ConstIterator( LeftIteratorType left, RightIteratorType right )
190  : left_ ( left ) // Iterator to the current left-hand side element
191  , right_( right ) // Iterator to the current right-hand side element
192  {}
193  //*******************************************************************************************
194 
195  //**Addition assignment operator*************************************************************
201  inline ConstIterator& operator+=( size_t inc ) {
202  left_ += inc;
203  right_ += inc;
204  return *this;
205  }
206  //*******************************************************************************************
207 
208  //**Subtraction assignment operator**********************************************************
214  inline ConstIterator& operator-=( size_t dec ) {
215  left_ -= dec;
216  right_ -= dec;
217  return *this;
218  }
219  //*******************************************************************************************
220 
221  //**Prefix increment operator****************************************************************
227  ++left_;
228  ++right_;
229  return *this;
230  }
231  //*******************************************************************************************
232 
233  //**Postfix increment operator***************************************************************
238  inline const ConstIterator operator++( int ) {
239  return ConstIterator( left_++, right_++ );
240  }
241  //*******************************************************************************************
242 
243  //**Prefix decrement operator****************************************************************
249  --left_;
250  --right_;
251  return *this;
252  }
253  //*******************************************************************************************
254 
255  //**Postfix decrement operator***************************************************************
260  inline const ConstIterator operator--( int ) {
261  return ConstIterator( left_--, right_-- );
262  }
263  //*******************************************************************************************
264 
265  //**Element access operator******************************************************************
270  inline ReturnType operator*() const {
271  return (*left_) + (*right_);
272  }
273  //*******************************************************************************************
274 
275  //**Load function****************************************************************************
280  inline IntrinsicType load() const {
281  return left_.load() + right_.load();
282  }
283  //*******************************************************************************************
284 
285  //**Equality operator************************************************************************
291  inline bool operator==( const ConstIterator& rhs ) const {
292  return left_ == rhs.left_;
293  }
294  //*******************************************************************************************
295 
296  //**Inequality operator**********************************************************************
302  inline bool operator!=( const ConstIterator& rhs ) const {
303  return left_ != rhs.left_;
304  }
305  //*******************************************************************************************
306 
307  //**Less-than operator***********************************************************************
313  inline bool operator<( const ConstIterator& rhs ) const {
314  return left_ < rhs.left_;
315  }
316  //*******************************************************************************************
317 
318  //**Greater-than operator********************************************************************
324  inline bool operator>( const ConstIterator& rhs ) const {
325  return left_ > rhs.left_;
326  }
327  //*******************************************************************************************
328 
329  //**Less-or-equal-than operator**************************************************************
335  inline bool operator<=( const ConstIterator& rhs ) const {
336  return left_ <= rhs.left_;
337  }
338  //*******************************************************************************************
339 
340  //**Greater-or-equal-than operator***********************************************************
346  inline bool operator>=( const ConstIterator& rhs ) const {
347  return left_ >= rhs.left_;
348  }
349  //*******************************************************************************************
350 
351  //**Subtraction operator*********************************************************************
357  inline DifferenceType operator-( const ConstIterator& rhs ) const {
358  return left_ - rhs.left_;
359  }
360  //*******************************************************************************************
361 
362  //**Addition operator************************************************************************
369  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
370  return ConstIterator( it.left_ + inc, it.right_ + inc );
371  }
372  //*******************************************************************************************
373 
374  //**Addition operator************************************************************************
381  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
382  return ConstIterator( it.left_ + inc, it.right_ + inc );
383  }
384  //*******************************************************************************************
385 
386  //**Subtraction operator*********************************************************************
393  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
394  return ConstIterator( it.left_ - dec, it.right_ - dec );
395  }
396  //*******************************************************************************************
397 
398  private:
399  //**Member variables*************************************************************************
402  //*******************************************************************************************
403  };
404  //**********************************************************************************************
405 
406  //**Compilation flags***************************************************************************
408  enum { vectorizable = VT1::vectorizable && VT2::vectorizable &&
411 
413  enum { smpAssignable = VT1::smpAssignable && VT2::smpAssignable };
414  //**********************************************************************************************
415 
416  //**Constructor*********************************************************************************
422  explicit inline DVecDVecAddExpr( const VT1& lhs, const VT2& rhs )
423  : lhs_( lhs ) // Left-hand side dense vector of the addition expression
424  , rhs_( rhs ) // Right-hand side dense vector of the addition expression
425  {
426  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
427  }
428  //**********************************************************************************************
429 
430  //**Subscript operator**************************************************************************
436  inline ReturnType operator[]( size_t index ) const {
437  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
438  return lhs_[index] + rhs_[index];
439  }
440  //**********************************************************************************************
441 
442  //**Load function*******************************************************************************
448  inline IntrinsicType load( size_t index ) const {
449  typedef IntrinsicTrait<ElementType> IT;
450  BLAZE_INTERNAL_ASSERT( index < lhs_.size() , "Invalid vector access index" );
451  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL, "Invalid vector access index" );
452  const IntrinsicType xmm1( lhs_.load( index ) );
453  const IntrinsicType xmm2( rhs_.load( index ) );
454  return xmm1 + xmm2;
455  }
456  //**********************************************************************************************
457 
458  //**Begin function******************************************************************************
463  inline ConstIterator begin() const {
464  return ConstIterator( lhs_.begin(), rhs_.begin() );
465  }
466  //**********************************************************************************************
467 
468  //**End function********************************************************************************
473  inline ConstIterator end() const {
474  return ConstIterator( lhs_.end(), rhs_.end() );
475  }
476  //**********************************************************************************************
477 
478  //**Size function*******************************************************************************
483  inline size_t size() const {
484  return lhs_.size();
485  }
486  //**********************************************************************************************
487 
488  //**Left operand access*************************************************************************
493  inline LeftOperand leftOperand() const {
494  return lhs_;
495  }
496  //**********************************************************************************************
497 
498  //**Right operand access************************************************************************
503  inline RightOperand rightOperand() const {
504  return rhs_;
505  }
506  //**********************************************************************************************
507 
508  //**********************************************************************************************
514  template< typename T >
515  inline bool canAlias( const T* alias ) const {
516  return ( IsComputation<VT1>::value && ( RequiresEvaluation<VT1>::value ? lhs_.isAliased( alias ) : lhs_.canAlias( alias ) ) ) ||
517  ( IsComputation<VT2>::value && ( RequiresEvaluation<VT2>::value ? rhs_.isAliased( alias ) : rhs_.canAlias( alias ) ) );
518  }
519  //**********************************************************************************************
520 
521  //**********************************************************************************************
527  template< typename T >
528  inline bool isAliased( const T* alias ) const {
529  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
530  }
531  //**********************************************************************************************
532 
533  private:
534  //**Member variables****************************************************************************
535  LeftOperand lhs_;
536  RightOperand rhs_;
537  //**********************************************************************************************
538 
539  //**Assignment to dense vectors*****************************************************************
553  template< typename VT3 > // Type of the target dense vector
554  friend inline typename EnableIf< UseAssign<VT3> >::Type
555  assign( DenseVector<VT3,TF>& lhs, const DVecDVecAddExpr& rhs )
556  {
558 
559  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
560 
561  if( !IsComputation<VT1>::value && (~lhs).isAliased( &rhs.lhs_ ) ) {
562  addAssign( ~lhs, rhs.rhs_ );
563  }
564  else if( !IsComputation<VT2>::value && (~lhs).isAliased( &rhs.rhs_ ) ) {
565  addAssign( ~lhs, rhs.lhs_ );
566  }
567  else {
568  assign ( ~lhs, rhs.lhs_ );
569  addAssign( ~lhs, rhs.rhs_ );
570  }
571  }
573  //**********************************************************************************************
574 
575  //**Assignment to sparse vectors****************************************************************
589  template< typename VT3 > // Type of the target sparse vector
590  friend inline typename EnableIf< UseAssign<VT3> >::Type
591  assign( SparseVector<VT3,TF>& lhs, const DVecDVecAddExpr& rhs )
592  {
594 
598 
599  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
600 
601  const ResultType tmp( rhs );
602  assign( ~lhs, tmp );
603  }
605  //**********************************************************************************************
606 
607  //**Addition assignment to dense vectors********************************************************
621  template< typename VT3 > // Type of the target dense vector
622  friend inline typename EnableIf< UseAssign<VT3> >::Type
623  addAssign( DenseVector<VT3,TF>& lhs, const DVecDVecAddExpr& rhs )
624  {
626 
627  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
628 
629  addAssign( ~lhs, rhs.lhs_ );
630  addAssign( ~lhs, rhs.rhs_ );
631  }
633  //**********************************************************************************************
634 
635  //**Addition assignment to sparse vectors*******************************************************
636  // No special implementation for the addition assignment to sparse vectors.
637  //**********************************************************************************************
638 
639  //**Subtraction assignment to dense vectors*****************************************************
653  template< typename VT3 > // Type of the target dense vector
654  friend inline typename EnableIf< UseAssign<VT3> >::Type
655  subAssign( DenseVector<VT3,TF>& lhs, const DVecDVecAddExpr& rhs )
656  {
658 
659  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
660 
661  subAssign( ~lhs, rhs.lhs_ );
662  subAssign( ~lhs, rhs.rhs_ );
663  }
665  //**********************************************************************************************
666 
667  //**Subtraction assignment to sparse vectors****************************************************
668  // No special implementation for the subtraction assignment to sparse vectors.
669  //**********************************************************************************************
670 
671  //**Multiplication assignment to dense vectors**************************************************
685  template< typename VT3 > // Type of the target dense vector
686  friend inline typename EnableIf< UseAssign<VT3> >::Type
687  multAssign( DenseVector<VT3,TF>& lhs, const DVecDVecAddExpr& rhs )
688  {
690 
694 
695  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
696 
697  const ResultType tmp( rhs );
698  multAssign( ~lhs, tmp );
699  }
701  //**********************************************************************************************
702 
703  //**Multiplication assignment to sparse vectors*************************************************
704  // No special implementation for the multiplication assignment to sparse vectors.
705  //**********************************************************************************************
706 
707  //**Compile time checks*************************************************************************
714  //**********************************************************************************************
715 };
716 //*************************************************************************************************
717 
718 
719 
720 
721 //=================================================================================================
722 //
723 // GLOBAL BINARY ARITHMETIC OPERATORS
724 //
725 //=================================================================================================
726 
727 //*************************************************************************************************
751 template< typename T1 // Type of the left-hand side dense vector
752  , typename T2 // Type of the right-hand side dense vector
753  , bool TF > // Transpose flag
754 inline const DVecDVecAddExpr<T1,T2,TF>
756 {
758 
759  if( (~lhs).size() != (~rhs).size() )
760  throw std::invalid_argument( "Vector sizes do not match" );
761 
762  return DVecDVecAddExpr<T1,T2,TF>( ~lhs, ~rhs );
763 }
764 //*************************************************************************************************
765 
766 
767 
768 
769 //=================================================================================================
770 //
771 // EXPRESSION TRAIT SPECIALIZATIONS
772 //
773 //=================================================================================================
774 
775 //*************************************************************************************************
777 template< typename VT1, typename VT2, bool TF >
778 struct SubvectorExprTrait< DVecDVecAddExpr<VT1,VT2,TF> >
779 {
780  public:
781  //**********************************************************************************************
782  typedef typename AddExprTrait< typename SubvectorExprTrait<const VT1>::Type
783  , typename SubvectorExprTrait<const VT2>::Type >::Type Type;
784  //**********************************************************************************************
785 };
787 //*************************************************************************************************
788 
789 } // namespace blaze
790 
791 #endif
VT1::ReturnType RN1
Return type of the left-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:95
Iterator over the elements of the dense vector.
Definition: DVecDVecAddExpr.h:159
Pointer difference type of the Blaze library.
ConstIterator(LeftIteratorType left, RightIteratorType right)
Constructor for the ConstIterator class.
Definition: DVecDVecAddExpr.h:189
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
Evaluation of the return type of an addition expression.Via this type trait it is possible to evaluat...
Definition: AddExprTrait.h:103
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecDVecAddExpr.h:357
PointerType pointer
Pointer return type.
Definition: DVecDVecAddExpr.h:172
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecDVecAddExpr.h:515
IteratorCategory iterator_category
The iterator category.
Definition: DVecDVecAddExpr.h:170
VT2::ResultType RE2
Result type of the right-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:94
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecDVecAddExpr.h:463
Header file for the IsSame and IsStrictlySame type traits.
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecDVecAddExpr.h:483
VT1::ConstIterator LeftIteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:177
ElementType ValueType
Type of the underlying elements.
Definition: DVecDVecAddExpr.h:164
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:248
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecDVecAddExpr.h:291
Header file for the DenseVector base class.
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:150
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecDVecAddExpr.h:270
Header file for the AddExprTrait class template.
DVecDVecAddExpr< VT1, VT2, TF > This
Type of this DVecDVecAddExpr instance.
Definition: DVecDVecAddExpr.h:137
Header file for the Computation base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
RightOperand rhs_
Right-hand side dense vector of the addition expression.
Definition: DVecDVecAddExpr.h:536
Header file for the RequiresEvaluation type trait.
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecDVecAddExpr.h:163
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecDVecAddExpr.h:141
Constraint on the data type.
SelectType< useAssign, const ResultType, const DVecDVecAddExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecDVecAddExpr.h:147
LeftOperand leftOperand() const
Returns the left-hand side dense vector operand.
Definition: DVecDVecAddExpr.h:493
Constraint on the data type.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecDVecAddExpr.h:214
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:250
AddTrait< RE1, RE2 >::Type ResultType
Result type for expression template evaluations.
Definition: DVecDVecAddExpr.h:138
VT1::ResultType RE1
Result type of the left-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:93
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecDVecAddExpr.h:381
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the IsTemporary type trait class.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecDVecAddExpr.h:167
VT1::CompositeType CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:97
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecAddExpr.h:335
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecDVecAddExpr.h:248
Header file for the VecVecAddExpr base class.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecAddExpr.h:324
VT2::ElementType ET2
Element type of the right-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:100
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecDVecAddExpr.h:144
ElementType & ReferenceType
Reference return type.
Definition: DVecDVecAddExpr.h:166
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:179
const DenseIterator< Type > operator+(const DenseIterator< Type > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:556
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DVecDVecAddExpr.h:401
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
Constraint on the data type.
AddExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecDVecAddExpr.h:113
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecDVecAddExpr.h:201
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
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:269
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
VT2::ConstIterator RightIteratorType
ConstIterator type of the right-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:180
Base class for all vector/vector addition expression templates.The VecVecAddExpr class serves as a ta...
Definition: VecVecAddExpr.h:65
Header file for the EnableIf class template.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecDVecAddExpr.h:260
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecDVecAddExpr.h:473
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecAddExpr.h:346
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:141
ElementType * PointerType
Pointer return type.
Definition: DVecDVecAddExpr.h:165
Header file for the addition trait.
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:209
RightOperand rightOperand() const
Returns the right-hand side dense vector operand.
Definition: DVecDVecAddExpr.h:503
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
VT1::ElementType ET1
Element type of the left-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:99
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:153
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:239
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecDVecAddExpr.h:238
VT2::ReturnType RN2
Return type of the right-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:96
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DVecDVecAddExpr.h:400
LeftOperand lhs_
Left-hand side dense vector of the addition expression.
Definition: DVecDVecAddExpr.h:535
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecDVecAddExpr.h:393
Expression object for dense vector-dense vector additions.The DVecDVecAddExpr class represents the co...
Definition: DVecDVecAddExpr.h:87
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecDVecAddExpr.h:369
Header file for all intrinsic functionality.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecDVecAddExpr.h:436
#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
IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecDVecAddExpr.h:448
ValueType value_type
Type of the underlying elements.
Definition: DVecDVecAddExpr.h:171
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecDVecAddExpr.h:302
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecDVecAddExpr.h:226
DifferenceType difference_type
Difference between two iterators.
Definition: DVecDVecAddExpr.h:174
VT2::CompositeType CT2
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecAddExpr.h:98
Header file for the IsComputation type trait class.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
DVecDVecAddExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the DVecDVecAddExpr class.
Definition: DVecDVecAddExpr.h:422
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
#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
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecDVecAddExpr.h:139
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecDVecAddExpr.h:528
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecAddExpr.h:313
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
Header file for basic type definitions.
Header file for the SubvectorExprTrait class template.
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecDVecAddExpr.h:280
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:238
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
ReferenceType reference
Reference return type.
Definition: DVecDVecAddExpr.h:173
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
ResultType::ElementType ElementType
Resulting element type.
Definition: DVecDVecAddExpr.h:140