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>
78 #include <blaze/system/Inline.h>
80 #include <blaze/util/Assert.h>
84 #include <blaze/util/EnableIf.h>
85 #include <blaze/util/InvalidType.h>
87 #include <blaze/util/SelectType.h>
88 #include <blaze/util/Types.h>
93 
94 
95 namespace blaze {
96 
97 //=================================================================================================
98 //
99 // CLASS DMATSCALARMULTEXPR
100 //
101 //=================================================================================================
102 
103 //*************************************************************************************************
110 template< typename MT // Type of the left-hand side dense matrix
111  , typename ST // Type of the right-hand side scalar value
112  , bool SO > // Storage order
113 class DMatScalarMultExpr : public DenseMatrix< DMatScalarMultExpr<MT,ST,SO>, SO >
114  , private MatScalarMultExpr
115  , private Computation
116 {
117  private:
118  //**Type definitions****************************************************************************
119  typedef typename MT::ResultType RT;
120  typedef typename MT::ReturnType RN;
121  typedef typename MT::ElementType ET;
122  typedef typename MT::CompositeType CT;
123  //**********************************************************************************************
124 
125  //**Return type evaluation**********************************************************************
127 
132  enum { returnExpr = !IsTemporary<RN>::value };
133 
136  //**********************************************************************************************
137 
138  //**Serial evaluation strategy******************************************************************
140 
147 
149  template< typename MT2 >
151  struct UseAssign {
152  enum { value = useAssign };
153  };
155  //**********************************************************************************************
156 
157  //**Parallel evaluation strategy****************************************************************
159 
165  template< typename MT2 >
166  struct UseSMPAssign {
167  enum { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
168  };
170  //**********************************************************************************************
171 
172  public:
173  //**Type definitions****************************************************************************
180 
183 
186 
188  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type LeftOperand;
189 
191  typedef ST RightOperand;
192  //**********************************************************************************************
193 
194  //**ConstIterator class definition**************************************************************
198  {
199  public:
200  //**Type definitions*************************************************************************
201  typedef std::random_access_iterator_tag IteratorCategory;
202  typedef ElementType ValueType;
203  typedef ElementType* PointerType;
204  typedef ElementType& ReferenceType;
206 
207  // STL iterator requirements
208  typedef IteratorCategory iterator_category;
209  typedef ValueType value_type;
210  typedef PointerType pointer;
211  typedef ReferenceType reference;
212  typedef DifferenceType difference_type;
213 
215  typedef typename MT::ConstIterator IteratorType;
216  //*******************************************************************************************
217 
218  //**Constructor******************************************************************************
224  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
225  : iterator_( iterator ) // Iterator to the current element
226  , scalar_ ( scalar ) // Scalar of the multiplication expression
227  {}
228  //*******************************************************************************************
229 
230  //**Addition assignment operator*************************************************************
236  inline ConstIterator& operator+=( size_t inc ) {
237  iterator_ += inc;
238  return *this;
239  }
240  //*******************************************************************************************
241 
242  //**Subtraction assignment operator**********************************************************
248  inline ConstIterator& operator-=( size_t dec ) {
249  iterator_ -= dec;
250  return *this;
251  }
252  //*******************************************************************************************
253 
254  //**Prefix increment operator****************************************************************
260  ++iterator_;
261  return *this;
262  }
263  //*******************************************************************************************
264 
265  //**Postfix increment operator***************************************************************
270  inline const ConstIterator operator++( int ) {
271  return ConstIterator( iterator_++ );
272  }
273  //*******************************************************************************************
274 
275  //**Prefix decrement operator****************************************************************
281  --iterator_;
282  return *this;
283  }
284  //*******************************************************************************************
285 
286  //**Postfix decrement operator***************************************************************
291  inline const ConstIterator operator--( int ) {
292  return ConstIterator( iterator_-- );
293  }
294  //*******************************************************************************************
295 
296  //**Element access operator******************************************************************
301  inline ReturnType operator*() const {
302  return *iterator_ * scalar_;
303  }
304  //*******************************************************************************************
305 
306  //**Load function****************************************************************************
311  inline IntrinsicType load() const {
312  return iterator_.load() * set( scalar_ );
313  }
314  //*******************************************************************************************
315 
316  //**Equality operator************************************************************************
322  inline bool operator==( const ConstIterator& rhs ) const {
323  return iterator_ == rhs.iterator_;
324  }
325  //*******************************************************************************************
326 
327  //**Inequality operator**********************************************************************
333  inline bool operator!=( const ConstIterator& rhs ) const {
334  return iterator_ != rhs.iterator_;
335  }
336  //*******************************************************************************************
337 
338  //**Less-than operator***********************************************************************
344  inline bool operator<( const ConstIterator& rhs ) const {
345  return iterator_ < rhs.iterator_;
346  }
347  //*******************************************************************************************
348 
349  //**Greater-than operator********************************************************************
355  inline bool operator>( const ConstIterator& rhs ) const {
356  return iterator_ > rhs.iterator_;
357  }
358  //*******************************************************************************************
359 
360  //**Less-or-equal-than operator**************************************************************
366  inline bool operator<=( const ConstIterator& rhs ) const {
367  return iterator_ <= rhs.iterator_;
368  }
369  //*******************************************************************************************
370 
371  //**Greater-or-equal-than operator***********************************************************
377  inline bool operator>=( const ConstIterator& rhs ) const {
378  return iterator_ >= rhs.iterator_;
379  }
380  //*******************************************************************************************
381 
382  //**Subtraction operator*********************************************************************
388  inline DifferenceType operator-( const ConstIterator& rhs ) const {
389  return iterator_ - rhs.iterator_;
390  }
391  //*******************************************************************************************
392 
393  //**Addition operator************************************************************************
400  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
401  return ConstIterator( it.iterator_ + inc, it.scalar_ );
402  }
403  //*******************************************************************************************
404 
405  //**Addition operator************************************************************************
412  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
413  return ConstIterator( it.iterator_ + inc, it.scalar_ );
414  }
415  //*******************************************************************************************
416 
417  //**Subtraction operator*********************************************************************
424  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
425  return ConstIterator( it.iterator_ - dec, it.scalar_ );
426  }
427  //*******************************************************************************************
428 
429  private:
430  //**Member variables*************************************************************************
431  IteratorType iterator_;
432  RightOperand scalar_;
433  //*******************************************************************************************
434  };
435  //**********************************************************************************************
436 
437  //**Compilation flags***************************************************************************
439  enum { vectorizable = MT::vectorizable &&
442 
444  enum { smpAssignable = MT::smpAssignable };
445  //**********************************************************************************************
446 
447  //**Constructor*********************************************************************************
453  explicit inline DMatScalarMultExpr( const MT& matrix, ST scalar )
454  : matrix_( matrix ) // Left-hand side dense matrix of the multiplication expression
455  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
456  {}
457  //**********************************************************************************************
458 
459  //**Access operator*****************************************************************************
466  inline ReturnType operator()( size_t i, size_t j ) const {
467  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
468  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
469  return matrix_(i,j) * scalar_;
470  }
471  //**********************************************************************************************
472 
473  //**Load function*******************************************************************************
480  BLAZE_ALWAYS_INLINE IntrinsicType load( size_t i, size_t j ) const {
481  typedef IntrinsicTrait<ElementType> IT;
482  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
483  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
484  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
485  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
486  const IntrinsicType xmm1( matrix_.load(i,j) );
487  const IntrinsicType xmm2( set( scalar_ ) );
488  return xmm1 * xmm2;
489  }
490  //**********************************************************************************************
491 
492  //**Begin function******************************************************************************
498  inline ConstIterator begin( size_t i ) const {
499  return ConstIterator( matrix_.begin(i), scalar_ );
500  }
501  //**********************************************************************************************
502 
503  //**End function********************************************************************************
509  inline ConstIterator end( size_t i ) const {
510  return ConstIterator( matrix_.end(i), scalar_ );
511  }
512  //**********************************************************************************************
513 
514  //**Rows function*******************************************************************************
519  inline size_t rows() const {
520  return matrix_.rows();
521  }
522  //**********************************************************************************************
523 
524  //**Columns function****************************************************************************
529  inline size_t columns() const {
530  return matrix_.columns();
531  }
532  //**********************************************************************************************
533 
534  //**Left operand access*************************************************************************
539  inline LeftOperand leftOperand() const {
540  return matrix_;
541  }
542  //**********************************************************************************************
543 
544  //**Right operand access************************************************************************
549  inline RightOperand rightOperand() const {
550  return scalar_;
551  }
552  //**********************************************************************************************
553 
554  //**********************************************************************************************
560  template< typename T >
561  inline bool canAlias( const T* alias ) const {
562  return IsComputation<MT>::value && matrix_.canAlias( alias );
563  }
564  //**********************************************************************************************
565 
566  //**********************************************************************************************
572  template< typename T >
573  inline bool isAliased( const T* alias ) const {
574  return matrix_.isAliased( alias );
575  }
576  //**********************************************************************************************
577 
578  //**********************************************************************************************
583  inline bool isAligned() const {
584  return matrix_.isAligned();
585  }
586  //**********************************************************************************************
587 
588  //**********************************************************************************************
593  inline bool canSMPAssign() const {
594  return matrix_.canSMPAssign() ||
595  ( ( ( SO == rowMajor ) ? rows() : columns() ) > SMP_DMATSCALARMULT_THRESHOLD );
596  }
597  //**********************************************************************************************
598 
599  private:
600  //**Member variables****************************************************************************
601  LeftOperand matrix_;
602  RightOperand scalar_;
603  //**********************************************************************************************
604 
605  //**Assignment to dense matrices****************************************************************
619  template< typename MT2 // Type of the target dense matrix
620  , bool SO2 > // Storage order of the target dense matrix
621  friend inline typename EnableIf< UseAssign<MT2> >::Type
623  {
625 
626  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
627  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
628 
629  assign( ~lhs, rhs.matrix_ );
630  assign( ~lhs, (~lhs) * rhs.scalar_ );
631  }
633  //**********************************************************************************************
634 
635  //**Assignment to sparse matrices***************************************************************
649  template< typename MT2 // Type of the target sparse matrix
650  , bool SO2 > // Storage order of the target sparse matrix
651  friend inline typename EnableIf< UseAssign<MT2> >::Type
653  {
655 
656  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
657  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
658 
659  assign( ~lhs, rhs.matrix_ );
660  (~lhs) *= rhs.scalar_;
661  }
663  //**********************************************************************************************
664 
665  //**Addition assignment to dense matrices*******************************************************
679  template< typename MT2 // Type of the target dense matrix
680  , bool SO2 > // Storage order of the target dense matrix
681  friend inline typename EnableIf< UseAssign<MT2> >::Type
682  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
683  {
685 
689 
690  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
691  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
692 
693  const ResultType tmp( serial( rhs ) );
694  addAssign( ~lhs, tmp );
695  }
697  //**********************************************************************************************
698 
699  //**Addition assignment to sparse matrices******************************************************
700  // No special implementation for the addition assignment to sparse matrices.
701  //**********************************************************************************************
702 
703  //**Subtraction assignment to dense matrices****************************************************
717  template< typename MT2 // Type of the target dense matrix
718  , bool SO2 > // Storage order of the target dense matrix
719  friend inline typename EnableIf< UseAssign<MT2> >::Type
720  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
721  {
723 
727 
728  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
729  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
730 
731  const ResultType tmp( serial( rhs ) );
732  subAssign( ~lhs, tmp );
733  }
735  //**********************************************************************************************
736 
737  //**Subtraction assignment to sparse matrices***************************************************
738  // No special implementation for the subtraction assignment to sparse matrices.
739  //**********************************************************************************************
740 
741  //**Multiplication assignment to dense matrices*************************************************
742  // No special implementation for the multiplication assignment to dense matrices.
743  //**********************************************************************************************
744 
745  //**Multiplication assignment to sparse matrices************************************************
746  // No special implementation for the multiplication assignment to sparse matrices.
747  //**********************************************************************************************
748 
749  //**SMP assignment to dense matrices************************************************************
763  template< typename MT2 // Type of the target dense matrix
764  , bool SO2 > // Storage order of the target dense matrix
765  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
766  smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
767  {
769 
770  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
771  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
772 
773  smpAssign( ~lhs, rhs.matrix_ );
774  smpAssign( ~lhs, (~lhs) * rhs.scalar_ );
775  }
777  //**********************************************************************************************
778 
779  //**SMP assignment to sparse matrices***********************************************************
793  template< typename MT2 // Type of the target sparse matrix
794  , bool SO2 > // Storage order of the target sparse matrix
795  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
796  smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
797  {
799 
800  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
801  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
802 
803  smpAssign( ~lhs, rhs.matrix_ );
804  (~lhs) *= rhs.scalar_;
805  }
807  //**********************************************************************************************
808 
809  //**SMP addition assignment to dense matrices***************************************************
823  template< typename MT2 // Type of the target dense matrix
824  , bool SO2 > // Storage order of the target dense matrix
825  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
826  smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
827  {
829 
833 
834  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
835  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
836 
837  const ResultType tmp( rhs );
838  smpAddAssign( ~lhs, tmp );
839  }
841  //**********************************************************************************************
842 
843  //**SMP addition assignment to sparse matrices**************************************************
844  // No special implementation for the SMP addition assignment to sparse matrices.
845  //**********************************************************************************************
846 
847  //**SMP subtraction assignment to dense matrices************************************************
861  template< typename MT2 // Type of the target dense matrix
862  , bool SO2 > // Storage order of the target dense matrix
863  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
864  smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
865  {
867 
871 
872  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
873  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
874 
875  const ResultType tmp( rhs );
876  smpSubAssign( ~lhs, tmp );
877  }
879  //**********************************************************************************************
880 
881  //**SMP subtraction assignment to sparse matrices***********************************************
882  // No special implementation for the SMP subtraction assignment to sparse matrices.
883  //**********************************************************************************************
884 
885  //**SMP multiplication assignment to dense matrices*********************************************
886  // No special implementation for the SMP multiplication assignment to dense matrices.
887  //**********************************************************************************************
888 
889  //**SMP multiplication assignment to sparse matrices********************************************
890  // No special implementation for the SMP multiplication assignment to sparse matrices.
891  //**********************************************************************************************
892 
893  //**Compile time checks*************************************************************************
898  BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( ST, RightOperand );
900  //**********************************************************************************************
901 };
902 //*************************************************************************************************
903 
904 
905 
906 
907 //=================================================================================================
908 //
909 // GLOBAL UNARY ARITHMETIC OPERATORS
910 //
911 //=================================================================================================
912 
913 //*************************************************************************************************
930 template< typename MT // Type of the dense matrix
931  , bool SO > // Storage order
932 inline const DMatScalarMultExpr<MT,typename BaseElementType<MT>::Type,SO>
934 {
936 
937  typedef typename BaseElementType<MT>::Type ElementType;
939 }
940 //*************************************************************************************************
941 
942 
943 
944 
945 //=================================================================================================
946 //
947 // GLOBAL BINARY ARITHMETIC OPERATORS
948 //
949 //=================================================================================================
950 
951 //*************************************************************************************************
972 template< typename T1 // Type of the left-hand side dense matrix
973  , bool SO // Storage order of the left-hand side dense matrix
974  , typename T2 > // Type of the right-hand side scalar
975 inline const typename EnableIf< IsNumeric<T2>, typename MultExprTrait<T1,T2>::Type >::Type
976  operator*( const DenseMatrix<T1,SO>& mat, T2 scalar )
977 {
979 
980  typedef typename MultExprTrait<T1,T2>::Type Type;
981  return Type( ~mat, scalar );
982 }
983 //*************************************************************************************************
984 
985 
986 //*************************************************************************************************
1007 template< typename T1 // Type of the left-hand side scalar
1008  , typename T2 // Type of the right-hand side dense matrix
1009  , bool SO > // Storage order of the right-hand side dense matrix
1010 inline const typename EnableIf< IsNumeric<T1>, typename MultExprTrait<T1,T2>::Type >::Type
1011  operator*( T1 scalar, const DenseMatrix<T2,SO>& mat )
1012 {
1014 
1015  typedef typename MultExprTrait<T1,T2>::Type Type;
1016  return Type( ~mat, scalar );
1017 }
1018 //*************************************************************************************************
1019 
1020 
1021 
1022 
1023 //=================================================================================================
1024 //
1025 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
1026 //
1027 //=================================================================================================
1028 
1029 //*************************************************************************************************
1041 template< typename VT // Type of the dense matrix
1042  , typename ST // Type of the scalar
1043  , bool TF > // Transpose flag
1044 inline const DMatScalarMultExpr<VT,ST,TF>
1045  operator-( const DMatScalarMultExpr<VT,ST,TF>& dm )
1046 {
1048 
1049  return DMatScalarMultExpr<VT,ST,TF>( dm.leftOperand(), -dm.rightOperand() );
1050 }
1052 //*************************************************************************************************
1053 
1054 
1055 
1056 
1057 //=================================================================================================
1058 //
1059 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1060 //
1061 //=================================================================================================
1062 
1063 //*************************************************************************************************
1076 template< typename MT // Type of the dense matrix of the left-hand side expression
1077  , typename ST1 // Type of the scalar of the left-hand side expression
1078  , bool SO // Storage order of the dense matrix
1079  , typename ST2 > // Type of the right-hand side scalar
1080 inline const typename EnableIf< IsNumeric<ST2>
1081  , typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
1082  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1083 {
1085 
1086  return mat.leftOperand() * ( mat.rightOperand() * scalar );
1087 }
1089 //*************************************************************************************************
1090 
1091 
1092 //*************************************************************************************************
1105 template< typename ST1 // Type of the left-hand side scalar
1106  , typename MT // Type of the dense matrix of the right-hand side expression
1107  , typename ST2 // Type of the scalar of the right-hand side expression
1108  , bool SO > // Storage order of the dense matrix
1109 inline const typename EnableIf< IsNumeric<ST1>
1110  , typename MultExprTrait< ST1, DMatScalarMultExpr<MT,ST2,SO> >::Type >::Type
1111  operator*( ST1 scalar, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1112 {
1114 
1115  return mat.leftOperand() * ( scalar * mat.rightOperand() );
1116 }
1118 //*************************************************************************************************
1119 
1120 
1121 //*************************************************************************************************
1134 template< typename MT // Type of the dense matrix of the left-hand side expression
1135  , typename ST1 // Type of the scalar of the left-hand side expression
1136  , bool SO // Storage order of the dense matrix
1137  , typename ST2 > // Type of the right-hand side scalar
1138 inline const typename EnableIf< IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>
1139  , typename DivExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
1140  operator/( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1141 {
1143 
1144  return mat.leftOperand() * ( mat.rightOperand() / scalar );
1145 }
1147 //*************************************************************************************************
1148 
1149 
1150 //*************************************************************************************************
1164 template< typename MT // Type of the dense matrix of the left-hand side expression
1165  , typename ST // Type of the scalar of the left-hand side expression
1166  , bool SO // Storage order of the left-hand side expression
1167  , typename VT > // Type of the right-hand side dense vector
1168 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
1169  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const DenseVector<VT,false>& vec )
1170 {
1172 
1173  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1174 }
1176 //*************************************************************************************************
1177 
1178 
1179 //*************************************************************************************************
1193 template< typename VT // Type of the left-hand side dense vector
1194  , typename MT // Type of the dense matrix of the right-hand side expression
1195  , typename ST // Type of the scalar of the right-hand side expression
1196  , bool SO > // Storage order of the right-hand side expression
1197 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
1198  operator*( const DenseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
1199 {
1201 
1202  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1203 }
1205 //*************************************************************************************************
1206 
1207 
1208 //*************************************************************************************************
1224 template< typename MT // Type of the dense matrix of the left-hand side expression
1225  , typename ST1 // Type of the scalar of the left-hand side expression
1226  , bool SO // Storage order of the left-hand side expression
1227  , typename VT // Type of the dense vector of the right-hand side expression
1228  , typename ST2 > // Type of the scalar of the right-hand side expression
1229 inline const DVecScalarMultExpr<typename MultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type,false>
1230  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const DVecScalarMultExpr<VT,ST2,false>& vec )
1231 {
1233 
1234  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1235 }
1237 //*************************************************************************************************
1238 
1239 
1240 //*************************************************************************************************
1256 template< typename VT // Type of the dense vector of the left-hand side expression
1257  , typename ST1 // Type of the scalar of the left-hand side expression
1258  , typename MT // Type of the dense matrix of the right-hand side expression
1259  , typename ST2 // Type of the scalar of the right-hand side expression
1260  , bool SO > // Storage order of the right-hand side expression
1261 inline const typename MultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
1262  operator*( const DVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1263 {
1265 
1266  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
1267 }
1269 //*************************************************************************************************
1270 
1271 
1272 //*************************************************************************************************
1286 template< typename MT // Type of the dense matrix of the left-hand side expression
1287  , typename ST // Type of the scalar of the left-hand side expression
1288  , bool SO // Storage order of the left-hand side expression
1289  , typename VT > // Type of the right-hand side sparse vector
1290 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
1291  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const SparseVector<VT,false>& vec )
1292 {
1294 
1295  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1296 }
1298 //*************************************************************************************************
1299 
1300 
1301 //*************************************************************************************************
1315 template< typename VT // Type of the left-hand side sparse vector
1316  , typename MT // Type of the dense matrix of the right-hand side expression
1317  , typename ST // Type of the scalar of the right-hand side expression
1318  , bool SO > // Storage order of the right-hand side expression
1319 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
1320  operator*( const SparseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
1321 {
1323 
1324  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1325 }
1327 //*************************************************************************************************
1328 
1329 
1330 //*************************************************************************************************
1346 template< typename MT // Type of the dense matrix of the left-hand side expression
1347  , typename ST1 // Type of the scalar of the left-hand side expression
1348  , bool SO // Storage order of the left-hand side expression
1349  , typename VT // Type of the sparse vector of the right-hand side expression
1350  , typename ST2 > // Type of the scalar of the right-hand side expression
1351 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, SVecScalarMultExpr<VT,ST2,false> >::Type
1352  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const SVecScalarMultExpr<VT,ST2,false>& vec )
1353 {
1355 
1356  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1357 }
1359 //*************************************************************************************************
1360 
1361 
1362 //*************************************************************************************************
1378 template< typename VT // Type of the sparse vector of the left-hand side expression
1379  , typename ST1 // Type of the scalar of the left-hand side expression
1380  , typename MT // Type of the dense matrix of the right-hand side expression
1381  , typename ST2 // Type of the scalar of the right-hand side expression
1382  , bool SO > // Storage order of the right-hand side expression
1383 inline const typename MultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
1384  operator*( const SVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1385 {
1387 
1388  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
1389 }
1391 //*************************************************************************************************
1392 
1393 
1394 //*************************************************************************************************
1408 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1409  , typename ST // Type of the scalar of the left-hand side expression
1410  , bool SO1 // Storage order of the left-hand side expression
1411  , typename MT2 // Type of the right-hand side dense matrix
1412  , bool SO2 > // Storage order of the right-hand side dense matrix
1413 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1414  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const DenseMatrix<MT2,SO2>& rhs )
1415 {
1417 
1418  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1419 }
1421 //*************************************************************************************************
1422 
1423 
1424 //*************************************************************************************************
1438 template< typename MT1 // Type of the left-hand side dense matrix
1439  , bool SO1 // Storage order of the left-hand side dense matrix
1440  , typename MT2 // Type of the dense matrix of the right-hand side expression
1441  , typename ST // Type of the scalar of the right-hand side expression
1442  , bool SO2 > // Storage order of the right-hand side expression
1443 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1444  operator*( const DenseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1445 {
1447 
1448  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1449 }
1451 //*************************************************************************************************
1452 
1453 
1454 //*************************************************************************************************
1468 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1469  , typename ST1 // Type of the scalar of the left-hand side expression
1470  , bool SO1 // Storage order of the left-hand side expression
1471  , typename MT2 // Type of the right-hand side dense matrix
1472  , typename ST2 // Type of the scalar of the right-hand side expression
1473  , bool SO2 > // Storage order of the right-hand side expression
1474 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1475  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST2,SO2>& rhs )
1476 {
1478 
1479  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1480 }
1482 //*************************************************************************************************
1483 
1484 
1485 //*************************************************************************************************
1499 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1500  , typename ST // Type of the scalar of the left-hand side expression
1501  , bool SO1 // Storage order of the left-hand side expression
1502  , typename MT2 // Type of the right-hand side sparse matrix
1503  , bool SO2 > // Storage order of the right-hand side sparse matrix
1504 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1505  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const SparseMatrix<MT2,SO2>& rhs )
1506 {
1508 
1509  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1510 }
1512 //*************************************************************************************************
1513 
1514 
1515 //*************************************************************************************************
1529 template< typename MT1 // Type of the left-hand side sparse matrix
1530  , bool SO1 // Storage order of the left-hand side sparse matrix
1531  , typename MT2 // Type of the dense matrix of the right-hand side expression
1532  , typename ST // Type of the scalar of the right-hand side expression
1533  , bool SO2 > // Storage order of the right-hand side expression
1534 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1535  operator*( const SparseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1536 {
1538 
1539  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1540 }
1542 //*************************************************************************************************
1543 
1544 
1545 //*************************************************************************************************
1560 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1561  , typename ST1 // Type of the scalar of the left-hand side expression
1562  , bool SO1 // Storage order of the left-hand side expression
1563  , typename MT2 // Type of the sparse matrix of the right-hand side expression
1564  , typename ST2 // Type of the scalar of the right-hand side expression
1565  , bool SO2 > // Storage order of the right-hand side expression
1566 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, SMatScalarMultExpr<MT2,ST2,SO2> >::Type
1567  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& mat, const SMatScalarMultExpr<MT2,ST2,SO2>& vec )
1568 {
1570 
1571  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1572 }
1574 //*************************************************************************************************
1575 
1576 
1577 //*************************************************************************************************
1592 template< typename MT1 // Type of the sparse matrix of the left-hand side expression
1593  , typename ST1 // Type of the scalar of the left-hand side expression
1594  , bool SO1 // Storage order of the left-hand side expression
1595  , typename MT2 // Type of the dense matrix of the right-hand side expression
1596  , typename ST2 // Type of the scalar of the right-hand side expression
1597  , bool SO2 > // Storage order of the right-hand side expression
1598 inline const typename MultExprTrait< SMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1599  operator*( const SMatScalarMultExpr<MT1,ST1,SO1>& mat, const DMatScalarMultExpr<MT2,ST2,SO2>& vec )
1600 {
1602 
1603  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1604 }
1606 //*************************************************************************************************
1607 
1608 
1609 
1610 
1611 //=================================================================================================
1612 //
1613 // ROWS SPECIALIZATIONS
1614 //
1615 //=================================================================================================
1616 
1617 //*************************************************************************************************
1619 template< typename MT, typename ST, bool SO >
1620 struct Rows< DMatScalarMultExpr<MT,ST,SO> > : public Columns<MT>
1621 {};
1623 //*************************************************************************************************
1624 
1625 
1626 
1627 
1628 //=================================================================================================
1629 //
1630 // COLUMNS SPECIALIZATIONS
1631 //
1632 //=================================================================================================
1633 
1634 //*************************************************************************************************
1636 template< typename MT, typename ST, bool SO >
1637 struct Columns< DMatScalarMultExpr<MT,ST,SO> > : public Rows<MT>
1638 {};
1640 //*************************************************************************************************
1641 
1642 
1643 
1644 
1645 //=================================================================================================
1646 //
1647 // ISSYMMETRIC SPECIALIZATIONS
1648 //
1649 //=================================================================================================
1650 
1651 //*************************************************************************************************
1653 template< typename MT, typename ST, bool SO >
1654 struct IsSymmetric< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsSymmetric<MT>::value >
1655 {};
1657 //*************************************************************************************************
1658 
1659 
1660 
1661 
1662 //=================================================================================================
1663 //
1664 // ISLOWER SPECIALIZATIONS
1665 //
1666 //=================================================================================================
1667 
1668 //*************************************************************************************************
1670 template< typename MT, typename ST, bool SO >
1671 struct IsLower< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsLower<MT>::value >
1672 {};
1674 //*************************************************************************************************
1675 
1676 
1677 
1678 
1679 //=================================================================================================
1680 //
1681 // ISSTRICTLYLOWER SPECIALIZATIONS
1682 //
1683 //=================================================================================================
1684 
1685 //*************************************************************************************************
1687 template< typename MT, typename ST, bool SO >
1688 struct IsStrictlyLower< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsStrictlyLower<MT>::value >
1689 {};
1691 //*************************************************************************************************
1692 
1693 
1694 
1695 
1696 //=================================================================================================
1697 //
1698 // ISUPPER SPECIALIZATIONS
1699 //
1700 //=================================================================================================
1701 
1702 //*************************************************************************************************
1704 template< typename MT, typename ST, bool SO >
1705 struct IsUpper< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsUpper<MT>::value >
1706 {};
1708 //*************************************************************************************************
1709 
1710 
1711 
1712 
1713 //=================================================================================================
1714 //
1715 // ISSTRICTLYUPPER SPECIALIZATIONS
1716 //
1717 //=================================================================================================
1718 
1719 //*************************************************************************************************
1721 template< typename MT, typename ST, bool SO >
1722 struct IsStrictlyUpper< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsStrictlyUpper<MT>::value >
1723 {};
1725 //*************************************************************************************************
1726 
1727 
1728 
1729 
1730 //=================================================================================================
1731 //
1732 // DMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1733 //
1734 //=================================================================================================
1735 
1736 //*************************************************************************************************
1738 template< typename MT, typename ST1, typename ST2 >
1739 struct DMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1740 {
1741  public:
1742  //**********************************************************************************************
1743  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1744  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1745  , typename DMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1746  , INVALID_TYPE >::Type Type;
1747  //**********************************************************************************************
1748 };
1750 //*************************************************************************************************
1751 
1752 
1753 
1754 
1755 //=================================================================================================
1756 //
1757 // TDMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1758 //
1759 //=================================================================================================
1760 
1761 //*************************************************************************************************
1763 template< typename MT, typename ST1, typename ST2 >
1764 struct TDMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1765 {
1766  public:
1767  //**********************************************************************************************
1768  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1769  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1770  , typename TDMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1771  , INVALID_TYPE >::Type Type;
1772  //**********************************************************************************************
1773 };
1775 //*************************************************************************************************
1776 
1777 
1778 
1779 
1780 //=================================================================================================
1781 //
1782 // DMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1783 //
1784 //=================================================================================================
1785 
1786 //*************************************************************************************************
1788 template< typename MT, typename ST1, typename ST2 >
1789 struct DMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1790 {
1791  private:
1792  //**********************************************************************************************
1793  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1794  //**********************************************************************************************
1795 
1796  //**********************************************************************************************
1797  typedef typename DMatScalarMultExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1798  typedef typename DMatScalarDivExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1799  //**********************************************************************************************
1800 
1801  public:
1802  //**********************************************************************************************
1803  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1804  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1805  , typename SelectType<condition,T1,T2>::Type
1806  , INVALID_TYPE >::Type Type;
1807  //**********************************************************************************************
1808 };
1810 //*************************************************************************************************
1811 
1812 
1813 
1814 
1815 //=================================================================================================
1816 //
1817 // TDMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1818 //
1819 //=================================================================================================
1820 
1821 //*************************************************************************************************
1823 template< typename MT, typename ST1, typename ST2 >
1824 struct TDMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1825 {
1826  private:
1827  //**********************************************************************************************
1828  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1829  //**********************************************************************************************
1830 
1831  //**********************************************************************************************
1832  typedef typename TDMatScalarMultExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1833  typedef typename TDMatScalarDivExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1834  //**********************************************************************************************
1835 
1836  public:
1837  //**********************************************************************************************
1838  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1839  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1840  , typename SelectType<condition,T1,T2>::Type
1841  , INVALID_TYPE >::Type Type;
1842  //**********************************************************************************************
1843 };
1845 //*************************************************************************************************
1846 
1847 
1848 
1849 
1850 //=================================================================================================
1851 //
1852 // DMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1853 //
1854 //=================================================================================================
1855 
1856 //*************************************************************************************************
1858 template< typename MT, typename ST, typename VT >
1859 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1860 {
1861  public:
1862  //**********************************************************************************************
1863  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1864  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1865  IsNumeric<ST>::value
1866  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1867  , INVALID_TYPE >::Type Type;
1868  //**********************************************************************************************
1869 };
1871 //*************************************************************************************************
1872 
1873 
1874 //*************************************************************************************************
1876 template< typename MT, typename ST1, typename VT, typename ST2 >
1877 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, DVecScalarMultExpr<VT,ST2,false> >
1878 {
1879  public:
1880  //**********************************************************************************************
1881  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1882  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1883  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1884  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1885  , INVALID_TYPE >::Type Type;
1886  //**********************************************************************************************
1887 };
1889 //*************************************************************************************************
1890 
1891 
1892 
1893 
1894 //=================================================================================================
1895 //
1896 // TDMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1897 //
1898 //=================================================================================================
1899 
1900 //*************************************************************************************************
1902 template< typename MT, typename ST, typename VT >
1903 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1904 {
1905  public:
1906  //**********************************************************************************************
1907  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1908  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1909  IsNumeric<ST>::value
1910  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1911  , INVALID_TYPE >::Type Type;
1912  //**********************************************************************************************
1913 };
1915 //*************************************************************************************************
1916 
1917 
1918 //*************************************************************************************************
1920 template< typename MT, typename ST1, typename VT, typename ST2 >
1921 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, DVecScalarMultExpr<VT,ST2,false> >
1922 {
1923  public:
1924  //**********************************************************************************************
1925  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1926  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1927  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1928  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1929  , INVALID_TYPE >::Type Type;
1930  //**********************************************************************************************
1931 };
1933 //*************************************************************************************************
1934 
1935 
1936 
1937 
1938 //=================================================================================================
1939 //
1940 // TDVECDMATMULTEXPRTRAIT SPECIALIZATIONS
1941 //
1942 //=================================================================================================
1943 
1944 //*************************************************************************************************
1946 template< typename VT, typename MT, typename ST >
1947 struct TDVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
1948 {
1949  public:
1950  //**********************************************************************************************
1951  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1952  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1953  IsNumeric<ST>::value
1954  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
1955  , INVALID_TYPE >::Type Type;
1956  //**********************************************************************************************
1957 };
1959 //*************************************************************************************************
1960 
1961 
1962 //*************************************************************************************************
1964 template< typename VT, typename ST1, typename MT, typename ST2 >
1965 struct TDVecDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
1966 {
1967  public:
1968  //**********************************************************************************************
1969  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1970  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1971  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1972  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1973  , INVALID_TYPE >::Type Type;
1974  //**********************************************************************************************
1975 };
1977 //*************************************************************************************************
1978 
1979 
1980 
1981 
1982 //=================================================================================================
1983 //
1984 // TDVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
1985 //
1986 //=================================================================================================
1987 
1988 //*************************************************************************************************
1990 template< typename VT, typename MT, typename ST >
1991 struct TDVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
1992 {
1993  public:
1994  //**********************************************************************************************
1995  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1996  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1997  IsNumeric<ST>::value
1998  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
1999  , INVALID_TYPE >::Type Type;
2000  //**********************************************************************************************
2001 };
2003 //*************************************************************************************************
2004 
2005 
2006 //*************************************************************************************************
2008 template< typename VT, typename ST1, typename MT, typename ST2 >
2009 struct TDVecTDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2010 {
2011  public:
2012  //**********************************************************************************************
2013  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2014  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2015  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2016  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2017  , INVALID_TYPE >::Type Type;
2018  //**********************************************************************************************
2019 };
2021 //*************************************************************************************************
2022 
2023 
2024 
2025 
2026 //=================================================================================================
2027 //
2028 // DMATSVECMULTEXPRTRAIT SPECIALIZATIONS
2029 //
2030 //=================================================================================================
2031 
2032 //*************************************************************************************************
2034 template< typename MT, typename ST, typename VT >
2035 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
2036 {
2037  public:
2038  //**********************************************************************************************
2039  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2040  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2041  IsNumeric<ST>::value
2042  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
2043  , INVALID_TYPE >::Type Type;
2044  //**********************************************************************************************
2045 };
2047 //*************************************************************************************************
2048 
2049 
2050 //*************************************************************************************************
2052 template< typename MT, typename ST1, typename VT, typename ST2 >
2053 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, SVecScalarMultExpr<VT,ST2,false> >
2054 {
2055  public:
2056  //**********************************************************************************************
2057  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2058  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2059  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2060  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2061  , INVALID_TYPE >::Type Type;
2062  //**********************************************************************************************
2063 };
2065 //*************************************************************************************************
2066 
2067 
2068 
2069 
2070 //=================================================================================================
2071 //
2072 // TDMATSVECMULTEXPRTRAIT SPECIALIZATIONS
2073 //
2074 //=================================================================================================
2075 
2076 //*************************************************************************************************
2078 template< typename MT, typename ST, typename VT >
2079 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
2080 {
2081  public:
2082  //**********************************************************************************************
2083  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2084  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2085  IsNumeric<ST>::value
2086  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
2087  , INVALID_TYPE >::Type Type;
2088  //**********************************************************************************************
2089 };
2091 //*************************************************************************************************
2092 
2093 
2094 //*************************************************************************************************
2096 template< typename MT, typename ST1, typename VT, typename ST2 >
2097 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, SVecScalarMultExpr<VT,ST2,false> >
2098 {
2099  public:
2100  //**********************************************************************************************
2101  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2102  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2103  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2104  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2105  , INVALID_TYPE >::Type Type;
2106  //**********************************************************************************************
2107 };
2109 //*************************************************************************************************
2110 
2111 
2112 
2113 
2114 //=================================================================================================
2115 //
2116 // TSVECDMATMULTEXPRTRAIT SPECIALIZATIONS
2117 //
2118 //=================================================================================================
2119 
2120 //*************************************************************************************************
2122 template< typename VT, typename MT, typename ST >
2123 struct TSVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
2124 {
2125  public:
2126  //**********************************************************************************************
2127  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2128  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2129  IsNumeric<ST>::value
2130  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
2131  , INVALID_TYPE >::Type Type;
2132  //**********************************************************************************************
2133 };
2135 //*************************************************************************************************
2136 
2137 
2138 //*************************************************************************************************
2140 template< typename VT, typename ST1, typename MT, typename ST2 >
2141 struct TSVecDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
2142 {
2143  public:
2144  //**********************************************************************************************
2145  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2146  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2147  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2148  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2149  , INVALID_TYPE >::Type Type;
2150  //**********************************************************************************************
2151 };
2153 //*************************************************************************************************
2154 
2155 
2156 
2157 
2158 //=================================================================================================
2159 //
2160 // TSVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2161 //
2162 //=================================================================================================
2163 
2164 //*************************************************************************************************
2166 template< typename VT, typename MT, typename ST >
2167 struct TSVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
2168 {
2169  public:
2170  //**********************************************************************************************
2171  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2172  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2173  IsNumeric<ST>::value
2174  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
2175  , INVALID_TYPE >::Type Type;
2176  //**********************************************************************************************
2177 };
2179 //*************************************************************************************************
2180 
2181 
2182 //*************************************************************************************************
2184 template< typename VT, typename ST1, typename MT, typename ST2 >
2185 struct TSVecTDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2186 {
2187  public:
2188  //**********************************************************************************************
2189  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2190  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2191  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2192  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2193  , INVALID_TYPE >::Type Type;
2194  //**********************************************************************************************
2195 };
2197 //*************************************************************************************************
2198 
2199 
2200 
2201 
2202 //=================================================================================================
2203 //
2204 // DMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2205 //
2206 //=================================================================================================
2207 
2208 //*************************************************************************************************
2210 template< typename MT1, typename ST, typename MT2 >
2211 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2212 {
2213  public:
2214  //**********************************************************************************************
2215  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2216  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2217  IsNumeric<ST>::value
2218  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2219  , INVALID_TYPE >::Type Type;
2220  //**********************************************************************************************
2221 };
2223 //*************************************************************************************************
2224 
2225 
2226 //*************************************************************************************************
2228 template< typename MT1, typename MT2, typename ST >
2229 struct DMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2230 {
2231  public:
2232  //**********************************************************************************************
2233  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2234  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2235  IsNumeric<ST>::value
2236  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2237  , INVALID_TYPE >::Type Type;
2238  //**********************************************************************************************
2239 };
2241 //*************************************************************************************************
2242 
2243 
2244 //*************************************************************************************************
2246 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2247 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2248 {
2249  public:
2250  //**********************************************************************************************
2251  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2252  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2253  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2254  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2255  , INVALID_TYPE >::Type Type;
2256  //**********************************************************************************************
2257 };
2259 //*************************************************************************************************
2260 
2261 
2262 
2263 
2264 //=================================================================================================
2265 //
2266 // DMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2267 //
2268 //=================================================================================================
2269 
2270 //*************************************************************************************************
2272 template< typename MT1, typename ST, typename MT2 >
2273 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2274 {
2275  public:
2276  //**********************************************************************************************
2277  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2278  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2279  IsNumeric<ST>::value
2280  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2281  , INVALID_TYPE >::Type Type;
2282  //**********************************************************************************************
2283 };
2285 //*************************************************************************************************
2286 
2287 
2288 //*************************************************************************************************
2290 template< typename MT1, typename MT2, typename ST >
2291 struct DMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2292 {
2293  public:
2294  //**********************************************************************************************
2295  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2296  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2297  IsNumeric<ST>::value
2298  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2299  , INVALID_TYPE >::Type Type;
2300  //**********************************************************************************************
2301 };
2303 //*************************************************************************************************
2304 
2305 
2306 //*************************************************************************************************
2308 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2309 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2310 {
2311  public:
2312  //**********************************************************************************************
2313  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2314  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2315  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2316  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2317  , INVALID_TYPE >::Type Type;
2318  //**********************************************************************************************
2319 };
2321 //*************************************************************************************************
2322 
2323 
2324 
2325 
2326 //=================================================================================================
2327 //
2328 // TDMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2329 //
2330 //=================================================================================================
2331 
2332 //*************************************************************************************************
2334 template< typename MT1, typename ST, typename MT2 >
2335 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2336 {
2337  public:
2338  //**********************************************************************************************
2339  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2340  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2341  IsNumeric<ST>::value
2342  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2343  , INVALID_TYPE >::Type Type;
2344  //**********************************************************************************************
2345 };
2347 //*************************************************************************************************
2348 
2349 
2350 //*************************************************************************************************
2352 template< typename MT1, typename MT2, typename ST >
2353 struct TDMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2354 {
2355  public:
2356  //**********************************************************************************************
2357  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2358  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2359  IsNumeric<ST>::value
2360  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2361  , INVALID_TYPE >::Type Type;
2362  //**********************************************************************************************
2363 };
2365 //*************************************************************************************************
2366 
2367 
2368 //*************************************************************************************************
2370 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2371 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2372 {
2373  public:
2374  //**********************************************************************************************
2375  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2376  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2377  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2378  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2379  , INVALID_TYPE >::Type Type;
2380  //**********************************************************************************************
2381 };
2383 //*************************************************************************************************
2384 
2385 
2386 
2387 
2388 //=================================================================================================
2389 //
2390 // TDMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2391 //
2392 //=================================================================================================
2393 
2394 //*************************************************************************************************
2396 template< typename MT1, typename ST, typename MT2 >
2397 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2398 {
2399  public:
2400  //**********************************************************************************************
2401  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2402  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2403  IsNumeric<ST>::value
2404  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2405  , INVALID_TYPE >::Type Type;
2406  //**********************************************************************************************
2407 };
2409 //*************************************************************************************************
2410 
2411 
2412 //*************************************************************************************************
2414 template< typename MT1, typename MT2, typename ST >
2415 struct TDMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2416 {
2417  public:
2418  //**********************************************************************************************
2419  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2420  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2421  IsNumeric<ST>::value
2422  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2423  , INVALID_TYPE >::Type Type;
2424  //**********************************************************************************************
2425 };
2427 //*************************************************************************************************
2428 
2429 
2430 //*************************************************************************************************
2432 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2433 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2434 {
2435  public:
2436  //**********************************************************************************************
2437  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2438  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2439  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2440  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2441  , INVALID_TYPE >::Type Type;
2442  //**********************************************************************************************
2443 };
2445 //*************************************************************************************************
2446 
2447 
2448 
2449 
2450 //=================================================================================================
2451 //
2452 // DMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2453 //
2454 //=================================================================================================
2455 
2456 //*************************************************************************************************
2458 template< typename MT1, typename ST, typename MT2 >
2459 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2460 {
2461  public:
2462  //**********************************************************************************************
2463  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2464  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2465  IsNumeric<ST>::value
2466  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2467  , INVALID_TYPE >::Type Type;
2468  //**********************************************************************************************
2469 };
2471 //*************************************************************************************************
2472 
2473 
2474 //*************************************************************************************************
2476 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2477 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,false> >
2478 {
2479  public:
2480  //**********************************************************************************************
2481  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2482  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2483  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2484  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2485  , INVALID_TYPE >::Type Type;
2486  //**********************************************************************************************
2487 };
2489 //*************************************************************************************************
2490 
2491 
2492 
2493 
2494 //=================================================================================================
2495 //
2496 // DMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2497 //
2498 //=================================================================================================
2499 
2500 //*************************************************************************************************
2502 template< typename MT1, typename ST, typename MT2 >
2503 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2504 {
2505  public:
2506  //**********************************************************************************************
2507  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2508  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2509  IsNumeric<ST>::value
2510  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2511  , INVALID_TYPE >::Type Type;
2512  //**********************************************************************************************
2513 };
2515 //*************************************************************************************************
2516 
2517 
2518 //*************************************************************************************************
2520 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2521 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,true> >
2522 {
2523  public:
2524  //**********************************************************************************************
2525  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2526  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2527  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2528  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2529  , INVALID_TYPE >::Type Type;
2530  //**********************************************************************************************
2531 };
2533 //*************************************************************************************************
2534 
2535 
2536 
2537 
2538 //=================================================================================================
2539 //
2540 // TDMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2541 //
2542 //=================================================================================================
2543 
2544 //*************************************************************************************************
2546 template< typename MT1, typename ST, typename MT2 >
2547 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2548 {
2549  public:
2550  //**********************************************************************************************
2551  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2552  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2553  IsNumeric<ST>::value
2554  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2555  , INVALID_TYPE >::Type Type;
2556  //**********************************************************************************************
2557 };
2559 //*************************************************************************************************
2560 
2561 
2562 //*************************************************************************************************
2564 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2565 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,false> >
2566 {
2567  public:
2568  //**********************************************************************************************
2569  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2570  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2571  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2572  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2573  , INVALID_TYPE >::Type Type;
2574  //**********************************************************************************************
2575 };
2577 //*************************************************************************************************
2578 
2579 
2580 
2581 
2582 //=================================================================================================
2583 //
2584 // TDMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2585 //
2586 //=================================================================================================
2587 
2588 //*************************************************************************************************
2590 template< typename MT1, typename ST, typename MT2 >
2591 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2592 {
2593  public:
2594  //**********************************************************************************************
2595  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2596  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2597  IsNumeric<ST>::value
2598  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2599  , INVALID_TYPE >::Type Type;
2600  //**********************************************************************************************
2601 };
2603 //*************************************************************************************************
2604 
2605 
2606 //*************************************************************************************************
2608 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2609 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,true> >
2610 {
2611  public:
2612  //**********************************************************************************************
2613  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2614  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2615  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2616  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2617  , INVALID_TYPE >::Type Type;
2618  //**********************************************************************************************
2619 };
2621 //*************************************************************************************************
2622 
2623 
2624 
2625 
2626 //=================================================================================================
2627 //
2628 // SMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2629 //
2630 //=================================================================================================
2631 
2632 //*************************************************************************************************
2634 template< typename MT1, typename ST, typename MT2 >
2635 struct SMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2636 {
2637  public:
2638  //**********************************************************************************************
2639  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2640  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2641  IsNumeric<ST>::value
2642  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2643  , INVALID_TYPE >::Type Type;
2644  //**********************************************************************************************
2645 };
2647 //*************************************************************************************************
2648 
2649 
2650 //*************************************************************************************************
2652 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2653 struct SMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2654 {
2655  public:
2656  //**********************************************************************************************
2657  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2658  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2659  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2660  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2661  , INVALID_TYPE >::Type Type;
2662  //**********************************************************************************************
2663 };
2665 //*************************************************************************************************
2666 
2667 
2668 
2669 
2670 //=================================================================================================
2671 //
2672 // SMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2673 //
2674 //=================================================================================================
2675 
2676 //*************************************************************************************************
2678 template< typename MT1, typename ST, typename MT2 >
2679 struct SMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2680 {
2681  public:
2682  //**********************************************************************************************
2683  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2684  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2685  IsNumeric<ST>::value
2686  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2687  , INVALID_TYPE >::Type Type;
2688  //**********************************************************************************************
2689 };
2691 //*************************************************************************************************
2692 
2693 
2694 //*************************************************************************************************
2696 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2697 struct SMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2698 {
2699  public:
2700  //**********************************************************************************************
2701  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2702  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2703  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2704  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2705  , INVALID_TYPE >::Type Type;
2706  //**********************************************************************************************
2707 };
2709 //*************************************************************************************************
2710 
2711 
2712 
2713 
2714 //=================================================================================================
2715 //
2716 // TSMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2717 //
2718 //=================================================================================================
2719 
2720 //*************************************************************************************************
2722 template< typename MT1, typename ST, typename MT2 >
2723 struct TSMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2724 {
2725  public:
2726  //**********************************************************************************************
2727  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2728  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2729  IsNumeric<ST>::value
2730  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2731  , INVALID_TYPE >::Type Type;
2732  //**********************************************************************************************
2733 };
2735 //*************************************************************************************************
2736 
2737 
2738 //*************************************************************************************************
2740 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2741 struct TSMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2742 {
2743  public:
2744  //**********************************************************************************************
2745  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2746  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2747  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2748  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2749  , INVALID_TYPE >::Type Type;
2750  //**********************************************************************************************
2751 };
2753 //*************************************************************************************************
2754 
2755 
2756 
2757 
2758 //=================================================================================================
2759 //
2760 // TSMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2761 //
2762 //=================================================================================================
2763 
2764 //*************************************************************************************************
2766 template< typename MT1, typename ST, typename MT2 >
2767 struct TSMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2768 {
2769  public:
2770  //**********************************************************************************************
2771  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2772  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2773  IsNumeric<ST>::value
2774  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2775  , INVALID_TYPE >::Type Type;
2776  //**********************************************************************************************
2777 };
2779 //*************************************************************************************************
2780 
2781 
2782 //*************************************************************************************************
2784 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2785 struct TSMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2786 {
2787  public:
2788  //**********************************************************************************************
2789  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2790  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2791  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2792  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2793  , INVALID_TYPE >::Type Type;
2794  //**********************************************************************************************
2795 };
2797 //*************************************************************************************************
2798 
2799 
2800 
2801 
2802 //=================================================================================================
2803 //
2804 // SUBMATRIXEXPRTRAIT SPECIALIZATIONS
2805 //
2806 //=================================================================================================
2807 
2808 //*************************************************************************************************
2810 template< typename MT, typename ST, bool SO, bool AF >
2811 struct SubmatrixExprTrait< DMatScalarMultExpr<MT,ST,SO>, AF >
2812 {
2813  public:
2814  //**********************************************************************************************
2815  typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type, ST >::Type Type;
2816  //**********************************************************************************************
2817 };
2819 //*************************************************************************************************
2820 
2821 
2822 
2823 
2824 //=================================================================================================
2825 //
2826 // ROWEXPRTRAIT SPECIALIZATIONS
2827 //
2828 //=================================================================================================
2829 
2830 //*************************************************************************************************
2832 template< typename MT, typename ST, bool SO >
2833 struct RowExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2834 {
2835  public:
2836  //**********************************************************************************************
2837  typedef typename MultExprTrait< typename RowExprTrait<const MT>::Type, ST >::Type Type;
2838  //**********************************************************************************************
2839 };
2841 //*************************************************************************************************
2842 
2843 
2844 
2845 
2846 //=================================================================================================
2847 //
2848 // COLUMNEXPRTRAIT SPECIALIZATIONS
2849 //
2850 //=================================================================================================
2851 
2852 //*************************************************************************************************
2854 template< typename MT, typename ST, bool SO >
2855 struct ColumnExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2856 {
2857  public:
2858  //**********************************************************************************************
2859  typedef typename MultExprTrait< typename ColumnExprTrait<const MT>::Type, ST >::Type Type;
2860  //**********************************************************************************************
2861 };
2863 //*************************************************************************************************
2864 
2865 } // namespace blaze
2866 
2867 #endif
LeftOperand leftOperand() const
Returns the left-hand side dense matrix operand.
Definition: DMatScalarMultExpr.h:539
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:215
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatScalarMultExpr.h:311
Pointer difference type of the Blaze library.
DifferenceType difference_type
Difference between two iterators.
Definition: DMatScalarMultExpr.h:212
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:432
Header file for the Rows type trait.
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:8247
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:939
MultExprTrait< RN, ST >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DMatScalarMultExpr.h:135
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
MT::ResultType RT
Result type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:119
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatScalarMultExpr.h:583
ReferenceType reference
Reference return type.
Definition: DMatScalarMultExpr.h:211
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatScalarMultExpr.h:259
Header file for the IsSparseMatrix type trait.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatScalarMultExpr.h:291
#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:209
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:377
#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:602
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:261
IteratorCategory iterator_category
The iterator category.
Definition: DMatScalarMultExpr.h:208
SelectType< useAssign, const ResultType, const DMatScalarMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatScalarMultExpr.h:185
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:120
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
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:388
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:301
Constraint on the data type.
Header file for the DivExprTrait class template.
ElementType ValueType
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:202
Constraint on the data type.
Header file for the MultExprTrait class template.
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:263
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatScalarMultExpr.h:593
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:205
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatScalarMultExpr.h:519
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:344
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:466
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
Expression object for dense matrix-scalar multiplications.The DMatScalarMultExpr class represents the...
Definition: DMatScalarMultExpr.h:113
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatScalarMultExpr.h:561
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatScalarMultExpr.h:236
IteratorType iterator_
Iterator to the current element.
Definition: DMatScalarMultExpr.h:431
Header file for the DenseMatrix base class.
BLAZE_ALWAYS_INLINE 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:635
Header file for the Columns type trait.
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:366
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DMatScalarMultExpr.h:182
#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
Header file for the IsLower type trait.
ElementType * PointerType
Pointer return type.
Definition: DMatScalarMultExpr.h:203
#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:322
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatScalarMultExpr.h:188
Constraints on the storage order of matrix types.
LeftOperand matrix_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatScalarMultExpr.h:601
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
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:509
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatScalarMultExpr.h:424
Header file for the serial shim.
Header file for the BaseElementType type trait.
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatScalarMultExpr.h:480
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatScalarMultExpr.h:529
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DMatScalarMultExpr.h:224
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatScalarMultExpr.h:412
Header file for the IsNumeric type trait.
ResultType::ElementType ElementType
Resulting element type.
Definition: DMatScalarMultExpr.h:178
ElementType & ReferenceType
Reference return type.
Definition: DMatScalarMultExpr.h:204
RightOperand rightOperand() const
Returns the right-hand side scalar operand.
Definition: DMatScalarMultExpr.h:549
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseVector type trait.
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2506
Header file for the MatScalarMultExpr base class.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
MT::CompositeType CT
Composite type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:122
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:150
DMatScalarMultExpr(const MT &matrix, ST scalar)
Constructor for the DMatScalarMultExpr class.
Definition: DMatScalarMultExpr.h:453
BLAZE_ALWAYS_INLINE 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:742
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:573
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:248
#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
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatScalarMultExpr.h:498
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:333
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:355
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatScalarMultExpr.h:270
Evaluation of the base element type of a given data type.Via this type trait it is possible to evalua...
Definition: BaseElementType.h:80
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatScalarMultExpr.h:400
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatScalarMultExpr.h:280
MT::ElementType ET
Element type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:121
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:191
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatScalarMultExpr.h:177
#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:210
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
Header file for the IsTrue value trait.
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatScalarMultExpr.h:179
Iterator over the elements of the dense matrix.
Definition: DMatScalarMultExpr.h:197
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatScalarMultExpr.h:201
Header file for the IsUpper type trait.
MultTrait< RT, ST >::Type ResultType
Result type for expression template evaluations.
Definition: DMatScalarMultExpr.h:175
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatScalarMultExpr.h:176
DMatScalarMultExpr< MT, ST, SO > This
Type of this DMatScalarMultExpr instance.
Definition: DMatScalarMultExpr.h:174
System settings for the inline keywords.
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
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE 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:849
ValueType value_type
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:209