DVecSVecOuterExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSVECOUTEREXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECSVECOUTEREXPR_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 DVECSVECOUTEREXPR
92 //
93 //=================================================================================================
94 
95 //*************************************************************************************************
102 template< typename VT1 // Type of the left-hand side dense vector
103  , typename VT2 > // Type of the right-hand side sparse vector
104 class DVecSVecOuterExpr : public SparseMatrix< DVecSVecOuterExpr<VT1,VT2>, false >
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 
142  enum : bool { useAssign = ( IsComputation<VT1>::value || !IsNumeric<ET1>::value ||
144 
146  template< typename MT >
148  struct UseAssign {
149  enum : bool { value = useAssign };
150  };
152  //**********************************************************************************************
153 
154  //**********************************************************************************************
156 
159  template< typename T1, typename T2, typename T3 >
160  struct UseVectorizedKernel {
161  enum : bool { value = useOptimizedKernels &&
162  T1::simdEnabled && T2::simdEnabled &&
164  IsSame< ElementType_<T1>, ElementType_<T3> >::value &&
166  };
168  //**********************************************************************************************
169 
170  //**********************************************************************************************
172 
175  template< typename T1, typename T2, typename T3 >
176  struct UseDefaultKernel {
177  enum : bool { value = !UseVectorizedKernel<T1,T2,T3>::value };
178  };
180  //**********************************************************************************************
181 
182  public:
183  //**Type definitions****************************************************************************
189 
192 
195 
197  typedef If_< IsExpression<VT1>, const VT1, const VT1& > LeftOperand;
198 
200  typedef If_< IsExpression<VT2>, const VT2, const VT2& > RightOperand;
201 
203  typedef If_< IsComputation<VT1>, const RT1, CT1 > LT;
204 
206  typedef If_< IsComputation<VT2>, const RT2, CT2 > RT;
207  //**********************************************************************************************
208 
209  //**ConstIterator class definition**************************************************************
213  {
214  public:
215  //**Type definitions*************************************************************************
218 
220  typedef ET1 LeftElement;
221 
224 
225  typedef std::forward_iterator_tag IteratorCategory;
226  typedef Element ValueType;
227  typedef ValueType* PointerType;
228  typedef ValueType& ReferenceType;
230 
231  // STL iterator requirements
232  typedef IteratorCategory iterator_category;
233  typedef ValueType value_type;
234  typedef PointerType pointer;
235  typedef ReferenceType reference;
236  typedef DifferenceType difference_type;
237  //*******************************************************************************************
238 
239  //**Constructor******************************************************************************
242  inline ConstIterator( LeftElement v, IteratorType it )
243  : v_ ( v ) // Element of the left-hand side dense vector expression.
244  , it_( it ) // Iterator over the elements of the right-hand side sparse vector expression
245  {}
246  //*******************************************************************************************
247 
248  //**Prefix increment operator****************************************************************
254  ++it_;
255  return *this;
256  }
257  //*******************************************************************************************
258 
259  //**Element access operator******************************************************************
264  inline const Element operator*() const {
265  return Element( v_ * it_->value(), it_->index() );
266  }
267  //*******************************************************************************************
268 
269  //**Element access operator******************************************************************
274  inline const ConstIterator* operator->() const {
275  return this;
276  }
277  //*******************************************************************************************
278 
279  //**Value function***************************************************************************
284  inline ReturnType value() const {
285  return v_ * it_->value();
286  }
287  //*******************************************************************************************
288 
289  //**Index function***************************************************************************
294  inline size_t index() const {
295  return it_->index();
296  }
297  //*******************************************************************************************
298 
299  //**Equality operator************************************************************************
305  inline bool operator==( const ConstIterator& rhs ) const {
306  return it_ == rhs.it_;
307  }
308  //*******************************************************************************************
309 
310  //**Inequality operator**********************************************************************
316  inline bool operator!=( const ConstIterator& rhs ) const {
317  return it_ != rhs.it_;
318  }
319  //*******************************************************************************************
320 
321  //**Subtraction operator*********************************************************************
327  inline DifferenceType operator-( const ConstIterator& rhs ) const {
328  return it_ - rhs.it_;
329  }
330  //*******************************************************************************************
331 
332  private:
333  //**Member variables*************************************************************************
334  LeftElement v_;
335  IteratorType it_;
336  //*******************************************************************************************
337  };
338  //**********************************************************************************************
339 
340  //**Compilation flags***************************************************************************
342  enum : bool { smpAssignable = false };
343  //**********************************************************************************************
344 
345  //**SIMD properties*****************************************************************************
347  enum : size_t { SIMDSIZE = SIMDTrait<ElementType>::size };
348  //**********************************************************************************************
349 
350  //**Constructor*********************************************************************************
356  explicit inline DVecSVecOuterExpr( const VT1& lhs, const VT2& rhs ) noexcept
357  : lhs_( lhs ) // Left-hand side dense vector of the multiplication expression
358  , rhs_( rhs ) // Right-hand side sparse vector of the multiplication expression
359  {}
360  //**********************************************************************************************
361 
362  //**Access operator*****************************************************************************
369  inline ReturnType operator()( size_t i, size_t j ) const {
370  BLAZE_INTERNAL_ASSERT( i < lhs_.size(), "Invalid row access index" );
371  BLAZE_INTERNAL_ASSERT( j < rhs_.size(), "Invalid column access index" );
372 
373  return lhs_[i] * rhs_[j];
374  }
375  //**********************************************************************************************
376 
377  //**At function*********************************************************************************
385  inline ReturnType at( size_t i, size_t j ) const {
386  if( i >= lhs_.size() ) {
387  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
388  }
389  if( j >= rhs_.size() ) {
390  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
391  }
392  return (*this)(i,j);
393  }
394  //**********************************************************************************************
395 
396  //**Begin function******************************************************************************
402  inline ConstIterator begin( size_t i ) const {
403  return ConstIterator( lhs_[i], rhs_.begin() );
404  }
405  //**********************************************************************************************
406 
407  //**End function********************************************************************************
413  inline ConstIterator end( size_t i ) const {
414  return ConstIterator( lhs_[i], rhs_.end() );
415  }
416  //**********************************************************************************************
417 
418  //**Rows function*******************************************************************************
423  inline size_t rows() const noexcept {
424  return lhs_.size();
425  }
426  //**********************************************************************************************
427 
428  //**Columns function****************************************************************************
433  inline size_t columns() const noexcept {
434  return rhs_.size();
435  }
436  //**********************************************************************************************
437 
438  //**NonZeros function***************************************************************************
443  inline size_t nonZeros() const {
444  return lhs_.size() * rhs_.nonZeros();
445  }
446  //**********************************************************************************************
447 
448  //**NonZeros function***************************************************************************
454  inline size_t nonZeros( size_t i ) const {
455  UNUSED_PARAMETER( i );
456  return rhs_.nonZeros();
457  }
458  //**********************************************************************************************
459 
460  //**Find function*******************************************************************************
467  inline ConstIterator find( size_t i, size_t j ) const {
469  return ConstIterator( lhs_[i], rhs_.find( j ) );
470  }
471  //**********************************************************************************************
472 
473  //**LowerBound function*************************************************************************
480  inline ConstIterator lowerBound( size_t i, size_t j ) const {
482  return ConstIterator( lhs_[i], rhs_.lowerBound( j ) );
483  }
484  //**********************************************************************************************
485 
486  //**UpperBound function*************************************************************************
493  inline ConstIterator upperBound( size_t i, size_t j ) const {
495  return ConstIterator( lhs_[i], rhs_.upperBound( j ) );
496  }
497  //**********************************************************************************************
498 
499  //**Left operand access*************************************************************************
504  inline LeftOperand leftOperand() const noexcept {
505  return lhs_;
506  }
507  //**********************************************************************************************
508 
509  //**Right operand access************************************************************************
514  inline RightOperand rightOperand() const noexcept {
515  return rhs_;
516  }
517  //**********************************************************************************************
518 
519  //**********************************************************************************************
525  template< typename T >
526  inline bool canAlias( const T* alias ) const noexcept {
527  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
528  }
529  //**********************************************************************************************
530 
531  //**********************************************************************************************
537  template< typename T >
538  inline bool isAliased( const T* alias ) const noexcept {
539  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
540  }
541  //**********************************************************************************************
542 
543  private:
544  //**Member variables****************************************************************************
545  LeftOperand lhs_;
546  RightOperand rhs_;
547  //**********************************************************************************************
548 
549  //**Assignment to row-major dense matrices******************************************************
564  template< typename MT > // Type of the target dense matrix
565  friend inline EnableIf_< UseAssign<MT> >
566  assign( DenseMatrix<MT,false>& lhs, const DVecSVecOuterExpr& rhs )
567  {
569 
570  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
571  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
572 
574 
575  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
576  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
577 
578  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
579  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
580  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
581  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
582 
583  const ConstIterator begin( y.begin() );
584  const ConstIterator end ( y.end() );
585 
586  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
587  for( ConstIterator element=begin; element!=end; ++element ) {
588  (~lhs)(i,element->index()) = x[i] * element->value();
589  }
590  }
591  }
593  //**********************************************************************************************
594 
595  //**Assignment to column-major dense matrices***************************************************
608  template< typename MT > // Type of the target dense matrix
609  friend inline void assign( DenseMatrix<MT,true>& lhs, const DVecSVecOuterExpr& rhs )
610  {
612 
614 
615  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
616  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
617 
618  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
619  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
620 
621  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
622  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
623  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
624  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
625 
626  DVecSVecOuterExpr::selectAssignKernel( ~lhs, x, y );
627  }
629  //**********************************************************************************************
630 
631  //**Default assignment to column-major dense matrices*******************************************
645  template< typename MT // Type of the left-hand side target matrix
646  , typename VT3 // Type of the left-hand side vector operand
647  , typename VT4 > // Type of the right-hand side vector operand
649  selectAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
650  {
652 
653  const ConstIterator begin( y.begin() );
654  const ConstIterator end ( y.end() );
655 
656  for( ConstIterator element=begin; element!=end; ++element ) {
657  for( size_t i=0UL; i<(~A).rows(); ++i ) {
658  (~A)(i,element->index()) = x[i] * element->value();
659  }
660  }
661  }
663  //**********************************************************************************************
664 
665  //**Vectorized assignment to column-major dense matrices****************************************
679  template< typename MT // Type of the left-hand side target matrix
680  , typename VT3 // Type of the left-hand side vector operand
681  , typename VT4 > // Type of the right-hand side vector operand
683  selectAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
684  {
686 
687  constexpr bool remainder( !IsPadded<MT>::value || !IsPadded<VT3>::value );
688 
689  const size_t M( (~A).rows() );
690 
691  const size_t ipos( remainder ? ( M & size_t(-SIMDSIZE) ) : M );
692  BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % SIMDSIZE ) ) == ipos, "Invalid end calculation" );
693 
694  const ConstIterator begin( y.begin() );
695  const ConstIterator end ( y.end() );
696 
697  for( ConstIterator element=begin; element!=end; ++element )
698  {
699  const SIMDTrait_<ElementType> y1( set( element->value() ) );
700 
701  size_t i( 0UL );
702 
703  for( ; i<ipos; i+=SIMDSIZE ) {
704  (~A).store( i, element->index(), x.load(i) * y1 );
705  }
706  for( ; remainder && i<M; ++i ) {
707  (~A)(i,element->index()) = x[i] * element->value();
708  }
709  }
710  }
712  //**********************************************************************************************
713 
714  //**Assignment to row-major sparse matrices*****************************************************
729  template< typename MT > // Type of the target sparse matrix
730  friend inline EnableIf_< UseAssign<MT> >
731  assign( SparseMatrix<MT,false>& lhs, const DVecSVecOuterExpr& rhs )
732  {
734 
735  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
736  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns() , "Invalid number of columns" );
737  BLAZE_INTERNAL_ASSERT( (~lhs).capacity() >= rhs.nonZeros(), "Insufficient capacity" );
738 
740 
741  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
742  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
743 
744  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
745  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
746  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
747  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
748 
749  const ConstIterator begin( y.begin() );
750  const ConstIterator end ( y.end() );
751 
752  if( begin == end )
753  return;
754 
755  for( size_t i=0UL; i<x.size(); ++i ) {
756  if( !isDefault( x[i] ) ) {
757  for( ConstIterator element=begin; element!=end; ++element ) {
758  (~lhs).append( i, element->index(), x[i] * element->value() );
759  }
760  }
761  (~lhs).finalize( i );
762  }
763  }
765  //**********************************************************************************************
766 
767  //**Assignment to column-major sparse matrices*****************************************************
780  template< typename MT > // Type of the target sparse matrix
781  friend inline void assign( SparseMatrix<MT,true>& lhs, const DVecSVecOuterExpr& rhs )
782  {
784 
786 
787  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
788  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns() , "Invalid number of columns" );
789 
791 
792  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
793  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
794 
795  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
796  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
797  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
798  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
799 
800  const ConstIterator begin( y.begin() );
801  const ConstIterator end ( y.end() );
802 
803  if( begin == end )
804  return;
805 
806  (~lhs).reserve( begin->index(), rhs.nonZeros() );
807 
808  size_t index( 0UL );
809 
810  for( ConstIterator element=begin; element!=end; ++element ) {
811  if( !isDefault( element->value() ) ) {
812  for( ; index < element->index(); ++index ) {
813  (~lhs).finalize( index );
814  }
815  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
816  (~lhs).append( i, element->index(), x[i] * element->value() );
817  }
818  (~lhs).finalize( index++ );
819  }
820  }
821 
822  for( ; index < y.size(); ++index ) {
823  (~lhs).finalize( index );
824  }
825  }
827  //**********************************************************************************************
828 
829  //**Addition assignment to row-major dense matrices*********************************************
845  template< typename MT > // Type of the target dense matrix
846  friend inline EnableIf_< UseAssign<MT> >
847  addAssign( DenseMatrix<MT,false>& lhs, const DVecSVecOuterExpr& rhs )
848  {
850 
851  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
852  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
853 
855 
856  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
857  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
858 
859  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
860  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
861  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
862  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
863 
864  const ConstIterator begin( y.begin() );
865  const ConstIterator end ( y.end() );
866 
867  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
868  for( ConstIterator element=begin; element!=end; ++element ) {
869  (~lhs)(i,element->index()) += x[i] * element->value();
870  }
871  }
872  }
874  //**********************************************************************************************
875 
876  //**Addition assignment to column-major dense matrices******************************************
889  template< typename MT > // Type of the target dense matrix
890  friend inline void addAssign( DenseMatrix<MT,true>& lhs, const DVecSVecOuterExpr& rhs )
891  {
893 
895 
896  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
897  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
898 
899  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
900  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
901 
902  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
903  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
904  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
905  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
906 
907  DVecSVecOuterExpr::selectAddAssignKernel( ~lhs, x, y );
908  }
910  //**********************************************************************************************
911 
912  //**Default addition assignment to column dense matrices****************************************
926  template< typename MT // Type of the left-hand side target matrix
927  , typename VT3 // Type of the left-hand side vector operand
928  , typename VT4 > // Type of the right-hand side vector operand
930  selectAddAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
931  {
933 
934  const ConstIterator begin( y.begin() );
935  const ConstIterator end ( y.end() );
936 
937  for( ConstIterator element=begin; element!=end; ++element ) {
938  for( size_t i=0UL; i<(~A).rows(); ++i ) {
939  (~A)(i,element->index()) += x[i] * element->value();
940  }
941  }
942  }
944  //**********************************************************************************************
945 
946  //**Vectorized addition assignment to column-major dense matrices*******************************
960  template< typename MT // Type of the left-hand side target matrix
961  , typename VT3 // Type of the left-hand side vector operand
962  , typename VT4 > // Type of the right-hand side vector operand
964  selectAddAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
965  {
967 
968  constexpr bool remainder( !IsPadded<MT>::value || !IsPadded<VT3>::value );
969 
970  const size_t M( (~A).rows() );
971 
972  const size_t ipos( remainder ? ( M & size_t(-SIMDSIZE) ) : M );
973  BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % SIMDSIZE ) ) == ipos, "Invalid end calculation" );
974 
975  const ConstIterator begin( y.begin() );
976  const ConstIterator end ( y.end() );
977 
978  for( ConstIterator element=begin; element!=end; ++element )
979  {
980  const SIMDTrait_<ElementType> y1( set( element->value() ) );
981 
982  size_t i( 0UL );
983 
984  for( ; i<ipos; i+=SIMDSIZE ) {
985  (~A).store( i, element->index(), (~A).load(i,element->index()) + x.load(i) * y1 );
986  }
987  for( ; remainder && i<M; ++i ) {
988  (~A)(i,element->index()) += x[i] * element->value();
989  }
990  }
991  }
993  //**********************************************************************************************
994 
995  //**Addition assignment to sparse matrices******************************************************
996  // No special implementation for the addition assignment to sparse matrices.
997  //**********************************************************************************************
998 
999  //**Subtraction assignment to row-major dense matrices******************************************
1015  template< typename MT > // Type of the target dense matrix
1016  friend inline EnableIf_< UseAssign<MT> >
1017  subAssign( DenseMatrix<MT,false>& lhs, const DVecSVecOuterExpr& rhs )
1018  {
1020 
1021  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1022  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1023 
1025 
1026  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
1027  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
1028 
1029  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1030  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1031  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
1032  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
1033 
1034  const ConstIterator begin( y.begin() );
1035  const ConstIterator end ( y.end() );
1036 
1037  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
1038  for( ConstIterator element=begin; element!=end; ++element ) {
1039  (~lhs)(i,element->index()) -= x[i] * element->value();
1040  }
1041  }
1042  }
1044  //**********************************************************************************************
1045 
1046  //**Subtraction assignment to column-major dense matrices***************************************
1059  template< typename MT > // Type of the target dense matrix
1060  friend inline void subAssign( DenseMatrix<MT,true>& lhs, const DVecSVecOuterExpr& rhs )
1061  {
1063 
1065 
1066  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1067  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1068 
1069  LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
1070  RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
1071 
1072  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1073  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1074  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
1075  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
1076 
1077  DVecSVecOuterExpr::selectSubAssignKernel( ~lhs, x, y );
1078  }
1080  //**********************************************************************************************
1081 
1082  //**Default subtraction assignment to column dense matrices*************************************
1096  template< typename MT // Type of the left-hand side target matrix
1097  , typename VT3 // Type of the left-hand side vector operand
1098  , typename VT4 > // Type of the right-hand side vector operand
1100  selectSubAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
1101  {
1103 
1104  const ConstIterator begin( y.begin() );
1105  const ConstIterator end ( y.end() );
1106 
1107  for( ConstIterator element=begin; element!=end; ++element ) {
1108  for( size_t i=0UL; i<(~A).rows(); ++i ) {
1109  (~A)(i,element->index()) -= x[i] * element->value();
1110  }
1111  }
1112  }
1114  //**********************************************************************************************
1115 
1116  //**Vectorized subtraction assignment to column-major dense matrices****************************
1130  template< typename MT // Type of the left-hand side target matrix
1131  , typename VT3 // Type of the left-hand side vector operand
1132  , typename VT4 > // Type of the right-hand side vector operand
1134  selectSubAssignKernel( DenseMatrix<MT,true>& A, const VT3& x, const VT4& y )
1135  {
1137 
1138  constexpr bool remainder( !IsPadded<MT>::value || !IsPadded<VT3>::value );
1139 
1140  const size_t M( (~A).rows() );
1141 
1142  const size_t ipos( remainder ? ( M & size_t(-SIMDSIZE) ) : M );
1143  BLAZE_INTERNAL_ASSERT( !remainder || ( M - ( M % SIMDSIZE ) ) == ipos, "Invalid end calculation" );
1144 
1145  const ConstIterator begin( y.begin() );
1146  const ConstIterator end ( y.end() );
1147 
1148  for( ConstIterator element=begin; element!=end; ++element )
1149  {
1150  const SIMDTrait_<ElementType> y1( set( element->value() ) );
1151 
1152  size_t i( 0UL );
1153 
1154  for( ; i<ipos; i+=SIMDSIZE ) {
1155  (~A).store( i, element->index(), (~A).load(i,element->index()) - x.load(i) * y1 );
1156  }
1157  for( ; remainder && i<M; ++i ) {
1158  (~A)(i,element->index()) -= x[i] * element->value();
1159  }
1160  }
1161  }
1163  //**********************************************************************************************
1164 
1165  //**Subtraction assignment to sparse matrices***************************************************
1166  // No special implementation for the subtraction assignment to sparse matrices.
1167  //**********************************************************************************************
1168 
1169  //**Multiplication assignment to dense matrices*************************************************
1170  // No special implementation for the multiplication assignment to dense matrices.
1171  //**********************************************************************************************
1172 
1173  //**Multiplication assignment to sparse matrices************************************************
1174  // No special implementation for the multiplication assignment to sparse matrices.
1175  //**********************************************************************************************
1176 
1177  //**Compile time checks*************************************************************************
1185  //**********************************************************************************************
1186 };
1187 //*************************************************************************************************
1188 
1189 
1190 
1191 
1192 //=================================================================================================
1193 //
1194 // GLOBAL BINARY ARITHMETIC OPERATORS
1195 //
1196 //=================================================================================================
1197 
1198 //*************************************************************************************************
1227 template< typename T1 // Type of the left-hand side dense vector
1228  , typename T2 > // Type of the right-hand side sparse vector
1229 inline const DVecSVecOuterExpr<T1,T2>
1231 {
1233 
1234  return DVecSVecOuterExpr<T1,T2>( ~lhs, ~rhs );
1235 }
1236 //*************************************************************************************************
1237 
1238 
1239 
1240 
1241 //=================================================================================================
1242 //
1243 // ROWS SPECIALIZATIONS
1244 //
1245 //=================================================================================================
1246 
1247 //*************************************************************************************************
1249 template< typename VT1, typename VT2 >
1250 struct Rows< DVecSVecOuterExpr<VT1,VT2> > : public Size<VT1>
1251 {};
1253 //*************************************************************************************************
1254 
1255 
1256 
1257 
1258 //=================================================================================================
1259 //
1260 // COLUMNS SPECIALIZATIONS
1261 //
1262 //=================================================================================================
1263 
1264 //*************************************************************************************************
1266 template< typename VT1, typename VT2 >
1267 struct Columns< DVecSVecOuterExpr<VT1,VT2> > : public Size<VT2>
1268 {};
1270 //*************************************************************************************************
1271 
1272 
1273 
1274 
1275 //=================================================================================================
1276 //
1277 // EXPRESSION TRAIT SPECIALIZATIONS
1278 //
1279 //=================================================================================================
1280 
1281 //*************************************************************************************************
1283 template< typename VT1, typename VT2, bool AF >
1284 struct SubmatrixExprTrait< DVecSVecOuterExpr<VT1,VT2>, AF >
1285 {
1286  public:
1287  //**********************************************************************************************
1290  //**********************************************************************************************
1291 };
1293 //*************************************************************************************************
1294 
1295 
1296 //*************************************************************************************************
1298 template< typename VT1, typename VT2 >
1299 struct RowExprTrait< DVecSVecOuterExpr<VT1,VT2> >
1300 {
1301  public:
1302  //**********************************************************************************************
1303  using Type = MultExprTrait_< ReturnType_<VT1>, VT2 >;
1304  //**********************************************************************************************
1305 };
1307 //*************************************************************************************************
1308 
1309 
1310 //*************************************************************************************************
1312 template< typename VT1, typename VT2 >
1313 struct ColumnExprTrait< DVecSVecOuterExpr<VT1,VT2> >
1314 {
1315  public:
1316  //**********************************************************************************************
1318  //**********************************************************************************************
1319 };
1321 //*************************************************************************************************
1322 
1323 } // namespace blaze
1324 
1325 #endif
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DVecSVecOuterExpr.h:186
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecSVecOuterExpr.h:538
ReferenceType reference
Reference return type.
Definition: DVecSVecOuterExpr.h:235
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
LeftElement v_
Element of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:334
IteratorCategory iterator_category
The iterator category.
Definition: DVecSVecOuterExpr.h:232
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.
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.
ReturnType_< VT2 > RN2
Return type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:113
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DVecSVecOuterExpr.h:433
#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
Header file for the serial shim.
ElementType_< VT1 > ET1
Element type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:116
Expression object for dense vector-sparse vector outer products.The DVecSVecOuterExpr class represent...
Definition: DVecSVecOuterExpr.h:104
Header file for the ColumnExprTrait class template.
Header file for the IsSame and IsStrictlySame type traits.
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: DVecSVecOuterExpr.h:264
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
DVecSVecOuterExpr< VT1, VT2 > This
Type of this DVecSVecOuterExpr instance.
Definition: DVecSVecOuterExpr.h:184
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DVecSVecOuterExpr.h:385
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
ValueType & ReferenceType
Reference return type.
Definition: DVecSVecOuterExpr.h:228
ElementType_< VT2 > ET2
Element type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:117
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
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
IfTrue_< useAssign, const ResultType, const DVecSVecOuterExpr &> CompositeType
Data type for composite expression templates.
Definition: DVecSVecOuterExpr.h:194
Header file for the SparseMatrix base class.
Constraint on the transpose flag of vector types.
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: DVecSVecOuterExpr.h:443
Constraint on the data type.
size_t index() const
Access to the current index of the sparse element.
Definition: DVecSVecOuterExpr.h:294
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DVecSVecOuterExpr.h:413
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.
IteratorType it_
Iterator over the elements of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:335
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
If_< IsExpression< VT2 >, const VT2, const VT2 &> RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:200
If_< IsComputation< VT2 >, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: DVecSVecOuterExpr.h:206
Header file for the ValueIndexPair class.
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: DVecSVecOuterExpr.h:217
Header file for the IsTemporary type trait class.
If_< IsComputation< VT1 >, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: DVecSVecOuterExpr.h:203
Header file for the multiplication trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
DVecSVecOuterExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the DVecSVecOuterExpr class.
Definition: DVecSVecOuterExpr.h:356
Iterator over the elements of the dense vector-sparse vector outer product expression.
Definition: DVecSVecOuterExpr.h:212
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: DVecSVecOuterExpr.h:480
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecSVecOuterExpr.h:526
#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.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecSVecOuterExpr.h:316
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.
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
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecSVecOuterExpr.h:187
#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
Constraint on the data type.
ConstIterator_< RemoveReference_< RightOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: DVecSVecOuterExpr.h:223
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
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecSVecOuterExpr.h:305
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DVecSVecOuterExpr.h:191
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.
Header file for the EnableIf class template.
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DVecSVecOuterExpr.h:185
ReturnType value() const
Access to the current value of the sparse element.
Definition: DVecSVecOuterExpr.h:284
ResultType_< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:111
Header file for the IsNumeric type trait.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: DVecSVecOuterExpr.h:514
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: DVecSVecOuterExpr.h:467
#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.
Header file for run time assertion macros.
ResultType_< VT1 > RT1
Result type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:110
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
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: DVecSVecOuterExpr.h:493
If_< IsExpression< VT1 >, const VT1, const VT1 &> LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:197
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.
Constraint on the data type.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: DVecSVecOuterExpr.h:327
CompositeType_< VT1 > CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:114
ReturnType_< VT1 > RN1
Return type of the left-hand side dense vector expression.
Definition: DVecSVecOuterExpr.h:112
#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.
DifferenceType difference_type
Difference between two iterators.
Definition: DVecSVecOuterExpr.h:236
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
MultExprTrait_< RN1, RN2 > ExprReturnType
Expression return type for the subscript operator.
Definition: DVecSVecOuterExpr.h:130
Base class for all outer product expression templates.The VecTVecMultExpr class serves as a tag for a...
Definition: VecTVecMultExpr.h:66
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
ET1 LeftElement
Element type of the dense vector expression.
Definition: DVecSVecOuterExpr.h:220
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
LeftOperand lhs_
Left-hand side dense vector of the multiplication expression.
Definition: DVecSVecOuterExpr.h:545
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DVecSVecOuterExpr.h:369
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: DVecSVecOuterExpr.h:546
Header file for the IsComputation type trait class.
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
ConstIterator(LeftElement v, IteratorType it)
Constructor for the ConstIterator class.
Definition: DVecSVecOuterExpr.h:242
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:75
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DVecSVecOuterExpr.h:402
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: DVecSVecOuterExpr.h:225
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecSVecOuterExpr.h:253
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecSVecOuterExpr.h:504
#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.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
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
ValueType value_type
Type of the underlying pointers.
Definition: DVecSVecOuterExpr.h:233
CompositeType_< VT2 > CT2
Composite type of the right-hand side sparse vector expression.
Definition: DVecSVecOuterExpr.h:115
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: DVecSVecOuterExpr.h:454
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DVecSVecOuterExpr.h:423
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecSVecOuterExpr.h:229
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
PointerType pointer
Pointer return type.
Definition: DVecSVecOuterExpr.h:234
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DVecSVecOuterExpr.h:188
ValueType * PointerType
Pointer return type.
Definition: DVecSVecOuterExpr.h:227
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Element ValueType
Type of the underlying pointers.
Definition: DVecSVecOuterExpr.h:226
Header file for the function trace functionality.
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: DVecSVecOuterExpr.h:274