All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecDVecMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECDVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECDVECMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
50 #include <blaze/math/Intrinsics.h>
58 #include <blaze/util/Assert.h>
60 #include <blaze/util/EnableIf.h>
62 #include <blaze/util/SelectType.h>
63 #include <blaze/util/Types.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DVECDVECMULTEXPR
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
82 template< typename VT1 // Type of the left-hand side dense vector
83  , typename VT2 // Type of the right-hand side dense vector
84  , bool TF > // Transpose flag
85 class DVecDVecMultExpr : public DenseVector< DVecDVecMultExpr<VT1,VT2,TF>, TF >
86  , private VecVecMultExpr
87  , private Computation
88 {
89  private:
90  //**Type definitions****************************************************************************
91  typedef typename VT1::ResultType RT1;
92  typedef typename VT2::ResultType RT2;
93  typedef typename VT1::ReturnType RN1;
94  typedef typename VT2::ReturnType RN2;
95  typedef typename VT1::CompositeType CT1;
96  typedef typename VT2::CompositeType CT2;
97  typedef typename VT1::ElementType ET1;
98  typedef typename VT2::ElementType ET2;
99  //**********************************************************************************************
100 
101  //**Return type evaluation**********************************************************************
103 
108  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
109 
112  //**********************************************************************************************
113 
114  //**Evaluation strategy*************************************************************************
116 
122  enum { useAssign = ( RequiresEvaluation<VT1>::value || RequiresEvaluation<VT2>::value || !returnExpr ) };
123 
125  template< typename VT >
127  struct UseAssign {
128  enum { value = useAssign };
129  };
131  //**********************************************************************************************
132 
133  public:
134  //**Type definitions****************************************************************************
140 
143 
146 
148  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
149 
151  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
152  //**********************************************************************************************
153 
154  //**ConstIterator class definition**************************************************************
158  {
159  public:
160  //**Type definitions*************************************************************************
161  typedef std::random_access_iterator_tag IteratorCategory;
162  typedef ElementType ValueType;
163  typedef ElementType* PointerType;
164  typedef ElementType& ReferenceType;
166 
167  // STL iterator requirements
173 
176 
179  //*******************************************************************************************
180 
181  //**Constructor******************************************************************************
187  explicit inline ConstIterator( LeftIteratorType left, RightIteratorType right )
188  : left_ ( left ) // Iterator to the current left-hand side element
189  , right_( right ) // Iterator to the current right-hand side element
190  {}
191  //*******************************************************************************************
192 
193  //**Addition assignment operator*************************************************************
199  inline ConstIterator& operator+=( size_t inc ) {
200  left_ += inc;
201  right_ += inc;
202  return *this;
203  }
204  //*******************************************************************************************
205 
206  //**Subtraction assignment operator**********************************************************
212  inline ConstIterator& operator-=( size_t dec ) {
213  left_ -= dec;
214  right_ -= dec;
215  return *this;
216  }
217  //*******************************************************************************************
218 
219  //**Prefix increment operator****************************************************************
225  ++left_;
226  ++right_;
227  return *this;
228  }
229  //*******************************************************************************************
230 
231  //**Postfix increment operator***************************************************************
236  inline const ConstIterator operator++( int ) {
237  return ConstIterator( left_++, right_++ );
238  }
239  //*******************************************************************************************
240 
241  //**Prefix decrement operator****************************************************************
247  --left_;
248  --right_;
249  return *this;
250  }
251  //*******************************************************************************************
252 
253  //**Postfix decrement operator***************************************************************
258  inline const ConstIterator operator--( int ) {
259  return ConstIterator( left_--, right_-- );
260  }
261  //*******************************************************************************************
262 
263  //**Element access operator******************************************************************
268  inline ReturnType operator*() const {
269  return (*left_) * (*right_);
270  }
271  //*******************************************************************************************
272 
273  //**Load function****************************************************************************
278  inline IntrinsicType load() const {
279  return left_.load() * right_.load();
280  }
281  //*******************************************************************************************
282 
283  //**Equality operator************************************************************************
289  inline bool operator==( const ConstIterator& rhs ) const {
290  return left_ == rhs.left_;
291  }
292  //*******************************************************************************************
293 
294  //**Inequality operator**********************************************************************
300  inline bool operator!=( const ConstIterator& rhs ) const {
301  return left_ != rhs.left_;
302  }
303  //*******************************************************************************************
304 
305  //**Less-than operator***********************************************************************
311  inline bool operator<( const ConstIterator& rhs ) const {
312  return left_ < rhs.left_;
313  }
314  //*******************************************************************************************
315 
316  //**Greater-than operator********************************************************************
322  inline bool operator>( const ConstIterator& rhs ) const {
323  return left_ > rhs.left_;
324  }
325  //*******************************************************************************************
326 
327  //**Less-or-equal-than operator**************************************************************
333  inline bool operator<=( const ConstIterator& rhs ) const {
334  return left_ <= rhs.left_;
335  }
336  //*******************************************************************************************
337 
338  //**Greater-or-equal-than operator***********************************************************
344  inline bool operator>=( const ConstIterator& rhs ) const {
345  return left_ >= rhs.left_;
346  }
347  //*******************************************************************************************
348 
349  //**Subtraction operator*********************************************************************
355  inline DifferenceType operator-( const ConstIterator& rhs ) const {
356  return left_ - rhs.left_;
357  }
358  //*******************************************************************************************
359 
360  //**Addition operator************************************************************************
367  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
368  return ConstIterator( it.left_ + inc, it.right_ + inc );
369  }
370  //*******************************************************************************************
371 
372  //**Addition operator************************************************************************
379  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
380  return ConstIterator( it.left_ + inc, it.right_ + inc );
381  }
382  //*******************************************************************************************
383 
384  //**Subtraction operator*********************************************************************
391  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
392  return ConstIterator( it.left_ - dec, it.right_ - dec );
393  }
394  //*******************************************************************************************
395 
396  private:
397  //**Member variables*************************************************************************
400  //*******************************************************************************************
401  };
402  //**********************************************************************************************
403 
404  //**Compilation flags***************************************************************************
406  enum { vectorizable = VT1::vectorizable && VT2::vectorizable &&
409 
411  enum { smpAssignable = VT1::smpAssignable && VT2::smpAssignable };
412  //**********************************************************************************************
413 
414  //**Constructor*********************************************************************************
420  explicit inline DVecDVecMultExpr( const VT1& lhs, const VT2& rhs )
421  : lhs_( lhs ) // Left-hand side dense vector of the multiplication expression
422  , rhs_( rhs ) // Right-hand side dense vector of the multiplication expression
423  {
424  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
425  }
426  //**********************************************************************************************
427 
428  //**Subscript operator**************************************************************************
434  inline ReturnType operator[]( size_t index ) const {
435  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
436  return lhs_[index] * rhs_[index];
437  }
438  //**********************************************************************************************
439 
440  //**Load function*******************************************************************************
446  inline IntrinsicType load( size_t index ) const {
447  typedef IntrinsicTrait<ElementType> IT;
448  BLAZE_INTERNAL_ASSERT( index < lhs_.size() , "Invalid vector access index" );
449  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL, "Invalid vector access index" );
450  const IntrinsicType xmm1( lhs_.load( index ) );
451  const IntrinsicType xmm2( rhs_.load( index ) );
452  return xmm1 * xmm2;
453  }
454  //**********************************************************************************************
455 
456  //**Begin function******************************************************************************
461  inline ConstIterator begin() const {
462  return ConstIterator( lhs_.begin(), rhs_.begin() );
463  }
464  //**********************************************************************************************
465 
466  //**End function********************************************************************************
471  inline ConstIterator end() const {
472  return ConstIterator( lhs_.end(), rhs_.end() );
473  }
474  //**********************************************************************************************
475 
476  //**Size function*******************************************************************************
481  inline size_t size() const {
482  return lhs_.size();
483  }
484  //**********************************************************************************************
485 
486  //**Left operand access*************************************************************************
491  inline LeftOperand leftOperand() const {
492  return lhs_;
493  }
494  //**********************************************************************************************
495 
496  //**Right operand access************************************************************************
501  inline RightOperand rightOperand() const {
502  return rhs_;
503  }
504  //**********************************************************************************************
505 
506  //**********************************************************************************************
512  template< typename T >
513  inline bool canAlias( const T* alias ) const {
514  return ( IsComputation<VT1>::value && ( RequiresEvaluation<VT1>::value ? lhs_.isAliased( alias ) : lhs_.canAlias( alias ) ) ) ||
515  ( IsComputation<VT2>::value && ( RequiresEvaluation<VT2>::value ? rhs_.isAliased( alias ) : rhs_.canAlias( alias ) ) );
516  }
517  //**********************************************************************************************
518 
519  //**********************************************************************************************
525  template< typename T >
526  inline bool isAliased( const T* alias ) const {
527  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
528  }
529  //**********************************************************************************************
530 
531  private:
532  //**Member variables****************************************************************************
533  LeftOperand lhs_;
534  RightOperand rhs_;
535  //**********************************************************************************************
536 
537  //**Assignment to dense vectors*****************************************************************
551  template< typename VT > // Type of the target dense vector
552  friend inline typename EnableIf< UseAssign<VT> >::Type
553  assign( DenseVector<VT,TF>& lhs, const DVecDVecMultExpr& rhs )
554  {
556 
557  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
558 
559  if( !IsComputation<VT1>::value && (~lhs).isAliased( &rhs.lhs_ ) ) {
560  multAssign( ~lhs, rhs.rhs_ );
561  }
562  else if( !IsComputation<VT2>::value && (~lhs).isAliased( &rhs.rhs_ ) ) {
563  multAssign( ~lhs, rhs.lhs_ );
564  }
565  else {
566  assign ( ~lhs, rhs.lhs_ );
567  multAssign( ~lhs, rhs.rhs_ );
568  }
569  }
571  //**********************************************************************************************
572 
573  //**Assignment to sparse vectors****************************************************************
587  template< typename VT > // Type of the target sparse vector
588  friend inline typename EnableIf< UseAssign<VT> >::Type
589  assign( SparseVector<VT,TF>& lhs, const DVecDVecMultExpr& rhs )
590  {
592 
596 
597  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
598 
599  const ResultType tmp( rhs );
600  assign( ~lhs, tmp );
601  }
603  //**********************************************************************************************
604 
605  //**Addition assignment to dense vectors********************************************************
619  template< typename VT > // Type of the target dense vector
620  friend inline typename EnableIf< UseAssign<VT> >::Type
621  addAssign( DenseVector<VT,TF>& lhs, const DVecDVecMultExpr& rhs )
622  {
624 
628 
629  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
630 
631  const ResultType tmp( rhs );
632  addAssign( ~lhs, tmp );
633  }
635  //**********************************************************************************************
636 
637  //**Addition assignment to sparse vectors*******************************************************
638  // No special implementation for the addition assignment to sparse vectors.
639  //**********************************************************************************************
640 
641  //**Subtraction assignment to dense vectors*****************************************************
655  template< typename VT > // Type of the target dense vector
656  friend inline typename EnableIf< UseAssign<VT> >::Type
657  subAssign( DenseVector<VT,TF>& lhs, const DVecDVecMultExpr& rhs )
658  {
660 
664 
665  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
666 
667  const ResultType tmp( rhs );
668  subAssign( ~lhs, tmp );
669  }
671  //**********************************************************************************************
672 
673  //**Subtraction assignment to sparse vectors****************************************************
674  // No special implementation for the subtraction assignment to sparse vectors.
675  //**********************************************************************************************
676 
677  //**Multiplication assignment to dense vectors**************************************************
691  template< typename VT > // Type of the target dense vector
692  friend inline typename EnableIf< UseAssign<VT> >::Type
693  multAssign( DenseVector<VT,TF>& lhs, const DVecDVecMultExpr& rhs )
694  {
696 
697  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
698 
699  multAssign( ~lhs, rhs.lhs_ );
700  multAssign( ~lhs, rhs.rhs_ );
701  }
703  //**********************************************************************************************
704 
705  //**Multiplication assignment to sparse vectors*************************************************
719  template< typename VT > // Type of the target sparse vector
720  friend inline typename EnableIf< UseAssign<VT> >::Type
721  multAssign( SparseVector<VT,TF>& lhs, const DVecDVecMultExpr& rhs )
722  {
724 
725  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
726 
727  multAssign( ~lhs, rhs.lhs_ );
728  multAssign( ~lhs, rhs.rhs_ );
729  }
731  //**********************************************************************************************
732 
733  //**Compile time checks*************************************************************************
740  //**********************************************************************************************
741 };
742 //*************************************************************************************************
743 
744 
745 
746 
747 //=================================================================================================
748 //
749 // GLOBAL BINARY ARITHMETIC OPERATORS
750 //
751 //=================================================================================================
752 
753 //*************************************************************************************************
778 template< typename T1 // Type of the left-hand side dense vector
779  , typename T2 // Type of the right-hand side dense vector
780  , bool TF > // Transpose flag
781 inline const DVecDVecMultExpr<T1,T2,TF>
783 {
785 
786  if( (~lhs).size() != (~rhs).size() )
787  throw std::invalid_argument( "Vector sizes do not match" );
788 
789  return DVecDVecMultExpr<T1,T2,TF>( ~lhs, ~rhs );
790 }
791 //*************************************************************************************************
792 
793 
794 
795 
796 //=================================================================================================
797 //
798 // EXPRESSION TRAIT SPECIALIZATIONS
799 //
800 //=================================================================================================
801 
802 //*************************************************************************************************
804 template< typename VT1, typename VT2, bool TF >
805 struct SubvectorExprTrait< DVecDVecMultExpr<VT1,VT2,TF> >
806 {
807  public:
808  //**********************************************************************************************
809  typedef typename MultExprTrait< typename SubvectorExprTrait<const VT1>::Type
810  , typename SubvectorExprTrait<const VT2>::Type >::Type Type;
811  //**********************************************************************************************
812 };
814 //*************************************************************************************************
815 
816 } // namespace blaze
817 
818 #endif
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DVecDVecMultExpr.h:399
Pointer difference type of the Blaze library.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecDVecMultExpr.h:139
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:3703
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecDVecMultExpr.h:224
ConstIterator(LeftIteratorType left, RightIteratorType right)
Constructor for the ConstIterator class.
Definition: DVecDVecMultExpr.h:187
DifferenceType difference_type
Difference between two iterators.
Definition: DVecDVecMultExpr.h:172
Iterator over the elements of the dense vector.
Definition: DVecDVecMultExpr.h:157
ReferenceType reference
Reference return type.
Definition: DVecDVecMultExpr.h:171
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecDVecMultExpr.h:513
LeftOperand lhs_
Left-hand side dense vector of the multiplication expression.
Definition: DVecDVecMultExpr.h:533
VT2::ResultType RT2
Result type of the right-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:92
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecMultExpr.h:333
VT2::ConstIterator RightIteratorType
ConstIterator type of the right-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:178
Header file for the IsSame and IsStrictlySame type traits.
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecMultExpr.h:311
VT1::ReturnType RN1
Return type of the left-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:93
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
Header file for the DenseVector base class.
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DVecDVecMultExpr.h:398
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
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecDVecMultExpr.h:268
Header file for the RequiresEvaluation type trait.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecDVecMultExpr.h:300
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecDVecMultExpr.h:355
Constraint on the data type.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecDVecMultExpr.h:165
Header file for the MultExprTrait class template.
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
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.
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecDVecMultExpr.h:236
Header file for the multiplication trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecDVecMultExpr.h:526
ResultType::ElementType ElementType
Resulting element type.
Definition: DVecDVecMultExpr.h:138
PointerType pointer
Pointer return type.
Definition: DVecDVecMultExpr.h:170
IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecDVecMultExpr.h:446
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecDVecMultExpr.h:161
RightOperand rightOperand() const
Returns the right-hand side dense vector operand.
Definition: DVecDVecMultExpr.h:501
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:151
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
VT2::ReturnType RN2
Return type of the right-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:94
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecDVecMultExpr.h:212
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
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecDVecMultExpr.h:481
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecDVecMultExpr.h:278
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
SelectType< useAssign, const ResultType, const DVecDVecMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecDVecMultExpr.h:145
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:148
Constraint on the data type.
VT1::ResultType RT1
Result type of the left-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:91
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecMultExpr.h:322
#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
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecMultExpr.h:344
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecDVecMultExpr.h:471
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecDVecMultExpr.h:258
Constraint on the data type.
Header file for the VecVecMultExpr base class.
VT2::CompositeType CT2
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:96
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.
DVecDVecMultExpr< VT1, VT2, TF > This
Type of this DVecDVecMultExpr instance.
Definition: DVecDVecMultExpr.h:135
Expression object for dense vector-dense vector multiplications.The DVecDVecMultExpr class represents...
Definition: DVecDVecMultExpr.h:85
Header file for the EnableIf class template.
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecDVecMultExpr.h:461
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
ElementType ValueType
Type of the underlying elements.
Definition: DVecDVecMultExpr.h:162
Header file for run time assertion macros.
ValueType value_type
Type of the underlying elements.
Definition: DVecDVecMultExpr.h:169
Base template for the MultTrait class.
Definition: MultTrait.h:141
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
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
IteratorCategory iterator_category
The iterator category.
Definition: DVecDVecMultExpr.h:168
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecDVecMultExpr.h:289
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
VT2::ElementType ET2
Element type of the right-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:98
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecDVecMultExpr.h:434
MultExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecDVecMultExpr.h:111
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecDVecMultExpr.h:246
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecDVecMultExpr.h:367
ElementType * PointerType
Pointer return type.
Definition: DVecDVecMultExpr.h:163
DVecDVecMultExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the DVecDVecMultExpr class.
Definition: DVecDVecMultExpr.h:420
LeftOperand leftOperand() const
Returns the left-hand side dense vector operand.
Definition: DVecDVecMultExpr.h:491
VT1::CompositeType CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:95
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
VT1::ElementType ET1
Element type of the left-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:97
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: DVecDVecMultExpr.h:136
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecDVecMultExpr.h:391
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
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
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.
RightOperand rhs_
Right-hand side dense vector of the multiplication expression.
Definition: DVecDVecMultExpr.h:534
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecDVecMultExpr.h:199
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecDVecMultExpr.h:379
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecDVecMultExpr.h:142
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
#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
Base class for all vector/vector multiplication expression templates.The VecVecMultExpr class serves ...
Definition: VecVecMultExpr.h:65
#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
VT1::ConstIterator LeftIteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecDVecMultExpr.h:175
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecDVecMultExpr.h:137
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
ElementType & ReferenceType
Reference return type.
Definition: DVecDVecMultExpr.h:164