All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMatScalarMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSCALARMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATSCALARMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
51 #include <blaze/math/Intrinsics.h>
72 #include <blaze/util/Assert.h>
76 #include <blaze/util/EnableIf.h>
77 #include <blaze/util/InvalidType.h>
79 #include <blaze/util/SelectType.h>
80 #include <blaze/util/Types.h>
84 
85 
86 namespace blaze {
87 
88 //=================================================================================================
89 //
90 // CLASS DMATSCALARMULTEXPR
91 //
92 //=================================================================================================
93 
94 //*************************************************************************************************
101 template< typename MT // Type of the left-hand side dense matrix
102  , typename ST // Type of the right-hand side scalar value
103  , bool SO > // Storage order
104 class DMatScalarMultExpr : public DenseMatrix< DMatScalarMultExpr<MT,ST,SO>, SO >
105  , private MatScalarMultExpr
106  , private Computation
107 {
108  private:
109  //**Type definitions****************************************************************************
110  typedef typename MT::ResultType RT;
111  typedef typename MT::ReturnType RN;
112  typedef typename MT::ElementType ET;
113  typedef typename MT::CompositeType CT;
114  //**********************************************************************************************
115 
116  //**Return type evaluation**********************************************************************
118 
123  enum { returnExpr = !IsTemporary<RN>::value };
124 
127  //**********************************************************************************************
128 
129  //**Serial evaluation strategy******************************************************************
131 
138 
140  template< typename MT2 >
142  struct UseAssign {
143  enum { value = useAssign };
144  };
146  //**********************************************************************************************
147 
148  //**Parallel evaluation strategy****************************************************************
150 
156  template< typename MT2 >
157  struct UseSMPAssign {
158  enum { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
159  };
161  //**********************************************************************************************
162 
163  public:
164  //**Type definitions****************************************************************************
171 
174 
177 
179  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type LeftOperand;
180 
182  typedef ST RightOperand;
183  //**********************************************************************************************
184 
185  //**ConstIterator class definition**************************************************************
189  {
190  public:
191  //**Type definitions*************************************************************************
192  typedef std::random_access_iterator_tag IteratorCategory;
197 
198  // STL iterator requirements
204 
206  typedef typename MT::ConstIterator IteratorType;
207  //*******************************************************************************************
208 
209  //**Constructor******************************************************************************
215  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
216  : iterator_( iterator ) // Iterator to the current element
217  , scalar_ ( scalar ) // Scalar of the multiplication expression
218  {}
219  //*******************************************************************************************
220 
221  //**Addition assignment operator*************************************************************
227  inline ConstIterator& operator+=( size_t inc ) {
228  iterator_ += inc;
229  return *this;
230  }
231  //*******************************************************************************************
232 
233  //**Subtraction assignment operator**********************************************************
239  inline ConstIterator& operator-=( size_t dec ) {
240  iterator_ -= dec;
241  return *this;
242  }
243  //*******************************************************************************************
244 
245  //**Prefix increment operator****************************************************************
251  ++iterator_;
252  return *this;
253  }
254  //*******************************************************************************************
255 
256  //**Postfix increment operator***************************************************************
261  inline const ConstIterator operator++( int ) {
262  return ConstIterator( iterator_++ );
263  }
264  //*******************************************************************************************
265 
266  //**Prefix decrement operator****************************************************************
272  --iterator_;
273  return *this;
274  }
275  //*******************************************************************************************
276 
277  //**Postfix decrement operator***************************************************************
282  inline const ConstIterator operator--( int ) {
283  return ConstIterator( iterator_-- );
284  }
285  //*******************************************************************************************
286 
287  //**Element access operator******************************************************************
292  inline ReturnType operator*() const {
293  return *iterator_ * scalar_;
294  }
295  //*******************************************************************************************
296 
297  //**Load function****************************************************************************
302  inline IntrinsicType load() const {
303  return iterator_.load() * set( scalar_ );
304  }
305  //*******************************************************************************************
306 
307  //**Equality operator************************************************************************
313  inline bool operator==( const ConstIterator& rhs ) const {
314  return iterator_ == rhs.iterator_;
315  }
316  //*******************************************************************************************
317 
318  //**Inequality operator**********************************************************************
324  inline bool operator!=( const ConstIterator& rhs ) const {
325  return iterator_ != rhs.iterator_;
326  }
327  //*******************************************************************************************
328 
329  //**Less-than operator***********************************************************************
335  inline bool operator<( const ConstIterator& rhs ) const {
336  return iterator_ < rhs.iterator_;
337  }
338  //*******************************************************************************************
339 
340  //**Greater-than operator********************************************************************
346  inline bool operator>( const ConstIterator& rhs ) const {
347  return iterator_ > rhs.iterator_;
348  }
349  //*******************************************************************************************
350 
351  //**Less-or-equal-than operator**************************************************************
357  inline bool operator<=( const ConstIterator& rhs ) const {
358  return iterator_ <= rhs.iterator_;
359  }
360  //*******************************************************************************************
361 
362  //**Greater-or-equal-than operator***********************************************************
368  inline bool operator>=( const ConstIterator& rhs ) const {
369  return iterator_ >= rhs.iterator_;
370  }
371  //*******************************************************************************************
372 
373  //**Subtraction operator*********************************************************************
379  inline DifferenceType operator-( const ConstIterator& rhs ) const {
380  return iterator_ - rhs.iterator_;
381  }
382  //*******************************************************************************************
383 
384  //**Addition operator************************************************************************
391  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
392  return ConstIterator( it.iterator_ + inc );
393  }
394  //*******************************************************************************************
395 
396  //**Addition operator************************************************************************
403  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
404  return ConstIterator( it.iterator_ + inc );
405  }
406  //*******************************************************************************************
407 
408  //**Subtraction operator*********************************************************************
415  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
416  return ConstIterator( it.iterator_ - dec );
417  }
418  //*******************************************************************************************
419 
420  private:
421  //**Member variables*************************************************************************
424  //*******************************************************************************************
425  };
426  //**********************************************************************************************
427 
428  //**Compilation flags***************************************************************************
430  enum { vectorizable = MT::vectorizable &&
433 
435  enum { smpAssignable = MT::smpAssignable };
436  //**********************************************************************************************
437 
438  //**Constructor*********************************************************************************
444  explicit inline DMatScalarMultExpr( const MT& matrix, ST scalar )
445  : matrix_( matrix ) // Left-hand side dense matrix of the multiplication expression
446  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
447  {}
448  //**********************************************************************************************
449 
450  //**Access operator*****************************************************************************
457  inline ReturnType operator()( size_t i, size_t j ) const {
458  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
459  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
460  return matrix_(i,j) * scalar_;
461  }
462  //**********************************************************************************************
463 
464  //**Load function*******************************************************************************
471  inline IntrinsicType load( size_t i, size_t j ) const {
472  typedef IntrinsicTrait<ElementType> IT;
473  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
474  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
475  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
476  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
477  const IntrinsicType xmm1( matrix_.load(i,j) );
478  const IntrinsicType xmm2( set( scalar_ ) );
479  return xmm1 * xmm2;
480  }
481  //**********************************************************************************************
482 
483  //**Begin function******************************************************************************
489  inline ConstIterator begin( size_t i ) const {
490  return ConstIterator( matrix_.begin(i), scalar_ );
491  }
492  //**********************************************************************************************
493 
494  //**End function********************************************************************************
500  inline ConstIterator end( size_t i ) const {
501  return ConstIterator( matrix_.end(i), scalar_ );
502  }
503  //**********************************************************************************************
504 
505  //**Rows function*******************************************************************************
510  inline size_t rows() const {
511  return matrix_.rows();
512  }
513  //**********************************************************************************************
514 
515  //**Columns function****************************************************************************
520  inline size_t columns() const {
521  return matrix_.columns();
522  }
523  //**********************************************************************************************
524 
525  //**Left operand access*************************************************************************
530  inline LeftOperand leftOperand() const {
531  return matrix_;
532  }
533  //**********************************************************************************************
534 
535  //**Right operand access************************************************************************
540  inline RightOperand rightOperand() const {
541  return scalar_;
542  }
543  //**********************************************************************************************
544 
545  //**********************************************************************************************
551  template< typename T >
552  inline bool canAlias( const T* alias ) const {
553  return IsComputation<MT>::value && matrix_.canAlias( alias );
554  }
555  //**********************************************************************************************
556 
557  //**********************************************************************************************
563  template< typename T >
564  inline bool isAliased( const T* alias ) const {
565  return matrix_.isAliased( alias );
566  }
567  //**********************************************************************************************
568 
569  //**********************************************************************************************
574  inline bool isAligned() const {
575  return matrix_.isAligned();
576  }
577  //**********************************************************************************************
578 
579  //**********************************************************************************************
584  inline bool canSMPAssign() const {
585  return matrix_.canSMPAssign() ||
586  ( ( ( SO == rowMajor ) ? rows() : columns() ) > SMP_DMATSCALARMULT_THRESHOLD );
587  }
588  //**********************************************************************************************
589 
590  private:
591  //**Member variables****************************************************************************
594  //**********************************************************************************************
595 
596  //**Assignment to dense matrices****************************************************************
610  template< typename MT2 // Type of the target dense matrix
611  , bool SO2 > // Storage order of the target dense matrix
612  friend inline typename EnableIf< UseAssign<MT2> >::Type
614  {
616 
617  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
618  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
619 
620  assign( ~lhs, rhs.matrix_ );
621  assign( ~lhs, (~lhs) * rhs.scalar_ );
622  }
624  //**********************************************************************************************
625 
626  //**Assignment to sparse matrices***************************************************************
640  template< typename MT2 // Type of the target sparse matrix
641  , bool SO2 > // Storage order of the target sparse matrix
642  friend inline typename EnableIf< UseAssign<MT2> >::Type
644  {
646 
647  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
648  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
649 
650  assign( ~lhs, rhs.matrix_ );
651  (~lhs) *= rhs.scalar_;
652  }
654  //**********************************************************************************************
655 
656  //**Addition assignment to dense matrices*******************************************************
670  template< typename MT2 // Type of the target dense matrix
671  , bool SO2 > // Storage order of the target dense matrix
672  friend inline typename EnableIf< UseAssign<MT2> >::Type
673  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
674  {
676 
680 
681  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
682  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
683 
684  const ResultType tmp( serial( rhs ) );
685  addAssign( ~lhs, tmp );
686  }
688  //**********************************************************************************************
689 
690  //**Addition assignment to sparse matrices******************************************************
691  // No special implementation for the addition assignment to sparse matrices.
692  //**********************************************************************************************
693 
694  //**Subtraction assignment to dense matrices****************************************************
708  template< typename MT2 // Type of the target dense matrix
709  , bool SO2 > // Storage order of the target dense matrix
710  friend inline typename EnableIf< UseAssign<MT2> >::Type
711  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
712  {
714 
718 
719  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
720  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
721 
722  const ResultType tmp( serial( rhs ) );
723  subAssign( ~lhs, tmp );
724  }
726  //**********************************************************************************************
727 
728  //**Subtraction assignment to sparse matrices***************************************************
729  // No special implementation for the subtraction assignment to sparse matrices.
730  //**********************************************************************************************
731 
732  //**Multiplication assignment to dense matrices*************************************************
733  // No special implementation for the multiplication assignment to dense matrices.
734  //**********************************************************************************************
735 
736  //**Multiplication assignment to sparse matrices************************************************
737  // No special implementation for the multiplication assignment to sparse matrices.
738  //**********************************************************************************************
739 
740  //**SMP assignment to dense matrices************************************************************
754  template< typename MT2 // Type of the target dense matrix
755  , bool SO2 > // Storage order of the target dense matrix
756  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
757  smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
758  {
760 
761  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
762  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
763 
764  smpAssign( ~lhs, rhs.matrix_ );
765  smpAssign( ~lhs, (~lhs) * rhs.scalar_ );
766  }
768  //**********************************************************************************************
769 
770  //**SMP assignment to sparse matrices***********************************************************
784  template< typename MT2 // Type of the target sparse matrix
785  , bool SO2 > // Storage order of the target sparse matrix
786  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
787  smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
788  {
790 
791  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
792  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
793 
794  smpAssign( ~lhs, rhs.matrix_ );
795  (~lhs) *= rhs.scalar_;
796  }
798  //**********************************************************************************************
799 
800  //**SMP addition assignment to dense matrices***************************************************
814  template< typename MT2 // Type of the target dense matrix
815  , bool SO2 > // Storage order of the target dense matrix
816  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
817  smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
818  {
820 
824 
825  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
826  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
827 
828  const ResultType tmp( rhs );
829  smpAddAssign( ~lhs, tmp );
830  }
832  //**********************************************************************************************
833 
834  //**SMP addition assignment to sparse matrices**************************************************
835  // No special implementation for the SMP addition assignment to sparse matrices.
836  //**********************************************************************************************
837 
838  //**SMP subtraction assignment to dense matrices************************************************
852  template< typename MT2 // Type of the target dense matrix
853  , bool SO2 > // Storage order of the target dense matrix
854  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
855  smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
856  {
858 
862 
863  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
864  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
865 
866  const ResultType tmp( rhs );
867  smpSubAssign( ~lhs, tmp );
868  }
870  //**********************************************************************************************
871 
872  //**SMP subtraction assignment to sparse matrices***********************************************
873  // No special implementation for the SMP subtraction assignment to sparse matrices.
874  //**********************************************************************************************
875 
876  //**SMP multiplication assignment to dense matrices*********************************************
877  // No special implementation for the SMP multiplication assignment to dense matrices.
878  //**********************************************************************************************
879 
880  //**SMP multiplication assignment to sparse matrices********************************************
881  // No special implementation for the SMP multiplication assignment to sparse matrices.
882  //**********************************************************************************************
883 
884  //**Compile time checks*************************************************************************
891  //**********************************************************************************************
892 };
893 //*************************************************************************************************
894 
895 
896 
897 
898 //=================================================================================================
899 //
900 // GLOBAL UNARY ARITHMETIC OPERATORS
901 //
902 //=================================================================================================
903 
904 //*************************************************************************************************
921 template< typename MT // Type of the dense matrix
922  , bool SO > // Storage order
923 inline const DMatScalarMultExpr<MT,typename BaseElementType<MT>::Type,SO>
925 {
927 
928  typedef typename BaseElementType<MT>::Type ElementType;
930 }
931 //*************************************************************************************************
932 
933 
934 
935 
936 //=================================================================================================
937 //
938 // GLOBAL BINARY ARITHMETIC OPERATORS
939 //
940 //=================================================================================================
941 
942 //*************************************************************************************************
963 template< typename T1 // Type of the left-hand side dense matrix
964  , bool SO // Storage order of the left-hand side dense matrix
965  , typename T2 > // Type of the right-hand side scalar
966 inline const typename EnableIf< IsNumeric<T2>, typename MultExprTrait<T1,T2>::Type >::Type
967  operator*( const DenseMatrix<T1,SO>& mat, T2 scalar )
968 {
970 
971  typedef typename MultExprTrait<T1,T2>::Type Type;
972  return Type( ~mat, scalar );
973 }
974 //*************************************************************************************************
975 
976 
977 //*************************************************************************************************
998 template< typename T1 // Type of the left-hand side scalar
999  , typename T2 // Type of the right-hand side dense matrix
1000  , bool SO > // Storage order of the right-hand side dense matrix
1001 inline const typename EnableIf< IsNumeric<T1>, typename MultExprTrait<T1,T2>::Type >::Type
1002  operator*( T1 scalar, const DenseMatrix<T2,SO>& mat )
1003 {
1005 
1006  typedef typename MultExprTrait<T1,T2>::Type Type;
1007  return Type( ~mat, scalar );
1008 }
1009 //*************************************************************************************************
1010 
1011 
1012 
1013 
1014 //=================================================================================================
1015 //
1016 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
1017 //
1018 //=================================================================================================
1019 
1020 //*************************************************************************************************
1032 template< typename VT // Type of the dense matrix
1033  , typename ST // Type of the scalar
1034  , bool TF > // Transpose flag
1035 inline const DMatScalarMultExpr<VT,ST,TF>
1036  operator-( const DMatScalarMultExpr<VT,ST,TF>& dm )
1037 {
1039 
1040  return DMatScalarMultExpr<VT,ST,TF>( dm.leftOperand(), -dm.rightOperand() );
1041 }
1043 //*************************************************************************************************
1044 
1045 
1046 
1047 
1048 //=================================================================================================
1049 //
1050 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1051 //
1052 //=================================================================================================
1053 
1054 //*************************************************************************************************
1067 template< typename MT // Type of the dense matrix of the left-hand side expression
1068  , typename ST1 // Type of the scalar of the left-hand side expression
1069  , bool SO // Storage order of the dense matrix
1070  , typename ST2 > // Type of the right-hand side scalar
1071 inline const typename EnableIf< IsNumeric<ST2>
1072  , typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
1073  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1074 {
1076 
1077  return mat.leftOperand() * ( mat.rightOperand() * scalar );
1078 }
1080 //*************************************************************************************************
1081 
1082 
1083 //*************************************************************************************************
1096 template< typename ST1 // Type of the left-hand side scalar
1097  , typename MT // Type of the dense matrix of the right-hand side expression
1098  , typename ST2 // Type of the scalar of the right-hand side expression
1099  , bool SO > // Storage order of the dense matrix
1100 inline const typename EnableIf< IsNumeric<ST1>
1101  , typename MultExprTrait< ST1, DMatScalarMultExpr<MT,ST2,SO> >::Type >::Type
1102  operator*( ST1 scalar, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1103 {
1105 
1106  return mat.leftOperand() * ( scalar * mat.rightOperand() );
1107 }
1109 //*************************************************************************************************
1110 
1111 
1112 //*************************************************************************************************
1125 template< typename MT // Type of the dense matrix of the left-hand side expression
1126  , typename ST1 // Type of the scalar of the left-hand side expression
1127  , bool SO // Storage order of the dense matrix
1128  , typename ST2 > // Type of the right-hand side scalar
1129 inline const typename EnableIf< IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>
1130  , typename DivExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
1131  operator/( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1132 {
1134 
1135  return mat.leftOperand() * ( mat.rightOperand() / scalar );
1136 }
1138 //*************************************************************************************************
1139 
1140 
1141 //*************************************************************************************************
1155 template< typename MT // Type of the dense matrix of the left-hand side expression
1156  , typename ST // Type of the scalar of the left-hand side expression
1157  , bool SO // Storage order of the left-hand side expression
1158  , typename VT > // Type of the right-hand side dense vector
1159 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
1160  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const DenseVector<VT,false>& vec )
1161 {
1163 
1164  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1165 }
1167 //*************************************************************************************************
1168 
1169 
1170 //*************************************************************************************************
1184 template< typename VT // Type of the left-hand side dense vector
1185  , typename MT // Type of the dense matrix of the right-hand side expression
1186  , typename ST // Type of the scalar of the right-hand side expression
1187  , bool SO > // Storage order of the right-hand side expression
1188 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
1189  operator*( const DenseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
1190 {
1192 
1193  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1194 }
1196 //*************************************************************************************************
1197 
1198 
1199 //*************************************************************************************************
1215 template< typename MT // Type of the dense matrix of the left-hand side expression
1216  , typename ST1 // Type of the scalar of the left-hand side expression
1217  , bool SO // Storage order of the left-hand side expression
1218  , typename VT // Type of the dense vector of the right-hand side expression
1219  , typename ST2 > // Type of the scalar of the right-hand side expression
1220 inline const DVecScalarMultExpr<typename MultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type,false>
1221  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const DVecScalarMultExpr<VT,ST2,false>& vec )
1222 {
1224 
1225  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1226 }
1228 //*************************************************************************************************
1229 
1230 
1231 //*************************************************************************************************
1247 template< typename VT // Type of the dense vector of the left-hand side expression
1248  , typename ST1 // Type of the scalar of the left-hand side expression
1249  , typename MT // Type of the dense matrix of the right-hand side expression
1250  , typename ST2 // Type of the scalar of the right-hand side expression
1251  , bool SO > // Storage order of the right-hand side expression
1252 inline const typename MultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
1253  operator*( const DVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1254 {
1256 
1257  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
1258 }
1260 //*************************************************************************************************
1261 
1262 
1263 //*************************************************************************************************
1277 template< typename MT // Type of the dense matrix of the left-hand side expression
1278  , typename ST // Type of the scalar of the left-hand side expression
1279  , bool SO // Storage order of the left-hand side expression
1280  , typename VT > // Type of the right-hand side sparse vector
1281 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
1282  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const SparseVector<VT,false>& vec )
1283 {
1285 
1286  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1287 }
1289 //*************************************************************************************************
1290 
1291 
1292 //*************************************************************************************************
1306 template< typename VT // Type of the left-hand side sparse vector
1307  , typename MT // Type of the dense matrix of the right-hand side expression
1308  , typename ST // Type of the scalar of the right-hand side expression
1309  , bool SO > // Storage order of the right-hand side expression
1310 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
1311  operator*( const SparseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
1312 {
1314 
1315  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1316 }
1318 //*************************************************************************************************
1319 
1320 
1321 //*************************************************************************************************
1337 template< typename MT // Type of the dense matrix of the left-hand side expression
1338  , typename ST1 // Type of the scalar of the left-hand side expression
1339  , bool SO // Storage order of the left-hand side expression
1340  , typename VT // Type of the sparse vector of the right-hand side expression
1341  , typename ST2 > // Type of the scalar of the right-hand side expression
1342 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, SVecScalarMultExpr<VT,ST2,false> >::Type
1343  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const SVecScalarMultExpr<VT,ST2,false>& vec )
1344 {
1346 
1347  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1348 }
1350 //*************************************************************************************************
1351 
1352 
1353 //*************************************************************************************************
1369 template< typename VT // Type of the sparse vector of the left-hand side expression
1370  , typename ST1 // Type of the scalar of the left-hand side expression
1371  , typename MT // Type of the dense matrix of the right-hand side expression
1372  , typename ST2 // Type of the scalar of the right-hand side expression
1373  , bool SO > // Storage order of the right-hand side expression
1374 inline const typename MultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
1375  operator*( const SVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1376 {
1378 
1379  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
1380 }
1382 //*************************************************************************************************
1383 
1384 
1385 //*************************************************************************************************
1399 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1400  , typename ST // Type of the scalar of the left-hand side expression
1401  , bool SO1 // Storage order of the left-hand side expression
1402  , typename MT2 // Type of the right-hand side dense matrix
1403  , bool SO2 > // Storage order of the right-hand side dense matrix
1404 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1405  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const DenseMatrix<MT2,SO2>& rhs )
1406 {
1408 
1409  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1410 }
1412 //*************************************************************************************************
1413 
1414 
1415 //*************************************************************************************************
1429 template< typename MT1 // Type of the left-hand side dense matrix
1430  , bool SO1 // Storage order of the left-hand side dense matrix
1431  , typename MT2 // Type of the dense matrix of the right-hand side expression
1432  , typename ST // Type of the scalar of the right-hand side expression
1433  , bool SO2 > // Storage order of the right-hand side expression
1434 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1435  operator*( const DenseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1436 {
1438 
1439  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1440 }
1442 //*************************************************************************************************
1443 
1444 
1445 //*************************************************************************************************
1459 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1460  , typename ST1 // Type of the scalar of the left-hand side expression
1461  , bool SO1 // Storage order of the left-hand side expression
1462  , typename MT2 // Type of the right-hand side dense matrix
1463  , typename ST2 // Type of the scalar of the right-hand side expression
1464  , bool SO2 > // Storage order of the right-hand side expression
1465 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1466  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST2,SO2>& rhs )
1467 {
1469 
1470  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1471 }
1473 //*************************************************************************************************
1474 
1475 
1476 //*************************************************************************************************
1490 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1491  , typename ST // Type of the scalar of the left-hand side expression
1492  , bool SO1 // Storage order of the left-hand side expression
1493  , typename MT2 // Type of the right-hand side sparse matrix
1494  , bool SO2 > // Storage order of the right-hand side sparse matrix
1495 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1496  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const SparseMatrix<MT2,SO2>& rhs )
1497 {
1499 
1500  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1501 }
1503 //*************************************************************************************************
1504 
1505 
1506 //*************************************************************************************************
1520 template< typename MT1 // Type of the left-hand side sparse matrix
1521  , bool SO1 // Storage order of the left-hand side sparse matrix
1522  , typename MT2 // Type of the dense matrix of the right-hand side expression
1523  , typename ST // Type of the scalar of the right-hand side expression
1524  , bool SO2 > // Storage order of the right-hand side expression
1525 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1526  operator*( const SparseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1527 {
1529 
1530  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1531 }
1533 //*************************************************************************************************
1534 
1535 
1536 //*************************************************************************************************
1551 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1552  , typename ST1 // Type of the scalar of the left-hand side expression
1553  , bool SO1 // Storage order of the left-hand side expression
1554  , typename MT2 // Type of the sparse matrix of the right-hand side expression
1555  , typename ST2 // Type of the scalar of the right-hand side expression
1556  , bool SO2 > // Storage order of the right-hand side expression
1557 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, SMatScalarMultExpr<MT2,ST2,SO2> >::Type
1558  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& mat, const SMatScalarMultExpr<MT2,ST2,SO2>& vec )
1559 {
1561 
1562  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1563 }
1565 //*************************************************************************************************
1566 
1567 
1568 //*************************************************************************************************
1583 template< typename MT1 // Type of the sparse matrix of the left-hand side expression
1584  , typename ST1 // Type of the scalar of the left-hand side expression
1585  , bool SO1 // Storage order of the left-hand side expression
1586  , typename MT2 // Type of the dense matrix of the right-hand side expression
1587  , typename ST2 // Type of the scalar of the right-hand side expression
1588  , bool SO2 > // Storage order of the right-hand side expression
1589 inline const typename MultExprTrait< SMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1590  operator*( const SMatScalarMultExpr<MT1,ST1,SO1>& mat, const DMatScalarMultExpr<MT2,ST2,SO2>& vec )
1591 {
1593 
1594  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1595 }
1597 //*************************************************************************************************
1598 
1599 
1600 
1601 
1602 //=================================================================================================
1603 //
1604 // DMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1605 //
1606 //=================================================================================================
1607 
1608 //*************************************************************************************************
1610 template< typename MT, typename ST1, typename ST2 >
1611 struct DMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1612 {
1613  public:
1614  //**********************************************************************************************
1615  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1616  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1617  , typename DMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1618  , INVALID_TYPE >::Type Type;
1619  //**********************************************************************************************
1620 };
1622 //*************************************************************************************************
1623 
1624 
1625 
1626 
1627 //=================================================================================================
1628 //
1629 // TDMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1630 //
1631 //=================================================================================================
1632 
1633 //*************************************************************************************************
1635 template< typename MT, typename ST1, typename ST2 >
1636 struct TDMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1637 {
1638  public:
1639  //**********************************************************************************************
1640  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1641  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1642  , typename TDMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1643  , INVALID_TYPE >::Type Type;
1644  //**********************************************************************************************
1645 };
1647 //*************************************************************************************************
1648 
1649 
1650 
1651 
1652 //=================================================================================================
1653 //
1654 // DMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1655 //
1656 //=================================================================================================
1657 
1658 //*************************************************************************************************
1660 template< typename MT, typename ST1, typename ST2 >
1661 struct DMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1662 {
1663  private:
1664  //**********************************************************************************************
1665  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1666  //**********************************************************************************************
1667 
1668  //**********************************************************************************************
1669  typedef typename DMatScalarMultExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1670  typedef typename DMatScalarDivExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1671  //**********************************************************************************************
1672 
1673  public:
1674  //**********************************************************************************************
1675  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1676  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1677  , typename SelectType<condition,T1,T2>::Type
1678  , INVALID_TYPE >::Type Type;
1679  //**********************************************************************************************
1680 };
1682 //*************************************************************************************************
1683 
1684 
1685 
1686 
1687 //=================================================================================================
1688 //
1689 // TDMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1690 //
1691 //=================================================================================================
1692 
1693 //*************************************************************************************************
1695 template< typename MT, typename ST1, typename ST2 >
1696 struct TDMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1697 {
1698  private:
1699  //**********************************************************************************************
1700  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1701  //**********************************************************************************************
1702 
1703  //**********************************************************************************************
1704  typedef typename TDMatScalarMultExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1705  typedef typename TDMatScalarDivExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1706  //**********************************************************************************************
1707 
1708  public:
1709  //**********************************************************************************************
1710  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1711  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1712  , typename SelectType<condition,T1,T2>::Type
1713  , INVALID_TYPE >::Type Type;
1714  //**********************************************************************************************
1715 };
1717 //*************************************************************************************************
1718 
1719 
1720 
1721 
1722 //=================================================================================================
1723 //
1724 // DMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1725 //
1726 //=================================================================================================
1727 
1728 //*************************************************************************************************
1730 template< typename MT, typename ST, typename VT >
1731 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1732 {
1733  public:
1734  //**********************************************************************************************
1735  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1736  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1737  IsNumeric<ST>::value
1738  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1739  , INVALID_TYPE >::Type Type;
1740  //**********************************************************************************************
1741 };
1743 //*************************************************************************************************
1744 
1745 
1746 //*************************************************************************************************
1748 template< typename MT, typename ST1, typename VT, typename ST2 >
1749 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, DVecScalarMultExpr<VT,ST2,false> >
1750 {
1751  public:
1752  //**********************************************************************************************
1753  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1754  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1755  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1756  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1757  , INVALID_TYPE >::Type Type;
1758  //**********************************************************************************************
1759 };
1761 //*************************************************************************************************
1762 
1763 
1764 
1765 
1766 //=================================================================================================
1767 //
1768 // TDMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1769 //
1770 //=================================================================================================
1771 
1772 //*************************************************************************************************
1774 template< typename MT, typename ST, typename VT >
1775 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1776 {
1777  public:
1778  //**********************************************************************************************
1779  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1780  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1781  IsNumeric<ST>::value
1782  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1783  , INVALID_TYPE >::Type Type;
1784  //**********************************************************************************************
1785 };
1787 //*************************************************************************************************
1788 
1789 
1790 //*************************************************************************************************
1792 template< typename MT, typename ST1, typename VT, typename ST2 >
1793 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, DVecScalarMultExpr<VT,ST2,false> >
1794 {
1795  public:
1796  //**********************************************************************************************
1797  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1798  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1799  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1800  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1801  , INVALID_TYPE >::Type Type;
1802  //**********************************************************************************************
1803 };
1805 //*************************************************************************************************
1806 
1807 
1808 
1809 
1810 //=================================================================================================
1811 //
1812 // TDVECDMATMULTEXPRTRAIT SPECIALIZATIONS
1813 //
1814 //=================================================================================================
1815 
1816 //*************************************************************************************************
1818 template< typename VT, typename MT, typename ST >
1819 struct TDVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
1820 {
1821  public:
1822  //**********************************************************************************************
1823  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1824  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1825  IsNumeric<ST>::value
1826  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
1827  , INVALID_TYPE >::Type Type;
1828  //**********************************************************************************************
1829 };
1831 //*************************************************************************************************
1832 
1833 
1834 //*************************************************************************************************
1836 template< typename VT, typename ST1, typename MT, typename ST2 >
1837 struct TDVecDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
1838 {
1839  public:
1840  //**********************************************************************************************
1841  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1842  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1843  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1844  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1845  , INVALID_TYPE >::Type Type;
1846  //**********************************************************************************************
1847 };
1849 //*************************************************************************************************
1850 
1851 
1852 
1853 
1854 //=================================================================================================
1855 //
1856 // TDVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
1857 //
1858 //=================================================================================================
1859 
1860 //*************************************************************************************************
1862 template< typename VT, typename MT, typename ST >
1863 struct TDVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
1864 {
1865  public:
1866  //**********************************************************************************************
1867  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1868  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1869  IsNumeric<ST>::value
1870  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
1871  , INVALID_TYPE >::Type Type;
1872  //**********************************************************************************************
1873 };
1875 //*************************************************************************************************
1876 
1877 
1878 //*************************************************************************************************
1880 template< typename VT, typename ST1, typename MT, typename ST2 >
1881 struct TDVecTDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
1882 {
1883  public:
1884  //**********************************************************************************************
1885  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1886  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1887  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1888  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1889  , INVALID_TYPE >::Type Type;
1890  //**********************************************************************************************
1891 };
1893 //*************************************************************************************************
1894 
1895 
1896 
1897 
1898 //=================================================================================================
1899 //
1900 // DMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1901 //
1902 //=================================================================================================
1903 
1904 //*************************************************************************************************
1906 template< typename MT, typename ST, typename VT >
1907 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1908 {
1909  public:
1910  //**********************************************************************************************
1911  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1912  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
1913  IsNumeric<ST>::value
1914  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1915  , INVALID_TYPE >::Type Type;
1916  //**********************************************************************************************
1917 };
1919 //*************************************************************************************************
1920 
1921 
1922 //*************************************************************************************************
1924 template< typename MT, typename ST1, typename VT, typename ST2 >
1925 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, SVecScalarMultExpr<VT,ST2,false> >
1926 {
1927  public:
1928  //**********************************************************************************************
1929  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1930  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
1931  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1932  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1933  , INVALID_TYPE >::Type Type;
1934  //**********************************************************************************************
1935 };
1937 //*************************************************************************************************
1938 
1939 
1940 
1941 
1942 //=================================================================================================
1943 //
1944 // TDMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1945 //
1946 //=================================================================================================
1947 
1948 //*************************************************************************************************
1950 template< typename MT, typename ST, typename VT >
1951 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1952 {
1953  public:
1954  //**********************************************************************************************
1955  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1956  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
1957  IsNumeric<ST>::value
1958  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1959  , INVALID_TYPE >::Type Type;
1960  //**********************************************************************************************
1961 };
1963 //*************************************************************************************************
1964 
1965 
1966 //*************************************************************************************************
1968 template< typename MT, typename ST1, typename VT, typename ST2 >
1969 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, SVecScalarMultExpr<VT,ST2,false> >
1970 {
1971  public:
1972  //**********************************************************************************************
1973  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1974  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
1975  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1976  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1977  , INVALID_TYPE >::Type Type;
1978  //**********************************************************************************************
1979 };
1981 //*************************************************************************************************
1982 
1983 
1984 
1985 
1986 //=================================================================================================
1987 //
1988 // TSVECDMATMULTEXPRTRAIT SPECIALIZATIONS
1989 //
1990 //=================================================================================================
1991 
1992 //*************************************************************************************************
1994 template< typename VT, typename MT, typename ST >
1995 struct TSVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
1996 {
1997  public:
1998  //**********************************************************************************************
1999  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2000  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2001  IsNumeric<ST>::value
2002  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
2003  , INVALID_TYPE >::Type Type;
2004  //**********************************************************************************************
2005 };
2007 //*************************************************************************************************
2008 
2009 
2010 //*************************************************************************************************
2012 template< typename VT, typename ST1, typename MT, typename ST2 >
2013 struct TSVecDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
2014 {
2015  public:
2016  //**********************************************************************************************
2017  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2018  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2019  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2020  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2021  , INVALID_TYPE >::Type Type;
2022  //**********************************************************************************************
2023 };
2025 //*************************************************************************************************
2026 
2027 
2028 
2029 
2030 //=================================================================================================
2031 //
2032 // TSVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2033 //
2034 //=================================================================================================
2035 
2036 //*************************************************************************************************
2038 template< typename VT, typename MT, typename ST >
2039 struct TSVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
2040 {
2041  public:
2042  //**********************************************************************************************
2043  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2044  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2045  IsNumeric<ST>::value
2046  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
2047  , INVALID_TYPE >::Type Type;
2048  //**********************************************************************************************
2049 };
2051 //*************************************************************************************************
2052 
2053 
2054 //*************************************************************************************************
2056 template< typename VT, typename ST1, typename MT, typename ST2 >
2057 struct TSVecTDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2058 {
2059  public:
2060  //**********************************************************************************************
2061  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2062  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2063  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2064  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2065  , INVALID_TYPE >::Type Type;
2066  //**********************************************************************************************
2067 };
2069 //*************************************************************************************************
2070 
2071 
2072 
2073 
2074 //=================================================================================================
2075 //
2076 // DMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2077 //
2078 //=================================================================================================
2079 
2080 //*************************************************************************************************
2082 template< typename MT1, typename ST, typename MT2 >
2083 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2084 {
2085  public:
2086  //**********************************************************************************************
2087  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2088  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2089  IsNumeric<ST>::value
2090  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2091  , INVALID_TYPE >::Type Type;
2092  //**********************************************************************************************
2093 };
2095 //*************************************************************************************************
2096 
2097 
2098 //*************************************************************************************************
2100 template< typename MT1, typename MT2, typename ST >
2101 struct DMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2102 {
2103  public:
2104  //**********************************************************************************************
2105  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2106  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2107  IsNumeric<ST>::value
2108  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2109  , INVALID_TYPE >::Type Type;
2110  //**********************************************************************************************
2111 };
2113 //*************************************************************************************************
2114 
2115 
2116 //*************************************************************************************************
2118 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2119 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2120 {
2121  public:
2122  //**********************************************************************************************
2123  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2124  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2125  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2126  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2127  , INVALID_TYPE >::Type Type;
2128  //**********************************************************************************************
2129 };
2131 //*************************************************************************************************
2132 
2133 
2134 
2135 
2136 //=================================================================================================
2137 //
2138 // DMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2139 //
2140 //=================================================================================================
2141 
2142 //*************************************************************************************************
2144 template< typename MT1, typename ST, typename MT2 >
2145 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2146 {
2147  public:
2148  //**********************************************************************************************
2149  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2150  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2151  IsNumeric<ST>::value
2152  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2153  , INVALID_TYPE >::Type Type;
2154  //**********************************************************************************************
2155 };
2157 //*************************************************************************************************
2158 
2159 
2160 //*************************************************************************************************
2162 template< typename MT1, typename MT2, typename ST >
2163 struct DMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2164 {
2165  public:
2166  //**********************************************************************************************
2167  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2168  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2169  IsNumeric<ST>::value
2170  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2171  , INVALID_TYPE >::Type Type;
2172  //**********************************************************************************************
2173 };
2175 //*************************************************************************************************
2176 
2177 
2178 //*************************************************************************************************
2180 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2181 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2182 {
2183  public:
2184  //**********************************************************************************************
2185  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2186  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2187  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2188  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2189  , INVALID_TYPE >::Type Type;
2190  //**********************************************************************************************
2191 };
2193 //*************************************************************************************************
2194 
2195 
2196 
2197 
2198 //=================================================================================================
2199 //
2200 // TDMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2201 //
2202 //=================================================================================================
2203 
2204 //*************************************************************************************************
2206 template< typename MT1, typename ST, typename MT2 >
2207 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2208 {
2209  public:
2210  //**********************************************************************************************
2211  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2212  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2213  IsNumeric<ST>::value
2214  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2215  , INVALID_TYPE >::Type Type;
2216  //**********************************************************************************************
2217 };
2219 //*************************************************************************************************
2220 
2221 
2222 //*************************************************************************************************
2224 template< typename MT1, typename MT2, typename ST >
2225 struct TDMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2226 {
2227  public:
2228  //**********************************************************************************************
2229  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2230  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2231  IsNumeric<ST>::value
2232  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2233  , INVALID_TYPE >::Type Type;
2234  //**********************************************************************************************
2235 };
2237 //*************************************************************************************************
2238 
2239 
2240 //*************************************************************************************************
2242 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2243 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2244 {
2245  public:
2246  //**********************************************************************************************
2247  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2248  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2249  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2250  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2251  , INVALID_TYPE >::Type Type;
2252  //**********************************************************************************************
2253 };
2255 //*************************************************************************************************
2256 
2257 
2258 
2259 
2260 //=================================================================================================
2261 //
2262 // TDMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2263 //
2264 //=================================================================================================
2265 
2266 //*************************************************************************************************
2268 template< typename MT1, typename ST, typename MT2 >
2269 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2270 {
2271  public:
2272  //**********************************************************************************************
2273  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2274  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2275  IsNumeric<ST>::value
2276  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2277  , INVALID_TYPE >::Type Type;
2278  //**********************************************************************************************
2279 };
2281 //*************************************************************************************************
2282 
2283 
2284 //*************************************************************************************************
2286 template< typename MT1, typename MT2, typename ST >
2287 struct TDMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2288 {
2289  public:
2290  //**********************************************************************************************
2291  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2292  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2293  IsNumeric<ST>::value
2294  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2295  , INVALID_TYPE >::Type Type;
2296  //**********************************************************************************************
2297 };
2299 //*************************************************************************************************
2300 
2301 
2302 //*************************************************************************************************
2304 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2305 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2306 {
2307  public:
2308  //**********************************************************************************************
2309  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2310  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2311  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2312  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2313  , INVALID_TYPE >::Type Type;
2314  //**********************************************************************************************
2315 };
2317 //*************************************************************************************************
2318 
2319 
2320 
2321 
2322 //=================================================================================================
2323 //
2324 // DMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2325 //
2326 //=================================================================================================
2327 
2328 //*************************************************************************************************
2330 template< typename MT1, typename ST, typename MT2 >
2331 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2332 {
2333  public:
2334  //**********************************************************************************************
2335  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2336  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2337  IsNumeric<ST>::value
2338  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2339  , INVALID_TYPE >::Type Type;
2340  //**********************************************************************************************
2341 };
2343 //*************************************************************************************************
2344 
2345 
2346 //*************************************************************************************************
2348 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2349 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,false> >
2350 {
2351  public:
2352  //**********************************************************************************************
2353  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2354  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2355  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2356  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2357  , INVALID_TYPE >::Type Type;
2358  //**********************************************************************************************
2359 };
2361 //*************************************************************************************************
2362 
2363 
2364 
2365 
2366 //=================================================================================================
2367 //
2368 // DMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2369 //
2370 //=================================================================================================
2371 
2372 //*************************************************************************************************
2374 template< typename MT1, typename ST, typename MT2 >
2375 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2376 {
2377  public:
2378  //**********************************************************************************************
2379  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2380  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2381  IsNumeric<ST>::value
2382  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2383  , INVALID_TYPE >::Type Type;
2384  //**********************************************************************************************
2385 };
2387 //*************************************************************************************************
2388 
2389 
2390 //*************************************************************************************************
2392 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2393 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,true> >
2394 {
2395  public:
2396  //**********************************************************************************************
2397  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2398  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2399  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2400  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2401  , INVALID_TYPE >::Type Type;
2402  //**********************************************************************************************
2403 };
2405 //*************************************************************************************************
2406 
2407 
2408 
2409 
2410 //=================================================================================================
2411 //
2412 // TDMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2413 //
2414 //=================================================================================================
2415 
2416 //*************************************************************************************************
2418 template< typename MT1, typename ST, typename MT2 >
2419 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2420 {
2421  public:
2422  //**********************************************************************************************
2423  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2424  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2425  IsNumeric<ST>::value
2426  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2427  , INVALID_TYPE >::Type Type;
2428  //**********************************************************************************************
2429 };
2431 //*************************************************************************************************
2432 
2433 
2434 //*************************************************************************************************
2436 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2437 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,false> >
2438 {
2439  public:
2440  //**********************************************************************************************
2441  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2442  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2443  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2444  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2445  , INVALID_TYPE >::Type Type;
2446  //**********************************************************************************************
2447 };
2449 //*************************************************************************************************
2450 
2451 
2452 
2453 
2454 //=================================================================================================
2455 //
2456 // TDMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2457 //
2458 //=================================================================================================
2459 
2460 //*************************************************************************************************
2462 template< typename MT1, typename ST, typename MT2 >
2463 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2464 {
2465  public:
2466  //**********************************************************************************************
2467  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2468  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2469  IsNumeric<ST>::value
2470  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2471  , INVALID_TYPE >::Type Type;
2472  //**********************************************************************************************
2473 };
2475 //*************************************************************************************************
2476 
2477 
2478 //*************************************************************************************************
2480 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2481 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,true> >
2482 {
2483  public:
2484  //**********************************************************************************************
2485  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2486  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2487  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2488  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2489  , INVALID_TYPE >::Type Type;
2490  //**********************************************************************************************
2491 };
2493 //*************************************************************************************************
2494 
2495 
2496 
2497 
2498 //=================================================================================================
2499 //
2500 // SMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2501 //
2502 //=================================================================================================
2503 
2504 //*************************************************************************************************
2506 template< typename MT1, typename ST, typename MT2 >
2507 struct SMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2508 {
2509  public:
2510  //**********************************************************************************************
2511  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2512  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2513  IsNumeric<ST>::value
2514  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2515  , INVALID_TYPE >::Type Type;
2516  //**********************************************************************************************
2517 };
2519 //*************************************************************************************************
2520 
2521 
2522 //*************************************************************************************************
2524 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2525 struct SMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2526 {
2527  public:
2528  //**********************************************************************************************
2529  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2530  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2531  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2532  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2533  , INVALID_TYPE >::Type Type;
2534  //**********************************************************************************************
2535 };
2537 //*************************************************************************************************
2538 
2539 
2540 
2541 
2542 //=================================================================================================
2543 //
2544 // SMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2545 //
2546 //=================================================================================================
2547 
2548 //*************************************************************************************************
2550 template< typename MT1, typename ST, typename MT2 >
2551 struct SMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2552 {
2553  public:
2554  //**********************************************************************************************
2555  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2556  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2557  IsNumeric<ST>::value
2558  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2559  , INVALID_TYPE >::Type Type;
2560  //**********************************************************************************************
2561 };
2563 //*************************************************************************************************
2564 
2565 
2566 //*************************************************************************************************
2568 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2569 struct SMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2570 {
2571  public:
2572  //**********************************************************************************************
2573  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2574  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2575  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2576  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2577  , INVALID_TYPE >::Type Type;
2578  //**********************************************************************************************
2579 };
2581 //*************************************************************************************************
2582 
2583 
2584 
2585 
2586 //=================================================================================================
2587 //
2588 // TSMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2589 //
2590 //=================================================================================================
2591 
2592 //*************************************************************************************************
2594 template< typename MT1, typename ST, typename MT2 >
2595 struct TSMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2596 {
2597  public:
2598  //**********************************************************************************************
2599  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2600  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2601  IsNumeric<ST>::value
2602  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2603  , INVALID_TYPE >::Type Type;
2604  //**********************************************************************************************
2605 };
2607 //*************************************************************************************************
2608 
2609 
2610 //*************************************************************************************************
2612 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2613 struct TSMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2614 {
2615  public:
2616  //**********************************************************************************************
2617  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2618  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2619  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2620  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2621  , INVALID_TYPE >::Type Type;
2622  //**********************************************************************************************
2623 };
2625 //*************************************************************************************************
2626 
2627 
2628 
2629 
2630 //=================================================================================================
2631 //
2632 // TSMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2633 //
2634 //=================================================================================================
2635 
2636 //*************************************************************************************************
2638 template< typename MT1, typename ST, typename MT2 >
2639 struct TSMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2640 {
2641  public:
2642  //**********************************************************************************************
2643  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2644  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2645  IsNumeric<ST>::value
2646  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2647  , INVALID_TYPE >::Type Type;
2648  //**********************************************************************************************
2649 };
2651 //*************************************************************************************************
2652 
2653 
2654 //*************************************************************************************************
2656 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2657 struct TSMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2658 {
2659  public:
2660  //**********************************************************************************************
2661  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2662  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2663  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2664  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2665  , INVALID_TYPE >::Type Type;
2666  //**********************************************************************************************
2667 };
2669 //*************************************************************************************************
2670 
2671 
2672 
2673 
2674 //=================================================================================================
2675 //
2676 // SUBMATRIXEXPRTRAIT SPECIALIZATIONS
2677 //
2678 //=================================================================================================
2679 
2680 //*************************************************************************************************
2682 template< typename MT, typename ST, bool SO, bool AF >
2683 struct SubmatrixExprTrait< DMatScalarMultExpr<MT,ST,SO>, AF >
2684 {
2685  public:
2686  //**********************************************************************************************
2687  typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type, ST >::Type Type;
2688  //**********************************************************************************************
2689 };
2691 //*************************************************************************************************
2692 
2693 
2694 
2695 
2696 //=================================================================================================
2697 //
2698 // ROWEXPRTRAIT SPECIALIZATIONS
2699 //
2700 //=================================================================================================
2701 
2702 //*************************************************************************************************
2704 template< typename MT, typename ST, bool SO >
2705 struct RowExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2706 {
2707  public:
2708  //**********************************************************************************************
2709  typedef typename MultExprTrait< typename RowExprTrait<const MT>::Type, ST >::Type Type;
2710  //**********************************************************************************************
2711 };
2713 //*************************************************************************************************
2714 
2715 
2716 
2717 
2718 //=================================================================================================
2719 //
2720 // COLUMNEXPRTRAIT SPECIALIZATIONS
2721 //
2722 //=================================================================================================
2723 
2724 //*************************************************************************************************
2726 template< typename MT, typename ST, bool SO >
2727 struct ColumnExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2728 {
2729  public:
2730  //**********************************************************************************************
2731  typedef typename MultExprTrait< typename ColumnExprTrait<const MT>::Type, ST >::Type Type;
2732  //**********************************************************************************************
2733 };
2735 //*************************************************************************************************
2736 
2737 } // namespace blaze
2738 
2739 #endif
LeftOperand leftOperand() const
Returns the left-hand side dense matrix operand.
Definition: DMatScalarMultExpr.h:530
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:206
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatScalarMultExpr.h:302
Pointer difference type of the Blaze library.
DifferenceType difference_type
Difference between two iterators.
Definition: DMatScalarMultExpr.h:203
Data type constraint.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
Constraint on the data type.
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
RightOperand scalar_
Scalar of the multiplication expression.
Definition: DMatScalarMultExpr.h:423
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:4329
const EnableIf< IsNumeric< T2 >, typename DivExprTrait< T1, T2 >::Type >::Type operator/(const DenseMatrix< T1, SO > &mat, T2 scalar)
Division operator for the division of a dense matrix by a scalar value ( ).
Definition: DMatScalarDivExpr.h:930
MultExprTrait< RN, ST >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DMatScalarMultExpr.h:126
MT::ResultType RT
Result type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:110
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:152
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatScalarMultExpr.h:574
ReferenceType reference
Reference return type.
Definition: DMatScalarMultExpr.h:202
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatScalarMultExpr.h:250
Header file for the IsSparseMatrix type trait.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatScalarMultExpr.h:282
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:242
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:199
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:368
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:79
Header file for the ColumnExprTrait class template.
Header file for the IsSame and IsStrictlySame type traits.
const size_t SMP_DMATSCALARMULT_THRESHOLD
SMP dense matrix/scalar multiplication/division threshold.This threshold specifies when a dense matri...
Definition: Thresholds.h:811
Header file for the IsColumnMajorMatrix type trait.
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: DMatScalarMultExpr.h:593
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2408
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:251
IteratorCategory iterator_category
The iterator category.
Definition: DMatScalarMultExpr.h:199
SelectType< useAssign, const ResultType, const DMatScalarMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatScalarMultExpr.h:176
Base class for all matrix/scalar multiplication expression templates.The MatScalarMultExpr class serv...
Definition: MatScalarMultExpr.h:66
Header file for the DenseVector base class.
MT::ReturnType RN
Return type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:111
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:690
Header file for the Computation base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Header file for the RequiresEvaluation type trait.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatScalarMultExpr.h:379
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:107
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatScalarMultExpr.h:292
Constraint on the data type.
Header file for the DivExprTrait class template.
ElementType ValueType
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:193
Constraint on the data type.
Header file for the MultExprTrait class template.
void smpAddAssign(DenseMatrix< 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:122
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:253
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatScalarMultExpr.h:584
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the IsTemporary type trait class.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatScalarMultExpr.h:196
Header file for the multiplication trait.
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatScalarMultExpr.h:510
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:335
Header file for the IsFloatingPoint type trait.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatScalarMultExpr.h:457
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2412
Expression object for dense matrix-scalar multiplications.The DMatScalarMultExpr class represents the...
Definition: DMatScalarMultExpr.h:104
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatScalarMultExpr.h:552
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatScalarMultExpr.h:227
IteratorType iterator_
Iterator to the current element.
Definition: DMatScalarMultExpr.h:422
Header file for the DenseMatrix base class.
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:357
IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatScalarMultExpr.h:471
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:271
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DMatScalarMultExpr.h:173
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE(A, B)
Data type constraint.In case the two types A and B are not the same (ignoring all cv-qualifiers of bo...
Definition: SameType.h:89
ElementType * PointerType
Pointer return type.
Definition: DMatScalarMultExpr.h:194
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:313
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatScalarMultExpr.h:179
Constraints on the storage order of matrix types.
LeftOperand matrix_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatScalarMultExpr.h:592
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2406
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatScalarMultExpr.h:500
Header file for the EnableIf class template.
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatScalarMultExpr.h:415
Header file for the serial shim.
Header file for the BaseElementType type trait.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatScalarMultExpr.h:520
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DMatScalarMultExpr.h:215
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:92
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatScalarMultExpr.h:403
Header file for the IsNumeric type trait.
ResultType::ElementType ElementType
Resulting element type.
Definition: DMatScalarMultExpr.h:169
ElementType & ReferenceType
Reference return type.
Definition: DMatScalarMultExpr.h:195
RightOperand rightOperand() const
Returns the right-hand side scalar operand.
Definition: DMatScalarMultExpr.h:540
Header file for the IsSparseVector type trait.
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2407
Header file for the MatScalarMultExpr base class.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:748
MT::CompositeType CT
Composite type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:113
Header file for run time assertion macros.
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:141
DMatScalarMultExpr(const MT &matrix, ST scalar)
Constructor for the DMatScalarMultExpr class.
Definition: DMatScalarMultExpr.h:444
Header file for the division trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatScalarMultExpr.h:564
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:301
const DenseIterator< Type > operator-(const DenseIterator< Type > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:585
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatScalarMultExpr.h:239
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:79
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:331
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatScalarMultExpr.h:489
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:324
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:346
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatScalarMultExpr.h:261
Evaluation of the base element type of a given data type.Via this type trait it is possible to evalua...
Definition: BaseElementType.h:75
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatScalarMultExpr.h:391
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatScalarMultExpr.h:271
MT::ElementType ET
Element type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:112
Header file for the IsRowMajorMatrix type trait.
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
Header file for the IsComputation type trait class.
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: DMatScalarMultExpr.h:182
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatScalarMultExpr.h:168
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
PointerType pointer
Pointer return type.
Definition: DMatScalarMultExpr.h:201
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2403
Header file for basic type definitions.
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatScalarMultExpr.h:170
Iterator over the elements of the dense matrix.
Definition: DMatScalarMultExpr.h:188
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatScalarMultExpr.h:192
MultTrait< RT, ST >::Type ResultType
Result type for expression template evaluations.
Definition: DMatScalarMultExpr.h:166
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatScalarMultExpr.h:167
DMatScalarMultExpr< MT, ST, SO > This
Type of this DMatScalarMultExpr instance.
Definition: DMatScalarMultExpr.h:165
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#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
EnableIf< IsIntegral< T >, Set< T, sizeof(T)> >::Type::Type set(T value)
Sets all values in the vector to the given integral value.
Definition: Set.h:209
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
ValueType value_type
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:200