All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecTDVecMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECTDVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECTDVECMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
51 #include <blaze/math/Intrinsics.h>
61 #include <blaze/util/Assert.h>
63 #include <blaze/util/EnableIf.h>
65 #include <blaze/util/SelectType.h>
66 #include <blaze/util/Types.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS DVECTDVECMULTEXPR
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
85 template< typename VT1 // Type of the left-hand side dense vector
86  , typename VT2 > // Type of the right-hand side dense vector
87 class DVecTDVecMultExpr : public DenseMatrix< DVecTDVecMultExpr<VT1,VT2>, false >
88  , private VecTVecMultExpr
89  , private Computation
90 {
91  private:
92  //**Type definitions****************************************************************************
93  typedef typename VT1::ResultType RT1;
94  typedef typename VT2::ResultType RT2;
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 = ( IsComputation<VT1>::value || IsComputation<VT2>::value ) };
125 
127  template< typename VT >
129  struct UseAssign {
130  enum { value = useAssign };
131  };
133  //**********************************************************************************************
134 
135  //**********************************************************************************************
137 
140  template< typename T1, typename T2, typename T3 >
141  struct UseVectorizedKernel {
142  enum { value = T1::vectorizable && T2::vectorizable && T3::vectorizable &&
146  };
148  //**********************************************************************************************
149 
150  //**********************************************************************************************
152 
155  template< typename T1, typename T2, typename T3 >
156  struct UseDefaultKernel {
157  enum { value = !UseVectorizedKernel<T1,T2,T3>::value };
158  };
160  //**********************************************************************************************
161 
162  public:
163  //**Type definitions****************************************************************************
170 
173 
176 
178  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
179 
181  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
182 
184  typedef typename SelectType< IsComputation<VT1>::value, const RT1, CT1 >::Type LT;
185 
187  typedef typename SelectType< IsComputation<VT2>::value, const RT2, CT2 >::Type RT;
188  //**********************************************************************************************
189 
190  //**ConstIterator class definition**************************************************************
194  {
195  public:
196  //**Type definitions*************************************************************************
197  typedef std::random_access_iterator_tag IteratorCategory;
198  typedef ElementType ValueType;
199  typedef ElementType* PointerType;
200  typedef ElementType& ReferenceType;
202 
203  // STL iterator requirements
209 
212 
215  //*******************************************************************************************
216 
217  //**Constructor******************************************************************************
223  explicit inline ConstIterator( LeftIteratorType left, RightIteratorType right )
224  : left_ ( left ) // Iterator to the current left-hand side element
225  , right_( right ) // Iterator to the current right-hand side element
226  {}
227  //*******************************************************************************************
228 
229  //**Addition assignment operator*************************************************************
235  inline ConstIterator& operator+=( size_t inc ) {
236  right_ += inc;
237  return *this;
238  }
239  //*******************************************************************************************
240 
241  //**Subtraction assignment operator**********************************************************
247  inline ConstIterator& operator-=( size_t dec ) {
248  right_ -= dec;
249  return *this;
250  }
251  //*******************************************************************************************
252 
253  //**Prefix increment operator****************************************************************
259  ++right_;
260  return *this;
261  }
262  //*******************************************************************************************
263 
264  //**Postfix increment operator***************************************************************
269  inline const ConstIterator operator++( int ) {
270  return ConstIterator( left_, right_++ );
271  }
272  //*******************************************************************************************
273 
274  //**Prefix decrement operator****************************************************************
280  --right_;
281  return *this;
282  }
283  //*******************************************************************************************
284 
285  //**Postfix decrement operator***************************************************************
290  inline const ConstIterator operator--( int ) {
291  return ConstIterator( left_, right_-- );
292  }
293  //*******************************************************************************************
294 
295  //**Element access operator******************************************************************
300  inline ReturnType operator*() const {
301  return (*left_) * (*right_);
302  }
303  //*******************************************************************************************
304 
305  //**Load function****************************************************************************
310  inline IntrinsicType load() const {
311  return set( *left_ ) * right_.load();
312  }
313  //*******************************************************************************************
314 
315  //**Equality operator************************************************************************
321  inline bool operator==( const ConstIterator& rhs ) const {
322  return right_ == rhs.right_;
323  }
324  //*******************************************************************************************
325 
326  //**Inequality operator**********************************************************************
332  inline bool operator!=( const ConstIterator& rhs ) const {
333  return right_ != rhs.right_;
334  }
335  //*******************************************************************************************
336 
337  //**Less-than operator***********************************************************************
343  inline bool operator<( const ConstIterator& rhs ) const {
344  return right_ < rhs.right_;
345  }
346  //*******************************************************************************************
347 
348  //**Greater-than operator********************************************************************
354  inline bool operator>( const ConstIterator& rhs ) const {
355  return right_ > rhs.right_;
356  }
357  //*******************************************************************************************
358 
359  //**Less-or-equal-than operator**************************************************************
365  inline bool operator<=( const ConstIterator& rhs ) const {
366  return right_ <= rhs.right_;
367  }
368  //*******************************************************************************************
369 
370  //**Greater-or-equal-than operator***********************************************************
376  inline bool operator>=( const ConstIterator& rhs ) const {
377  return right_ >= rhs.right_;
378  }
379  //*******************************************************************************************
380 
381  //**Subtraction operator*********************************************************************
387  inline DifferenceType operator-( const ConstIterator& rhs ) const {
388  return right_ - rhs.right_;
389  }
390  //*******************************************************************************************
391 
392  //**Addition operator************************************************************************
399  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
400  return ConstIterator( it.left_, it.right_ + inc );
401  }
402  //*******************************************************************************************
403 
404  //**Addition operator************************************************************************
411  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
412  return ConstIterator( it.left_, it.right_ + inc );
413  }
414  //*******************************************************************************************
415 
416  //**Subtraction operator*********************************************************************
423  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
424  return ConstIterator( it.left_, it.right_ - dec );
425  }
426  //*******************************************************************************************
427 
428  private:
429  //**Member variables*************************************************************************
432  //*******************************************************************************************
433  };
434  //**********************************************************************************************
435 
436  //**Compilation flags***************************************************************************
438  enum { vectorizable = VT1::vectorizable && VT2::vectorizable &&
441  //**********************************************************************************************
442 
443  //**Constructor*********************************************************************************
449  explicit inline DVecTDVecMultExpr( const VT1& lhs, const VT2& rhs )
450  : lhs_( lhs ) // Left-hand side dense vector of the multiplication expression
451  , rhs_( rhs ) // Right-hand side dense vector of the multiplication expression
452  {}
453  //**********************************************************************************************
454 
455  //**Access operator*****************************************************************************
462  inline ReturnType operator()( size_t i, size_t j ) const {
463  BLAZE_INTERNAL_ASSERT( i < lhs_.size(), "Invalid row access index" );
464  BLAZE_INTERNAL_ASSERT( j < rhs_.size(), "Invalid column access index" );
465 
466  return lhs_[i] * rhs_[j];
467  }
468  //**********************************************************************************************
469 
470  //**Load function*******************************************************************************
477  inline IntrinsicType load( size_t i, size_t j ) const {
478  typedef IntrinsicTrait<ElementType> IT;
479  BLAZE_INTERNAL_ASSERT( i < lhs_.size() , "Invalid row access index" );
480  BLAZE_INTERNAL_ASSERT( j < rhs_.size() , "Invalid column access index" );
481  BLAZE_INTERNAL_ASSERT( j % IT::size == 0UL, "Invalid column access index" );
482  const IntrinsicType xmm1( set( lhs_[i] ) );
483  const IntrinsicType xmm2( rhs_.load( j ) );
484  return xmm1 * xmm2;
485  }
486  //**********************************************************************************************
487 
488  //**Begin function******************************************************************************
494  inline ConstIterator begin( size_t i ) const {
495  BLAZE_INTERNAL_ASSERT( i < lhs_.size(), "Invalid row access index" );
496  return ConstIterator( lhs_.begin()+i, rhs_.begin() );
497  }
498  //**********************************************************************************************
499 
500  //**End function********************************************************************************
506  inline ConstIterator end( size_t i ) const {
507  BLAZE_INTERNAL_ASSERT( i < lhs_.size(), "Invalid row access index" );
508  return ConstIterator( lhs_.begin()+i, rhs_.end() );
509  }
510  //**********************************************************************************************
511 
512  //**Rows function*******************************************************************************
517  inline size_t rows() const {
518  return lhs_.size();
519  }
520  //**********************************************************************************************
521 
522  //**Columns function****************************************************************************
527  inline size_t columns() const {
528  return rhs_.size();
529  }
530  //**********************************************************************************************
531 
532  //**Left operand access*************************************************************************
537  inline LeftOperand leftOperand() const {
538  return lhs_;
539  }
540  //**********************************************************************************************
541 
542  //**Right operand access************************************************************************
547  inline RightOperand rightOperand() const {
548  return rhs_;
549  }
550  //**********************************************************************************************
551 
552  //**********************************************************************************************
558  template< typename T >
559  inline bool canAlias( const T* alias ) const {
560  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
561  }
562  //**********************************************************************************************
563 
564  //**********************************************************************************************
570  template< typename T >
571  inline bool isAliased( const T* alias ) const {
572  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
573  }
574  //**********************************************************************************************
575 
576  private:
577  //**Member variables****************************************************************************
578  LeftOperand lhs_;
579  RightOperand rhs_;
580  //**********************************************************************************************
581 
582  //**Assignment to row-major dense matrices******************************************************
596  template< typename MT > // Type of the target dense matrix
597  friend inline typename EnableIf< UseAssign<MT> >::Type
599  {
601 
602  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
603  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
604 
605  LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
606  RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
607 
608  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
609  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
610  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
611  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
612 
613  DVecTDVecMultExpr::selectAssignKernel( ~lhs, x, y );
614  }
616  //**********************************************************************************************
617 
618  //**Default assignment to row-major dense matrices**********************************************
632  template< typename MT // Type of the left-hand side target matrix
633  , typename VT3 // Type of the left-hand side vector operand
634  , typename VT4 > // Type of the right-hand side vector operand
635  static inline typename EnableIf< UseDefaultKernel<MT,VT3,VT4> >::Type
636  selectAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
637  {
638  const size_t m( (~A).rows() );
639  const size_t n( (~A).columns() );
640 
641  const size_t jend( n & size_t(-2) );
642  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == jend, "Invalid end calculation" );
643 
644  for( size_t i=0UL; i<m; ++i ) {
645  for( size_t j=0UL; j<jend; j+=2UL ) {
646  (~A)(i,j ) = x[i] * y[j ];
647  (~A)(i,j+1UL) = x[i] * y[j+1];
648  }
649  if( jend < n ) {
650  (~A)(i,jend) = x[i] * y[jend];
651  }
652  }
653  }
655  //**********************************************************************************************
656 
657  //**Vectorized assignment to row-major dense matrices*******************************************
671  template< typename MT // Type of the left-hand side target matrix
672  , typename VT3 // Type of the left-hand side vector operand
673  , typename VT4 > // Type of the right-hand side vector operand
674  static inline typename EnableIf< UseVectorizedKernel<MT,VT3,VT4> >::Type
675  selectAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
676  {
677  typedef IntrinsicTrait<ElementType> IT;
678 
679  const size_t m( (~A).rows() );
680  const size_t n( (~A).columns() );
681 
682  for( size_t i=0UL; i<m; ++i )
683  {
684  const IntrinsicType x1( set( x[i] ) );
685 
686  for( size_t j=0UL; j<n; j+=IT::size ) {
687  (~A).store( i, j, x1 * y.load(j) );
688  }
689  }
690  }
692  //**********************************************************************************************
693 
694  //**Assignment to column-major dense matrices***************************************************
706  template< typename MT > // Type of the target dense matrix
707  friend inline void assign( DenseMatrix<MT,true>& lhs, const DVecTDVecMultExpr& rhs )
708  {
710 
711  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
712  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
713 
714  LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
715  RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
716 
717  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
718  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
719  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
720  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
721 
722  DVecTDVecMultExpr::selectAssignKernel( ~lhs, x, y );
723  }
725  //**********************************************************************************************
726 
727  //**Default assignment to column-major dense matrices*******************************************
741  template< typename MT // Type of the left-hand side target matrix
742  , typename VT3 // Type of the left-hand side vector operand
743  , typename VT4 > // Type of the right-hand side vector operand
744  static inline typename EnableIf< UseDefaultKernel<MT,VT3,VT4> >::Type
745  selectAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
746  {
747  const size_t m( (~A).rows() );
748  const size_t n( (~A).columns() );
749 
750  const size_t iend( m & size_t(-2) );
751  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == iend, "Invalid end calculation" );
752 
753  for( size_t j=0UL; j<n; ++j ) {
754  for( size_t i=0UL; i<iend; i+=2UL ) {
755  (~A)(i ,j) = x[i ] * y[j];
756  (~A)(i+1UL,j) = x[i+1] * y[j];
757  }
758  if( iend < m ) {
759  (~A)(iend,j) = x[iend] * y[j];
760  }
761  }
762  }
764  //**********************************************************************************************
765 
766  //**Vectorized assignment to column-major dense matrices****************************************
780  template< typename MT // Type of the left-hand side target matrix
781  , typename VT3 // Type of the left-hand side vector operand
782  , typename VT4 > // Type of the right-hand side vector operand
783  static inline typename EnableIf< UseVectorizedKernel<MT,VT3,VT4> >::Type
784  selectAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
785  {
786  typedef IntrinsicTrait<ElementType> IT;
787 
788  const size_t m( (~A).rows() );
789  const size_t n( (~A).columns() );
790 
791  for( size_t j=0UL; j<n; ++j )
792  {
793  const IntrinsicType y1( set( y[j] ) );
794 
795  for( size_t i=0UL; i<m; i+=IT::size ) {
796  (~A).store( i, j, x.load(i) * y1 );
797  }
798  }
799  }
801  //**********************************************************************************************
802 
803  //**Assignment to sparse matrices***************************************************************
815  template< typename MT // Type of the target sparse matrix
816  , bool SO > // Storage order of the target sparse matrix
817  friend inline void assign( SparseMatrix<MT,SO>& lhs, const DVecTDVecMultExpr& rhs )
818  {
820 
821  typedef typename SelectType< SO, OppositeType, ResultType >::Type TmpType;
822 
829 
830  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
831  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
832 
833  const TmpType tmp( rhs );
834  assign( ~lhs, tmp );
835  }
837  //**********************************************************************************************
838 
839  //**Addition assignment to row-major dense matrices*********************************************
854  template< typename MT > // Type of the target dense matrix
855  friend inline typename EnableIf< UseAssign<MT> >::Type
856  addAssign( DenseMatrix<MT,false>& lhs, const DVecTDVecMultExpr& rhs )
857  {
859 
860  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
861  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
862 
863  LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
864  RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
865 
866  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
867  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
868  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
869  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
870 
871  DVecTDVecMultExpr::selectAddAssignKernel( ~lhs, x, y );
872  }
874  //**********************************************************************************************
875 
876  //**Default addition assignment to row-major dense matrices*************************************
890  template< typename MT // Type of the left-hand side target matrix
891  , typename VT3 // Type of the left-hand side vector operand
892  , typename VT4 > // Type of the right-hand side vector operand
893  static inline typename EnableIf< UseDefaultKernel<MT,VT3,VT4> >::Type
894  selectAddAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
895  {
896  const size_t m( (~A).rows() );
897  const size_t n( (~A).columns() );
898 
899  const size_t jend( n & size_t(-2) );
900  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == jend, "Invalid end calculation" );
901 
902  for( size_t i=0UL; i<m; ++i ) {
903  for( size_t j=0UL; j<jend; j+=2UL ) {
904  (~A)(i,j ) += x[i] * y[j ];
905  (~A)(i,j+1UL) += x[i] * y[j+1UL];
906  }
907  if( jend < n ) {
908  (~A)(i,jend) += x[i] * y[jend];
909  }
910  }
911  }
913  //**********************************************************************************************
914 
915  //**Vectorized addition assignment to row-major dense matrices**********************************
929  template< typename MT // Type of the left-hand side target matrix
930  , typename VT3 // Type of the left-hand side vector operand
931  , typename VT4 > // Type of the right-hand side vector operand
932  static inline typename EnableIf< UseVectorizedKernel<MT,VT3,VT4> >::Type
933  selectAddAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
934  {
935  typedef IntrinsicTrait<ElementType> IT;
936 
937  const size_t m( (~A).rows() );
938  const size_t n( (~A).columns() );
939 
940  for( size_t i=0UL; i<m; ++i )
941  {
942  const IntrinsicType x1( set( x[i] ) );
943 
944  for( size_t j=0UL; j<n; j+=IT::size ) {
945  (~A).store( i, j, (~A).load(i,j) + x1 * y.load(j) );
946  }
947  }
948  }
950  //**********************************************************************************************
951 
952  //**Addition assignment to column-major dense matrices******************************************
965  template< typename MT > // Type of the target dense matrix
966  friend inline void addAssign( DenseMatrix<MT,true>& lhs, const DVecTDVecMultExpr& rhs )
967  {
969 
970  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
971  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
972 
973  LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
974  RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
975 
976  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
977  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
978  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
979  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
980 
981  DVecTDVecMultExpr::selectAddAssignKernel( ~lhs, x, y );
982  }
984  //**********************************************************************************************
985 
986  //**Default addition assignment to column dense matrices****************************************
1000  template< typename MT // Type of the left-hand side target matrix
1001  , typename VT3 // Type of the left-hand side vector operand
1002  , typename VT4 > // Type of the right-hand side vector operand
1003  static inline typename EnableIf< UseDefaultKernel<MT,VT3,VT4> >::Type
1004  selectAddAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
1005  {
1006  const size_t m( (~A).rows() );
1007  const size_t n( (~A).columns() );
1008 
1009  const size_t iend( m & size_t(-2) );
1010  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == iend, "Invalid end calculation" );
1011 
1012  for( size_t j=0UL; j<n; ++j ) {
1013  for( size_t i=0UL; i<iend; i+=2UL ) {
1014  (~A)(i ,j) += x[i ] * y[j];
1015  (~A)(i+1UL,j) += x[i+1UL] * y[j];
1016  }
1017  if( iend < m ) {
1018  (~A)(iend,j) += x[iend] * y[j];
1019  }
1020  }
1021  }
1023  //**********************************************************************************************
1024 
1025  //**Vectorized addition assignment to column-major dense matrices*******************************
1039  template< typename MT // Type of the left-hand side target matrix
1040  , typename VT3 // Type of the left-hand side vector operand
1041  , typename VT4 > // Type of the right-hand side vector operand
1042  static inline typename EnableIf< UseVectorizedKernel<MT,VT3,VT4> >::Type
1043  selectAddAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
1044  {
1045  typedef IntrinsicTrait<ElementType> IT;
1046 
1047  const size_t m( (~A).rows() );
1048  const size_t n( (~A).columns() );
1049 
1050  for( size_t j=0UL; j<n; ++j )
1051  {
1052  const IntrinsicType y1( set( y[j] ) );
1053 
1054  for( size_t i=0UL; i<m; i+=IT::size ) {
1055  (~A).store( i, j, (~A).load(i,j) + x.load(i) * y1 );
1056  }
1057  }
1058  }
1060  //**********************************************************************************************
1061 
1062  //**Addition assignment to sparse matrices******************************************************
1063  // No special implementation for the addition assignment to sparse matrices.
1064  //**********************************************************************************************
1065 
1066  //**Subtraction assignment to row-major dense matrices******************************************
1081  template< typename MT > // Type of the target dense matrix
1082  friend inline typename EnableIf< UseAssign<MT> >::Type
1083  subAssign( DenseMatrix<MT,false>& lhs, const DVecTDVecMultExpr& rhs )
1084  {
1086 
1087  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1088  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1089 
1090  LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
1091  RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
1092 
1093  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1094  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1095  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
1096  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
1097 
1098  DVecTDVecMultExpr::selectSubAssignKernel( ~lhs, x, y );
1099  }
1101  //**********************************************************************************************
1102 
1103  //**Default subtraction assignment to row-major dense matrices**********************************
1117  template< typename MT // Type of the left-hand side target matrix
1118  , typename VT3 // Type of the left-hand side vector operand
1119  , typename VT4 > // Type of the right-hand side vector operand
1120  static inline typename EnableIf< UseDefaultKernel<MT,VT3,VT4> >::Type
1121  selectSubAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
1122  {
1123  const size_t m( (~A).rows() );
1124  const size_t n( (~A).columns() );
1125 
1126  const size_t jend( n & size_t(-2) );
1127  BLAZE_INTERNAL_ASSERT( ( n - ( n % 2UL ) ) == jend, "Invalid end calculation" );
1128 
1129  for( size_t i=0UL; i<m; ++i ) {
1130  for( size_t j=0UL; j<jend; j+=2UL ) {
1131  (~A)(i,j ) -= x[i] * y[j ];
1132  (~A)(i,j+1UL) -= x[i] * y[j+1UL];
1133  }
1134  if( jend < n ) {
1135  (~A)(i,jend) -= x[i] * y[jend];
1136  }
1137  }
1138  }
1140  //**********************************************************************************************
1141 
1142  //**Vectorized subtraction assignment to row-major dense matrices*******************************
1156  template< typename MT // Type of the left-hand side target matrix
1157  , typename VT3 // Type of the left-hand side vector operand
1158  , typename VT4 > // Type of the right-hand side vector operand
1159  static inline typename EnableIf< UseVectorizedKernel<MT,VT3,VT4> >::Type
1160  selectSubAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
1161  {
1162  typedef IntrinsicTrait<ElementType> IT;
1163 
1164  const size_t m( (~A).rows() );
1165  const size_t n( (~A).columns() );
1166 
1167  for( size_t i=0UL; i<m; ++i )
1168  {
1169  const IntrinsicType x1( set( x[i] ) );
1170 
1171  for( size_t j=0UL; j<n; j+=IT::size ) {
1172  (~A).store( i, j, (~A).load(i,j) - x1 * y.load(j) );
1173  }
1174  }
1175  }
1177  //**********************************************************************************************
1178 
1179  //**Subtraction assignment to column-major dense matrices***************************************
1192  template< typename MT > // Type of the target dense matrix
1193  friend inline void subAssign( DenseMatrix<MT,true>& lhs, const DVecTDVecMultExpr& rhs )
1194  {
1196 
1197  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1198  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1199 
1200  LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
1201  RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
1202 
1203  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1204  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1205  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
1206  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
1207 
1208  DVecTDVecMultExpr::selectSubAssignKernel( ~lhs, x, y );
1209  }
1211  //**********************************************************************************************
1212 
1213  //**Default subtraction assignment to column dense matrices*************************************
1227  template< typename MT // Type of the left-hand side target matrix
1228  , typename VT3 // Type of the left-hand side vector operand
1229  , typename VT4 > // Type of the right-hand side vector operand
1230  static inline typename EnableIf< UseDefaultKernel<MT,VT3,VT4> >::Type
1231  selectSubAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
1232  {
1233  const size_t m( (~A).rows() );
1234  const size_t n( (~A).columns() );
1235 
1236  const size_t iend( m & size_t(-2) );
1237  BLAZE_INTERNAL_ASSERT( ( m - ( m % 2UL ) ) == iend, "Invalid end calculation" );
1238 
1239  for( size_t j=0UL; j<n; ++j ) {
1240  for( size_t i=0UL; i<iend; i+=2UL ) {
1241  (~A)(i ,j) -= x[i ] * y[j];
1242  (~A)(i+1UL,j) -= x[i+1UL] * y[j];
1243  }
1244  if( iend < m ) {
1245  (~A)(iend,j) -= x[iend] * y[j];
1246  }
1247  }
1248  }
1250  //**********************************************************************************************
1251 
1252  //**Vectorized subtraction assignment to column-major dense matrices****************************
1266  template< typename MT // Type of the left-hand side target matrix
1267  , typename VT3 // Type of the left-hand side vector operand
1268  , typename VT4 > // Type of the right-hand side vector operand
1269  static inline typename EnableIf< UseVectorizedKernel<MT,VT3,VT4> >::Type
1270  selectSubAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
1271  {
1272  typedef IntrinsicTrait<ElementType> IT;
1273 
1274  const size_t m( (~A).rows() );
1275  const size_t n( (~A).columns() );
1276 
1277  for( size_t j=0UL; j<n; ++j )
1278  {
1279  const IntrinsicType y1( set( y[j] ) );
1280 
1281  for( size_t i=0UL; i<m; i+=IT::size ) {
1282  (~A).store( i, j, (~A).load(i,j) - x.load(i) * y1 );
1283  }
1284  }
1285  }
1287  //**********************************************************************************************
1288 
1289  //**Subtraction assignment to sparse matrices***************************************************
1290  // No special implementation for the subtraction assignment to sparse matrices.
1291  //**********************************************************************************************
1292 
1293  //**Multiplication assignment to dense matrices*************************************************
1294  // No special implementation for the multiplication assignment to dense matrices.
1295  //**********************************************************************************************
1296 
1297  //**Multiplication assignment to sparse matrices************************************************
1298  // No special implementation for the multiplication assignment to sparse matrices.
1299  //**********************************************************************************************
1300 
1301  //**Compile time checks*************************************************************************
1308  //**********************************************************************************************
1309 };
1310 //*************************************************************************************************
1311 
1312 
1313 
1314 
1315 //=================================================================================================
1316 //
1317 // GLOBAL BINARY ARITHMETIC OPERATORS
1318 //
1319 //=================================================================================================
1320 
1321 //*************************************************************************************************
1348 template< typename T1 // Type of the left-hand side dense vector
1349  , typename T2 > // Type of the right-hand side dense vector
1350 inline const DVecTDVecMultExpr<T1,T2>
1352 {
1354 
1355  return DVecTDVecMultExpr<T1,T2>( ~lhs, ~rhs );
1356 }
1357 //*************************************************************************************************
1358 
1359 
1360 
1361 
1362 //=================================================================================================
1363 //
1364 // EXPRESSION TRAIT SPECIALIZATIONS
1365 //
1366 //=================================================================================================
1367 
1368 //*************************************************************************************************
1370 template< typename VT1, typename VT2 >
1371 struct SubmatrixExprTrait< DVecTDVecMultExpr<VT1,VT2> >
1372 {
1373  public:
1374  //**********************************************************************************************
1375  typedef typename MultExprTrait< typename SubvectorExprTrait<const VT1>::Type
1376  , typename SubvectorExprTrait<const VT2>::Type >::Type Type;
1377  //**********************************************************************************************
1378 };
1380 //*************************************************************************************************
1381 
1382 
1383 //*************************************************************************************************
1385 template< typename VT1, typename VT2 >
1386 struct RowExprTrait< DVecTDVecMultExpr<VT1,VT2> >
1387 {
1388  public:
1389  //**********************************************************************************************
1390  typedef typename MultExprTrait< typename VT1::ReturnType, VT2 >::Type Type;
1391  //**********************************************************************************************
1392 };
1394 //*************************************************************************************************
1395 
1396 
1397 //*************************************************************************************************
1399 template< typename VT1, typename VT2 >
1400 struct ColumnExprTrait< DVecTDVecMultExpr<VT1,VT2> >
1401 {
1402  public:
1403  //**********************************************************************************************
1404  typedef typename MultExprTrait< VT1, typename VT2::ReturnType >::Type Type;
1405  //**********************************************************************************************
1406 };
1408 //*************************************************************************************************
1409 
1410 } // namespace blaze
1411 
1412 #endif
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
SelectType< IsComputation< VT2 >::value, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side dense vector operand.
Definition: DVecTDVecMultExpr.h:187
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
DVecTDVecMultExpr< VT1, VT2 > This
Type of this DVecTDVecMultExpr instance.
Definition: DVecTDVecMultExpr.h:164
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecTDVecMultExpr.h:201
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
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecTDVecMultExpr.h:269
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: TransposeFlag.h:159
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecTDVecMultExpr.h:247
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DVecTDVecMultExpr.h:506
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecTDVecMultExpr.h:423
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:79
Header file for the ColumnExprTrait class template.
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: DVecTDVecMultExpr.h:165
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecTDVecMultExpr.h:559
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecTDVecMultExpr.h:387
ElementType * PointerType
Pointer return type.
Definition: DVecTDVecMultExpr.h:199
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
DVecTDVecMultExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the DVecTDVecMultExpr class.
Definition: DVecTDVecMultExpr.h:449
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DVecTDVecMultExpr.h:430
VT2::ConstIterator RightIteratorType
ConstIterator type of the right-hand side dense matrix expression.
Definition: DVecTDVecMultExpr.h:214
Expression object for outer products between two dense vectors.The DVecTDVecMultExpr class represents...
Definition: DVecTDVecMultExpr.h:87
Header file for the Computation base class.
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecTDVecMultExpr.h:376
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
SelectType< IsComputation< VT1 >::value, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side dense vector operand.
Definition: DVecTDVecMultExpr.h:184
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Constraint on the data type.
VT1::ConstIterator LeftIteratorType
ConstIterator type of the left-hand side dense matrix expression.
Definition: DVecTDVecMultExpr.h:211
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecTDVecMultExpr.h:343
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecTDVecMultExpr.h:571
Constraint on the data type.
Header file for the MultExprTrait class template.
ValueType value_type
Type of the underlying elements.
Definition: DVecTDVecMultExpr.h:205
VT1::ElementType ET1
Element type of the left-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:99
VT1::CompositeType CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:97
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.
Header file for the multiplication trait.
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecTDVecMultExpr.h:399
VT2::ReturnType RN2
Return type of the right-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:96
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: StorageOrder.h:161
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecTDVecMultExpr.h:279
SelectType< useAssign, const ResultType, const DVecTDVecMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecTDVecMultExpr.h:175
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecTDVecMultExpr.h:321
LeftOperand leftOperand() const
Returns the left-hand side dense vector operand.
Definition: DVecTDVecMultExpr.h:537
Header file for the DenseMatrix base class.
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DVecTDVecMultExpr.h:166
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecTDVecMultExpr.h:169
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DVecTDVecMultExpr.h:517
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
ReferenceType reference
Reference return type.
Definition: DVecTDVecMultExpr.h:207
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
ConstIterator(LeftIteratorType left, RightIteratorType right)
Constructor for the ConstIterator class.
Definition: DVecTDVecMultExpr.h:223
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecTDVecMultExpr.h:332
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecTDVecMultExpr.h:172
Constraint on the data type.
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:181
#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
DifferenceType difference_type
Difference between two iterators.
Definition: DVecTDVecMultExpr.h:208
Constraints on the storage order of matrix types.
Constraint on the data type.
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecTDVecMultExpr.h:411
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
VT1::ReturnType RN1
Return type of the left-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:95
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the VecTVecMultExpr base class.
VT2::ResultType RT2
Result type of the right-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:94
Header file for the EnableIf class template.
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecTDVecMultExpr.h:258
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecTDVecMultExpr.h:197
IteratorCategory iterator_category
The iterator category.
Definition: DVecTDVecMultExpr.h:204
VT2::ElementType ET2
Element type of the right-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:100
VT1::ResultType RT1
Result type of the left-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:93
LeftOperand lhs_
Left-hand side dense vector of the multiplication expression.
Definition: DVecTDVecMultExpr.h:578
Header file for the SubmatrixExprTrait class template.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: StorageOrder.h:81
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 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
RightOperand rightOperand() const
Returns the right-hand side dense vector operand.
Definition: DVecTDVecMultExpr.h:547
IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DVecTDVecMultExpr.h:477
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DVecTDVecMultExpr.h:494
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DVecTDVecMultExpr.h:431
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
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecTDVecMultExpr.h:167
RightOperand rhs_
Right-hand side dense vector of the multiplication expression.
Definition: DVecTDVecMultExpr.h:579
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DVecTDVecMultExpr.h:310
VT2::CompositeType CT2
Composite type of the right-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:98
ElementType & ReferenceType
Reference return type.
Definition: DVecTDVecMultExpr.h:200
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DVecTDVecMultExpr.h:462
Header file for the IsReference type trait.
Base class for all outer product expression templates.The VecTVecMultExpr class serves as a tag for a...
Definition: VecTVecMultExpr.h:66
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:283
Header file for all intrinsic functionality.
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecTDVecMultExpr.h:235
ResultType::ElementType ElementType
Resulting element type.
Definition: DVecTDVecMultExpr.h:168
#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
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DVecTDVecMultExpr.h:527
ElementType ValueType
Type of the underlying elements.
Definition: DVecTDVecMultExpr.h:198
Header file for the IsComputation type trait class.
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecTDVecMultExpr.h:300
Iterator over the elements of the dense matrix.
Definition: DVecTDVecMultExpr.h:193
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
#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
PointerType pointer
Pointer return type.
Definition: DVecTDVecMultExpr.h:206
Header file for basic type definitions.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: TransposeFlag.h:81
Header file for the SubvectorExprTrait class template.
MultExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecTDVecMultExpr.h:113
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecTDVecMultExpr.h:365
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecTDVecMultExpr.h:290
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecTDVecMultExpr.h:354
#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
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecTDVecMultExpr.h:178
EnableIf< IsIntegral< T >, Set< T, sizeof(T)> >::Type::Type set(T value)
Sets all values in the vector to the given integral value.
Definition: Set.h:209
void store(float *address, const sse_float_t &value)
Aligned store of a vector of &#39;float&#39; values.
Definition: Store.h:242
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.