TDMatSMatMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_TDMATSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TDMATSMATMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
51 #include <blaze/math/Exception.h>
56 #include <blaze/math/Functions.h>
65 #include <blaze/math/shims/Reset.h>
109 #include <blaze/system/Thresholds.h>
110 #include <blaze/util/Assert.h>
112 #include <blaze/util/DisableIf.h>
113 #include <blaze/util/EnableIf.h>
116 #include <blaze/util/InvalidType.h>
117 #include <blaze/util/mpl/And.h>
118 #include <blaze/util/mpl/Bool.h>
119 #include <blaze/util/mpl/If.h>
120 #include <blaze/util/mpl/Or.h>
121 #include <blaze/util/Types.h>
123 
124 
125 namespace blaze {
126 
127 //=================================================================================================
128 //
129 // CLASS TDMATSMATMULTEXPR
130 //
131 //=================================================================================================
132 
133 //*************************************************************************************************
140 template< typename MT1 // Type of the left-hand side dense matrix
141  , typename MT2 // Type of the right-hand side sparse matrix
142  , bool SF // Symmetry flag
143  , bool HF // Hermitian flag
144  , bool LF // Lower flag
145  , bool UF > // Upper flag
146 class TDMatSMatMultExpr : public DenseMatrix< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, true >
147  , private MatMatMultExpr
148  , private Computation
149 {
150  private:
151  //**Type definitions****************************************************************************
158  //**********************************************************************************************
159 
160  //**********************************************************************************************
162  enum : bool { evaluateLeft = IsComputation<MT1>::value || RequiresEvaluation<MT1>::value };
163  //**********************************************************************************************
164 
165  //**********************************************************************************************
167  enum : bool { evaluateRight = IsComputation<MT2>::value || RequiresEvaluation<MT2>::value };
168  //**********************************************************************************************
169 
170  //**********************************************************************************************
172  enum : bool {
173  SYM = ( SF && !( HF || LF || UF ) ),
174  HERM = ( HF && !( LF || UF ) ),
175  LOW = ( LF || ( ( SF || HF ) && UF ) ),
176  UPP = ( UF || ( ( SF || HF ) && LF ) )
177  };
178  //**********************************************************************************************
179 
180  //**********************************************************************************************
182 
187  template< typename T1, typename T2, typename T3 >
188  struct CanExploitSymmetry {
189  enum : bool { value = IsSymmetric<T3>::value };
190  };
192  //**********************************************************************************************
193 
194  //**********************************************************************************************
196 
200  template< typename T1, typename T2, typename T3 >
201  struct IsEvaluationRequired {
202  enum : bool { value = ( evaluateLeft || evaluateRight ) &&
203  !CanExploitSymmetry<T1,T2,T3>::value };
204  };
206  //**********************************************************************************************
207 
208  //**********************************************************************************************
210 
214  template< typename T1, typename T2, typename T3 >
215  struct UseOptimizedKernel {
216  enum : bool { value = useOptimizedKernels &&
218  !IsResizable< ElementType_<T1> >::value &&
220  };
222  //**********************************************************************************************
223 
224  //**********************************************************************************************
226 
229  template< typename T1, typename T2, typename T3 >
230  struct UseDefaultKernel {
231  enum : bool { value = !UseOptimizedKernel<T1,T2,T3>::value };
232  };
234  //**********************************************************************************************
235 
236  //**********************************************************************************************
238 
241  typedef IfTrue_< HERM
242  , DeclHerm
243  , IfTrue_< SYM
244  , DeclSym
245  , IfTrue_< LOW
246  , IfTrue_< UPP
247  , DeclDiag
248  , DeclLow >
249  , IfTrue_< UPP
250  , DeclUpp
251  , Noop > > > > ForwardFunctor;
253  //**********************************************************************************************
254 
255  public:
256  //**Type definitions****************************************************************************
259 
264  typedef const ElementType ReturnType;
265  typedef const ResultType CompositeType;
266 
268  typedef If_< IsExpression<MT1>, const MT1, const MT1& > LeftOperand;
269 
271  typedef If_< IsExpression<MT2>, const MT2, const MT2& > RightOperand;
272 
275 
278  //**********************************************************************************************
279 
280  //**Compilation flags***************************************************************************
282  enum : bool { simdEnabled = false };
283 
285  enum : bool { smpAssignable = !evaluateLeft && MT1::smpAssignable &&
286  !evaluateRight && MT2::smpAssignable };
287  //**********************************************************************************************
288 
289  //**Constructor*********************************************************************************
295  explicit inline TDMatSMatMultExpr( const MT1& lhs, const MT2& rhs ) noexcept
296  : lhs_( lhs ) // Left-hand side dense matrix of the multiplication expression
297  , rhs_( rhs ) // Right-hand side sparse matrix of the multiplication expression
298  {
299  BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.rows(), "Invalid matrix sizes" );
300  }
301  //**********************************************************************************************
302 
303  //**Access operator*****************************************************************************
310  inline ReturnType operator()( size_t i, size_t j ) const {
311  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
312  BLAZE_INTERNAL_ASSERT( j < rhs_.columns(), "Invalid column access index" );
313 
314  if( IsDiagonal<MT1>::value ) {
315  return lhs_(i,i) * rhs_(i,j);
316  }
317  else if( IsDiagonal<MT2>::value ) {
318  return lhs_(i,j) * rhs_(j,j);
319  }
321  const size_t begin( ( IsUpper<MT1>::value )
322  ?( ( IsLower<MT2>::value )
323  ?( max( ( IsStrictlyUpper<MT1>::value ? i+1UL : i )
324  , ( IsStrictlyLower<MT2>::value ? j+1UL : j ) ) )
325  :( IsStrictlyUpper<MT1>::value ? i+1UL : i ) )
326  :( ( IsLower<MT2>::value )
327  ?( IsStrictlyLower<MT2>::value ? j+1UL : j )
328  :( 0UL ) ) );
329  const size_t end( ( IsLower<MT1>::value )
330  ?( ( IsUpper<MT2>::value )
331  ?( min( ( IsStrictlyLower<MT1>::value ? i : i+1UL )
332  , ( IsStrictlyUpper<MT2>::value ? j : j+1UL ) ) )
333  :( IsStrictlyLower<MT1>::value ? i : i+1UL ) )
334  :( ( IsUpper<MT2>::value )
335  ?( IsStrictlyUpper<MT2>::value ? j : j+1UL )
336  :( lhs_.columns() ) ) );
337 
338  if( begin >= end ) return ElementType();
339 
340  const size_t n( end - begin );
341 
342  return subvector( row( lhs_, i ), begin, n ) * subvector( column( rhs_, j ), begin, n );
343  }
344  else {
345  return row( lhs_, i ) * column( rhs_, j );
346  }
347  }
348  //**********************************************************************************************
349 
350  //**At function*********************************************************************************
358  inline ReturnType at( size_t i, size_t j ) const {
359  if( i >= lhs_.rows() ) {
360  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
361  }
362  if( j >= rhs_.columns() ) {
363  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
364  }
365  return (*this)(i,j);
366  }
367  //**********************************************************************************************
368 
369  //**Rows function*******************************************************************************
374  inline size_t rows() const noexcept {
375  return lhs_.rows();
376  }
377  //**********************************************************************************************
378 
379  //**Columns function****************************************************************************
384  inline size_t columns() const noexcept {
385  return rhs_.columns();
386  }
387  //**********************************************************************************************
388 
389  //**Left operand access*************************************************************************
394  inline LeftOperand leftOperand() const noexcept {
395  return lhs_;
396  }
397  //**********************************************************************************************
398 
399  //**Right operand access************************************************************************
404  inline RightOperand rightOperand() const noexcept {
405  return rhs_;
406  }
407  //**********************************************************************************************
408 
409  //**********************************************************************************************
415  template< typename T >
416  inline bool canAlias( const T* alias ) const noexcept {
417  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
418  }
419  //**********************************************************************************************
420 
421  //**********************************************************************************************
427  template< typename T >
428  inline bool isAliased( const T* alias ) const {
429  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
430  }
431  //**********************************************************************************************
432 
433  //**********************************************************************************************
438  inline bool isAligned() const noexcept {
439  return lhs_.isAligned();
440  }
441  //**********************************************************************************************
442 
443  //**********************************************************************************************
448  inline bool canSMPAssign() const noexcept {
449  return ( rows() * columns() >= SMP_TDMATSMATMULT_THRESHOLD ) && !IsDiagonal<MT1>::value;
450  }
451  //**********************************************************************************************
452 
453  private:
454  //**Member variables****************************************************************************
455  LeftOperand lhs_;
456  RightOperand rhs_;
457  //**********************************************************************************************
458 
459  //**Assignment to dense matrices****************************************************************
472  template< typename MT // Type of the target dense matrix
473  , bool SO > // Storage order of the target dense matrix
475  assign( DenseMatrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
476  {
478 
479  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
480  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
481 
482  LT A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
483  RT B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
484 
485  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
486  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
487  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
488  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
489  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
490  BLAZE_INTERNAL_ASSERT( B.columns() == (~lhs).columns() , "Invalid number of columns" );
491 
492  TDMatSMatMultExpr::selectAssignKernel( ~lhs, A, B );
493  }
495  //**********************************************************************************************
496 
497  //**Assignment to dense matrices (kernel selection)*********************************************
508  template< typename MT3 // Type of the left-hand side target matrix
509  , typename MT4 // Type of the left-hand side matrix operand
510  , typename MT5 > // Type of the right-hand side matrix operand
511  static inline void selectAssignKernel( MT3& C, const MT4& A, const MT5& B )
512  {
513  if( C.rows() * C.columns() < TDMATSMATMULT_THRESHOLD )
514  selectSmallAssignKernel( C, A, B );
515  else
516  selectLargeAssignKernel( C, A, B );
517  }
519  //**********************************************************************************************
520 
521  //**Default assignment to dense matrices********************************************************
536  template< typename MT3 // Type of the left-hand side target matrix
537  , typename MT4 // Type of the left-hand side matrix operand
538  , typename MT5 > // Type of the right-hand side matrix operand
539  static inline void selectDefaultAssignKernel( MT3& C, const MT4& A, const MT5& B )
540  {
542 
543  reset( C );
544 
545  for( size_t j=0UL; j<B.rows(); ++j )
546  {
547  ConstIterator element( B.begin(j) );
548  const ConstIterator end( B.end(j) );
549 
551  {
552  for( ; element!=end; ++element ) {
553  C(j,element->index()) = A(j,j) * element->value();
554  }
555  }
556  else
557  {
558  for( ; element!=end; ++element )
559  {
560  const size_t j1( element->index() );
561 
562  const size_t ibegin( ( IsLower<MT4>::value )
564  ?( SYM || HERM || LOW ? max(j1,j+1UL) : j+1UL )
565  :( SYM || HERM || LOW ? max(j1,j) : j ) )
566  :( SYM || HERM || LOW ? j1 : 0UL ) );
567  const size_t iend( ( IsUpper<MT4>::value )
569  ?( UPP ? min(j1+1UL,j) : j )
570  :( UPP ? min(j1,j)+1UL : j+1UL ) )
571  :( UPP ? j1+1UL : A.rows() ) );
572 
573  if( ( SYM || HERM || LOW || UPP ) && ( ibegin >= iend ) ) continue;
574  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
575 
576  for( size_t i=ibegin; i<iend; ++i ) {
577  if( isDefault( C(i,j1) ) )
578  C(i,j1) = A(i,j) * element->value();
579  else
580  C(i,j1) += A(i,j) * element->value();
581  }
582  }
583  }
584  }
585 
586  if( SYM || HERM ) {
587  for( size_t j=1UL; j<B.columns(); ++j ) {
588  for( size_t i=0UL; i<j; ++i ) {
589  C(i,j) = HERM ? conj( C(j,i) ) : C(j,i);
590  }
591  }
592  }
593  }
595  //**********************************************************************************************
596 
597  //**Default assignment to dense matrices (small matrices)***************************************
611  template< typename MT3 // Type of the left-hand side target matrix
612  , typename MT4 // Type of the left-hand side matrix operand
613  , typename MT5 > // Type of the right-hand side matrix operand
615  selectSmallAssignKernel( MT3& C, const MT4& A, const MT5& B )
616  {
617  selectDefaultAssignKernel( C, A, B );
618  }
620  //**********************************************************************************************
621 
622  //**Optimized assignment to dense matrices (small matrices)*************************************
637  template< typename MT3 // Type of the left-hand side target matrix
638  , typename MT4 // Type of the left-hand side matrix operand
639  , typename MT5 > // Type of the right-hand side matrix operand
641  selectSmallAssignKernel( MT3& C, const MT4& A, const MT5& B )
642  {
644 
645  reset( C );
646 
647  for( size_t j=0UL; j<B.rows(); ++j )
648  {
649  ConstIterator element( B.begin(j) );
650  const ConstIterator end( B.end(j) );
651 
652  const size_t nonzeros( B.nonZeros(j) );
653  const size_t kpos( nonzeros & size_t(-4) );
654  BLAZE_INTERNAL_ASSERT( ( nonzeros - ( nonzeros % 4UL ) ) == kpos, "Invalid end calculation" );
655 
656  for( size_t k=0UL; k<kpos; k+=4UL )
657  {
658  const size_t j1( element->index() );
659  const ET2 v1( element->value() );
660  ++element;
661  const size_t j2( element->index() );
662  const ET2 v2( element->value() );
663  ++element;
664  const size_t j3( element->index() );
665  const ET2 v3( element->value() );
666  ++element;
667  const size_t j4( element->index() );
668  const ET2 v4( element->value() );
669  ++element;
670 
671  BLAZE_INTERNAL_ASSERT( j1 < j2 && j2 < j3 && j3 < j4, "Invalid sparse matrix index detected" );
672 
673  const size_t ibegin( ( IsLower<MT4>::value )
675  ?( SYM || HERM || LOW ? max(j1,j+1UL) : j+1UL )
676  :( SYM || HERM || LOW ? max(j1,j) : j ) )
677  :( SYM || HERM || LOW ? j1 : 0UL ) );
678  const size_t iend( ( IsUpper<MT4>::value )
680  ?( UPP ? min(j4+1UL,j) : j )
681  :( UPP ? min(j4,j)+1UL : j+1UL ) )
682  :( UPP ? j4+1UL : A.rows() ) );
683 
684  if( ( SYM || HERM || LOW || UPP ) && ( ibegin >= iend ) ) continue;
685  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
686 
687  const size_t inum( iend - ibegin );
688  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
689  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
690 
691  size_t i( ibegin );
692 
693  for( ; i<ipos; i+=4UL ) {
694  C(i ,j1) += A(i ,j) * v1;
695  C(i+1UL,j1) += A(i+1UL,j) * v1;
696  C(i+2UL,j1) += A(i+2UL,j) * v1;
697  C(i+3UL,j1) += A(i+3UL,j) * v1;
698  C(i ,j2) += A(i ,j) * v2;
699  C(i+1UL,j2) += A(i+1UL,j) * v2;
700  C(i+2UL,j2) += A(i+2UL,j) * v2;
701  C(i+3UL,j2) += A(i+3UL,j) * v2;
702  C(i ,j3) += A(i ,j) * v3;
703  C(i+1UL,j3) += A(i+1UL,j) * v3;
704  C(i+2UL,j3) += A(i+2UL,j) * v3;
705  C(i+3UL,j3) += A(i+3UL,j) * v3;
706  C(i ,j4) += A(i ,j) * v4;
707  C(i+1UL,j4) += A(i+1UL,j) * v4;
708  C(i+2UL,j4) += A(i+2UL,j) * v4;
709  C(i+3UL,j4) += A(i+3UL,j) * v4;
710  }
711  for( ; i<iend; ++i ) {
712  C(i,j1) += A(i,j) * v1;
713  C(i,j2) += A(i,j) * v2;
714  C(i,j3) += A(i,j) * v3;
715  C(i,j4) += A(i,j) * v4;
716  }
717  }
718 
719  for( ; element!=end; ++element )
720  {
721  const size_t j1( element->index() );
722  const ET2 v1( element->value() );
723 
724  const size_t ibegin( ( IsLower<MT4>::value )
726  ?( SYM || HERM || LOW ? max(j1,j+1UL) : j+1UL )
727  :( SYM || HERM || LOW ? max(j1,j) : j ) )
728  :( SYM || HERM || LOW ? j1 : 0UL ) );
729  const size_t iend( ( IsUpper<MT4>::value )
731  ?( UPP ? min(j1+1UL,j) : j )
732  :( UPP ? min(j1,j)+1UL : j+1UL ) )
733  :( UPP ? j1+1UL : A.rows() ) );
734 
735  if( ( SYM || HERM || LOW || UPP ) && ( ibegin >= iend ) ) continue;
736  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
737 
738  const size_t inum( iend - ibegin );
739  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
740  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
741 
742  size_t i( ibegin );
743 
744  for( ; i<ipos; i+=4UL ) {
745  C(i ,j1) += A(i ,j) * v1;
746  C(i+1UL,j1) += A(i+1UL,j) * v1;
747  C(i+2UL,j1) += A(i+2UL,j) * v1;
748  C(i+3UL,j1) += A(i+3UL,j) * v1;
749  }
750  for( ; i<iend; ++i ) {
751  C(i,j1) += A(i,j) * v1;
752  }
753  }
754  }
755 
756  if( SYM || HERM ) {
757  for( size_t j=1UL; j<B.columns(); ++j ) {
758  for( size_t i=0UL; i<j; ++i ) {
759  C(i,j) = HERM ? conj( C(j,i) ) : C(j,i);
760  }
761  }
762  }
763  }
765  //**********************************************************************************************
766 
767  //**Default assignment to dense matrices (large matrices)***************************************
781  template< typename MT3 // Type of the left-hand side target matrix
782  , typename MT4 // Type of the left-hand side matrix operand
783  , typename MT5 > // Type of the right-hand side matrix operand
785  selectLargeAssignKernel( MT3& C, const MT4& A, const MT5& B )
786  {
787  selectDefaultAssignKernel( C, A, B );
788  }
790  //**********************************************************************************************
791 
792  //**Optimized assignment to dense matrices (large matrices)*************************************
807  template< typename MT3 // Type of the left-hand side target matrix
808  , typename MT4 // Type of the left-hand side matrix operand
809  , typename MT5 > // Type of the right-hand side matrix operand
811  selectLargeAssignKernel( MT3& C, const MT4& A, const MT5& B )
812  {
814 
815  const ForwardFunctor fwd;
816 
817  const OppositeType_<MT5> tmp( serial( B ) );
818  assign( C, fwd( A * tmp ) );
819  }
821  //**********************************************************************************************
822 
823  //**Assignment to sparse matrices***************************************************************
836  template< typename MT // Type of the target sparse matrix
837  , bool SO > // Storage order of the target sparse matrix
839  assign( SparseMatrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
840  {
842 
844 
851 
852  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
853  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
854 
855  const ForwardFunctor fwd;
856 
857  const TmpType tmp( serial( rhs ) );
858  assign( ~lhs, fwd( tmp ) );
859  }
861  //**********************************************************************************************
862 
863  //**Restructuring assignment********************************************************************
878  template< typename MT // Type of the target matrix
879  , bool SO > // Storage order of the target matrix
881  assign( Matrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
882  {
884 
886 
887  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
888  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
889 
890  const ForwardFunctor fwd;
891 
892  assign( ~lhs, fwd( rhs.lhs_ * trans( rhs.rhs_ ) ) );
893  }
895  //**********************************************************************************************
896 
897  //**Addition assignment to dense matrices*******************************************************
910  template< typename MT // Type of the target dense matrix
911  , bool SO > // Storage order of the target dense matrix
913  addAssign( DenseMatrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
914  {
916 
917  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
918  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
919 
920  LT A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
921  RT B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
922 
923  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
924  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
925  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
926  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
927  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
928  BLAZE_INTERNAL_ASSERT( B.columns() == (~lhs).columns() , "Invalid number of columns" );
929 
930  TDMatSMatMultExpr::selectAddAssignKernel( ~lhs, A, B );
931  }
933  //**********************************************************************************************
934 
935  //**Addition assignment to dense matrices (kernel selection)************************************
946  template< typename MT3 // Type of the left-hand side target matrix
947  , typename MT4 // Type of the left-hand side matrix operand
948  , typename MT5 > // Type of the right-hand side matrix operand
949  static inline void selectAddAssignKernel( MT3& C, const MT4& A, const MT5& B )
950  {
951  if( C.rows() * C.columns() < TDMATSMATMULT_THRESHOLD )
952  selectSmallAddAssignKernel( C, A, B );
953  else
954  selectLargeAddAssignKernel( C, A, B );
955  }
957  //**********************************************************************************************
958 
959  //**Default addition assignment to dense matrices***********************************************
974  template< typename MT3 // Type of the left-hand side target matrix
975  , typename MT4 // Type of the left-hand side matrix operand
976  , typename MT5 > // Type of the right-hand side matrix operand
977  static inline void selectDefaultAddAssignKernel( MT3& C, const MT4& A, const MT5& B )
978  {
980 
981  size_t i( 0UL );
982 
983  for( size_t j=0UL; j<B.rows(); ++j )
984  {
985  ConstIterator element( B.begin(j) );
986  const ConstIterator end( B.end(j) );
987 
989  {
990  for( ; element!=end; ++element ) {
991  C(j,element->index()) += A(j,j) * element->value();
992  }
993  }
994  else
995  {
996  for( ; element!=end; ++element )
997  {
998  const size_t j1( element->index() );
999 
1000  const size_t ibegin( ( IsLower<MT4>::value )
1002  ?( LOW ? max(j1,j+1UL) : j+1UL )
1003  :( LOW ? max(j1,j) : j ) )
1004  :( LOW ? j1 : 0UL ) );
1005  const size_t iend( ( IsUpper<MT4>::value )
1007  ?( UPP ? min(j1+1UL,j) : j )
1008  :( UPP ? min(j1,j)+1UL : j+1UL ) )
1009  :( UPP ? j1+1UL : A.rows() ) );
1010 
1011  if( ( LOW || UPP ) && ( ibegin >= iend ) ) continue;
1012  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
1013 
1014  const size_t inum( iend - ibegin );
1015  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
1016  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
1017 
1018  for( i=ibegin; i<ipos; i+=4UL ) {
1019  C(i ,j1) += A(i ,j) * element->value();
1020  C(i+1UL,j1) += A(i+1UL,j) * element->value();
1021  C(i+2UL,j1) += A(i+2UL,j) * element->value();
1022  C(i+3UL,j1) += A(i+3UL,j) * element->value();
1023  }
1024  for( ; i<iend; ++i ) {
1025  C(i,j1) += A(i,j) * element->value();
1026  }
1027  }
1028  }
1029  }
1030  }
1032  //**********************************************************************************************
1033 
1034  //**Default addition assignment to dense matrices (small matrices)******************************
1048  template< typename MT3 // Type of the left-hand side target matrix
1049  , typename MT4 // Type of the left-hand side matrix operand
1050  , typename MT5 > // Type of the right-hand side matrix operand
1052  selectSmallAddAssignKernel( MT3& C, const MT4& A, const MT5& B )
1053  {
1054  selectDefaultAddAssignKernel( C, A, B );
1055  }
1057  //**********************************************************************************************
1058 
1059  //**Optimized addition assignment to dense matrices (small matrices)****************************
1074  template< typename MT3 // Type of the left-hand side target matrix
1075  , typename MT4 // Type of the left-hand side matrix operand
1076  , typename MT5 > // Type of the right-hand side matrix operand
1078  selectSmallAddAssignKernel( MT3& C, const MT4& A, const MT5& B )
1079  {
1081 
1082  for( size_t j=0UL; j<B.rows(); ++j )
1083  {
1084  ConstIterator element( B.begin(j) );
1085  const ConstIterator end( B.end(j) );
1086 
1087  const size_t nonzeros( B.nonZeros(j) );
1088  const size_t kpos( nonzeros & size_t(-4) );
1089  BLAZE_INTERNAL_ASSERT( ( nonzeros - ( nonzeros % 4UL ) ) == kpos, "Invalid end calculation" );
1090 
1091  for( size_t k=0UL; k<kpos; k+=4UL )
1092  {
1093  const size_t j1( element->index() );
1094  const ET2 v1( element->value() );
1095  ++element;
1096  const size_t j2( element->index() );
1097  const ET2 v2( element->value() );
1098  ++element;
1099  const size_t j3( element->index() );
1100  const ET2 v3( element->value() );
1101  ++element;
1102  const size_t j4( element->index() );
1103  const ET2 v4( element->value() );
1104  ++element;
1105 
1106  BLAZE_INTERNAL_ASSERT( j1 < j2 && j2 < j3 && j3 < j4, "Invalid sparse matrix index detected" );
1107 
1108  const size_t ibegin( ( IsLower<MT4>::value )
1110  ?( LOW ? max(j1,j+1UL) : j+1UL )
1111  :( LOW ? max(j1,j) : j ) )
1112  :( LOW ? j1 : 0UL ) );
1113  const size_t iend( ( IsUpper<MT4>::value )
1115  ?( UPP ? min(j4+1UL,j) : j )
1116  :( UPP ? min(j4,j)+1UL : j+1UL ) )
1117  :( UPP ? j4+1UL : A.rows() ) );
1118 
1119  if( ( LOW || UPP ) && ( ibegin >= iend ) ) continue;
1120  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
1121 
1122  const size_t inum( iend - ibegin );
1123  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
1124  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
1125 
1126  size_t i( ibegin );
1127 
1128  for( i=ibegin; i<ipos; i+=4UL ) {
1129  C(i ,j1) += A(i ,j) * v1;
1130  C(i+1UL,j1) += A(i+1UL,j) * v1;
1131  C(i+2UL,j1) += A(i+2UL,j) * v1;
1132  C(i+3UL,j1) += A(i+3UL,j) * v1;
1133  C(i ,j2) += A(i ,j) * v2;
1134  C(i+1UL,j2) += A(i+1UL,j) * v2;
1135  C(i+2UL,j2) += A(i+2UL,j) * v2;
1136  C(i+3UL,j2) += A(i+3UL,j) * v2;
1137  C(i ,j3) += A(i ,j) * v3;
1138  C(i+1UL,j3) += A(i+1UL,j) * v3;
1139  C(i+2UL,j3) += A(i+2UL,j) * v3;
1140  C(i+3UL,j3) += A(i+3UL,j) * v3;
1141  C(i ,j4) += A(i ,j) * v4;
1142  C(i+1UL,j4) += A(i+1UL,j) * v4;
1143  C(i+2UL,j4) += A(i+2UL,j) * v4;
1144  C(i+3UL,j4) += A(i+3UL,j) * v4;
1145  }
1146  for( ; i<iend; ++i ) {
1147  C(i,j1) += A(i,j) * v1;
1148  C(i,j2) += A(i,j) * v2;
1149  C(i,j3) += A(i,j) * v3;
1150  C(i,j4) += A(i,j) * v4;
1151  }
1152  }
1153 
1154  for( ; element!=end; ++element )
1155  {
1156  const size_t j1( element->index() );
1157  const ET2 v1( element->value() );
1158 
1159  const size_t ibegin( ( IsLower<MT4>::value )
1161  ?( LOW ? max(j1,j+1UL) : j+1UL )
1162  :( LOW ? max(j1,j) : j ) )
1163  :( LOW ? j1 : 0UL ) );
1164  const size_t iend( ( IsUpper<MT4>::value )
1166  ?( UPP ? min(j1+1UL,j) : j )
1167  :( UPP ? min(j1,j)+1UL : j+1UL ) )
1168  :( UPP ? j1+1UL : A.rows() ) );
1169 
1170  if( ( LOW || UPP ) && ( ibegin >= iend ) ) continue;
1171  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
1172 
1173  const size_t inum( iend - ibegin );
1174  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
1175  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
1176 
1177  size_t i( ibegin );
1178 
1179  for( ; i<ipos; i+=4UL ) {
1180  C(i ,j1) += A(i ,j) * v1;
1181  C(i+1UL,j1) += A(i+1UL,j) * v1;
1182  C(i+2UL,j1) += A(i+2UL,j) * v1;
1183  C(i+3UL,j1) += A(i+3UL,j) * v1;
1184  }
1185  for( ; i<iend; ++i ) {
1186  C(i,j1) += A(i,j) * v1;
1187  }
1188  }
1189  }
1190  }
1192  //**********************************************************************************************
1193 
1194  //**Default addition assignment to dense matrices (large matrices)******************************
1208  template< typename MT3 // Type of the left-hand side target matrix
1209  , typename MT4 // Type of the left-hand side matrix operand
1210  , typename MT5 > // Type of the right-hand side matrix operand
1212  selectLargeAddAssignKernel( MT3& C, const MT4& A, const MT5& B )
1213  {
1214  selectDefaultAddAssignKernel( C, A, B );
1215  }
1217  //**********************************************************************************************
1218 
1219  //**Optimized addition assignment to dense matrices (large matrices)****************************
1234  template< typename MT3 // Type of the left-hand side target matrix
1235  , typename MT4 // Type of the left-hand side matrix operand
1236  , typename MT5 > // Type of the right-hand side matrix operand
1238  selectLargeAddAssignKernel( MT3& C, const MT4& A, const MT5& B )
1239  {
1241 
1242  const ForwardFunctor fwd;
1243 
1244  const OppositeType_<MT5> tmp( serial( B ) );
1245  addAssign( C, fwd( A * tmp ) );
1246  }
1248  //**********************************************************************************************
1249 
1250  //**Restructuring addition assignment***********************************************************
1265  template< typename MT // Type of the target matrix
1266  , bool SO > // Storage order of the target matrix
1268  addAssign( Matrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1269  {
1271 
1272  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1273  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1274 
1275  const ForwardFunctor fwd;
1276 
1277  addAssign( ~lhs, fwd( rhs.lhs_ * trans( rhs.rhs_ ) ) );
1278  }
1280  //**********************************************************************************************
1281 
1282  //**Addition assignment to sparse matrices******************************************************
1283  // No special implementation for the addition assignment to sparse matrices.
1284  //**********************************************************************************************
1285 
1286  //**Subtraction assignment to dense matrices****************************************************
1299  template< typename MT // Type of the target dense matrix
1300  , bool SO > // Storage order of the target dense matrix
1302  subAssign( DenseMatrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1303  {
1305 
1306  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1307  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1308 
1309  LT A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
1310  RT B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
1311 
1312  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
1313  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
1314  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
1315  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
1316  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
1317  BLAZE_INTERNAL_ASSERT( B.columns() == (~lhs).columns() , "Invalid number of columns" );
1318 
1319  TDMatSMatMultExpr::selectSubAssignKernel( ~lhs, A, B );
1320  }
1322  //**********************************************************************************************
1323 
1324  //**Subtraction assignment to dense matrices (kernel selection)*********************************
1335  template< typename MT3 // Type of the left-hand side target matrix
1336  , typename MT4 // Type of the left-hand side matrix operand
1337  , typename MT5 > // Type of the right-hand side matrix operand
1338  static inline void selectSubAssignKernel( MT3& C, const MT4& A, const MT5& B )
1339  {
1340  if( C.rows() * C.columns() < TDMATSMATMULT_THRESHOLD )
1341  selectSmallSubAssignKernel( C, A, B );
1342  else
1343  selectLargeSubAssignKernel( C, A, B );
1344  }
1346  //**********************************************************************************************
1347 
1348  //**Default subtraction assignment to dense matrices********************************************
1363  template< typename MT3 // Type of the left-hand side target matrix
1364  , typename MT4 // Type of the left-hand side matrix operand
1365  , typename MT5 > // Type of the right-hand side matrix operand
1366  static inline void selectDefaultSubAssignKernel( MT3& C, const MT4& A, const MT5& B )
1367  {
1369 
1370  size_t i( 0UL );
1371 
1372  for( size_t j=0UL; j<B.rows(); ++j )
1373  {
1374  ConstIterator element( B.begin(j) );
1375  const ConstIterator end( B.end(j) );
1376 
1378  {
1379  for( ; element!=end; ++element ) {
1380  C(j,element->index()) -= A(j,j) * element->value();
1381  }
1382  }
1383  else
1384  {
1385  for( ; element!=end; ++element )
1386  {
1387  const size_t j1( element->index() );
1388 
1389  const size_t ibegin( ( IsLower<MT4>::value )
1391  ?( LOW ? max(j1,j+1UL) : j+1UL )
1392  :( LOW ? max(j1,j) : j ) )
1393  :( LOW ? j1 : 0UL ) );
1394  const size_t iend( ( IsUpper<MT4>::value )
1396  ?( UPP ? min(j1+1UL,j) : j )
1397  :( UPP ? min(j1,j)+1UL : j+1UL ) )
1398  :( UPP ? j1+1UL : A.rows() ) );
1399 
1400  if( ( LOW || UPP ) && ( ibegin >= iend ) ) continue;
1401  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
1402 
1403  const size_t inum( iend - ibegin );
1404  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
1405  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
1406 
1407  for( i=ibegin; i<ipos; i+=4UL ) {
1408  C(i ,j1) -= A(i ,j) * element->value();
1409  C(i+1UL,j1) -= A(i+1UL,j) * element->value();
1410  C(i+2UL,j1) -= A(i+2UL,j) * element->value();
1411  C(i+3UL,j1) -= A(i+3UL,j) * element->value();
1412  }
1413  for( ; i<iend; ++i ) {
1414  C(i,j1) -= A(i,j) * element->value();
1415  }
1416  }
1417  }
1418  }
1419  }
1421  //**********************************************************************************************
1422 
1423  //**Default subtraction assignment to dense matrices (small matrices)***************************
1437  template< typename MT3 // Type of the left-hand side target matrix
1438  , typename MT4 // Type of the left-hand side matrix operand
1439  , typename MT5 > // Type of the right-hand side matrix operand
1441  selectSmallSubAssignKernel( MT3& C, const MT4& A, const MT5& B )
1442  {
1443  selectDefaultSubAssignKernel( C, A, B );
1444  }
1446  //**********************************************************************************************
1447 
1448  //**Optimized subtraction assignment to dense matrices (small matrices)*************************
1463  template< typename MT3 // Type of the left-hand side target matrix
1464  , typename MT4 // Type of the left-hand side matrix operand
1465  , typename MT5 > // Type of the right-hand side matrix operand
1467  selectSmallSubAssignKernel( MT3& C, const MT4& A, const MT5& B )
1468  {
1470 
1471  for( size_t j=0UL; j<B.rows(); ++j )
1472  {
1473  ConstIterator element( B.begin(j) );
1474  const ConstIterator end( B.end(j) );
1475 
1476  const size_t nonzeros( B.nonZeros(j) );
1477  const size_t kpos( nonzeros & size_t(-4) );
1478  BLAZE_INTERNAL_ASSERT( ( nonzeros - ( nonzeros % 4UL ) ) == kpos, "Invalid end calculation" );
1479 
1480  for( size_t k=0UL; k<kpos; k+=4UL )
1481  {
1482  const size_t j1( element->index() );
1483  const ET2 v1( element->value() );
1484  ++element;
1485  const size_t j2( element->index() );
1486  const ET2 v2( element->value() );
1487  ++element;
1488  const size_t j3( element->index() );
1489  const ET2 v3( element->value() );
1490  ++element;
1491  const size_t j4( element->index() );
1492  const ET2 v4( element->value() );
1493  ++element;
1494 
1495  BLAZE_INTERNAL_ASSERT( j1 < j2 && j2 < j3 && j3 < j4, "Invalid sparse matrix index detected" );
1496 
1497  const size_t ibegin( ( IsLower<MT4>::value )
1499  ?( LOW ? max(j1,j+1UL) : j+1UL )
1500  :( LOW ? max(j1,j) : j ) )
1501  :( LOW ? j1 : 0UL ) );
1502  const size_t iend( ( IsUpper<MT4>::value )
1504  ?( UPP ? min(j4+1UL,j) : j )
1505  :( UPP ? min(j4,j)+1UL : j+1UL ) )
1506  :( UPP ? j4+1UL : A.rows() ) );
1507 
1508  if( ( LOW || UPP ) && ( ibegin >= iend ) ) continue;
1509  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
1510 
1511  const size_t inum( iend - ibegin );
1512  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
1513  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
1514 
1515  size_t i( ibegin );
1516 
1517  for( ; i<ipos; i+=4UL ) {
1518  C(i ,j1) -= A(i ,j) * v1;
1519  C(i+1UL,j1) -= A(i+1UL,j) * v1;
1520  C(i+2UL,j1) -= A(i+2UL,j) * v1;
1521  C(i+3UL,j1) -= A(i+3UL,j) * v1;
1522  C(i ,j2) -= A(i ,j) * v2;
1523  C(i+1UL,j2) -= A(i+1UL,j) * v2;
1524  C(i+2UL,j2) -= A(i+2UL,j) * v2;
1525  C(i+3UL,j2) -= A(i+3UL,j) * v2;
1526  C(i ,j3) -= A(i ,j) * v3;
1527  C(i+1UL,j3) -= A(i+1UL,j) * v3;
1528  C(i+2UL,j3) -= A(i+2UL,j) * v3;
1529  C(i+3UL,j3) -= A(i+3UL,j) * v3;
1530  C(i ,j4) -= A(i ,j) * v4;
1531  C(i+1UL,j4) -= A(i+1UL,j) * v4;
1532  C(i+2UL,j4) -= A(i+2UL,j) * v4;
1533  C(i+3UL,j4) -= A(i+3UL,j) * v4;
1534  }
1535  for( ; i<iend; ++i ) {
1536  C(i,j1) -= A(i,j) * v1;
1537  C(i,j2) -= A(i,j) * v2;
1538  C(i,j3) -= A(i,j) * v3;
1539  C(i,j4) -= A(i,j) * v4;
1540  }
1541  }
1542 
1543  for( ; element!=end; ++element )
1544  {
1545  const size_t j1( element->index() );
1546  const ET2 v1( element->value() );
1547 
1548  const size_t ibegin( ( IsLower<MT4>::value )
1550  ?( LOW ? max(j1,j+1UL) : j+1UL )
1551  :( LOW ? max(j1,j) : j ) )
1552  :( LOW ? j1 : 0UL ) );
1553  const size_t iend( ( IsUpper<MT4>::value )
1555  ?( UPP ? min(j1+1UL,j) : j )
1556  :( UPP ? min(j1,j)+1UL : j+1UL ) )
1557  :( UPP ? j1+1UL : A.rows() ) );
1558 
1559  if( ( LOW || UPP ) && ( ibegin >= iend ) ) continue;
1560  BLAZE_INTERNAL_ASSERT( ibegin <= iend, "Invalid loop indices detected" );
1561 
1562  const size_t inum( iend - ibegin );
1563  const size_t ipos( ibegin + ( inum & size_t(-4) ) );
1564  BLAZE_INTERNAL_ASSERT( ( ibegin + inum - ( inum % 4UL ) ) == ipos, "Invalid end calculation" );
1565 
1566  size_t i( ibegin );
1567 
1568  for( ; i<ipos; i+=4UL ) {
1569  C(i ,j1) -= A(i ,j) * v1;
1570  C(i+1UL,j1) -= A(i+1UL,j) * v1;
1571  C(i+2UL,j1) -= A(i+2UL,j) * v1;
1572  C(i+3UL,j1) -= A(i+3UL,j) * v1;
1573  }
1574  for( ; i<iend; ++i ) {
1575  C(i,j1) -= A(i,j) * v1;
1576  }
1577  }
1578  }
1579  }
1581  //**********************************************************************************************
1582 
1583  //**Default subtraction assignment to dense matrices (large matrices)***************************
1597  template< typename MT3 // Type of the left-hand side target matrix
1598  , typename MT4 // Type of the left-hand side matrix operand
1599  , typename MT5 > // Type of the right-hand side matrix operand
1601  selectLargeSubAssignKernel( MT3& C, const MT4& A, const MT5& B )
1602  {
1603  selectDefaultSubAssignKernel( C, A, B );
1604  }
1606  //**********************************************************************************************
1607 
1608  //**Optimized subtraction assignment to dense matrices (large matrices)*************************
1623  template< typename MT3 // Type of the left-hand side target matrix
1624  , typename MT4 // Type of the left-hand side matrix operand
1625  , typename MT5 > // Type of the right-hand side matrix operand
1627  selectLargeSubAssignKernel( MT3& C, const MT4& A, const MT5& B )
1628  {
1630 
1631  const ForwardFunctor fwd;
1632 
1633  const OppositeType_<MT5> tmp( serial( B ) );
1634  subAssign( C, fwd( A * tmp ) );
1635  }
1637  //**********************************************************************************************
1638 
1639  //**Restructuring subtraction assignment********************************************************
1654  template< typename MT // Type of the target matrix
1655  , bool SO > // Storage order of the target matrix
1657  subAssign( Matrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1658  {
1660 
1662 
1663  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1664  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1665 
1666  const ForwardFunctor fwd;
1667 
1668  subAssign( ~lhs, fwd( rhs.lhs_ * trans( rhs.rhs_ ) ) );
1669  }
1671  //**********************************************************************************************
1672 
1673  //**Subtraction assignment to sparse matrices***************************************************
1674  // No special implementation for the subtraction assignment to sparse matrices.
1675  //**********************************************************************************************
1676 
1677  //**Multiplication assignment to dense matrices*************************************************
1678  // No special implementation for the multiplication assignment to dense matrices.
1679  //**********************************************************************************************
1680 
1681  //**Multiplication assignment to sparse matrices************************************************
1682  // No special implementation for the multiplication assignment to sparse matrices.
1683  //**********************************************************************************************
1684 
1685  //**SMP assignment to dense matrices************************************************************
1701  template< typename MT // Type of the target dense matrix
1702  , bool SO > // Storage order of the target dense matrix
1704  smpAssign( DenseMatrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1705  {
1707 
1708  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1709  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1710 
1711  LT A( rhs.lhs_ ); // Evaluation of the left-hand side dense matrix operand
1712  RT B( rhs.rhs_ ); // Evaluation of the right-hand side sparse matrix operand
1713 
1714  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
1715  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
1716  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
1717  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
1718  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
1719  BLAZE_INTERNAL_ASSERT( B.columns() == (~lhs).columns() , "Invalid number of columns" );
1720 
1721  smpAssign( ~lhs, A * B );
1722  }
1724  //**********************************************************************************************
1725 
1726  //**SMP assignment to sparse matrices***********************************************************
1742  template< typename MT // Type of the target sparse matrix
1743  , bool SO > // Storage order of the target sparse matrix
1745  smpAssign( SparseMatrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1746  {
1748 
1750 
1757 
1758  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1759  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1760 
1761  const ForwardFunctor fwd;
1762 
1763  const TmpType tmp( rhs );
1764  smpAssign( ~lhs, fwd( tmp ) );
1765  }
1767  //**********************************************************************************************
1768 
1769  //**Restructuring SMP assignment****************************************************************
1784  template< typename MT // Type of the target matrix
1785  , bool SO > // Storage order of the target matrix
1787  smpAssign( Matrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1788  {
1790 
1791  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1792  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1793 
1794  const ForwardFunctor fwd;
1795 
1796  smpAssign( ~lhs, fwd( rhs.lhs_ * trans( rhs.rhs_ ) ) );
1797  }
1799  //**********************************************************************************************
1800 
1801  //**SMP addition assignment to dense matrices***************************************************
1817  template< typename MT // Type of the target dense matrix
1818  , bool SO > // Storage order of the target sparse matrix
1821  {
1823 
1824  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1825  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1826 
1827  LT A( rhs.lhs_ ); // Evaluation of the left-hand side dense matrix operand
1828  RT B( rhs.rhs_ ); // Evaluation of the right-hand side sparse matrix operand
1829 
1830  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
1831  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
1832  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
1833  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
1834  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
1835  BLAZE_INTERNAL_ASSERT( B.columns() == (~lhs).columns() , "Invalid number of columns" );
1836 
1837  smpAddAssign( ~lhs, A * B );
1838  }
1840  //**********************************************************************************************
1841 
1842  //**Restructuring SMP addition assignment*******************************************************
1857  template< typename MT // Type of the target matrix
1858  , bool SO > // Storage order of the target matrix
1860  smpAddAssign( Matrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1861  {
1863 
1865 
1866  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1867  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1868 
1869  const ForwardFunctor fwd;
1870 
1871  smpAddAssign( ~lhs, fwd( rhs.lhs_ * trans( rhs.rhs_ ) ) );
1872  }
1874  //**********************************************************************************************
1875 
1876  //**SMP addition assignment to sparse matrices**************************************************
1877  // No special implementation for the SMP addition assignment to sparse matrices.
1878  //**********************************************************************************************
1879 
1880  //**SMP subtraction assignment to dense matrices************************************************
1896  template< typename MT // Type of the target dense matrix
1897  , bool SO > // Storage order of the target sparse matrix
1900  {
1902 
1903  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1904  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1905 
1906  LT A( rhs.lhs_ ); // Evaluation of the left-hand side dense matrix operand
1907  RT B( rhs.rhs_ ); // Evaluation of the right-hand side sparse matrix operand
1908 
1909  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
1910  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
1911  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
1912  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
1913  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
1914  BLAZE_INTERNAL_ASSERT( B.columns() == (~lhs).columns() , "Invalid number of columns" );
1915 
1916  smpSubAssign( ~lhs, A * B );
1917  }
1919  //**********************************************************************************************
1920 
1921  //**Restructuring SMP subtraction assignment****************************************************
1936  template< typename MT // Type of the target matrix
1937  , bool SO > // Storage order of the target matrix
1939  smpSubAssign( Matrix<MT,SO>& lhs, const TDMatSMatMultExpr& rhs )
1940  {
1942 
1944 
1945  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
1946  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
1947 
1948  const ForwardFunctor fwd;
1949 
1950  smpSubAssign( ~lhs, fwd( rhs.lhs_ * trans( rhs.rhs_ ) ) );
1951  }
1953  //**********************************************************************************************
1954 
1955  //**SMP subtraction assignment to sparse matrices***********************************************
1956  // No special implementation for the SMP subtraction assignment to sparse matrices.
1957  //**********************************************************************************************
1958 
1959  //**SMP multiplication assignment to dense matrices*********************************************
1960  // No special implementation for the SMP multiplication assignment to dense matrices.
1961  //**********************************************************************************************
1962 
1963  //**SMP multiplication assignment to sparse matrices********************************************
1964  // No special implementation for the SMP multiplication assignment to sparse matrices.
1965  //**********************************************************************************************
1966 
1967  //**Compile time checks*************************************************************************
1975  //**********************************************************************************************
1976 };
1977 //*************************************************************************************************
1978 
1979 
1980 
1981 
1982 //=================================================================================================
1983 //
1984 // GLOBAL BINARY ARITHMETIC OPERATORS
1985 //
1986 //=================================================================================================
1987 
1988 //*************************************************************************************************
2018 template< typename T1 // Type of the left-hand side dense matrix
2019  , typename T2 > // Type of the right-hand side sparse matrix
2022 {
2024 
2025  if( (~lhs).columns() != (~rhs).rows() ) {
2026  BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
2027  }
2028 
2030 }
2031 //*************************************************************************************************
2032 
2033 
2034 
2035 
2036 //=================================================================================================
2037 //
2038 // GLOBAL FUNCTIONS
2039 //
2040 //=================================================================================================
2041 
2042 //*************************************************************************************************
2067 template< typename MT1 // Type of the left-hand side dense matrix
2068  , typename MT2 // Type of the right-hand side dense matrix
2069  , bool SF // Symmetry flag
2070  , bool HF // Hermitian flag
2071  , bool LF // Lower flag
2072  , bool UF > // Upper flag
2075 {
2077 
2078  if( !isSquare( dm ) ) {
2079  BLAZE_THROW_INVALID_ARGUMENT( "Invalid symmetric matrix specification" );
2080  }
2081 
2082  return TDMatSMatMultExpr<MT1,MT2,true,HF,LF,UF>( dm.leftOperand(), dm.rightOperand() );
2083 }
2085 //*************************************************************************************************
2086 
2087 
2088 //*************************************************************************************************
2113 template< typename MT1 // Type of the left-hand side dense matrix
2114  , typename MT2 // Type of the right-hand side dense matrix
2115  , bool SF // Symmetry flag
2116  , bool HF // Hermitian flag
2117  , bool LF // Lower flag
2118  , bool UF > // Upper flag
2121 {
2123 
2124  if( !isSquare( dm ) ) {
2125  BLAZE_THROW_INVALID_ARGUMENT( "Invalid Hermitian matrix specification" );
2126  }
2127 
2128  return TDMatSMatMultExpr<MT1,MT2,SF,true,LF,UF>( dm.leftOperand(), dm.rightOperand() );
2129 }
2131 //*************************************************************************************************
2132 
2133 
2134 //*************************************************************************************************
2159 template< typename MT1 // Type of the left-hand side dense matrix
2160  , typename MT2 // Type of the right-hand side dense matrix
2161  , bool SF // Symmetry flag
2162  , bool HF // Hermitian flag
2163  , bool LF // Lower flag
2164  , bool UF > // Upper flag
2167 {
2169 
2170  if( !isSquare( dm ) ) {
2171  BLAZE_THROW_INVALID_ARGUMENT( "Invalid lower matrix specification" );
2172  }
2173 
2174  return TDMatSMatMultExpr<MT1,MT2,SF,HF,true,UF>( dm.leftOperand(), dm.rightOperand() );
2175 }
2177 //*************************************************************************************************
2178 
2179 
2180 //*************************************************************************************************
2205 template< typename MT1 // Type of the left-hand side dense matrix
2206  , typename MT2 // Type of the right-hand side dense matrix
2207  , bool SF // Symmetry flag
2208  , bool HF // Hermitian flag
2209  , bool LF // Lower flag
2210  , bool UF > // Upper flag
2213 {
2215 
2216  if( !isSquare( dm ) ) {
2217  BLAZE_THROW_INVALID_ARGUMENT( "Invalid upper matrix specification" );
2218  }
2219 
2220  return TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,true>( dm.leftOperand(), dm.rightOperand() );
2221 }
2223 //*************************************************************************************************
2224 
2225 
2226 //*************************************************************************************************
2251 template< typename MT1 // Type of the left-hand side dense matrix
2252  , typename MT2 // Type of the right-hand side dense matrix
2253  , bool SF // Symmetry flag
2254  , bool HF // Hermitian flag
2255  , bool LF // Lower flag
2256  , bool UF > // Upper flag
2259 {
2261 
2262  if( !isSquare( dm ) ) {
2263  BLAZE_THROW_INVALID_ARGUMENT( "Invalid diagonal matrix specification" );
2264  }
2265 
2266  return TDMatSMatMultExpr<MT1,MT2,SF,HF,true,true>( dm.leftOperand(), dm.rightOperand() );
2267 }
2269 //*************************************************************************************************
2270 
2271 
2272 
2273 
2274 //=================================================================================================
2275 //
2276 // ROWS SPECIALIZATIONS
2277 //
2278 //=================================================================================================
2279 
2280 //*************************************************************************************************
2282 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2283 struct Rows< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> > : public Rows<MT1>
2284 {};
2286 //*************************************************************************************************
2287 
2288 
2289 
2290 
2291 //=================================================================================================
2292 //
2293 // COLUMNS SPECIALIZATIONS
2294 //
2295 //=================================================================================================
2296 
2297 //*************************************************************************************************
2299 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2300 struct Columns< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> > : public Columns<MT2>
2301 {};
2303 //*************************************************************************************************
2304 
2305 
2306 
2307 
2308 //=================================================================================================
2309 //
2310 // ISALIGNED SPECIALIZATIONS
2311 //
2312 //=================================================================================================
2313 
2314 //*************************************************************************************************
2316 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2317 struct IsAligned< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2318  : public BoolConstant< IsAligned<MT1>::value >
2319 {};
2321 //*************************************************************************************************
2322 
2323 
2324 
2325 
2326 //=================================================================================================
2327 //
2328 // ISSYMMETRIC SPECIALIZATIONS
2329 //
2330 //=================================================================================================
2331 
2332 //*************************************************************************************************
2334 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2335 struct IsSymmetric< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2336  : public BoolConstant< Or< Bool<SF>
2337  , And< Bool<HF>
2338  , IsBuiltin< ElementType_< TDMatSMatMultExpr<MT1,MT2,false,true,false,false> > > >
2339  , And< Bool<LF>, Bool<UF> > >::value >
2340 {};
2342 //*************************************************************************************************
2343 
2344 
2345 
2346 
2347 //=================================================================================================
2348 //
2349 // ISHERMITIAN SPECIALIZATIONS
2350 //
2351 //=================================================================================================
2352 
2353 //*************************************************************************************************
2355 template< typename MT1, typename MT2, bool SF, bool LF, bool UF >
2356 struct IsHermitian< TDMatSMatMultExpr<MT1,MT2,SF,true,LF,UF> >
2357  : public TrueType
2358 {};
2360 //*************************************************************************************************
2361 
2362 
2363 
2364 
2365 //=================================================================================================
2366 //
2367 // ISLOWER SPECIALIZATIONS
2368 //
2369 //=================================================================================================
2370 
2371 //*************************************************************************************************
2373 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2374 struct IsLower< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2375  : public BoolConstant< Or< Bool<LF>
2376  , And< IsLower<MT1>, IsLower<MT2> >
2377  , And< Or< Bool<SF>, Bool<HF> >
2378  , IsUpper<MT1>, IsUpper<MT2> > >::value >
2379 {};
2381 //*************************************************************************************************
2382 
2383 
2384 
2385 
2386 //=================================================================================================
2387 //
2388 // ISUNILOWER SPECIALIZATIONS
2389 //
2390 //=================================================================================================
2391 
2392 //*************************************************************************************************
2394 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2395 struct IsUniLower< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2396  : public BoolConstant< Or< And< IsUniLower<MT1>, IsUniLower<MT2> >
2397  , And< Or< Bool<SF>, Bool<HF> >
2398  , IsUniUpper<MT1>, IsUniUpper<MT2> > >::value >
2399 {};
2401 //*************************************************************************************************
2402 
2403 
2404 
2405 
2406 //=================================================================================================
2407 //
2408 // ISSTRICTLYLOWER SPECIALIZATIONS
2409 //
2410 //=================================================================================================
2411 
2412 //*************************************************************************************************
2414 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2415 struct IsStrictlyLower< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2416  : public BoolConstant< Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2417  , And< IsStrictlyLower<MT2>, IsLower<MT1> >
2418  , And< Or< Bool<SF>, Bool<HF> >
2419  , Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2420  , And< IsStrictlyUpper<MT2>, IsUpper<MT1> > > > >::value >
2421 {};
2423 //*************************************************************************************************
2424 
2425 
2426 
2427 
2428 //=================================================================================================
2429 //
2430 // ISUPPER SPECIALIZATIONS
2431 //
2432 //=================================================================================================
2433 
2434 //*************************************************************************************************
2436 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2437 struct IsUpper< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2438  : public BoolConstant< Or< Bool<UF>
2439  , And< IsUpper<MT1>, IsUpper<MT2> >
2440  , And< Or< Bool<SF>, Bool<HF> >
2441  , IsLower<MT1>, IsLower<MT2> > >::value >
2442 {};
2444 //*************************************************************************************************
2445 
2446 
2447 
2448 
2449 //=================================================================================================
2450 //
2451 // ISUNIUPPER SPECIALIZATIONS
2452 //
2453 //=================================================================================================
2454 
2455 //*************************************************************************************************
2457 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2458 struct IsUniUpper< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2459  : public BoolConstant< Or< And< IsUniUpper<MT1>, IsUniUpper<MT2> >
2460  , And< Or< Bool<SF>, Bool<HF> >
2461  , IsUniLower<MT1>, IsUniLower<MT2> > >::value >
2462 {};
2464 //*************************************************************************************************
2465 
2466 
2467 
2468 
2469 //=================================================================================================
2470 //
2471 // ISSTRICTLYUPPER SPECIALIZATIONS
2472 //
2473 //=================================================================================================
2474 
2475 //*************************************************************************************************
2477 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2478 struct IsStrictlyUpper< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2479  : public BoolConstant< Or< And< IsStrictlyUpper<MT1>, IsUpper<MT2> >
2480  , And< IsStrictlyUpper<MT2>, IsUpper<MT1> >
2481  , And< Or< Bool<SF>, Bool<HF> >
2482  , Or< And< IsStrictlyLower<MT1>, IsLower<MT2> >
2483  , And< IsStrictlyLower<MT2>, IsLower<MT1> > > > >::value >
2484 {};
2486 //*************************************************************************************************
2487 
2488 
2489 
2490 
2491 //=================================================================================================
2492 //
2493 // EXPRESSION TRAIT SPECIALIZATIONS
2494 //
2495 //=================================================================================================
2496 
2497 //*************************************************************************************************
2499 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF, typename VT >
2500 struct TDMatDVecMultExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, VT >
2501 {
2502  public:
2503  //**********************************************************************************************
2508  , INVALID_TYPE >;
2509  //**********************************************************************************************
2510 };
2512 //*************************************************************************************************
2513 
2514 
2515 //*************************************************************************************************
2517 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF, typename VT >
2518 struct TDMatSVecMultExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, VT >
2519 {
2520  public:
2521  //**********************************************************************************************
2526  , INVALID_TYPE >;
2527  //**********************************************************************************************
2528 };
2530 //*************************************************************************************************
2531 
2532 
2533 //*************************************************************************************************
2535 template< typename VT, typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2536 struct TDVecTDMatMultExprTrait< VT, TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2537 {
2538  public:
2539  //**********************************************************************************************
2544  , INVALID_TYPE >;
2545  //**********************************************************************************************
2546 };
2548 //*************************************************************************************************
2549 
2550 
2551 //*************************************************************************************************
2553 template< typename VT, typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2554 struct TSVecTDMatMultExprTrait< VT, TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2555 {
2556  public:
2557  //**********************************************************************************************
2562  , INVALID_TYPE >;
2563  //**********************************************************************************************
2564 };
2566 //*************************************************************************************************
2567 
2568 
2569 //*************************************************************************************************
2571 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2572 struct TDMatDeclSymExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2573 {
2574  public:
2575  //**********************************************************************************************
2579  , INVALID_TYPE >;
2580  //**********************************************************************************************
2581 };
2583 //*************************************************************************************************
2584 
2585 
2586 //*************************************************************************************************
2588 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2589 struct TDMatDeclHermExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2590 {
2591  public:
2592  //**********************************************************************************************
2596  , INVALID_TYPE >;
2597  //**********************************************************************************************
2598 };
2600 //*************************************************************************************************
2601 
2602 
2603 //*************************************************************************************************
2605 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2606 struct TDMatDeclLowExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2607 {
2608  public:
2609  //**********************************************************************************************
2613  , INVALID_TYPE >;
2614  //**********************************************************************************************
2615 };
2617 //*************************************************************************************************
2618 
2619 
2620 //*************************************************************************************************
2622 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2623 struct TDMatDeclUppExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2624 {
2625  public:
2626  //**********************************************************************************************
2630  , INVALID_TYPE >;
2631  //**********************************************************************************************
2632 };
2634 //*************************************************************************************************
2635 
2636 
2637 //*************************************************************************************************
2639 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2640 struct TDMatDeclDiagExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2641 {
2642  public:
2643  //**********************************************************************************************
2647  , INVALID_TYPE >;
2648  //**********************************************************************************************
2649 };
2651 //*************************************************************************************************
2652 
2653 
2654 //*************************************************************************************************
2656 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF, bool AF >
2657 struct SubmatrixExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF>, AF >
2658 {
2659  public:
2660  //**********************************************************************************************
2663  //**********************************************************************************************
2664 };
2666 //*************************************************************************************************
2667 
2668 
2669 //*************************************************************************************************
2671 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2672 struct RowExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2673 {
2674  public:
2675  //**********************************************************************************************
2676  using Type = MultExprTrait_< RowExprTrait_<const MT1>, MT2 >;
2677  //**********************************************************************************************
2678 };
2680 //*************************************************************************************************
2681 
2682 
2683 //*************************************************************************************************
2685 template< typename MT1, typename MT2, bool SF, bool HF, bool LF, bool UF >
2686 struct ColumnExprTrait< TDMatSMatMultExpr<MT1,MT2,SF,HF,LF,UF> >
2687 {
2688  public:
2689  //**********************************************************************************************
2691  //**********************************************************************************************
2692 };
2694 //*************************************************************************************************
2695 
2696 } // namespace blaze
2697 
2698 #endif
typename SubmatrixExprTrait< MT, AF >::Type SubmatrixExprTrait_
Auxiliary alias declaration for the SubmatrixExprTrait type trait.The SubmatrixExprTrait_ alias decla...
Definition: SubmatrixExprTrait.h:134
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Evaluation of the expression type of a dense matrix declherm operation.Via this type trait it is poss...
Definition: TDMatDeclHermExprTrait.h:75
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:80
const DMatForEachExpr< MT, Conj, SO > conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatForEachExpr.h:1214
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
Evaluation of the expression type of a dense matrix decllow operation.Via this type trait it is possi...
Definition: TDMatDeclLowExprTrait.h:75
Header file for mathematical functions.
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
Header file for the SMatDVecMultExprTrait class template.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: TDMatSMatMultExpr.h:374
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: TDMatSMatMultExpr.h:310
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:87
Header file for basic type definitions.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: TDMatSMatMultExpr.h:358
IfTrue_< evaluateRight, const RT2, CT2 > RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: TDMatSMatMultExpr.h:277
typename TDVecSMatMultExprTrait< VT, MT >::Type TDVecSMatMultExprTrait_
Auxiliary alias declaration for the TDVecSMatMultExprTrait class template.The TDVecSMatMultExprTrait_...
Definition: TDVecSMatMultExprTrait.h:123
LeftOperand leftOperand() const noexcept
Returns the left-hand side transpose dense matrix operand.
Definition: TDMatSMatMultExpr.h:394
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseMatrix type trait.
Header file for the serial shim.
Header file for the IsDiagonal type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
ElementType_< RT2 > ET2
Element type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:155
Header file for the ColumnExprTrait class template.
Header file for the DeclUpp functor.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:194
Header file for the IsColumnMajorMatrix type trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse matrix operand.
Definition: TDMatSMatMultExpr.h:404
CompositeType_< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:157
Header file for the IsRowVector type trait.
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Header file for the TDVecSMatMultExprTrait class template.
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
Evaluation of the expression type of a sparse vector/transpose dense matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/transpose dense matrix multiplication. Given the transpose sparse vector type VT and the column-major dense matrix type MT, the nested type Type corresponds to the resulting expression type. In case either VT is not a transpose sparse vector type or MT is not a column-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSVecTDMatMultExprTrait.h:81
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
ElementType_< ResultType > ElementType
Resulting element type.
Definition: TDMatSMatMultExpr.h:263
Header file for the Computation base class.
Flag for symmetric matrices.
Definition: TDMatSMatMultExpr.h:173
Header file for the MatMatMultExpr base class.
DisableIf_< IsSymmetric< MT >, const DMatDeclSymExpr< MT, SO > > declsym(const DenseMatrix< MT, SO > &dm)
Declares the given non-symmetric dense matrix expression dm as symmetric.
Definition: DMatDeclSymExpr.h:841
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Constraints on the storage order of matrix types.
Header file for the TDMatDeclDiagExprTrait class template.
typename TDMatSVecMultExprTrait< MT, VT >::Type TDMatSVecMultExprTrait_
Auxiliary alias declaration for the TDMatSVecMultExprTrait class template.The TDMatSVecMultExprTrait_...
Definition: TDMatSVecMultExprTrait.h:120
Header file for the RequiresEvaluation type trait.
System settings for performance optimizations.
Expression object for transpose dense matrix-sparse matrix multiplications.The TDMatSMatMultExpr clas...
Definition: Forward.h:141
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1802
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
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
Constraint on the data type.
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
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
RightOperand rhs_
Right-hand side sparse matrix of the multiplication expression.
Definition: TDMatSMatMultExpr.h:456
Constraint on the data type.
Constraint on the data type.
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.
DisableIf_< IsHermitian< MT >, const DMatDeclHermExpr< MT, SO > > declherm(const DenseMatrix< MT, SO > &dm)
Declares the given non-Hermitian dense matrix expression dm as Hermitian.
Definition: DMatDeclHermExpr.h:841
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: TDMatSMatMultExpr.h:416
SubvectorExprTrait_< VT, unaligned > subvector(Vector< VT, TF > &vector, size_t index, size_t size)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:152
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:260
Flag for lower matrices.
Definition: TDMatSMatMultExpr.h:175
Header file for the DisableIf class template.
Compile time check for dense vector types.This type trait tests whether or not the given template par...
Definition: IsDenseVector.h:78
ResultType_< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:153
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the DeclLow functor.
Header file for the If class template.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:61
Flag for upper matrices.
Definition: TDMatSMatMultExpr.h:176
Header file for the TSVecTDMatMultExprTrait class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Evaluation of the expression type of a dense matrix declupp operation.Via this type trait it is possi...
Definition: TDMatDeclUppExprTrait.h:75
Generic wrapper for the decllow() function.
Definition: DeclLow.h:58
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Header file for the Or class template.
Header file for the TDMatSVecMultExprTrait class template.
Header file for the TDMatDeclHermExprTrait class template.
#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 DenseMatrix base class.
Header file for the Columns type trait.
Header file for the TDMatDeclUppExprTrait class template.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Evaluation of the expression type of a dense matrix decldiag operation.Via this type trait it is poss...
Definition: TDMatDeclDiagExprTrait.h:75
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:78
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:80
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
Header file for the SMatSVecMultExprTrait class template.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:60
Generic wrapper for the null function.
Definition: Noop.h:58
Header file for the IsTriangular type trait.
If_< IsExpression< MT2 >, const MT2, const MT2 &> RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TDMatSMatMultExpr.h:271
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:80
Evaluation of the expression type of a dense matrix declsym operation.Via this type trait it is possi...
Definition: TDMatDeclSymExprTrait.h:75
Constraints on the storage order of matrix types.
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the exception macros of the math module.
DisableIf_< IsLower< MT >, const DMatDeclLowExpr< MT, SO > > decllow(const DenseMatrix< MT, SO > &dm)
Declares the given non-lower dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:842
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Evaluation of the expression type type of a row operation.Via this type trait it is possible to evalu...
Definition: RowExprTrait.h:79
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:260
Header file for the DeclDiag functor.
Compile time check for dense matrix types.This type trait tests whether or not the given template par...
Definition: IsDenseMatrix.h:78
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: TDMatSMatMultExpr.h:438
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:264
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_MATMATMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid matrix/matrix ...
Definition: MatMatMultExpr.h:109
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
Header file for the conjugate shim.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Evaluation of the expression type of a transpose dense matrix/sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/sparse vector multiplication. Given the column-major dense matrix type MT and the non-transpose sparse vector type VT, the nested type Type corresponds to the resulting expression type. In case either MT is not a column-major dense matrix type or VT is not a non-transpose sparse vector type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDMatSVecMultExprTrait.h:79
Header file for the IsSparseVector type trait.
#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.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for run time assertion macros.
TDMatSMatMultExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the TDMatSMatMultExpr class.
Definition: TDMatSMatMultExpr.h:295
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:83
Utility type for generic codes.
Header file for the TDMatDeclLowExprTrait class template.
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: TDMatSMatMultExpr.h:261
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
IfTrue_< evaluateLeft, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense matrix operand.
Definition: TDMatSMatMultExpr.h:274
Header file for the reset shim.
#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
Flag for Hermitian matrices.
Definition: TDMatSMatMultExpr.h:174
LeftOperand lhs_
Left-hand side dense matrix of the multiplication expression.
Definition: TDMatSMatMultExpr.h:455
Header file for the isDefault shim.
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:94
Constraint on the data type.
Constraints on the storage order of matrix types.
Generic wrapper for the declherm() function.
Definition: DeclHerm.h:58
Header file for the TDMatDeclSymExprTrait class template.
ResultType_< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:152
If_< IsExpression< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:268
Header file for the Noop functor.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: TDMatSMatMultExpr.h:384
typename TDMatDVecMultExprTrait< MT, VT >::Type TDMatDVecMultExprTrait_
Auxiliary alias declaration for the TDMatDVecMultExprTrait class template.The TDMatDVecMultExprTrait_...
Definition: TDMatDVecMultExprTrait.h:120
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
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
Header file for the IsDenseVector type trait.
Generic wrapper for the declupp() function.
Definition: DeclUpp.h:58
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
Evaluation of the expression type of a dense vector/transpose dense matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a dense vector/transpose dense matrix multiplication. Given the transpose dense vector type VT and the column-major dense matrix type MT, the nested type Type corresponds to the resulting expression type. In case either VT is not a transpose dense vector type or MT is not a column-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDVecTDMatMultExprTrait.h:79
TDMatSMatMultExpr< MT1, MT2, SF, HF, LF, UF > This
Type of this TDMatSMatMultExpr instance.
Definition: TDMatSMatMultExpr.h:258
Header file for the IsRowMajorMatrix type trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TDMatSMatMultExpr.h:428
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:733
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
Header file for the TDMatDVecMultExprTrait class template.
Evaluation of the expression type of a transpose dense matrix/dense vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/dense vector multiplication. Given the column-major dense matrix type MT and the non-transpose dense vector type VT, the nested type Type corresponds to the resulting expression type. In case either MT is not a column-major dense matrix type or VT is not a non-transpose dense vector type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDMatDVecMultExprTrait.h:79
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: TDMatSMatMultExpr.h:448
ElementType_< RT1 > ET1
Element type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:154
Generic wrapper for the decldiag() function.
Definition: DeclDiag.h:58
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
CompositeType_< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: TDMatSMatMultExpr.h:156
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:78
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: TDMatSMatMultExpr.h:262
Header file for the DeclHerm functor.
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
Header file for the IsUpper type trait.
Header file for the IsColumnVector type trait.
Constraint on the data type.
Generic wrapper for the declsym() function.
Definition: DeclSym.h:58
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
Header file for the IsResizable type trait.
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 thresholds for matrix/vector and matrix/matrix multiplications.
DisableIf_< IsDiagonal< MT >, const DMatDeclDiagExpr< MT, SO > > decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given non-diagonal dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:841
DisableIf_< IsUpper< MT >, const DMatDeclUppExpr< MT, SO > > declupp(const DenseMatrix< MT, SO > &dm)
Declares the given non-upper dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:842
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
Header file for the Bool class template.
Header file for the TDVecTDMatMultExprTrait class template.
Header file for the DeclSym functor.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
const ResultType CompositeType
Data type for composite expression templates.
Definition: TDMatSMatMultExpr.h:265