SVecDVecOuterExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECDVECOUTEREXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECDVECOUTEREXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
44 #include <blaze/math/Aliases.h>
53 #include <blaze/math/Exception.h>
60 #include <blaze/math/SIMD.h>
76 #include <blaze/util/Assert.h>
77 #include <blaze/util/EnableIf.h>
79 #include <blaze/util/mpl/If.h>
80 #include <blaze/util/Types.h>
84 #include <blaze/util/Unused.h>
85 
86 
87 namespace blaze {
88 
89 //=================================================================================================
90 //
91 // CLASS SVECDVECOUTEREXPR
92 //
93 //=================================================================================================
94 
95 //*************************************************************************************************
102 template< typename VT1 // Type of the left-hand side sparse vector
103  , typename VT2 > // Type of the right-hand side dense vector
104 class SVecDVecOuterExpr : public SparseMatrix< SVecDVecOuterExpr<VT1,VT2>, true >
105  , private VecTVecMultExpr
106  , private Computation
107 {
108  private:
109  //**Type definitions****************************************************************************
118  //**********************************************************************************************
119 
120  //**Return type evaluation**********************************************************************
122 
127  enum : bool { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
128 
131  //**********************************************************************************************
132 
133  //**Evaluation strategy*************************************************************************
135 
141  enum : bool { useAssign = ( IsComputation<VT1>::value || !IsNumeric<ET1>::value ||
143 
145  template< typename MT >
147  struct UseAssign {
148  enum : bool { value = useAssign };
149  };
151  //**********************************************************************************************
152 
153  //**********************************************************************************************
155 
158  template< typename T1, typename T2, typename T3 >
159  struct UseVectorizedKernel {
160  enum : bool { value = useOptimizedKernels &&
161  T1::simdEnabled && T3::simdEnabled &&
163  IsSame< ElementType_<T1>, ElementType_<T3> >::value &&
165  };
167  //**********************************************************************************************
168 
169  //**********************************************************************************************
171 
174  template< typename T1, typename T2, typename T3 >
175  struct UseDefaultKernel {
176  enum : bool { value = !UseVectorizedKernel<T1,T2,T3>::value };
177  };
179  //**********************************************************************************************
180 
181  public:
182  //**Type definitions****************************************************************************
188 
191 
194 
196  typedef If_< IsExpression<VT1>, const VT1, const VT1& > LeftOperand;
197 
199  typedef If_< IsExpression<VT2>, const VT2, const VT2& > RightOperand;
200 
202  typedef If_< IsComputation<VT1>, const RT1, CT1 > LT;
203 
205  typedef If_< IsComputation<VT2>, const RT2, CT2 > RT;
206  //**********************************************************************************************
207 
208  //**ConstIterator class definition**************************************************************
212  {
213  public:
214  //**Type definitions*************************************************************************
217 
220 
222  typedef ET2 RightElement;
223 
224  typedef std::forward_iterator_tag IteratorCategory;
225  typedef Element ValueType;
226  typedef ValueType* PointerType;
227  typedef ValueType& ReferenceType;
229 
230  // STL iterator requirements
231  typedef IteratorCategory iterator_category;
232  typedef ValueType value_type;
233  typedef PointerType pointer;
234  typedef ReferenceType reference;
235  typedef DifferenceType difference_type;
236  //*******************************************************************************************
237 
238  //**Constructor******************************************************************************
241  inline ConstIterator( IteratorType it, RightElement v )
242  : it_( it ) // Iterator over the elements of the left-hand side sparse vector expression
243  , v_ ( v ) // Element of the right-hand side dense vector expression.
244  {}
245  //*******************************************************************************************
246 
247  //**Prefix increment operator****************************************************************
253  ++it_;
254  return *this;
255  }
256  //*******************************************************************************************
257 
258  //**Element access operator******************************************************************
263  inline const Element operator*() const {
264  return Element( it_->value() * v_, it_->index() );
265  }
266  //*******************************************************************************************
267 
268  //**Element access operator******************************************************************
273  inline const ConstIterator* operator->() const {
274  return this;
275  }
276  //*******************************************************************************************
277 
278  //**Value function***************************************************************************
283  inline ReturnType value() const {
284  return it_->value() * v_;
285  }
286  //*******************************************************************************************
287 
288  //**Index function***************************************************************************
293  inline size_t index() const {
294  return it_->index();
295  }
296  //*******************************************************************************************
297 
298  //**Equality operator************************************************************************
304  inline bool operator==( const ConstIterator& rhs ) const {
305  return it_ == rhs.it_;
306  }
307  //*******************************************************************************************
308 
309  //**Inequality operator**********************************************************************
315  inline bool operator!=( const ConstIterator& rhs ) const {
316  return it_ != rhs.it_;
317  }
318  //*******************************************************************************************
319 
320  //**Subtraction operator*********************************************************************
326  inline DifferenceType operator-( const ConstIterator& rhs ) const {
327  return it_ - rhs.it_;
328  }
329  //*******************************************************************************************
330 
331  private:
332  //**Member variables*************************************************************************
333  IteratorType it_;
334  RightElement v_;
335  //*******************************************************************************************
336  };
337  //**********************************************************************************************
338 
339  //**Compilation flags***************************************************************************
341  enum : bool { smpAssignable = false };
342  //**********************************************************************************************
343 
344  //**SIMD properties*****************************************************************************
346  enum : size_t { SIMDSIZE = SIMDTrait<ElementType>::size };
347  //**********************************************************************************************
348 
349  //**Constructor*********************************************************************************
355  explicit inline SVecDVecOuterExpr( const VT1& lhs, const VT2& rhs ) noexcept
356  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
357  , rhs_( rhs ) // Right-hand side dense vector of the multiplication expression
358  {}
359  //**********************************************************************************************
360 
361  //**Access operator*****************************************************************************
368  inline ReturnType operator()( size_t i, size_t j ) const {
369  BLAZE_INTERNAL_ASSERT( i < lhs_.size(), "Invalid row access index" );
370  BLAZE_INTERNAL_ASSERT( j < rhs_.size(), "Invalid column access index" );
371 
372  return lhs_[i] * rhs_[j];
373  }
374  //**********************************************************************************************
375 
376  //**At function*********************************************************************************
384  inline ReturnType at( size_t i, size_t j ) const {
385  if( i >= lhs_.size() ) {
386  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
387  }
388  if( j >= rhs_.size() ) {
389  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
390  }
391  return (*this)(i,j);
392  }
393  //**********************************************************************************************
394 
395  //**Begin function******************************************************************************
401  inline ConstIterator begin( size_t i ) const {
402  return ConstIterator( lhs_.begin(), rhs_[i] );
403  }
404  //**********************************************************************************************
405 
406  //**End function********************************************************************************
412  inline ConstIterator end( size_t i ) const {
413  return ConstIterator( lhs_.end(), rhs_[i] );
414  }
415  //**********************************************************************************************
416 
417  //**Rows function*******************************************************************************
422  inline size_t rows() const noexcept {
423  return lhs_.size();
424  }
425  //**********************************************************************************************
426 
427  //**Columns function****************************************************************************
432  inline size_t columns() const noexcept {
433  return rhs_.size();
434  }
435  //**********************************************************************************************
436 
437  //**NonZeros function***************************************************************************
442  inline size_t nonZeros() const {
443  return lhs_.nonZeros() * rhs_.size();
444  }
445  //**********************************************************************************************
446 
447  //**NonZeros function***************************************************************************
453  inline size_t nonZeros( size_t i ) const {
454  UNUSED_PARAMETER( i );
455  return lhs_.nonZeros();
456  }
457  //**********************************************************************************************
458 
459  //**Find function*******************************************************************************
466  inline ConstIterator find( size_t i, size_t j ) const {
468  return ConstIterator( lhs_.find( i ), rhs_[j] );
469  }
470  //**********************************************************************************************
471 
472  //**LowerBound function*************************************************************************
479  inline ConstIterator lowerBound( size_t i, size_t j ) const {
481  return ConstIterator( lhs_.lowerBound( i ), rhs_[j] );
482  }
483  //**********************************************************************************************
484 
485  //**UpperBound function*************************************************************************
492  inline ConstIterator upperBound( size_t i, size_t j ) const {
494  return ConstIterator( lhs_.upperBound( i ), rhs_[j] );
495  }
496  //**********************************************************************************************
497 
498  //**Left operand access*************************************************************************
503  inline LeftOperand leftOperand() const noexcept {
504  return lhs_;
505  }
506  //**********************************************************************************************
507 
508  //**Right operand access************************************************************************
513  inline RightOperand rightOperand() const noexcept {
514  return rhs_;
515  }
516  //**********************************************************************************************
517 
518  //**********************************************************************************************
524  template< typename T >
525  inline bool canAlias( const T* alias ) const noexcept {
526  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
527  }
528  //**********************************************************************************************
529 
530  //**********************************************************************************************
536  template< typename T >
537  inline bool isAliased( const T* alias ) const noexcept {
538  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
539  }
540  //**********************************************************************************************
541 
542  private:
543  //**Member variables****************************************************************************
544  LeftOperand lhs_;
545  RightOperand rhs_;
546  //**********************************************************************************************
547 
548  //**Assignment to row-major dense matrices******************************************************
560  template< typename MT > // Type of the target dense matrix
561  friend inline void assign( DenseMatrix<MT,false>& lhs, const SVecDVecOuterExpr& rhs )
562  {
564 
566 
567  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
568  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
569 
570  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
571  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
572 
573  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
574  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
575  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
576  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
577 
578  SVecDVecOuterExpr::selectAssignKernel( ~lhs, x, y );
579  }
581  //**********************************************************************************************
582 
583  //**Default assignment to row-major dense matrices**********************************************
597  template< typename MT // Type of the left-hand side target matrix
598  , typename VT3 // Type of the left-hand side vector operand
599  , typename VT4 > // Type of the right-hand side vector operand
601  selectAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
602  {
604 
605  const ConstIterator end( x.end() );
606 
607  for( ConstIterator element=x.begin(); element!=end; ++element ) {
608  if( !isDefault( element->value() ) ) {
609  for( size_t j=0UL; j<y.size(); ++j ) {
610  (~A)(element->index(),j) = element->value() * y[j];
611  }
612  }
613  }
614  }
616  //**********************************************************************************************
617 
618  //**Vectorized 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
636  selectAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
637  {
639 
640  constexpr bool remainder( !IsPadded<MT>::value || !IsPadded<VT4>::value );
641 
642  const size_t N( (~A).columns() );
643 
644  const size_t jpos( remainder ? ( N & size_t(-SIMDSIZE) ) : N );
645  BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % SIMDSIZE ) ) == jpos, "Invalid end calculation" );
646 
647  const ConstIterator begin( x.begin() );
648  const ConstIterator end ( x.end() );
649 
650  for( ConstIterator element=begin; element!=end; ++element )
651  {
652  const SIMDTrait_<ElementType> x1( set( element->value() ) );
653 
654  size_t j( 0UL );
655 
656  for( ; j<jpos; j+=SIMDSIZE ) {
657  (~A).store( element->index(), j, x1 * y.load(j) );
658  }
659  for( ; remainder && j<N; ++j ) {
660  (~A)(element->index(),j) = element->value() * y[j];
661  }
662  }
663  }
665  //**********************************************************************************************
666 
667  //**Assignment to column-major dense matrices***************************************************
683  template< typename MT > // Type of the target dense matrix
684  friend inline EnableIf_< UseAssign<MT> >
685  assign( DenseMatrix<MT,true>& lhs, const SVecDVecOuterExpr& rhs )
686  {
688 
689  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
690  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
691 
693 
694  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
695  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
696 
697  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
698  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
699  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
700  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
701 
702  const ConstIterator end( x.end() );
703 
704  for( size_t i=0UL; i<y.size(); ++i ) {
705  if( !isDefault( y[i] ) ) {
706  for( ConstIterator element=x.begin(); element!=end; ++element ) {
707  (~lhs)(element->index(),i) = element->value() * y[i];
708  }
709  }
710  }
711  }
713  //**********************************************************************************************
714 
715  //**Assignment to row-major sparse matrices*****************************************************
727  template< typename MT > // Type of the target sparse matrix
728  friend inline void assign( SparseMatrix<MT,false>& lhs, const SVecDVecOuterExpr& rhs )
729  {
731 
733 
734  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
735  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns() , "Invalid number of columns" );
736 
738 
739  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
740  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
741 
742  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
743  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
744  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
745  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
746 
747  const ConstIterator begin( x.begin() );
748  const ConstIterator end ( x.end() );
749 
750  if( begin == end )
751  return;
752 
753  (~lhs).reserve( begin->index(), rhs.nonZeros() );
754 
755  size_t index( 0UL );
756 
757  for( ConstIterator element=begin; element!=end; ++element ) {
758  if( !isDefault( element->value() ) ) {
759  for( ; index < element->index(); ++index ) {
760  (~lhs).finalize( index );
761  }
762  for( size_t i=0UL; i<y.size(); ++i ) {
763  (~lhs).append( element->index(), i, element->value() * y[i] );
764  }
765  (~lhs).finalize( index++ );
766  }
767  }
768 
769  for( ; index < x.size(); ++index ) {
770  (~lhs).finalize( index );
771  }
772  }
774  //**********************************************************************************************
775 
776  //**Assignment to column-major sparse matrices**************************************************
792  template< typename MT > // Type of the target sparse matrix
793  friend inline EnableIf_< UseAssign<MT> >
794  assign( SparseMatrix<MT,true>& lhs, const SVecDVecOuterExpr& rhs )
795  {
797 
798  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
799  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns() , "Invalid number of columns" );
800  BLAZE_INTERNAL_ASSERT( (~lhs).capacity() >= rhs.nonZeros(), "Insufficient capacity" );
801 
803 
804  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
805  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
806 
807  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
808  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
809  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
810  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
811 
812  const ConstIterator begin( x.begin() );
813  const ConstIterator end ( x.end() );
814 
815  if( begin == end )
816  return;
817 
818  for( size_t i=0UL; i<y.size(); ++i ) {
819  if( !isDefault( y[i] ) ) {
820  for( ConstIterator element=begin; element!=end; ++element ) {
821  (~lhs).append( element->index(), i, element->value() * y[i] );
822  }
823  }
824  (~lhs).finalize( i );
825  }
826  }
828  //**********************************************************************************************
829 
830  //**Addition assignment to row-major dense matrices*********************************************
843  template< typename MT > // Type of the target dense matrix
844  friend inline void addAssign( DenseMatrix<MT,false>& lhs, const SVecDVecOuterExpr& rhs )
845  {
847 
849 
850  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
851  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
852 
853  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
854  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
855 
856  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
857  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
858  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
859  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
860 
861  SVecDVecOuterExpr::selectAddAssignKernel( ~lhs, x, y );
862  }
864  //**********************************************************************************************
865 
866  //**Default addition assignment to row-major dense matrices*************************************
880  template< typename MT // Type of the left-hand side target matrix
881  , typename VT3 // Type of the left-hand side vector operand
882  , typename VT4 > // Type of the right-hand side vector operand
884  selectAddAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
885  {
887 
888  const ConstIterator end( x.end() );
889 
890  for( ConstIterator element=x.begin(); element!=end; ++element ) {
891  if( !isDefault( element->value() ) ) {
892  for( size_t i=0UL; i<y.size(); ++i ) {
893  (~A)(element->index(),i) += element->value() * y[i];
894  }
895  }
896  }
897  }
899  //**********************************************************************************************
900 
901  //**Vectorized addition assignment to row-major dense matrices**********************************
915  template< typename MT // Type of the left-hand side target matrix
916  , typename VT3 // Type of the left-hand side vector operand
917  , typename VT4 > // Type of the right-hand side vector operand
919  selectAddAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
920  {
922 
923  constexpr bool remainder( !IsPadded<MT>::value || !IsPadded<VT4>::value );
924 
925  const size_t N( (~A).columns() );
926 
927  const size_t jpos( remainder ? ( N & size_t(-SIMDSIZE) ) : N );
928  BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % SIMDSIZE ) ) == jpos, "Invalid end calculation" );
929 
930  const ConstIterator begin( x.begin() );
931  const ConstIterator end ( x.end() );
932 
933  for( ConstIterator element=begin; element!=end; ++element )
934  {
935  const SIMDTrait_<ElementType> x1( set( element->value() ) );
936 
937  size_t j( 0UL );
938 
939  for( ; j<jpos; j+=SIMDSIZE ) {
940  (~A).store( element->index(), j, (~A).load(element->index(),j) + x1 * y.load(j) );
941  }
942  for( ; remainder && j<N; ++j ) {
943  (~A)(element->index(),j) += element->value() * y[j];
944  }
945  }
946  }
948  //**********************************************************************************************
949 
950  //**Addition assignment to column-major dense matrices******************************************
966  template< typename MT > // Type of the target dense matrix
967  friend inline EnableIf_< UseAssign<MT> >
968  addAssign( DenseMatrix<MT,true>& lhs, const SVecDVecOuterExpr& rhs )
969  {
971 
972  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
973  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
974 
976 
977  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
978  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
979 
980  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
981  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
982  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
983  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
984 
985  const ConstIterator end( x.end() );
986 
987  for( size_t i=0UL; i<y.size(); ++i ) {
988  if( !isDefault( y[i] ) ) {
989  for( ConstIterator element=x.begin(); element!=end; ++element ) {
990  (~lhs)(element->index(),i) += element->value() * y[i];
991  }
992  }
993  }
994  }
996  //**********************************************************************************************
997 
998  //**Addition assignment to sparse matrices******************************************************
999  // No special implementation for the addition assignment to sparse matrices.
1000  //**********************************************************************************************
1001 
1002  //**Subtraction assignment to row-major dense matrices******************************************
1015  template< typename MT > // Type of the target dense matrix
1016  friend inline void subAssign( DenseMatrix<MT,false>& lhs, const SVecDVecOuterExpr& rhs )
1017  {
1019 
1021 
1022  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1023  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1024 
1025  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
1026  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
1027 
1028  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1029  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1030  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
1031  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
1032 
1033  SVecDVecOuterExpr::selectSubAssignKernel( ~lhs, x, y );
1034  }
1036  //**********************************************************************************************
1037 
1038  //**Default subtraction assignment to row-major dense matrices**********************************
1052  template< typename MT // Type of the left-hand side target matrix
1053  , typename VT3 // Type of the left-hand side vector operand
1054  , typename VT4 > // Type of the right-hand side vector operand
1056  selectSubAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
1057  {
1059 
1060  const ConstIterator end( x.end() );
1061 
1062  for( ConstIterator element=x.begin(); element!=end; ++element ) {
1063  if( !isDefault( element->value() ) ) {
1064  for( size_t i=0UL; i<y.size(); ++i ) {
1065  (~A)(element->index(),i) -= element->value() * y[i];
1066  }
1067  }
1068  }
1069  }
1071  //**********************************************************************************************
1072 
1073  //**Vectorized subtraction assignment to row-major dense matrices*******************************
1087  template< typename MT // Type of the left-hand side target matrix
1088  , typename VT3 // Type of the left-hand side vector operand
1089  , typename VT4 > // Type of the right-hand side vector operand
1091  selectSubAssignKernel( DenseMatrix<MT,false>& A, const VT3& x, const VT4& y )
1092  {
1094 
1095  constexpr bool remainder( !IsPadded<MT>::value || !IsPadded<VT4>::value );
1096 
1097  const size_t N( (~A).columns() );
1098 
1099  const size_t jpos( remainder ? ( N & size_t(-SIMDSIZE) ) : N );
1100  BLAZE_INTERNAL_ASSERT( !remainder || ( N - ( N % SIMDSIZE ) ) == jpos, "Invalid end calculation" );
1101 
1102  const ConstIterator begin( x.begin() );
1103  const ConstIterator end ( x.end() );
1104 
1105  for( ConstIterator element=begin; element!=end; ++element )
1106  {
1107  const SIMDTrait_<ElementType> x1( set( element->value() ) );
1108 
1109  size_t j( 0UL );
1110 
1111  for( ; j<jpos; j+=SIMDSIZE ) {
1112  (~A).store( element->index(), j, (~A).load(element->index(),j) - x1 * y.load(j) );
1113  }
1114  for( ; remainder && j<N; ++j ) {
1115  (~A)(element->index(),j) -= element->value() * y[j];
1116  }
1117  }
1118  }
1120  //**********************************************************************************************
1121 
1122  //**Subtraction assignment to column-major dense matrices***************************************
1138  template< typename MT > // Type of the target dense matrix
1139  friend inline EnableIf_< UseAssign<MT> >
1140  subAssign( DenseMatrix<MT,true>& lhs, const SVecDVecOuterExpr& rhs )
1141  {
1143 
1144  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1145  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1146 
1148 
1149  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
1150  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
1151 
1152  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1153  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1154  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
1155  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
1156 
1157  const ConstIterator end( x.end() );
1158 
1159  for( size_t i=0UL; i<y.size(); ++i ) {
1160  if( !isDefault( y[i] ) ) {
1161  for( ConstIterator element=x.begin(); element!=end; ++element ) {
1162  (~lhs)(element->index(),i) -= element->value() * y[i];
1163  }
1164  }
1165  }
1166  }
1168  //**********************************************************************************************
1169 
1170  //**Subtraction assignment to sparse matrices***************************************************
1171  // No special implementation for the subtraction assignment to sparse matrices.
1172  //**********************************************************************************************
1173 
1174  //**Multiplication assignment to dense matrices*************************************************
1175  // No special implementation for the multiplication assignment to dense matrices.
1176  //**********************************************************************************************
1177 
1178  //**Multiplication assignment to sparse matrices************************************************
1179  // No special implementation for the multiplication assignment to sparse matrices.
1180  //**********************************************************************************************
1181 
1182  //**Compile time checks*************************************************************************
1190  //**********************************************************************************************
1191 };
1192 //*************************************************************************************************
1193 
1194 
1195 
1196 
1197 //=================================================================================================
1198 //
1199 // GLOBAL BINARY ARITHMETIC OPERATORS
1200 //
1201 //=================================================================================================
1202 
1203 //*************************************************************************************************
1232 template< typename T1 // Type of the left-hand side sparse vector
1233  , typename T2 > // Type of the right-hand side dense vector
1234 inline const SVecDVecOuterExpr<T1,T2>
1236 {
1238 
1239  return SVecDVecOuterExpr<T1,T2>( ~lhs, ~rhs );
1240 }
1241 //*************************************************************************************************
1242 
1243 
1244 
1245 
1246 //=================================================================================================
1247 //
1248 // ROWS SPECIALIZATIONS
1249 //
1250 //=================================================================================================
1251 
1252 //*************************************************************************************************
1254 template< typename VT1, typename VT2 >
1255 struct Rows< SVecDVecOuterExpr<VT1,VT2> > : public Size<VT1>
1256 {};
1258 //*************************************************************************************************
1259 
1260 
1261 
1262 
1263 //=================================================================================================
1264 //
1265 // COLUMNS SPECIALIZATIONS
1266 //
1267 //=================================================================================================
1268 
1269 //*************************************************************************************************
1271 template< typename VT1, typename VT2 >
1272 struct Columns< SVecDVecOuterExpr<VT1,VT2> > : public Size<VT2>
1273 {};
1275 //*************************************************************************************************
1276 
1277 
1278 
1279 
1280 //=================================================================================================
1281 //
1282 // EXPRESSION TRAIT SPECIALIZATIONS
1283 //
1284 //=================================================================================================
1285 
1286 //*************************************************************************************************
1288 template< typename VT1, typename VT2, bool AF >
1289 struct SubmatrixExprTrait< SVecDVecOuterExpr<VT1,VT2>, AF >
1290 {
1291  public:
1292  //**********************************************************************************************
1295  //**********************************************************************************************
1296 };
1298 //*************************************************************************************************
1299 
1300 
1301 //*************************************************************************************************
1303 template< typename VT1, typename VT2 >
1304 struct RowExprTrait< SVecDVecOuterExpr<VT1,VT2> >
1305 {
1306  public:
1307  //**********************************************************************************************
1308  using Type = MultExprTrait_< ReturnType_<VT1>, VT2 >;
1309  //**********************************************************************************************
1310 };
1312 //*************************************************************************************************
1313 
1314 
1315 //*************************************************************************************************
1317 template< typename VT1, typename VT2 >
1318 struct ColumnExprTrait< SVecDVecOuterExpr<VT1,VT2> >
1319 {
1320  public:
1321  //**********************************************************************************************
1323  //**********************************************************************************************
1324 };
1326 //*************************************************************************************************
1327 
1328 } // namespace blaze
1329 
1330 #endif
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SVecDVecOuterExpr.h:384
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:70
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
ReturnType_< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:112
CompositeType_< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:114
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:352
Header file for basic type definitions.
SVecDVecOuterExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the SVecDVecOuterExpr class.
Definition: SVecDVecOuterExpr.h:355
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecDVecOuterExpr.h:537
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecDVecOuterExpr.h:224
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified column.
Definition: SVecDVecOuterExpr.h:453
CompositeType_< VT2 > CT2
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:115
RightOperand rhs_
Right-hand side dense vector of the multiplication expression.
Definition: SVecDVecOuterExpr.h:545
MultExprTrait_< RN1, RN2 > ExprReturnType
Expression return type for the subscript operator.
Definition: SVecDVecOuterExpr.h:130
#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: ColumnVector.h:61
PointerType pointer
Pointer return type.
Definition: SVecDVecOuterExpr.h:233
Header file for the serial shim.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SVecDVecOuterExpr.h:432
If_< IsExpression< VT2 >, const VT2, const VT2 &> RightOperand
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:199
Header file for the ColumnExprTrait class template.
Header file for the IsSame and IsStrictlySame type traits.
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:162
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:315
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecDVecOuterExpr.h:252
IteratorType it_
Iterator over the elements of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:333
ResultType_< VT2 > RT2
Result type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:111
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
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 constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:138
System settings for performance optimizations.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
RightElement v_
Element of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:334
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
Element ValueType
Type of the underlying pointers.
Definition: SVecDVecOuterExpr.h:225
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
Header file for the SparseMatrix base class.
Constraint on the transpose flag of vector types.
If_< IsExpression< VT1 >, const VT1, const VT1 &> LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:196
Constraint on the data type.
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: SVecDVecOuterExpr.h:466
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
Header file for the MultExprTrait class template.
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SVecDVecOuterExpr.h:185
RightOperand rightOperand() const noexcept
Returns the right-hand side dense vector operand.
Definition: SVecDVecOuterExpr.h:513
If_< IsComputation< VT1 >, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: SVecDVecOuterExpr.h:202
Header file for the ValueIndexPair class.
Header file for the IsTemporary type trait class.
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecDVecOuterExpr.h:190
Header file for the multiplication trait.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecDVecOuterExpr.h:304
ConstIterator_< RemoveReference_< LeftOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecDVecOuterExpr.h:219
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SVecDVecOuterExpr.h:263
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECTVECMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/vector ...
Definition: VecTVecMultExpr.h:105
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the Columns type trait.
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: SVecDVecOuterExpr.h:216
typename SubvectorExprTrait< VT, AF >::Type SubvectorExprTrait_
Auxiliary alias declaration for the SubvectorExprTrait type trait.The SubvectorExprTrait_ alias decla...
Definition: SubvectorExprTrait.h:133
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for all SIMD functionality.
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecDVecOuterExpr.h:503
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecDVecOuterExpr.h:544
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:80
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:61
ConstIterator(IteratorType it, RightElement v)
Constructor for the ConstIterator class.
Definition: SVecDVecOuterExpr.h:241
DifferenceType difference_type
Difference between two iterators.
Definition: SVecDVecOuterExpr.h:235
ET2 RightElement
Element type of the dense vector expression.
Definition: SVecDVecOuterExpr.h:222
size_t index() const
Access to the current index of the sparse element.
Definition: SVecDVecOuterExpr.h:293
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecDVecOuterExpr.h:184
Constraint on the data type.
Header file for the exception macros of the math module.
Evaluation of the expression type type of a row operation.Via this type trait it is possible to evalu...
Definition: RowExprTrait.h:79
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecDVecOuterExpr.h:326
Constraint on the data type.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the VecTVecMultExpr base class.
Iterator over the elements of the sparse vector-dense vector outer product expression.
Definition: SVecDVecOuterExpr.h:211
Header file for the EnableIf class template.
If_< IsComputation< VT2 >, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: SVecDVecOuterExpr.h:205
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecDVecOuterExpr.h:186
ValueType value_type
Type of the underlying pointers.
Definition: SVecDVecOuterExpr.h:232
Header file for the IsNumeric type trait.
ReferenceType reference
Reference return type.
Definition: SVecDVecOuterExpr.h:234
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for the SubmatrixExprTrait class template.
Header file for the HasSIMDMult type trait.
Expression object for sparse vector-dense vector outer products.The SVecDVecOuterExpr class represent...
Definition: Forward.h:124
Header file for run time assertion macros.
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SVecDVecOuterExpr.h:273
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of column i.
Definition: SVecDVecOuterExpr.h:412
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecDVecOuterExpr.h:283
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecDVecOuterExpr.h:525
ValueType & ReferenceType
Reference return type.
Definition: SVecDVecOuterExpr.h:227
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecDVecOuterExpr.h:315
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SVecDVecOuterExpr.h:422
ResultType_< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:110
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
Header file for the isDefault shim.
SVecDVecOuterExpr< VT1, VT2 > This
Type of this SVecDVecOuterExpr instance.
Definition: SVecDVecOuterExpr.h:183
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
Constraint on the data type.
Header file for the RemoveReference type trait.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
IteratorCategory iterator_category
The iterator category.
Definition: SVecDVecOuterExpr.h:231
ValueType * PointerType
Pointer return type.
Definition: SVecDVecOuterExpr.h:226
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#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:61
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
ReturnType_< VT2 > RN2
Return type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:113
Header file for the IsComputation type trait class.
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of column i.
Definition: SVecDVecOuterExpr.h:401
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SVecDVecOuterExpr.h:187
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:75
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecDVecOuterExpr.h:228
#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: RowVector.h:61
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
Header file for the SubvectorExprTrait class template.
ElementType_< VT2 > ET2
Element type of the right-hand side dense vector expression.
Definition: SVecDVecOuterExpr.h:117
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SVecDVecOuterExpr.h:442
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
ElementType_< VT1 > ET1
Element type of the left-hand side sparse vector expression.
Definition: SVecDVecOuterExpr.h:116
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: SVecDVecOuterExpr.h:492
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: SVecDVecOuterExpr.h:479
const DMatDMatMultExpr< T1, T2, false, false, false, false > 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:7505
Header file for the Size type trait.
Evaluation of the expression type type of a column operation.Via this type trait it is possible to ev...
Definition: ColumnExprTrait.h:78
#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
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SVecDVecOuterExpr.h:368
IfTrue_< useAssign, const ResultType, const SVecDVecOuterExpr &> CompositeType
Data type for composite expression templates.
Definition: SVecDVecOuterExpr.h:193
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Header file for the function trace functionality.