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>
85 #include <blaze/system/Inline.h>
87 #include <blaze/util/Assert.h>
91 #include <blaze/util/EnableIf.h>
92 #include <blaze/util/Exception.h>
93 #include <blaze/util/InvalidType.h>
95 #include <blaze/util/mpl/And.h>
96 #include <blaze/util/SelectType.h>
97 #include <blaze/util/Types.h>
101 
102 
103 namespace blaze {
104 
105 //=================================================================================================
106 //
107 // CLASS DMATSCALARMULTEXPR
108 //
109 //=================================================================================================
110 
111 //*************************************************************************************************
118 template< typename MT // Type of the left-hand side dense matrix
119  , typename ST // Type of the right-hand side scalar value
120  , bool SO > // Storage order
121 class DMatScalarMultExpr : public DenseMatrix< DMatScalarMultExpr<MT,ST,SO>, SO >
122  , private MatScalarMultExpr
123  , private Computation
124 {
125  private:
126  //**Type definitions****************************************************************************
127  typedef typename MT::ResultType RT;
128  typedef typename MT::ReturnType RN;
129  typedef typename MT::ElementType ET;
130  typedef typename MT::CompositeType CT;
131  //**********************************************************************************************
132 
133  //**Return type evaluation**********************************************************************
135 
140  enum { returnExpr = !IsTemporary<RN>::value };
141 
144  //**********************************************************************************************
145 
146  //**Serial evaluation strategy******************************************************************
148 
155 
157  template< typename MT2 >
159  struct UseAssign {
160  enum { value = useAssign };
161  };
163  //**********************************************************************************************
164 
165  //**Parallel evaluation strategy****************************************************************
167 
173  template< typename MT2 >
174  struct UseSMPAssign {
175  enum { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
176  };
178  //**********************************************************************************************
179 
180  public:
181  //**Type definitions****************************************************************************
188 
191 
194 
196  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type LeftOperand;
197 
199  typedef ST RightOperand;
200  //**********************************************************************************************
201 
202  //**ConstIterator class definition**************************************************************
206  {
207  public:
208  //**Type definitions*************************************************************************
209  typedef std::random_access_iterator_tag IteratorCategory;
210  typedef ElementType ValueType;
211  typedef ElementType* PointerType;
212  typedef ElementType& ReferenceType;
214 
215  // STL iterator requirements
216  typedef IteratorCategory iterator_category;
217  typedef ValueType value_type;
218  typedef PointerType pointer;
219  typedef ReferenceType reference;
220  typedef DifferenceType difference_type;
221 
223  typedef typename MT::ConstIterator IteratorType;
224  //*******************************************************************************************
225 
226  //**Constructor******************************************************************************
232  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
233  : iterator_( iterator ) // Iterator to the current element
234  , scalar_ ( scalar ) // Scalar of the multiplication expression
235  {}
236  //*******************************************************************************************
237 
238  //**Addition assignment operator*************************************************************
244  inline ConstIterator& operator+=( size_t inc ) {
245  iterator_ += inc;
246  return *this;
247  }
248  //*******************************************************************************************
249 
250  //**Subtraction assignment operator**********************************************************
256  inline ConstIterator& operator-=( size_t dec ) {
257  iterator_ -= dec;
258  return *this;
259  }
260  //*******************************************************************************************
261 
262  //**Prefix increment operator****************************************************************
268  ++iterator_;
269  return *this;
270  }
271  //*******************************************************************************************
272 
273  //**Postfix increment operator***************************************************************
278  inline const ConstIterator operator++( int ) {
279  return ConstIterator( iterator_++ );
280  }
281  //*******************************************************************************************
282 
283  //**Prefix decrement operator****************************************************************
289  --iterator_;
290  return *this;
291  }
292  //*******************************************************************************************
293 
294  //**Postfix decrement operator***************************************************************
299  inline const ConstIterator operator--( int ) {
300  return ConstIterator( iterator_-- );
301  }
302  //*******************************************************************************************
303 
304  //**Element access operator******************************************************************
309  inline ReturnType operator*() const {
310  return *iterator_ * scalar_;
311  }
312  //*******************************************************************************************
313 
314  //**Load function****************************************************************************
319  inline IntrinsicType load() const {
320  return iterator_.load() * set( scalar_ );
321  }
322  //*******************************************************************************************
323 
324  //**Equality operator************************************************************************
330  inline bool operator==( const ConstIterator& rhs ) const {
331  return iterator_ == rhs.iterator_;
332  }
333  //*******************************************************************************************
334 
335  //**Inequality operator**********************************************************************
341  inline bool operator!=( const ConstIterator& rhs ) const {
342  return iterator_ != rhs.iterator_;
343  }
344  //*******************************************************************************************
345 
346  //**Less-than operator***********************************************************************
352  inline bool operator<( const ConstIterator& rhs ) const {
353  return iterator_ < rhs.iterator_;
354  }
355  //*******************************************************************************************
356 
357  //**Greater-than operator********************************************************************
363  inline bool operator>( const ConstIterator& rhs ) const {
364  return iterator_ > rhs.iterator_;
365  }
366  //*******************************************************************************************
367 
368  //**Less-or-equal-than operator**************************************************************
374  inline bool operator<=( const ConstIterator& rhs ) const {
375  return iterator_ <= rhs.iterator_;
376  }
377  //*******************************************************************************************
378 
379  //**Greater-or-equal-than operator***********************************************************
385  inline bool operator>=( const ConstIterator& rhs ) const {
386  return iterator_ >= rhs.iterator_;
387  }
388  //*******************************************************************************************
389 
390  //**Subtraction operator*********************************************************************
396  inline DifferenceType operator-( const ConstIterator& rhs ) const {
397  return iterator_ - rhs.iterator_;
398  }
399  //*******************************************************************************************
400 
401  //**Addition operator************************************************************************
408  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
409  return ConstIterator( it.iterator_ + inc, it.scalar_ );
410  }
411  //*******************************************************************************************
412 
413  //**Addition operator************************************************************************
420  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
421  return ConstIterator( it.iterator_ + inc, it.scalar_ );
422  }
423  //*******************************************************************************************
424 
425  //**Subtraction operator*********************************************************************
432  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
433  return ConstIterator( it.iterator_ - dec, it.scalar_ );
434  }
435  //*******************************************************************************************
436 
437  private:
438  //**Member variables*************************************************************************
439  IteratorType iterator_;
440  RightOperand scalar_;
441  //*******************************************************************************************
442  };
443  //**********************************************************************************************
444 
445  //**Compilation flags***************************************************************************
447  enum { vectorizable = MT::vectorizable &&
450  IsSame<typename UnderlyingElement<ET>::Type,RightOperand>::value ) &&
452 
454  enum { smpAssignable = MT::smpAssignable };
455  //**********************************************************************************************
456 
457  //**Constructor*********************************************************************************
463  explicit inline DMatScalarMultExpr( const MT& matrix, ST scalar )
464  : matrix_( matrix ) // Left-hand side dense matrix of the multiplication expression
465  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
466  {}
467  //**********************************************************************************************
468 
469  //**Access operator*****************************************************************************
476  inline ReturnType operator()( size_t i, size_t j ) const {
477  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
478  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
479  return matrix_(i,j) * scalar_;
480  }
481  //**********************************************************************************************
482 
483  //**At function*********************************************************************************
491  inline ReturnType at( size_t i, size_t j ) const {
492  if( i >= matrix_.rows() ) {
493  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
494  }
495  if( j >= matrix_.columns() ) {
496  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
497  }
498  return (*this)(i,j);
499  }
500  //**********************************************************************************************
501 
502  //**Load function*******************************************************************************
509  BLAZE_ALWAYS_INLINE IntrinsicType load( size_t i, size_t j ) const {
510  typedef IntrinsicTrait<ElementType> IT;
511  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
512  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
513  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
514  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
515  return matrix_.load(i,j) * set( scalar_ );
516  }
517  //**********************************************************************************************
518 
519  //**Begin function******************************************************************************
525  inline ConstIterator begin( size_t i ) const {
526  return ConstIterator( matrix_.begin(i), scalar_ );
527  }
528  //**********************************************************************************************
529 
530  //**End function********************************************************************************
536  inline ConstIterator end( size_t i ) const {
537  return ConstIterator( matrix_.end(i), scalar_ );
538  }
539  //**********************************************************************************************
540 
541  //**Rows function*******************************************************************************
546  inline size_t rows() const {
547  return matrix_.rows();
548  }
549  //**********************************************************************************************
550 
551  //**Columns function****************************************************************************
556  inline size_t columns() const {
557  return matrix_.columns();
558  }
559  //**********************************************************************************************
560 
561  //**Left operand access*************************************************************************
566  inline LeftOperand leftOperand() const {
567  return matrix_;
568  }
569  //**********************************************************************************************
570 
571  //**Right operand access************************************************************************
576  inline RightOperand rightOperand() const {
577  return scalar_;
578  }
579  //**********************************************************************************************
580 
581  //**********************************************************************************************
587  template< typename T >
588  inline bool canAlias( const T* alias ) const {
589  return IsComputation<MT>::value && matrix_.canAlias( alias );
590  }
591  //**********************************************************************************************
592 
593  //**********************************************************************************************
599  template< typename T >
600  inline bool isAliased( const T* alias ) const {
601  return matrix_.isAliased( alias );
602  }
603  //**********************************************************************************************
604 
605  //**********************************************************************************************
610  inline bool isAligned() const {
611  return matrix_.isAligned();
612  }
613  //**********************************************************************************************
614 
615  //**********************************************************************************************
620  inline bool canSMPAssign() const {
621  return matrix_.canSMPAssign() ||
622  ( ( ( SO == rowMajor ) ? rows() : columns() ) > SMP_DMATSCALARMULT_THRESHOLD );
623  }
624  //**********************************************************************************************
625 
626  private:
627  //**Member variables****************************************************************************
628  LeftOperand matrix_;
629  RightOperand scalar_;
630  //**********************************************************************************************
631 
632  //**Assignment to dense matrices****************************************************************
646  template< typename MT2 // Type of the target dense matrix
647  , bool SO2 > // Storage order of the target dense matrix
648  friend inline typename EnableIf< UseAssign<MT2> >::Type
649  assign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
650  {
652 
653  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
654  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
655 
656  assign( ~lhs, rhs.matrix_ );
657  assign( ~lhs, (~lhs) * rhs.scalar_ );
658  }
660  //**********************************************************************************************
661 
662  //**Assignment to sparse matrices***************************************************************
676  template< typename MT2 // Type of the target sparse matrix
677  , bool SO2 > // Storage order of the target sparse matrix
678  friend inline typename EnableIf< UseAssign<MT2> >::Type
679  assign( SparseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
680  {
682 
683  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
684  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
685 
686  assign( ~lhs, rhs.matrix_ );
687  (~lhs) *= rhs.scalar_;
688  }
690  //**********************************************************************************************
691 
692  //**Addition assignment to dense matrices*******************************************************
706  template< typename MT2 // Type of the target dense matrix
707  , bool SO2 > // Storage order of the target dense matrix
708  friend inline typename EnableIf< UseAssign<MT2> >::Type
709  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
710  {
712 
716 
717  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
718  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
719 
720  const ResultType tmp( serial( rhs ) );
721  addAssign( ~lhs, tmp );
722  }
724  //**********************************************************************************************
725 
726  //**Addition assignment to sparse matrices******************************************************
727  // No special implementation for the addition assignment to sparse matrices.
728  //**********************************************************************************************
729 
730  //**Subtraction assignment to dense matrices****************************************************
744  template< typename MT2 // Type of the target dense matrix
745  , bool SO2 > // Storage order of the target dense matrix
746  friend inline typename EnableIf< UseAssign<MT2> >::Type
747  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
748  {
750 
754 
755  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
756  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
757 
758  const ResultType tmp( serial( rhs ) );
759  subAssign( ~lhs, tmp );
760  }
762  //**********************************************************************************************
763 
764  //**Subtraction assignment to sparse matrices***************************************************
765  // No special implementation for the subtraction assignment to sparse matrices.
766  //**********************************************************************************************
767 
768  //**Multiplication assignment to dense matrices*************************************************
769  // No special implementation for the multiplication assignment to dense matrices.
770  //**********************************************************************************************
771 
772  //**Multiplication assignment to sparse matrices************************************************
773  // No special implementation for the multiplication assignment to sparse matrices.
774  //**********************************************************************************************
775 
776  //**SMP assignment to dense matrices************************************************************
790  template< typename MT2 // Type of the target dense matrix
791  , bool SO2 > // Storage order of the target dense matrix
792  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
793  smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
794  {
796 
797  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
798  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
799 
800  smpAssign( ~lhs, rhs.matrix_ );
801  smpAssign( ~lhs, (~lhs) * rhs.scalar_ );
802  }
804  //**********************************************************************************************
805 
806  //**SMP assignment to sparse matrices***********************************************************
820  template< typename MT2 // Type of the target sparse matrix
821  , bool SO2 > // Storage order of the target sparse matrix
822  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
823  smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
824  {
826 
827  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
828  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
829 
830  smpAssign( ~lhs, rhs.matrix_ );
831  (~lhs) *= rhs.scalar_;
832  }
834  //**********************************************************************************************
835 
836  //**SMP addition assignment to dense matrices***************************************************
850  template< typename MT2 // Type of the target dense matrix
851  , bool SO2 > // Storage order of the target dense matrix
852  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
853  smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
854  {
856 
860 
861  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
862  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
863 
864  const ResultType tmp( rhs );
865  smpAddAssign( ~lhs, tmp );
866  }
868  //**********************************************************************************************
869 
870  //**SMP addition assignment to sparse matrices**************************************************
871  // No special implementation for the SMP addition assignment to sparse matrices.
872  //**********************************************************************************************
873 
874  //**SMP subtraction assignment to dense matrices************************************************
888  template< typename MT2 // Type of the target dense matrix
889  , bool SO2 > // Storage order of the target dense matrix
890  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
891  smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
892  {
894 
898 
899  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
900  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
901 
902  const ResultType tmp( rhs );
903  smpSubAssign( ~lhs, tmp );
904  }
906  //**********************************************************************************************
907 
908  //**SMP subtraction assignment to sparse matrices***********************************************
909  // No special implementation for the SMP subtraction assignment to sparse matrices.
910  //**********************************************************************************************
911 
912  //**SMP multiplication assignment to dense matrices*********************************************
913  // No special implementation for the SMP multiplication assignment to dense matrices.
914  //**********************************************************************************************
915 
916  //**SMP multiplication assignment to sparse matrices********************************************
917  // No special implementation for the SMP multiplication assignment to sparse matrices.
918  //**********************************************************************************************
919 
920  //**Compile time checks*************************************************************************
925  BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( ST, RightOperand );
927  //**********************************************************************************************
928 };
929 //*************************************************************************************************
930 
931 
932 
933 
934 //=================================================================================================
935 //
936 // GLOBAL UNARY ARITHMETIC OPERATORS
937 //
938 //=================================================================================================
939 
940 //*************************************************************************************************
957 template< typename MT // Type of the dense matrix
958  , bool SO > // Storage order
959 inline const DMatScalarMultExpr<MT,typename UnderlyingBuiltin<MT>::Type,SO>
961 {
963 
964  typedef typename UnderlyingBuiltin<MT>::Type ElementType;
966 }
967 //*************************************************************************************************
968 
969 
970 
971 
972 //=================================================================================================
973 //
974 // GLOBAL BINARY ARITHMETIC OPERATORS
975 //
976 //=================================================================================================
977 
978 //*************************************************************************************************
999 template< typename T1 // Type of the left-hand side dense matrix
1000  , bool SO // Storage order of the left-hand side dense matrix
1001  , typename T2 > // Type of the right-hand side scalar
1002 inline const typename EnableIf< IsNumeric<T2>, typename MultExprTrait<T1,T2>::Type >::Type
1003  operator*( const DenseMatrix<T1,SO>& mat, T2 scalar )
1004 {
1006 
1007  typedef typename MultExprTrait<T1,T2>::Type Type;
1008  return Type( ~mat, scalar );
1009 }
1010 //*************************************************************************************************
1011 
1012 
1013 //*************************************************************************************************
1034 template< typename T1 // Type of the left-hand side scalar
1035  , typename T2 // Type of the right-hand side dense matrix
1036  , bool SO > // Storage order of the right-hand side dense matrix
1037 inline const typename EnableIf< IsNumeric<T1>, typename MultExprTrait<T1,T2>::Type >::Type
1038  operator*( T1 scalar, const DenseMatrix<T2,SO>& mat )
1039 {
1041 
1042  typedef typename MultExprTrait<T1,T2>::Type Type;
1043  return Type( ~mat, scalar );
1044 }
1045 //*************************************************************************************************
1046 
1047 
1048 
1049 
1050 //=================================================================================================
1051 //
1052 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
1053 //
1054 //=================================================================================================
1055 
1056 //*************************************************************************************************
1068 template< typename VT // Type of the dense matrix
1069  , typename ST // Type of the scalar
1070  , bool TF > // Transpose flag
1071 inline const DMatScalarMultExpr<VT,ST,TF>
1072  operator-( const DMatScalarMultExpr<VT,ST,TF>& dm )
1073 {
1075 
1076  return DMatScalarMultExpr<VT,ST,TF>( dm.leftOperand(), -dm.rightOperand() );
1077 }
1079 //*************************************************************************************************
1080 
1081 
1082 
1083 
1084 //=================================================================================================
1085 //
1086 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1087 //
1088 //=================================================================================================
1089 
1090 //*************************************************************************************************
1103 template< typename MT // Type of the dense matrix of the left-hand side expression
1104  , typename ST1 // Type of the scalar of the left-hand side expression
1105  , bool SO // Storage order of the dense matrix
1106  , typename ST2 > // Type of the right-hand side scalar
1107 inline const typename EnableIf< IsNumeric<ST2>
1108  , typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
1109  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1110 {
1112 
1113  return mat.leftOperand() * ( mat.rightOperand() * scalar );
1114 }
1116 //*************************************************************************************************
1117 
1118 
1119 //*************************************************************************************************
1132 template< typename ST1 // Type of the left-hand side scalar
1133  , typename MT // Type of the dense matrix of the right-hand side expression
1134  , typename ST2 // Type of the scalar of the right-hand side expression
1135  , bool SO > // Storage order of the dense matrix
1136 inline const typename EnableIf< IsNumeric<ST1>
1137  , typename MultExprTrait< ST1, DMatScalarMultExpr<MT,ST2,SO> >::Type >::Type
1138  operator*( ST1 scalar, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1139 {
1141 
1142  return mat.leftOperand() * ( scalar * mat.rightOperand() );
1143 }
1145 //*************************************************************************************************
1146 
1147 
1148 //*************************************************************************************************
1161 template< typename MT // Type of the dense matrix of the left-hand side expression
1162  , typename ST1 // Type of the scalar of the left-hand side expression
1163  , bool SO // Storage order of the dense matrix
1164  , typename ST2 > // Type of the right-hand side scalar
1165 inline const typename EnableIf< And< IsNumeric<ST2>, IsInvertible< typename DivTrait<ST1,ST2>::Type > >
1166  , typename DivExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
1167  operator/( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1168 {
1170 
1171  return mat.leftOperand() * ( mat.rightOperand() / scalar );
1172 }
1174 //*************************************************************************************************
1175 
1176 
1177 //*************************************************************************************************
1191 template< typename MT // Type of the dense matrix of the left-hand side expression
1192  , typename ST // Type of the scalar of the left-hand side expression
1193  , bool SO // Storage order of the left-hand side expression
1194  , typename VT > // Type of the right-hand side dense vector
1195 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
1196  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const DenseVector<VT,false>& vec )
1197 {
1199 
1200  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1201 }
1203 //*************************************************************************************************
1204 
1205 
1206 //*************************************************************************************************
1220 template< typename VT // Type of the left-hand side dense vector
1221  , typename MT // Type of the dense matrix of the right-hand side expression
1222  , typename ST // Type of the scalar of the right-hand side expression
1223  , bool SO > // Storage order of the right-hand side expression
1224 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
1225  operator*( const DenseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
1226 {
1228 
1229  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1230 }
1232 //*************************************************************************************************
1233 
1234 
1235 //*************************************************************************************************
1251 template< typename MT // Type of the dense matrix of the left-hand side expression
1252  , typename ST1 // Type of the scalar of the left-hand side expression
1253  , bool SO // Storage order of the left-hand side expression
1254  , typename VT // Type of the dense vector of the right-hand side expression
1255  , typename ST2 > // Type of the scalar of the right-hand side expression
1256 inline const DVecScalarMultExpr<typename MultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type,false>
1257  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const DVecScalarMultExpr<VT,ST2,false>& vec )
1258 {
1260 
1261  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1262 }
1264 //*************************************************************************************************
1265 
1266 
1267 //*************************************************************************************************
1283 template< typename VT // Type of the dense vector of the left-hand side expression
1284  , typename ST1 // Type of the scalar of the left-hand side expression
1285  , typename MT // Type of the dense matrix of the right-hand side expression
1286  , typename ST2 // Type of the scalar of the right-hand side expression
1287  , bool SO > // Storage order of the right-hand side expression
1288 inline const typename MultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
1289  operator*( const DVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1290 {
1292 
1293  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
1294 }
1296 //*************************************************************************************************
1297 
1298 
1299 //*************************************************************************************************
1313 template< typename MT // Type of the dense matrix of the left-hand side expression
1314  , typename ST // Type of the scalar of the left-hand side expression
1315  , bool SO // Storage order of the left-hand side expression
1316  , typename VT > // Type of the right-hand side sparse vector
1317 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
1318  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const SparseVector<VT,false>& vec )
1319 {
1321 
1322  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1323 }
1325 //*************************************************************************************************
1326 
1327 
1328 //*************************************************************************************************
1342 template< typename VT // Type of the left-hand side sparse vector
1343  , typename MT // Type of the dense matrix of the right-hand side expression
1344  , typename ST // Type of the scalar of the right-hand side expression
1345  , bool SO > // Storage order of the right-hand side expression
1346 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
1347  operator*( const SparseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
1348 {
1350 
1351  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1352 }
1354 //*************************************************************************************************
1355 
1356 
1357 //*************************************************************************************************
1373 template< typename MT // Type of the dense matrix of the left-hand side expression
1374  , typename ST1 // Type of the scalar of the left-hand side expression
1375  , bool SO // Storage order of the left-hand side expression
1376  , typename VT // Type of the sparse vector of the right-hand side expression
1377  , typename ST2 > // Type of the scalar of the right-hand side expression
1378 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, SVecScalarMultExpr<VT,ST2,false> >::Type
1379  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const SVecScalarMultExpr<VT,ST2,false>& vec )
1380 {
1382 
1383  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1384 }
1386 //*************************************************************************************************
1387 
1388 
1389 //*************************************************************************************************
1405 template< typename VT // Type of the sparse vector of the left-hand side expression
1406  , typename ST1 // Type of the scalar of the left-hand side expression
1407  , typename MT // Type of the dense matrix of the right-hand side expression
1408  , typename ST2 // Type of the scalar of the right-hand side expression
1409  , bool SO > // Storage order of the right-hand side expression
1410 inline const typename MultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
1411  operator*( const SVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
1412 {
1414 
1415  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
1416 }
1418 //*************************************************************************************************
1419 
1420 
1421 //*************************************************************************************************
1435 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1436  , typename ST // Type of the scalar of the left-hand side expression
1437  , bool SO1 // Storage order of the left-hand side expression
1438  , typename MT2 // Type of the right-hand side dense matrix
1439  , bool SO2 > // Storage order of the right-hand side dense matrix
1440 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1441  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const DenseMatrix<MT2,SO2>& rhs )
1442 {
1444 
1445  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1446 }
1448 //*************************************************************************************************
1449 
1450 
1451 //*************************************************************************************************
1465 template< typename MT1 // Type of the left-hand side dense matrix
1466  , bool SO1 // Storage order of the left-hand side dense matrix
1467  , typename MT2 // Type of the dense matrix of the right-hand side expression
1468  , typename ST // Type of the scalar of the right-hand side expression
1469  , bool SO2 > // Storage order of the right-hand side expression
1470 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1471  operator*( const DenseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1472 {
1474 
1475  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1476 }
1478 //*************************************************************************************************
1479 
1480 
1481 //*************************************************************************************************
1495 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1496  , typename ST1 // Type of the scalar of the left-hand side expression
1497  , bool SO1 // Storage order of the left-hand side expression
1498  , typename MT2 // Type of the right-hand side dense matrix
1499  , typename ST2 // Type of the scalar of the right-hand side expression
1500  , bool SO2 > // Storage order of the right-hand side expression
1501 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1502  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST2,SO2>& rhs )
1503 {
1505 
1506  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1507 }
1509 //*************************************************************************************************
1510 
1511 
1512 //*************************************************************************************************
1526 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1527  , typename ST // Type of the scalar of the left-hand side expression
1528  , bool SO1 // Storage order of the left-hand side expression
1529  , typename MT2 // Type of the right-hand side sparse matrix
1530  , bool SO2 > // Storage order of the right-hand side sparse matrix
1531 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1532  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const SparseMatrix<MT2,SO2>& rhs )
1533 {
1535 
1536  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1537 }
1539 //*************************************************************************************************
1540 
1541 
1542 //*************************************************************************************************
1556 template< typename MT1 // Type of the left-hand side sparse matrix
1557  , bool SO1 // Storage order of the left-hand side sparse matrix
1558  , typename MT2 // Type of the dense matrix of the right-hand side expression
1559  , typename ST // Type of the scalar of the right-hand side expression
1560  , bool SO2 > // Storage order of the right-hand side expression
1561 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1562  operator*( const SparseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1563 {
1565 
1566  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1567 }
1569 //*************************************************************************************************
1570 
1571 
1572 //*************************************************************************************************
1587 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1588  , typename ST1 // Type of the scalar of the left-hand side expression
1589  , bool SO1 // Storage order of the left-hand side expression
1590  , typename MT2 // Type of the sparse matrix of the right-hand side expression
1591  , typename ST2 // Type of the scalar of the right-hand side expression
1592  , bool SO2 > // Storage order of the right-hand side expression
1593 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, SMatScalarMultExpr<MT2,ST2,SO2> >::Type
1594  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& mat, const SMatScalarMultExpr<MT2,ST2,SO2>& vec )
1595 {
1597 
1598  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1599 }
1601 //*************************************************************************************************
1602 
1603 
1604 //*************************************************************************************************
1619 template< typename MT1 // Type of the sparse matrix of the left-hand side expression
1620  , typename ST1 // Type of the scalar of the left-hand side expression
1621  , bool SO1 // Storage order of the left-hand side expression
1622  , typename MT2 // Type of the dense matrix of the right-hand side expression
1623  , typename ST2 // Type of the scalar of the right-hand side expression
1624  , bool SO2 > // Storage order of the right-hand side expression
1625 inline const typename MultExprTrait< SMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1626  operator*( const SMatScalarMultExpr<MT1,ST1,SO1>& mat, const DMatScalarMultExpr<MT2,ST2,SO2>& vec )
1627 {
1629 
1630  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1631 }
1633 //*************************************************************************************************
1634 
1635 
1636 
1637 
1638 //=================================================================================================
1639 //
1640 // ROWS SPECIALIZATIONS
1641 //
1642 //=================================================================================================
1643 
1644 //*************************************************************************************************
1646 template< typename MT, typename ST, bool SO >
1647 struct Rows< DMatScalarMultExpr<MT,ST,SO> > : public Columns<MT>
1648 {};
1650 //*************************************************************************************************
1651 
1652 
1653 
1654 
1655 //=================================================================================================
1656 //
1657 // COLUMNS SPECIALIZATIONS
1658 //
1659 //=================================================================================================
1660 
1661 //*************************************************************************************************
1663 template< typename MT, typename ST, bool SO >
1664 struct Columns< DMatScalarMultExpr<MT,ST,SO> > : public Rows<MT>
1665 {};
1667 //*************************************************************************************************
1668 
1669 
1670 
1671 
1672 //=================================================================================================
1673 //
1674 // ISALIGNED SPECIALIZATIONS
1675 //
1676 //=================================================================================================
1677 
1678 //*************************************************************************************************
1680 template< typename MT, typename ST, bool SO >
1681 struct IsAligned< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsAligned<MT>::value >
1682 {};
1684 //*************************************************************************************************
1685 
1686 
1687 
1688 
1689 //=================================================================================================
1690 //
1691 // ISPADDED SPECIALIZATIONS
1692 //
1693 //=================================================================================================
1694 
1695 //*************************************************************************************************
1697 template< typename MT, typename ST, bool SO >
1698 struct IsPadded< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsPadded<MT>::value >
1699 {};
1701 //*************************************************************************************************
1702 
1703 
1704 
1705 
1706 //=================================================================================================
1707 //
1708 // ISSYMMETRIC SPECIALIZATIONS
1709 //
1710 //=================================================================================================
1711 
1712 //*************************************************************************************************
1714 template< typename MT, typename ST, bool SO >
1715 struct IsSymmetric< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsSymmetric<MT>::value >
1716 {};
1718 //*************************************************************************************************
1719 
1720 
1721 
1722 
1723 //=================================================================================================
1724 //
1725 // ISHERMITIAN SPECIALIZATIONS
1726 //
1727 //=================================================================================================
1728 
1729 //*************************************************************************************************
1731 template< typename MT, typename ST, bool SO >
1732 struct IsHermitian< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsHermitian<MT>::value >
1733 {};
1735 //*************************************************************************************************
1736 
1737 
1738 
1739 
1740 //=================================================================================================
1741 //
1742 // ISLOWER SPECIALIZATIONS
1743 //
1744 //=================================================================================================
1745 
1746 //*************************************************************************************************
1748 template< typename MT, typename ST, bool SO >
1749 struct IsLower< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsLower<MT>::value >
1750 {};
1752 //*************************************************************************************************
1753 
1754 
1755 
1756 
1757 //=================================================================================================
1758 //
1759 // ISSTRICTLYLOWER SPECIALIZATIONS
1760 //
1761 //=================================================================================================
1762 
1763 //*************************************************************************************************
1765 template< typename MT, typename ST, bool SO >
1766 struct IsStrictlyLower< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsStrictlyLower<MT>::value >
1767 {};
1769 //*************************************************************************************************
1770 
1771 
1772 
1773 
1774 //=================================================================================================
1775 //
1776 // ISUPPER SPECIALIZATIONS
1777 //
1778 //=================================================================================================
1779 
1780 //*************************************************************************************************
1782 template< typename MT, typename ST, bool SO >
1783 struct IsUpper< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsUpper<MT>::value >
1784 {};
1786 //*************************************************************************************************
1787 
1788 
1789 
1790 
1791 //=================================================================================================
1792 //
1793 // ISSTRICTLYUPPER SPECIALIZATIONS
1794 //
1795 //=================================================================================================
1796 
1797 //*************************************************************************************************
1799 template< typename MT, typename ST, bool SO >
1800 struct IsStrictlyUpper< DMatScalarMultExpr<MT,ST,SO> > : public IsTrue< IsStrictlyUpper<MT>::value >
1801 {};
1803 //*************************************************************************************************
1804 
1805 
1806 
1807 
1808 //=================================================================================================
1809 //
1810 // DMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1811 //
1812 //=================================================================================================
1813 
1814 //*************************************************************************************************
1816 template< typename MT, typename ST1, typename ST2 >
1817 struct DMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1818 {
1819  public:
1820  //**********************************************************************************************
1821  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1822  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1823  , typename DMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1824  , INVALID_TYPE >::Type Type;
1825  //**********************************************************************************************
1826 };
1828 //*************************************************************************************************
1829 
1830 
1831 
1832 
1833 //=================================================================================================
1834 //
1835 // TDMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1836 //
1837 //=================================================================================================
1838 
1839 //*************************************************************************************************
1841 template< typename MT, typename ST1, typename ST2 >
1842 struct TDMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1843 {
1844  public:
1845  //**********************************************************************************************
1846  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1847  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1848  , typename TDMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1849  , INVALID_TYPE >::Type Type;
1850  //**********************************************************************************************
1851 };
1853 //*************************************************************************************************
1854 
1855 
1856 
1857 
1858 //=================================================================================================
1859 //
1860 // DMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1861 //
1862 //=================================================================================================
1863 
1864 //*************************************************************************************************
1866 template< typename MT, typename ST1, typename ST2 >
1867 struct DMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1868 {
1869  private:
1870  //**********************************************************************************************
1871  typedef typename DivTrait<ST1,ST2>::Type ScalarType;
1872  //**********************************************************************************************
1873 
1874  //**********************************************************************************************
1875  enum { condition = IsInvertible<ScalarType>::value };
1876  //**********************************************************************************************
1877 
1878  //**********************************************************************************************
1879  typedef typename DMatScalarMultExprTrait<MT,ScalarType>::Type T1;
1880  typedef typename DMatScalarDivExprTrait<MT,ScalarType>::Type T2;
1881  //**********************************************************************************************
1882 
1883  public:
1884  //**********************************************************************************************
1885  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1886  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1887  , typename SelectType<condition,T1,T2>::Type
1888  , INVALID_TYPE >::Type Type;
1889  //**********************************************************************************************
1890 };
1892 //*************************************************************************************************
1893 
1894 
1895 
1896 
1897 //=================================================================================================
1898 //
1899 // TDMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1900 //
1901 //=================================================================================================
1902 
1903 //*************************************************************************************************
1905 template< typename MT, typename ST1, typename ST2 >
1906 struct TDMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1907 {
1908  private:
1909  //**********************************************************************************************
1910  typedef typename DivTrait<ST1,ST2>::Type ScalarType;
1911  //**********************************************************************************************
1912 
1913  //**********************************************************************************************
1914  enum { condition = IsInvertible<ScalarType>::value };
1915  //**********************************************************************************************
1916 
1917  //**********************************************************************************************
1918  typedef typename TDMatScalarMultExprTrait<MT,ScalarType>::Type T1;
1919  typedef typename TDMatScalarDivExprTrait<MT,ScalarType>::Type T2;
1920  //**********************************************************************************************
1921 
1922  public:
1923  //**********************************************************************************************
1924  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1925  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1926  , typename SelectType<condition,T1,T2>::Type
1927  , INVALID_TYPE >::Type Type;
1928  //**********************************************************************************************
1929 };
1931 //*************************************************************************************************
1932 
1933 
1934 
1935 
1936 //=================================================================================================
1937 //
1938 // DMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1939 //
1940 //=================================================================================================
1941 
1942 //*************************************************************************************************
1944 template< typename MT, typename ST, typename VT >
1945 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1946 {
1947  public:
1948  //**********************************************************************************************
1949  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1950  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1951  IsNumeric<ST>::value
1952  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1953  , INVALID_TYPE >::Type Type;
1954  //**********************************************************************************************
1955 };
1957 //*************************************************************************************************
1958 
1959 
1960 //*************************************************************************************************
1962 template< typename MT, typename ST1, typename VT, typename ST2 >
1963 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, DVecScalarMultExpr<VT,ST2,false> >
1964 {
1965  public:
1966  //**********************************************************************************************
1967  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1968  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1969  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1970  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1971  , INVALID_TYPE >::Type Type;
1972  //**********************************************************************************************
1973 };
1975 //*************************************************************************************************
1976 
1977 
1978 
1979 
1980 //=================================================================================================
1981 //
1982 // TDMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1983 //
1984 //=================================================================================================
1985 
1986 //*************************************************************************************************
1988 template< typename MT, typename ST, typename VT >
1989 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1990 {
1991  public:
1992  //**********************************************************************************************
1993  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1994  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1995  IsNumeric<ST>::value
1996  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1997  , INVALID_TYPE >::Type Type;
1998  //**********************************************************************************************
1999 };
2001 //*************************************************************************************************
2002 
2003 
2004 //*************************************************************************************************
2006 template< typename MT, typename ST1, typename VT, typename ST2 >
2007 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, DVecScalarMultExpr<VT,ST2,false> >
2008 {
2009  public:
2010  //**********************************************************************************************
2011  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2012  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
2013  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2014  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2015  , INVALID_TYPE >::Type Type;
2016  //**********************************************************************************************
2017 };
2019 //*************************************************************************************************
2020 
2021 
2022 
2023 
2024 //=================================================================================================
2025 //
2026 // TDVECDMATMULTEXPRTRAIT SPECIALIZATIONS
2027 //
2028 //=================================================================================================
2029 
2030 //*************************************************************************************************
2032 template< typename VT, typename MT, typename ST >
2033 struct TDVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
2034 {
2035  public:
2036  //**********************************************************************************************
2037  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2038  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2039  IsNumeric<ST>::value
2040  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
2041  , INVALID_TYPE >::Type Type;
2042  //**********************************************************************************************
2043 };
2045 //*************************************************************************************************
2046 
2047 
2048 //*************************************************************************************************
2050 template< typename VT, typename ST1, typename MT, typename ST2 >
2051 struct TDVecDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
2052 {
2053  public:
2054  //**********************************************************************************************
2055  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2056  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2057  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2058  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2059  , INVALID_TYPE >::Type Type;
2060  //**********************************************************************************************
2061 };
2063 //*************************************************************************************************
2064 
2065 
2066 
2067 
2068 //=================================================================================================
2069 //
2070 // TDVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2071 //
2072 //=================================================================================================
2073 
2074 //*************************************************************************************************
2076 template< typename VT, typename MT, typename ST >
2077 struct TDVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
2078 {
2079  public:
2080  //**********************************************************************************************
2081  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2082  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2083  IsNumeric<ST>::value
2084  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
2085  , INVALID_TYPE >::Type Type;
2086  //**********************************************************************************************
2087 };
2089 //*************************************************************************************************
2090 
2091 
2092 //*************************************************************************************************
2094 template< typename VT, typename ST1, typename MT, typename ST2 >
2095 struct TDVecTDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2096 {
2097  public:
2098  //**********************************************************************************************
2099  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2100  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2101  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2102  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2103  , INVALID_TYPE >::Type Type;
2104  //**********************************************************************************************
2105 };
2107 //*************************************************************************************************
2108 
2109 
2110 
2111 
2112 //=================================================================================================
2113 //
2114 // DMATSVECMULTEXPRTRAIT SPECIALIZATIONS
2115 //
2116 //=================================================================================================
2117 
2118 //*************************************************************************************************
2120 template< typename MT, typename ST, typename VT >
2121 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
2122 {
2123  public:
2124  //**********************************************************************************************
2125  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2126  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2127  IsNumeric<ST>::value
2128  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
2129  , INVALID_TYPE >::Type Type;
2130  //**********************************************************************************************
2131 };
2133 //*************************************************************************************************
2134 
2135 
2136 //*************************************************************************************************
2138 template< typename MT, typename ST1, typename VT, typename ST2 >
2139 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, SVecScalarMultExpr<VT,ST2,false> >
2140 {
2141  public:
2142  //**********************************************************************************************
2143  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2144  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2145  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2146  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2147  , INVALID_TYPE >::Type Type;
2148  //**********************************************************************************************
2149 };
2151 //*************************************************************************************************
2152 
2153 
2154 
2155 
2156 //=================================================================================================
2157 //
2158 // TDMATSVECMULTEXPRTRAIT SPECIALIZATIONS
2159 //
2160 //=================================================================================================
2161 
2162 //*************************************************************************************************
2164 template< typename MT, typename ST, typename VT >
2165 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
2166 {
2167  public:
2168  //**********************************************************************************************
2169  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2170  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2171  IsNumeric<ST>::value
2172  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
2173  , INVALID_TYPE >::Type Type;
2174  //**********************************************************************************************
2175 };
2177 //*************************************************************************************************
2178 
2179 
2180 //*************************************************************************************************
2182 template< typename MT, typename ST1, typename VT, typename ST2 >
2183 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, SVecScalarMultExpr<VT,ST2,false> >
2184 {
2185  public:
2186  //**********************************************************************************************
2187  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2188  IsSparseVector<VT>::value && IsColumnVector<VT>::value &&
2189  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2190  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2191  , INVALID_TYPE >::Type Type;
2192  //**********************************************************************************************
2193 };
2195 //*************************************************************************************************
2196 
2197 
2198 
2199 
2200 //=================================================================================================
2201 //
2202 // TSVECDMATMULTEXPRTRAIT SPECIALIZATIONS
2203 //
2204 //=================================================================================================
2205 
2206 //*************************************************************************************************
2208 template< typename VT, typename MT, typename ST >
2209 struct TSVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
2210 {
2211  public:
2212  //**********************************************************************************************
2213  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2214  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2215  IsNumeric<ST>::value
2216  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
2217  , INVALID_TYPE >::Type Type;
2218  //**********************************************************************************************
2219 };
2221 //*************************************************************************************************
2222 
2223 
2224 //*************************************************************************************************
2226 template< typename VT, typename ST1, typename MT, typename ST2 >
2227 struct TSVecDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
2228 {
2229  public:
2230  //**********************************************************************************************
2231  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2232  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2233  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2234  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2235  , INVALID_TYPE >::Type Type;
2236  //**********************************************************************************************
2237 };
2239 //*************************************************************************************************
2240 
2241 
2242 
2243 
2244 //=================================================================================================
2245 //
2246 // TSVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2247 //
2248 //=================================================================================================
2249 
2250 //*************************************************************************************************
2252 template< typename VT, typename MT, typename ST >
2253 struct TSVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
2254 {
2255  public:
2256  //**********************************************************************************************
2257  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2258  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2259  IsNumeric<ST>::value
2260  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
2261  , INVALID_TYPE >::Type Type;
2262  //**********************************************************************************************
2263 };
2265 //*************************************************************************************************
2266 
2267 
2268 //*************************************************************************************************
2270 template< typename VT, typename ST1, typename MT, typename ST2 >
2271 struct TSVecTDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2272 {
2273  public:
2274  //**********************************************************************************************
2275  typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value &&
2276  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2277  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2278  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2279  , INVALID_TYPE >::Type Type;
2280  //**********************************************************************************************
2281 };
2283 //*************************************************************************************************
2284 
2285 
2286 
2287 
2288 //=================================================================================================
2289 //
2290 // DMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2291 //
2292 //=================================================================================================
2293 
2294 //*************************************************************************************************
2296 template< typename MT1, typename ST, typename MT2 >
2297 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2298 {
2299  public:
2300  //**********************************************************************************************
2301  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2302  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2303  IsNumeric<ST>::value
2304  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2305  , INVALID_TYPE >::Type Type;
2306  //**********************************************************************************************
2307 };
2309 //*************************************************************************************************
2310 
2311 
2312 //*************************************************************************************************
2314 template< typename MT1, typename MT2, typename ST >
2315 struct DMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2316 {
2317  public:
2318  //**********************************************************************************************
2319  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2320  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2321  IsNumeric<ST>::value
2322  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2323  , INVALID_TYPE >::Type Type;
2324  //**********************************************************************************************
2325 };
2327 //*************************************************************************************************
2328 
2329 
2330 //*************************************************************************************************
2332 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2333 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2334 {
2335  public:
2336  //**********************************************************************************************
2337  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2338  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2339  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2340  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2341  , INVALID_TYPE >::Type Type;
2342  //**********************************************************************************************
2343 };
2345 //*************************************************************************************************
2346 
2347 
2348 
2349 
2350 //=================================================================================================
2351 //
2352 // DMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2353 //
2354 //=================================================================================================
2355 
2356 //*************************************************************************************************
2358 template< typename MT1, typename ST, typename MT2 >
2359 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2360 {
2361  public:
2362  //**********************************************************************************************
2363  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2364  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2365  IsNumeric<ST>::value
2366  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2367  , INVALID_TYPE >::Type Type;
2368  //**********************************************************************************************
2369 };
2371 //*************************************************************************************************
2372 
2373 
2374 //*************************************************************************************************
2376 template< typename MT1, typename MT2, typename ST >
2377 struct DMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2378 {
2379  public:
2380  //**********************************************************************************************
2381  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2382  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2383  IsNumeric<ST>::value
2384  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2385  , INVALID_TYPE >::Type Type;
2386  //**********************************************************************************************
2387 };
2389 //*************************************************************************************************
2390 
2391 
2392 //*************************************************************************************************
2394 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2395 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2396 {
2397  public:
2398  //**********************************************************************************************
2399  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2400  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2401  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2402  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2403  , INVALID_TYPE >::Type Type;
2404  //**********************************************************************************************
2405 };
2407 //*************************************************************************************************
2408 
2409 
2410 
2411 
2412 //=================================================================================================
2413 //
2414 // TDMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2415 //
2416 //=================================================================================================
2417 
2418 //*************************************************************************************************
2420 template< typename MT1, typename ST, typename MT2 >
2421 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2422 {
2423  public:
2424  //**********************************************************************************************
2425  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2426  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2427  IsNumeric<ST>::value
2428  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2429  , INVALID_TYPE >::Type Type;
2430  //**********************************************************************************************
2431 };
2433 //*************************************************************************************************
2434 
2435 
2436 //*************************************************************************************************
2438 template< typename MT1, typename MT2, typename ST >
2439 struct TDMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2440 {
2441  public:
2442  //**********************************************************************************************
2443  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2444  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2445  IsNumeric<ST>::value
2446  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2447  , INVALID_TYPE >::Type Type;
2448  //**********************************************************************************************
2449 };
2451 //*************************************************************************************************
2452 
2453 
2454 //*************************************************************************************************
2456 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2457 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2458 {
2459  public:
2460  //**********************************************************************************************
2461  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2462  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2463  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2464  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2465  , INVALID_TYPE >::Type Type;
2466  //**********************************************************************************************
2467 };
2469 //*************************************************************************************************
2470 
2471 
2472 
2473 
2474 //=================================================================================================
2475 //
2476 // TDMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2477 //
2478 //=================================================================================================
2479 
2480 //*************************************************************************************************
2482 template< typename MT1, typename ST, typename MT2 >
2483 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2484 {
2485  public:
2486  //**********************************************************************************************
2487  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2488  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2489  IsNumeric<ST>::value
2490  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2491  , INVALID_TYPE >::Type Type;
2492  //**********************************************************************************************
2493 };
2495 //*************************************************************************************************
2496 
2497 
2498 //*************************************************************************************************
2500 template< typename MT1, typename MT2, typename ST >
2501 struct TDMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2502 {
2503  public:
2504  //**********************************************************************************************
2505  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2506  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2507  IsNumeric<ST>::value
2508  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2509  , INVALID_TYPE >::Type Type;
2510  //**********************************************************************************************
2511 };
2513 //*************************************************************************************************
2514 
2515 
2516 //*************************************************************************************************
2518 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2519 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2520 {
2521  public:
2522  //**********************************************************************************************
2523  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2524  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2525  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2526  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2527  , INVALID_TYPE >::Type Type;
2528  //**********************************************************************************************
2529 };
2531 //*************************************************************************************************
2532 
2533 
2534 
2535 
2536 //=================================================================================================
2537 //
2538 // DMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2539 //
2540 //=================================================================================================
2541 
2542 //*************************************************************************************************
2544 template< typename MT1, typename ST, typename MT2 >
2545 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2546 {
2547  public:
2548  //**********************************************************************************************
2549  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2550  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2551  IsNumeric<ST>::value
2552  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2553  , INVALID_TYPE >::Type Type;
2554  //**********************************************************************************************
2555 };
2557 //*************************************************************************************************
2558 
2559 
2560 //*************************************************************************************************
2562 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2563 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,false> >
2564 {
2565  public:
2566  //**********************************************************************************************
2567  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2568  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2569  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2570  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2571  , INVALID_TYPE >::Type Type;
2572  //**********************************************************************************************
2573 };
2575 //*************************************************************************************************
2576 
2577 
2578 
2579 
2580 //=================================================================================================
2581 //
2582 // DMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2583 //
2584 //=================================================================================================
2585 
2586 //*************************************************************************************************
2588 template< typename MT1, typename ST, typename MT2 >
2589 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2590 {
2591  public:
2592  //**********************************************************************************************
2593  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2594  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2595  IsNumeric<ST>::value
2596  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2597  , INVALID_TYPE >::Type Type;
2598  //**********************************************************************************************
2599 };
2601 //*************************************************************************************************
2602 
2603 
2604 //*************************************************************************************************
2606 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2607 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,true> >
2608 {
2609  public:
2610  //**********************************************************************************************
2611  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2612  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2613  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2614  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2615  , INVALID_TYPE >::Type Type;
2616  //**********************************************************************************************
2617 };
2619 //*************************************************************************************************
2620 
2621 
2622 
2623 
2624 //=================================================================================================
2625 //
2626 // TDMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2627 //
2628 //=================================================================================================
2629 
2630 //*************************************************************************************************
2632 template< typename MT1, typename ST, typename MT2 >
2633 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2634 {
2635  public:
2636  //**********************************************************************************************
2637  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2638  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2639  IsNumeric<ST>::value
2640  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2641  , INVALID_TYPE >::Type Type;
2642  //**********************************************************************************************
2643 };
2645 //*************************************************************************************************
2646 
2647 
2648 //*************************************************************************************************
2650 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2651 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,false> >
2652 {
2653  public:
2654  //**********************************************************************************************
2655  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2656  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2657  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2658  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2659  , INVALID_TYPE >::Type Type;
2660  //**********************************************************************************************
2661 };
2663 //*************************************************************************************************
2664 
2665 
2666 
2667 
2668 //=================================================================================================
2669 //
2670 // TDMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2671 //
2672 //=================================================================================================
2673 
2674 //*************************************************************************************************
2676 template< typename MT1, typename ST, typename MT2 >
2677 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2678 {
2679  public:
2680  //**********************************************************************************************
2681  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2682  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2683  IsNumeric<ST>::value
2684  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2685  , INVALID_TYPE >::Type Type;
2686  //**********************************************************************************************
2687 };
2689 //*************************************************************************************************
2690 
2691 
2692 //*************************************************************************************************
2694 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2695 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,true> >
2696 {
2697  public:
2698  //**********************************************************************************************
2699  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2700  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2701  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2702  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2703  , INVALID_TYPE >::Type Type;
2704  //**********************************************************************************************
2705 };
2707 //*************************************************************************************************
2708 
2709 
2710 
2711 
2712 //=================================================================================================
2713 //
2714 // SMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2715 //
2716 //=================================================================================================
2717 
2718 //*************************************************************************************************
2720 template< typename MT1, typename ST, typename MT2 >
2721 struct SMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2722 {
2723  public:
2724  //**********************************************************************************************
2725  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2726  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2727  IsNumeric<ST>::value
2728  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2729  , INVALID_TYPE >::Type Type;
2730  //**********************************************************************************************
2731 };
2733 //*************************************************************************************************
2734 
2735 
2736 //*************************************************************************************************
2738 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2739 struct SMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2740 {
2741  public:
2742  //**********************************************************************************************
2743  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2744  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2745  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2746  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2747  , INVALID_TYPE >::Type Type;
2748  //**********************************************************************************************
2749 };
2751 //*************************************************************************************************
2752 
2753 
2754 
2755 
2756 //=================================================================================================
2757 //
2758 // SMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2759 //
2760 //=================================================================================================
2761 
2762 //*************************************************************************************************
2764 template< typename MT1, typename ST, typename MT2 >
2765 struct SMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2766 {
2767  public:
2768  //**********************************************************************************************
2769  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2770  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2771  IsNumeric<ST>::value
2772  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2773  , INVALID_TYPE >::Type Type;
2774  //**********************************************************************************************
2775 };
2777 //*************************************************************************************************
2778 
2779 
2780 //*************************************************************************************************
2782 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2783 struct SMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2784 {
2785  public:
2786  //**********************************************************************************************
2787  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2788  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2789  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2790  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2791  , INVALID_TYPE >::Type Type;
2792  //**********************************************************************************************
2793 };
2795 //*************************************************************************************************
2796 
2797 
2798 
2799 
2800 //=================================================================================================
2801 //
2802 // TSMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2803 //
2804 //=================================================================================================
2805 
2806 //*************************************************************************************************
2808 template< typename MT1, typename ST, typename MT2 >
2809 struct TSMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2810 {
2811  public:
2812  //**********************************************************************************************
2813  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2814  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2815  IsNumeric<ST>::value
2816  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2817  , INVALID_TYPE >::Type Type;
2818  //**********************************************************************************************
2819 };
2821 //*************************************************************************************************
2822 
2823 
2824 //*************************************************************************************************
2826 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2827 struct TSMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2828 {
2829  public:
2830  //**********************************************************************************************
2831  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2832  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2833  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2834  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2835  , INVALID_TYPE >::Type Type;
2836  //**********************************************************************************************
2837 };
2839 //*************************************************************************************************
2840 
2841 
2842 
2843 
2844 //=================================================================================================
2845 //
2846 // TSMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2847 //
2848 //=================================================================================================
2849 
2850 //*************************************************************************************************
2852 template< typename MT1, typename ST, typename MT2 >
2853 struct TSMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2854 {
2855  public:
2856  //**********************************************************************************************
2857  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2858  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2859  IsNumeric<ST>::value
2860  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2861  , INVALID_TYPE >::Type Type;
2862  //**********************************************************************************************
2863 };
2865 //*************************************************************************************************
2866 
2867 
2868 //*************************************************************************************************
2870 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2871 struct TSMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2872 {
2873  public:
2874  //**********************************************************************************************
2875  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2876  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2877  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2878  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2879  , INVALID_TYPE >::Type Type;
2880  //**********************************************************************************************
2881 };
2883 //*************************************************************************************************
2884 
2885 
2886 
2887 
2888 //=================================================================================================
2889 //
2890 // SUBMATRIXEXPRTRAIT SPECIALIZATIONS
2891 //
2892 //=================================================================================================
2893 
2894 //*************************************************************************************************
2896 template< typename MT, typename ST, bool SO, bool AF >
2897 struct SubmatrixExprTrait< DMatScalarMultExpr<MT,ST,SO>, AF >
2898 {
2899  public:
2900  //**********************************************************************************************
2901  typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type, ST >::Type Type;
2902  //**********************************************************************************************
2903 };
2905 //*************************************************************************************************
2906 
2907 
2908 
2909 
2910 //=================================================================================================
2911 //
2912 // ROWEXPRTRAIT SPECIALIZATIONS
2913 //
2914 //=================================================================================================
2915 
2916 //*************************************************************************************************
2918 template< typename MT, typename ST, bool SO >
2919 struct RowExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2920 {
2921  public:
2922  //**********************************************************************************************
2923  typedef typename MultExprTrait< typename RowExprTrait<const MT>::Type, ST >::Type Type;
2924  //**********************************************************************************************
2925 };
2927 //*************************************************************************************************
2928 
2929 
2930 
2931 
2932 //=================================================================================================
2933 //
2934 // COLUMNEXPRTRAIT SPECIALIZATIONS
2935 //
2936 //=================================================================================================
2937 
2938 //*************************************************************************************************
2940 template< typename MT, typename ST, bool SO >
2941 struct ColumnExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2942 {
2943  public:
2944  //**********************************************************************************************
2945  typedef typename MultExprTrait< typename ColumnExprTrait<const MT>::Type, ST >::Type Type;
2946  //**********************************************************************************************
2947 };
2949 //*************************************************************************************************
2950 
2951 } // namespace blaze
2952 
2953 #endif
LeftOperand leftOperand() const
Returns the left-hand side dense matrix operand.
Definition: DMatScalarMultExpr.h:566
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:223
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatScalarMultExpr.h:319
Pointer difference type of the Blaze library.
DifferenceType difference_type
Difference between two iterators.
Definition: DMatScalarMultExpr.h:220
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Data type constraint.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:98
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:440
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:7820
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:962
MultExprTrait< RN, ST >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DMatScalarMultExpr.h:143
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:252
MT::ResultType RT
Result type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:127
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatScalarMultExpr.h:610
ReferenceType reference
Reference return type.
Definition: DMatScalarMultExpr.h:219
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatScalarMultExpr.h:267
Header file for the IsSparseMatrix type trait.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatScalarMultExpr.h:299
#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:81
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:385
#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.
Header file for the IsColumnMajorMatrix type trait.
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: DMatScalarMultExpr.h:629
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:259
IteratorCategory iterator_category
The iterator category.
Definition: DMatScalarMultExpr.h:216
SelectType< useAssign, const ResultType, const DMatScalarMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatScalarMultExpr.h:193
Base class for all matrix/scalar multiplication expression templates.The MatScalarMultExpr class serv...
Definition: MatScalarMultExpr.h:66
Header file for the And class template.
Header file for the DenseVector base class.
MT::ReturnType RN
Return type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:128
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
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 UnderlyingElement type trait.
Header file for the RequiresEvaluation type trait.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatScalarMultExpr.h:396
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:117
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatScalarMultExpr.h:309
Constraint on the data type.
Header file for the DivExprTrait class template.
ElementType ValueType
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:210
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:261
Evaluation of the underlying builtin element type of a given data type.Via this type trait it is poss...
Definition: UnderlyingBuiltin.h:80
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatScalarMultExpr.h:620
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatScalarMultExpr.h:491
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:213
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:546
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:352
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatScalarMultExpr.h:476
Header file for the UnderlyingBuiltin type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
Expression object for dense matrix-scalar multiplications.The DMatScalarMultExpr class represents the...
Definition: DMatScalarMultExpr.h:121
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatScalarMultExpr.h:588
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatScalarMultExpr.h:244
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
IteratorType iterator_
Iterator to the current element.
Definition: DMatScalarMultExpr.h:439
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:374
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DMatScalarMultExpr.h:190
#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:211
Header file for the IsAligned type trait.
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:642
#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:330
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatScalarMultExpr.h:196
Constraints on the storage order of matrix types.
LeftOperand matrix_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatScalarMultExpr.h:628
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
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:536
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:432
Header file for the IsPadded type trait.
Header file for the serial shim.
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatScalarMultExpr.h:509
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatScalarMultExpr.h:556
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DMatScalarMultExpr.h:232
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatScalarMultExpr.h:420
Header file for the IsNumeric type trait.
ResultType::ElementType ElementType
Resulting element type.
Definition: DMatScalarMultExpr.h:186
ElementType & ReferenceType
Reference return type.
Definition: DMatScalarMultExpr.h:212
RightOperand rightOperand() const
Returns the right-hand side scalar operand.
Definition: DMatScalarMultExpr.h:576
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:2587
Header file for the MatScalarMultExpr base class.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:1232
MT::CompositeType CT
Composite type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:130
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:138
DMatScalarMultExpr(const MT &matrix, ST scalar)
Constructor for the DMatScalarMultExpr class.
Definition: DMatScalarMultExpr.h:463
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:600
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:256
#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:525
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:341
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:363
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatScalarMultExpr.h:278
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatScalarMultExpr.h:408
Header file for the IsInvertible type trait.
Header file for the IsDenseVector type trait.
Header file for all intrinsic functionality.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatScalarMultExpr.h:288
MT::ElementType ET
Element type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:129
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:199
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:185
#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:218
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the IsTrue value trait.
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatScalarMultExpr.h:187
Iterator over the elements of the dense matrix.
Definition: DMatScalarMultExpr.h:205
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatScalarMultExpr.h:209
Header file for the IsUpper type trait.
Header file for exception macros.
MultTrait< RT, ST >::Type ResultType
Result type for expression template evaluations.
Definition: DMatScalarMultExpr.h:183
Header file for the IsColumnVector type trait.
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatScalarMultExpr.h:184
DMatScalarMultExpr< MT, ST, SO > This
Type of this DMatScalarMultExpr instance.
Definition: DMatScalarMultExpr.h:182
Header file for the IsHermitian type trait.
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.
ValueType value_type
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:217