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>
44 #include <blaze/math/Aliases.h>
47 #include <blaze/math/Exception.h>
54 #include <blaze/math/SIMD.h>
88 #include <blaze/system/Inline.h>
90 #include <blaze/util/Assert.h>
94 #include <blaze/util/EnableIf.h>
96 #include <blaze/util/InvalidType.h>
98 #include <blaze/util/mpl/And.h>
99 #include <blaze/util/mpl/If.h>
100 #include <blaze/util/mpl/Or.h>
101 #include <blaze/util/Types.h>
103 
104 
105 namespace blaze {
106 
107 //=================================================================================================
108 //
109 // CLASS DMATSCALARMULTEXPR
110 //
111 //=================================================================================================
112 
113 //*************************************************************************************************
120 template< typename MT // Type of the left-hand side dense matrix
121  , typename ST // Type of the right-hand side scalar value
122  , bool SO > // Storage order
123 class DMatScalarMultExpr : public DenseMatrix< DMatScalarMultExpr<MT,ST,SO>, SO >
124  , private MatScalarMultExpr
125  , private Computation
126 {
127  private:
128  //**Type definitions****************************************************************************
129  typedef ResultType_<MT> RT;
130  typedef ReturnType_<MT> RN;
133  //**********************************************************************************************
134 
135  //**Return type evaluation**********************************************************************
137 
142  enum : bool { returnExpr = !IsTemporary<RN>::value };
143 
146  //**********************************************************************************************
147 
148  //**Serial evaluation strategy******************************************************************
150 
156  enum : bool { useAssign = IsComputation<MT>::value && RequiresEvaluation<MT>::value };
157 
159  template< typename MT2 >
161  struct UseAssign {
162  enum : bool { value = useAssign };
163  };
165  //**********************************************************************************************
166 
167  //**Parallel evaluation strategy****************************************************************
169 
175  template< typename MT2 >
176  struct UseSMPAssign {
177  enum : bool { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
178  };
180  //**********************************************************************************************
181 
182  public:
183  //**Type definitions****************************************************************************
189 
192 
195 
197  typedef If_< IsExpression<MT>, const MT, const MT& > LeftOperand;
198 
200  typedef ST RightOperand;
201  //**********************************************************************************************
202 
203  //**ConstIterator class definition**************************************************************
207  {
208  public:
209  //**Type definitions*************************************************************************
210  typedef std::random_access_iterator_tag IteratorCategory;
211  typedef ElementType ValueType;
212  typedef ElementType* PointerType;
213  typedef ElementType& ReferenceType;
215 
216  // STL iterator requirements
217  typedef IteratorCategory iterator_category;
218  typedef ValueType value_type;
219  typedef PointerType pointer;
220  typedef ReferenceType reference;
221  typedef DifferenceType difference_type;
222 
225  //*******************************************************************************************
226 
227  //**Constructor******************************************************************************
233  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
234  : iterator_( iterator ) // Iterator to the current element
235  , scalar_ ( scalar ) // Scalar of the multiplication expression
236  {}
237  //*******************************************************************************************
238 
239  //**Addition assignment operator*************************************************************
245  inline ConstIterator& operator+=( size_t inc ) {
246  iterator_ += inc;
247  return *this;
248  }
249  //*******************************************************************************************
250 
251  //**Subtraction assignment operator**********************************************************
257  inline ConstIterator& operator-=( size_t dec ) {
258  iterator_ -= dec;
259  return *this;
260  }
261  //*******************************************************************************************
262 
263  //**Prefix increment operator****************************************************************
269  ++iterator_;
270  return *this;
271  }
272  //*******************************************************************************************
273 
274  //**Postfix increment operator***************************************************************
279  inline const ConstIterator operator++( int ) {
280  return ConstIterator( iterator_++ );
281  }
282  //*******************************************************************************************
283 
284  //**Prefix decrement operator****************************************************************
290  --iterator_;
291  return *this;
292  }
293  //*******************************************************************************************
294 
295  //**Postfix decrement operator***************************************************************
300  inline const ConstIterator operator--( int ) {
301  return ConstIterator( iterator_-- );
302  }
303  //*******************************************************************************************
304 
305  //**Element access operator******************************************************************
310  inline ReturnType operator*() const {
311  return *iterator_ * scalar_;
312  }
313  //*******************************************************************************************
314 
315  //**Load function****************************************************************************
320  inline auto load() const noexcept {
321  return iterator_.load() * set( scalar_ );
322  }
323  //*******************************************************************************************
324 
325  //**Equality operator************************************************************************
331  inline bool operator==( const ConstIterator& rhs ) const {
332  return iterator_ == rhs.iterator_;
333  }
334  //*******************************************************************************************
335 
336  //**Inequality operator**********************************************************************
342  inline bool operator!=( const ConstIterator& rhs ) const {
343  return iterator_ != rhs.iterator_;
344  }
345  //*******************************************************************************************
346 
347  //**Less-than operator***********************************************************************
353  inline bool operator<( const ConstIterator& rhs ) const {
354  return iterator_ < rhs.iterator_;
355  }
356  //*******************************************************************************************
357 
358  //**Greater-than operator********************************************************************
364  inline bool operator>( const ConstIterator& rhs ) const {
365  return iterator_ > rhs.iterator_;
366  }
367  //*******************************************************************************************
368 
369  //**Less-or-equal-than operator**************************************************************
375  inline bool operator<=( const ConstIterator& rhs ) const {
376  return iterator_ <= rhs.iterator_;
377  }
378  //*******************************************************************************************
379 
380  //**Greater-or-equal-than operator***********************************************************
386  inline bool operator>=( const ConstIterator& rhs ) const {
387  return iterator_ >= rhs.iterator_;
388  }
389  //*******************************************************************************************
390 
391  //**Subtraction operator*********************************************************************
397  inline DifferenceType operator-( const ConstIterator& rhs ) const {
398  return iterator_ - rhs.iterator_;
399  }
400  //*******************************************************************************************
401 
402  //**Addition operator************************************************************************
409  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
410  return ConstIterator( it.iterator_ + inc, it.scalar_ );
411  }
412  //*******************************************************************************************
413 
414  //**Addition operator************************************************************************
421  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
422  return ConstIterator( it.iterator_ + inc, it.scalar_ );
423  }
424  //*******************************************************************************************
425 
426  //**Subtraction operator*********************************************************************
433  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
434  return ConstIterator( it.iterator_ - dec, it.scalar_ );
435  }
436  //*******************************************************************************************
437 
438  private:
439  //**Member variables*************************************************************************
440  IteratorType iterator_;
441  RightOperand scalar_;
442  //*******************************************************************************************
443  };
444  //**********************************************************************************************
445 
446  //**Compilation flags***************************************************************************
448  enum : bool { simdEnabled = MT::simdEnabled &&
451  HasSIMDMult<UnderlyingElement_<ET>,ST>::value ) };
452 
454  enum : bool { smpAssignable = MT::smpAssignable };
455  //**********************************************************************************************
456 
457  //**SIMD properties*****************************************************************************
459  enum : size_t { SIMDSIZE = SIMDTrait<ElementType>::size };
460  //**********************************************************************************************
461 
462  //**Constructor*********************************************************************************
468  explicit inline DMatScalarMultExpr( const MT& matrix, ST scalar ) noexcept
469  : matrix_( matrix ) // Left-hand side dense matrix of the multiplication expression
470  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
471  {}
472  //**********************************************************************************************
473 
474  //**Access operator*****************************************************************************
481  inline ReturnType operator()( size_t i, size_t j ) const {
482  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
483  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
484  return matrix_(i,j) * scalar_;
485  }
486  //**********************************************************************************************
487 
488  //**At function*********************************************************************************
496  inline ReturnType at( size_t i, size_t j ) const {
497  if( i >= matrix_.rows() ) {
498  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
499  }
500  if( j >= matrix_.columns() ) {
501  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
502  }
503  return (*this)(i,j);
504  }
505  //**********************************************************************************************
506 
507  //**Load function*******************************************************************************
514  BLAZE_ALWAYS_INLINE auto load( size_t i, size_t j ) const noexcept {
515  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
516  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
517  BLAZE_INTERNAL_ASSERT( !SO || ( i % SIMDSIZE == 0UL ), "Invalid row access index" );
518  BLAZE_INTERNAL_ASSERT( SO || ( j % SIMDSIZE == 0UL ), "Invalid column access index" );
519  return matrix_.load(i,j) * set( scalar_ );
520  }
521  //**********************************************************************************************
522 
523  //**Begin function******************************************************************************
529  inline ConstIterator begin( size_t i ) const {
530  return ConstIterator( matrix_.begin(i), scalar_ );
531  }
532  //**********************************************************************************************
533 
534  //**End function********************************************************************************
540  inline ConstIterator end( size_t i ) const {
541  return ConstIterator( matrix_.end(i), scalar_ );
542  }
543  //**********************************************************************************************
544 
545  //**Rows function*******************************************************************************
550  inline size_t rows() const noexcept {
551  return matrix_.rows();
552  }
553  //**********************************************************************************************
554 
555  //**Columns function****************************************************************************
560  inline size_t columns() const noexcept {
561  return matrix_.columns();
562  }
563  //**********************************************************************************************
564 
565  //**Left operand access*************************************************************************
570  inline LeftOperand leftOperand() const noexcept {
571  return matrix_;
572  }
573  //**********************************************************************************************
574 
575  //**Right operand access************************************************************************
580  inline RightOperand rightOperand() const noexcept {
581  return scalar_;
582  }
583  //**********************************************************************************************
584 
585  //**********************************************************************************************
591  template< typename T >
592  inline bool canAlias( const T* alias ) const noexcept {
593  return IsComputation<MT>::value && matrix_.canAlias( alias );
594  }
595  //**********************************************************************************************
596 
597  //**********************************************************************************************
603  template< typename T >
604  inline bool isAliased( const T* alias ) const noexcept {
605  return matrix_.isAliased( alias );
606  }
607  //**********************************************************************************************
608 
609  //**********************************************************************************************
614  inline bool isAligned() const noexcept {
615  return matrix_.isAligned();
616  }
617  //**********************************************************************************************
618 
619  //**********************************************************************************************
624  inline bool canSMPAssign() const noexcept {
625  return matrix_.canSMPAssign() ||
626  ( rows() * columns() >= SMP_DMATSCALARMULT_THRESHOLD );
627  }
628  //**********************************************************************************************
629 
630  private:
631  //**Member variables****************************************************************************
632  LeftOperand matrix_;
633  RightOperand scalar_;
634  //**********************************************************************************************
635 
636  //**Assignment to dense matrices****************************************************************
650  template< typename MT2 // Type of the target dense matrix
651  , bool SO2 > // Storage order of the target dense matrix
652  friend inline EnableIf_< UseAssign<MT2> >
653  assign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
654  {
656 
657  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
658  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
659 
660  assign( ~lhs, rhs.matrix_ );
661  assign( ~lhs, (~lhs) * rhs.scalar_ );
662  }
664  //**********************************************************************************************
665 
666  //**Assignment to sparse matrices***************************************************************
680  template< typename MT2 // Type of the target sparse matrix
681  , bool SO2 > // Storage order of the target sparse matrix
682  friend inline EnableIf_< UseAssign<MT2> >
683  assign( SparseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
684  {
686 
687  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
688  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
689 
690  assign( ~lhs, rhs.matrix_ );
691  (~lhs) *= rhs.scalar_;
692  }
694  //**********************************************************************************************
695 
696  //**Addition assignment to dense matrices*******************************************************
710  template< typename MT2 // Type of the target dense matrix
711  , bool SO2 > // Storage order of the target dense matrix
712  friend inline EnableIf_< UseAssign<MT2> >
713  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
714  {
716 
719  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( CompositeType_<ResultType> );
720 
721  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
722  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
723 
724  const ResultType tmp( serial( rhs ) );
725  addAssign( ~lhs, tmp );
726  }
728  //**********************************************************************************************
729 
730  //**Addition assignment to sparse matrices******************************************************
731  // No special implementation for the addition assignment to sparse matrices.
732  //**********************************************************************************************
733 
734  //**Subtraction assignment to dense matrices****************************************************
748  template< typename MT2 // Type of the target dense matrix
749  , bool SO2 > // Storage order of the target dense matrix
750  friend inline EnableIf_< UseAssign<MT2> >
751  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
752  {
754 
757  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( CompositeType_<ResultType> );
758 
759  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
760  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
761 
762  const ResultType tmp( serial( rhs ) );
763  subAssign( ~lhs, tmp );
764  }
766  //**********************************************************************************************
767 
768  //**Subtraction assignment to sparse matrices***************************************************
769  // No special implementation for the subtraction assignment to sparse matrices.
770  //**********************************************************************************************
771 
772  //**Multiplication assignment to dense matrices*************************************************
773  // No special implementation for the multiplication assignment to dense matrices.
774  //**********************************************************************************************
775 
776  //**Multiplication assignment to sparse matrices************************************************
777  // No special implementation for the multiplication assignment to sparse matrices.
778  //**********************************************************************************************
779 
780  //**SMP assignment to dense matrices************************************************************
794  template< typename MT2 // Type of the target dense matrix
795  , bool SO2 > // Storage order of the target dense matrix
796  friend inline EnableIf_< UseSMPAssign<MT2> >
797  smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
798  {
800 
801  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
802  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
803 
804  smpAssign( ~lhs, rhs.matrix_ );
805  smpAssign( ~lhs, (~lhs) * rhs.scalar_ );
806  }
808  //**********************************************************************************************
809 
810  //**SMP assignment to sparse matrices***********************************************************
824  template< typename MT2 // Type of the target sparse matrix
825  , bool SO2 > // Storage order of the target sparse matrix
826  friend inline EnableIf_< UseSMPAssign<MT2> >
827  smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
828  {
830 
831  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
832  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
833 
834  smpAssign( ~lhs, rhs.matrix_ );
835  (~lhs) *= rhs.scalar_;
836  }
838  //**********************************************************************************************
839 
840  //**SMP addition assignment to dense matrices***************************************************
854  template< typename MT2 // Type of the target dense matrix
855  , bool SO2 > // Storage order of the target dense matrix
856  friend inline EnableIf_< UseSMPAssign<MT2> >
857  smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
858  {
860 
863  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( CompositeType_<ResultType> );
864 
865  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
866  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
867 
868  const ResultType tmp( rhs );
869  smpAddAssign( ~lhs, tmp );
870  }
872  //**********************************************************************************************
873 
874  //**SMP addition assignment to sparse matrices**************************************************
875  // No special implementation for the SMP addition assignment to sparse matrices.
876  //**********************************************************************************************
877 
878  //**SMP subtraction assignment to dense matrices************************************************
892  template< typename MT2 // Type of the target dense matrix
893  , bool SO2 > // Storage order of the target dense matrix
894  friend inline EnableIf_< UseSMPAssign<MT2> >
895  smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
896  {
898 
901  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( CompositeType_<ResultType> );
902 
903  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
904  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
905 
906  const ResultType tmp( rhs );
907  smpSubAssign( ~lhs, tmp );
908  }
910  //**********************************************************************************************
911 
912  //**SMP subtraction assignment to sparse matrices***********************************************
913  // No special implementation for the SMP subtraction assignment to sparse matrices.
914  //**********************************************************************************************
915 
916  //**SMP multiplication assignment to dense matrices*********************************************
917  // No special implementation for the SMP multiplication assignment to dense matrices.
918  //**********************************************************************************************
919 
920  //**SMP multiplication assignment to sparse matrices********************************************
921  // No special implementation for the SMP multiplication assignment to sparse matrices.
922  //**********************************************************************************************
923 
924  //**Compile time checks*************************************************************************
929  BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE( ST, RightOperand );
931  //**********************************************************************************************
932 };
933 //*************************************************************************************************
934 
935 
936 
937 
938 //=================================================================================================
939 //
940 // GLOBAL UNARY ARITHMETIC OPERATORS
941 //
942 //=================================================================================================
943 
944 //*************************************************************************************************
961 template< typename MT // Type of the dense matrix
962  , bool SO > // Storage order
963 inline const DMatScalarMultExpr<MT,UnderlyingBuiltin_<MT>,SO>
965 {
967 
970 }
971 //*************************************************************************************************
972 
973 
974 
975 
976 //=================================================================================================
977 //
978 // GLOBAL BINARY ARITHMETIC OPERATORS
979 //
980 //=================================================================================================
981 
982 //*************************************************************************************************
1003 template< typename T1 // Type of the left-hand side dense matrix
1004  , bool SO // Storage order of the left-hand side dense matrix
1005  , typename T2 > // Type of the right-hand side scalar
1006 inline const EnableIf_< IsNumeric<T2>, MultExprTrait_<T1,T2> >
1007  operator*( const DenseMatrix<T1,SO>& mat, T2 scalar )
1008 {
1010 
1011  return MultExprTrait_<T1,T2>( ~mat, scalar );
1012 }
1013 //*************************************************************************************************
1014 
1015 
1016 //*************************************************************************************************
1037 template< typename T1 // Type of the left-hand side scalar
1038  , typename T2 // Type of the right-hand side dense matrix
1039  , bool SO > // Storage order of the right-hand side dense matrix
1040 inline const EnableIf_< IsNumeric<T1>, MultExprTrait_<T1,T2> >
1041  operator*( T1 scalar, const DenseMatrix<T2,SO>& mat )
1042 {
1044 
1045  return MultExprTrait_<T1,T2>( ~mat, scalar );
1046 }
1047 //*************************************************************************************************
1048 
1049 
1050 
1051 
1052 //=================================================================================================
1053 //
1054 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
1055 //
1056 //=================================================================================================
1057 
1058 //*************************************************************************************************
1070 template< typename VT // Type of the dense matrix
1071  , typename ST // Type of the scalar
1072  , bool TF > // Transpose flag
1073 inline const DMatScalarMultExpr<VT,ST,TF>
1074  operator-( const DMatScalarMultExpr<VT,ST,TF>& dm )
1075 {
1077 
1078  return DMatScalarMultExpr<VT,ST,TF>( dm.leftOperand(), -dm.rightOperand() );
1079 }
1081 //*************************************************************************************************
1082 
1083 
1084 
1085 
1086 //=================================================================================================
1087 //
1088 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1089 //
1090 //=================================================================================================
1091 
1092 //*************************************************************************************************
1105 template< typename MT // Type of the dense matrix of the left-hand side expression
1106  , typename ST1 // Type of the scalar of the left-hand side expression
1107  , bool SO // Storage order of the dense matrix
1108  , typename ST2 > // Type of the right-hand side scalar
1109 inline const EnableIf_< IsNumeric<ST2>, MultExprTrait_< DMatScalarMultExpr<MT,ST1,SO>, ST2 > >
1110  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
1111 {
1113 
1114  return mat.leftOperand() * ( mat.rightOperand() * scalar );
1115 }
1117 //*************************************************************************************************
1118 
1119 
1120 //*************************************************************************************************
1133 template< typename ST1 // Type of the left-hand side scalar
1134  , typename MT // Type of the dense matrix of the right-hand side expression
1135  , typename ST2 // Type of the scalar of the right-hand side expression
1136  , bool SO > // Storage order of the dense matrix
1137 inline const EnableIf_< IsNumeric<ST1>, MultExprTrait_< ST1, DMatScalarMultExpr<MT,ST2,SO> > >
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 EnableIf_< And< IsNumeric<ST2>, Or< IsInvertible<ST1>, IsInvertible<ST2> > >
1166  , DivExprTrait_< DMatScalarMultExpr<MT,ST1,SO>, ST2 > >
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 MultExprTrait_< DMatScalarMultExpr<MT,ST,SO>, VT >
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 MultExprTrait_< VT, DMatScalarMultExpr<MT,ST,SO> >
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< MultExprTrait_<MT,VT>, MultTrait_<ST1,ST2>, 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 MultExprTrait_< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >
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 MultExprTrait_< DMatScalarMultExpr<MT,ST,SO>, VT >
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 MultExprTrait_< VT, DMatScalarMultExpr<MT,ST,SO> >
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 MultExprTrait_< DMatScalarMultExpr<MT,ST1,SO>, SVecScalarMultExpr<VT,ST2,false> >
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 MultExprTrait_< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >
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 MultExprTrait_< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >
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 MultExprTrait_< MT1, DMatScalarMultExpr<MT2,ST,SO2> >
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 MultExprTrait_< DMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >
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 MultExprTrait_< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >
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 MultExprTrait_< MT1, DMatScalarMultExpr<MT2,ST,SO2> >
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 MultExprTrait_< DMatScalarMultExpr<MT1,ST1,SO1>, SMatScalarMultExpr<MT2,ST2,SO2> >
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 MultExprTrait_< SMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >
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> >
1682  : public BoolConstant< IsAligned<MT>::value >
1683 {};
1685 //*************************************************************************************************
1686 
1687 
1688 
1689 
1690 //=================================================================================================
1691 //
1692 // ISPADDED SPECIALIZATIONS
1693 //
1694 //=================================================================================================
1695 
1696 //*************************************************************************************************
1698 template< typename MT, typename ST, bool SO >
1699 struct IsPadded< DMatScalarMultExpr<MT,ST,SO> >
1700  : public BoolConstant< IsPadded<MT>::value >
1701 {};
1703 //*************************************************************************************************
1704 
1705 
1706 
1707 
1708 //=================================================================================================
1709 //
1710 // ISSYMMETRIC SPECIALIZATIONS
1711 //
1712 //=================================================================================================
1713 
1714 //*************************************************************************************************
1716 template< typename MT, typename ST, bool SO >
1717 struct IsSymmetric< DMatScalarMultExpr<MT,ST,SO> >
1718  : public BoolConstant< IsSymmetric<MT>::value >
1719 {};
1721 //*************************************************************************************************
1722 
1723 
1724 
1725 
1726 //=================================================================================================
1727 //
1728 // ISHERMITIAN SPECIALIZATIONS
1729 //
1730 //=================================================================================================
1731 
1732 //*************************************************************************************************
1734 template< typename MT, typename ST, bool SO >
1735 struct IsHermitian< DMatScalarMultExpr<MT,ST,SO> >
1736  : public BoolConstant< IsHermitian<MT>::value >
1737 {};
1739 //*************************************************************************************************
1740 
1741 
1742 
1743 
1744 //=================================================================================================
1745 //
1746 // ISLOWER SPECIALIZATIONS
1747 //
1748 //=================================================================================================
1749 
1750 //*************************************************************************************************
1752 template< typename MT, typename ST, bool SO >
1753 struct IsLower< DMatScalarMultExpr<MT,ST,SO> >
1754  : public BoolConstant< IsLower<MT>::value >
1755 {};
1757 //*************************************************************************************************
1758 
1759 
1760 
1761 
1762 //=================================================================================================
1763 //
1764 // ISSTRICTLYLOWER SPECIALIZATIONS
1765 //
1766 //=================================================================================================
1767 
1768 //*************************************************************************************************
1770 template< typename MT, typename ST, bool SO >
1771 struct IsStrictlyLower< DMatScalarMultExpr<MT,ST,SO> >
1772  : public BoolConstant< IsStrictlyLower<MT>::value >
1773 {};
1775 //*************************************************************************************************
1776 
1777 
1778 
1779 
1780 //=================================================================================================
1781 //
1782 // ISUPPER SPECIALIZATIONS
1783 //
1784 //=================================================================================================
1785 
1786 //*************************************************************************************************
1788 template< typename MT, typename ST, bool SO >
1789 struct IsUpper< DMatScalarMultExpr<MT,ST,SO> >
1790  : public BoolConstant< IsUpper<MT>::value >
1791 {};
1793 //*************************************************************************************************
1794 
1795 
1796 
1797 
1798 //=================================================================================================
1799 //
1800 // ISSTRICTLYUPPER SPECIALIZATIONS
1801 //
1802 //=================================================================================================
1803 
1804 //*************************************************************************************************
1806 template< typename MT, typename ST, bool SO >
1807 struct IsStrictlyUpper< DMatScalarMultExpr<MT,ST,SO> >
1808  : public BoolConstant< IsStrictlyUpper<MT>::value >
1809 {};
1811 //*************************************************************************************************
1812 
1813 
1814 
1815 
1816 //=================================================================================================
1817 //
1818 // DMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1819 //
1820 //=================================================================================================
1821 
1822 //*************************************************************************************************
1824 template< typename MT, typename ST1, typename ST2 >
1825 struct DMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1826 {
1827  public:
1828  //**********************************************************************************************
1829  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT>, IsNumeric<ST1>, IsNumeric<ST2> >
1830  , DMatScalarMultExprTrait_< MT, MultTrait_<ST1,ST2> >
1831  , INVALID_TYPE >;
1832  //**********************************************************************************************
1833 };
1835 //*************************************************************************************************
1836 
1837 
1838 
1839 
1840 //=================================================================================================
1841 //
1842 // TDMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1843 //
1844 //=================================================================================================
1845 
1846 //*************************************************************************************************
1848 template< typename MT, typename ST1, typename ST2 >
1849 struct TDMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1850 {
1851  public:
1852  //**********************************************************************************************
1853  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>, IsNumeric<ST1>, IsNumeric<ST2> >
1854  , TDMatScalarMultExprTrait_< MT, MultTrait_<ST1,ST2> >
1855  , INVALID_TYPE >;
1856  //**********************************************************************************************
1857 };
1859 //*************************************************************************************************
1860 
1861 
1862 
1863 
1864 //=================================================================================================
1865 //
1866 // DMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1867 //
1868 //=================================================================================================
1869 
1870 //*************************************************************************************************
1872 template< typename MT, typename ST1, typename ST2 >
1873 struct DMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1874 {
1875  private:
1876  //**********************************************************************************************
1877  typedef DivTrait_<ST1,ST2> ScalarType;
1878  //**********************************************************************************************
1879 
1880  public:
1881  //**********************************************************************************************
1882  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT>, IsNumeric<ST1>, IsNumeric<ST2> >
1883  , If_< IsInvertible<ScalarType>
1884  , DMatScalarMultExprTrait_<MT,ScalarType>
1885  , DMatScalarDivExprTrait_<MT,ScalarType> >
1886  , INVALID_TYPE >;
1887  //**********************************************************************************************
1888 };
1890 //*************************************************************************************************
1891 
1892 
1893 
1894 
1895 //=================================================================================================
1896 //
1897 // TDMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1898 //
1899 //=================================================================================================
1900 
1901 //*************************************************************************************************
1903 template< typename MT, typename ST1, typename ST2 >
1904 struct TDMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1905 {
1906  private:
1907  //**********************************************************************************************
1908  typedef DivTrait_<ST1,ST2> ScalarType;
1909  //**********************************************************************************************
1910 
1911  public:
1912  //**********************************************************************************************
1913  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>, IsNumeric<ST1>, IsNumeric<ST2> >
1914  , If_< IsInvertible<ScalarType>
1915  , TDMatScalarMultExprTrait_<MT,ScalarType>
1916  , TDMatScalarDivExprTrait_<MT,ScalarType> >
1917  , INVALID_TYPE >;
1918  //**********************************************************************************************
1919 };
1921 //*************************************************************************************************
1922 
1923 
1924 
1925 
1926 //=================================================================================================
1927 //
1928 // DMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1929 //
1930 //=================================================================================================
1931 
1932 //*************************************************************************************************
1934 template< typename MT, typename ST, typename VT >
1935 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1936 {
1937  public:
1938  //**********************************************************************************************
1939  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
1940  , IsDenseVector<VT>, IsColumnVector<VT>
1941  , IsNumeric<ST> >
1942  , DVecScalarMultExprTrait_< DMatDVecMultExprTrait_<MT,VT>, ST >
1943  , INVALID_TYPE >;
1944  //**********************************************************************************************
1945 };
1947 //*************************************************************************************************
1948 
1949 
1950 //*************************************************************************************************
1952 template< typename MT, typename ST1, typename VT, typename ST2 >
1953 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, DVecScalarMultExpr<VT,ST2,false> >
1954 {
1955  public:
1956  //**********************************************************************************************
1957  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
1958  , IsDenseVector<VT>, IsColumnVector<VT>
1959  , IsNumeric<ST1>, IsNumeric<ST2> >
1960  , DVecScalarMultExprTrait_< DMatDVecMultExprTrait_<MT,VT>, MultTrait_<ST1,ST2> >
1961  , INVALID_TYPE >;
1962  //**********************************************************************************************
1963 };
1965 //*************************************************************************************************
1966 
1967 
1968 
1969 
1970 //=================================================================================================
1971 //
1972 // TDMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1973 //
1974 //=================================================================================================
1975 
1976 //*************************************************************************************************
1978 template< typename MT, typename ST, typename VT >
1979 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1980 {
1981  public:
1982  //**********************************************************************************************
1983  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
1984  , IsDenseVector<VT>, IsColumnVector<VT>
1985  , IsNumeric<ST> >
1986  , DVecScalarMultExprTrait_< TDMatDVecMultExprTrait_<MT,VT>, ST >
1987  , INVALID_TYPE >;
1988  //**********************************************************************************************
1989 };
1991 //*************************************************************************************************
1992 
1993 
1994 //*************************************************************************************************
1996 template< typename MT, typename ST1, typename VT, typename ST2 >
1997 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, DVecScalarMultExpr<VT,ST2,false> >
1998 {
1999  public:
2000  //**********************************************************************************************
2001  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2002  , IsDenseVector<VT>, IsColumnVector<VT>
2003  , IsNumeric<ST1>, IsNumeric<ST2> >
2004  , DVecScalarMultExprTrait_< TDMatDVecMultExprTrait_<MT,VT>, MultTrait_<ST1,ST2> >
2005  , INVALID_TYPE >;
2006  //**********************************************************************************************
2007 };
2009 //*************************************************************************************************
2010 
2011 
2012 
2013 
2014 //=================================================================================================
2015 //
2016 // TDVECDMATMULTEXPRTRAIT SPECIALIZATIONS
2017 //
2018 //=================================================================================================
2019 
2020 //*************************************************************************************************
2022 template< typename VT, typename MT, typename ST >
2023 struct TDVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
2024 {
2025  public:
2026  //**********************************************************************************************
2027  using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT>
2028  , IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
2029  , IsNumeric<ST> >
2030  , TDVecScalarMultExprTrait_< TDVecDMatMultExprTrait_<VT,MT>, ST >
2031  , INVALID_TYPE >;
2032  //**********************************************************************************************
2033 };
2035 //*************************************************************************************************
2036 
2037 
2038 //*************************************************************************************************
2040 template< typename VT, typename ST1, typename MT, typename ST2 >
2041 struct TDVecDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
2042 {
2043  public:
2044  //**********************************************************************************************
2045  using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT>
2046  , IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
2047  , IsNumeric<ST1>, IsNumeric<ST2> >
2048  , TDVecScalarMultExprTrait_< TDVecDMatMultExprTrait_<VT,MT>, MultTrait_<ST1,ST2> >
2049  , INVALID_TYPE >;
2050  //**********************************************************************************************
2051 };
2053 //*************************************************************************************************
2054 
2055 
2056 
2057 
2058 //=================================================================================================
2059 //
2060 // TDVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2061 //
2062 //=================================================================================================
2063 
2064 //*************************************************************************************************
2066 template< typename VT, typename MT, typename ST >
2067 struct TDVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
2068 {
2069  public:
2070  //**********************************************************************************************
2071  using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT>
2072  , IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2073  , IsNumeric<ST> >
2074  , TDVecScalarMultExprTrait_< TDVecTDMatMultExprTrait_<VT,MT>, ST >
2075  , INVALID_TYPE >;
2076  //**********************************************************************************************
2077 };
2079 //*************************************************************************************************
2080 
2081 
2082 //*************************************************************************************************
2084 template< typename VT, typename ST1, typename MT, typename ST2 >
2085 struct TDVecTDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2086 {
2087  public:
2088  //**********************************************************************************************
2089  using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT>
2090  , IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2091  , IsNumeric<ST1>, IsNumeric<ST2> >
2092  , TDVecScalarMultExprTrait_< TDVecTDMatMultExprTrait_<VT,MT>, MultTrait_<ST1,ST2> >
2093  , INVALID_TYPE >;
2094  //**********************************************************************************************
2095 };
2097 //*************************************************************************************************
2098 
2099 
2100 
2101 
2102 //=================================================================================================
2103 //
2104 // DMATSVECMULTEXPRTRAIT SPECIALIZATIONS
2105 //
2106 //=================================================================================================
2107 
2108 //*************************************************************************************************
2110 template< typename MT, typename ST, typename VT >
2111 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
2112 {
2113  public:
2114  //**********************************************************************************************
2115  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
2116  , IsSparseVector<VT>, IsColumnVector<VT>
2117  , IsNumeric<ST> >
2118  , DVecScalarMultExprTrait_< DMatSVecMultExprTrait_<MT,VT>, ST >
2119  , INVALID_TYPE >;
2120  //**********************************************************************************************
2121 };
2123 //*************************************************************************************************
2124 
2125 
2126 //*************************************************************************************************
2128 template< typename MT, typename ST1, typename VT, typename ST2 >
2129 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, SVecScalarMultExpr<VT,ST2,false> >
2130 {
2131  public:
2132  //**********************************************************************************************
2133  using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
2134  , IsSparseVector<VT>, IsColumnVector<VT>
2135  , IsNumeric<ST1>, IsNumeric<ST2> >
2136  , DVecScalarMultExprTrait_< DMatSVecMultExprTrait_<MT,VT>, MultTrait_<ST1,ST2> >
2137  , INVALID_TYPE >;
2138  //**********************************************************************************************
2139 };
2141 //*************************************************************************************************
2142 
2143 
2144 
2145 
2146 //=================================================================================================
2147 //
2148 // TDMATSVECMULTEXPRTRAIT SPECIALIZATIONS
2149 //
2150 //=================================================================================================
2151 
2152 //*************************************************************************************************
2154 template< typename MT, typename ST, typename VT >
2155 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
2156 {
2157  public:
2158  //**********************************************************************************************
2159  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2160  , IsSparseVector<VT>, IsColumnVector<VT>
2161  , IsNumeric<ST> >
2162  , DVecScalarMultExprTrait_< TDMatSVecMultExprTrait_<MT,VT>, ST >
2163  , INVALID_TYPE >;
2164  //**********************************************************************************************
2165 };
2167 //*************************************************************************************************
2168 
2169 
2170 //*************************************************************************************************
2172 template< typename MT, typename ST1, typename VT, typename ST2 >
2173 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, SVecScalarMultExpr<VT,ST2,false> >
2174 {
2175  public:
2176  //**********************************************************************************************
2177  using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2178  , IsSparseVector<VT>, IsColumnVector<VT>
2179  , IsNumeric<ST1>, IsNumeric<ST2> >
2180  , DVecScalarMultExprTrait_< TDMatSVecMultExprTrait_<MT,VT>, MultTrait_<ST1,ST2> >
2181  , INVALID_TYPE >;
2182  //**********************************************************************************************
2183 };
2185 //*************************************************************************************************
2186 
2187 
2188 
2189 
2190 //=================================================================================================
2191 //
2192 // TSVECDMATMULTEXPRTRAIT SPECIALIZATIONS
2193 //
2194 //=================================================================================================
2195 
2196 //*************************************************************************************************
2198 template< typename VT, typename MT, typename ST >
2199 struct TSVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
2200 {
2201  public:
2202  //**********************************************************************************************
2203  using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT>
2204  , IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
2205  , IsNumeric<ST> >
2206  , TDVecScalarMultExprTrait_< TSVecDMatMultExprTrait_<VT,MT>, ST >
2207  , INVALID_TYPE >;
2208  //**********************************************************************************************
2209 };
2211 //*************************************************************************************************
2212 
2213 
2214 //*************************************************************************************************
2216 template< typename VT, typename ST1, typename MT, typename ST2 >
2217 struct TSVecDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
2218 {
2219  public:
2220  //**********************************************************************************************
2221  using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT>
2222  , IsDenseMatrix<MT>, IsRowMajorMatrix<MT>
2223  , IsNumeric<ST1>, IsNumeric<ST2> >
2224  , TDVecScalarMultExprTrait_< TSVecDMatMultExprTrait_<VT,MT>, MultTrait_<ST1,ST2> >
2225  , INVALID_TYPE >;
2226  //**********************************************************************************************
2227 };
2229 //*************************************************************************************************
2230 
2231 
2232 
2233 
2234 //=================================================================================================
2235 //
2236 // TSVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2237 //
2238 //=================================================================================================
2239 
2240 //*************************************************************************************************
2242 template< typename VT, typename MT, typename ST >
2243 struct TSVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
2244 {
2245  public:
2246  //**********************************************************************************************
2247  using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT>
2248  , IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2249  , IsNumeric<ST> >
2250  , TDVecScalarMultExprTrait_< TSVecTDMatMultExprTrait_<VT,MT>, ST >
2251  , INVALID_TYPE >;
2252  //**********************************************************************************************
2253 };
2255 //*************************************************************************************************
2256 
2257 
2258 //*************************************************************************************************
2260 template< typename VT, typename ST1, typename MT, typename ST2 >
2261 struct TSVecTDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
2262 {
2263  public:
2264  //**********************************************************************************************
2265  using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT>
2266  , IsDenseMatrix<MT>, IsColumnMajorMatrix<MT>
2267  , IsNumeric<ST1>, IsNumeric<ST2> >
2268  , TDVecScalarMultExprTrait_< TSVecTDMatMultExprTrait_<VT,MT>, MultTrait_<ST1,ST2> >
2269  , INVALID_TYPE >;
2270  //**********************************************************************************************
2271 };
2273 //*************************************************************************************************
2274 
2275 
2276 
2277 
2278 //=================================================================================================
2279 //
2280 // DMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2281 //
2282 //=================================================================================================
2283 
2284 //*************************************************************************************************
2286 template< typename MT1, typename ST, typename MT2 >
2287 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2288 {
2289  public:
2290  //**********************************************************************************************
2291  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2292  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2293  , IsNumeric<ST> >
2294  , DMatScalarMultExprTrait_< DMatDMatMultExprTrait_<MT1,MT2>, ST >
2295  , INVALID_TYPE >;
2296  //**********************************************************************************************
2297 };
2299 //*************************************************************************************************
2300 
2301 
2302 //*************************************************************************************************
2304 template< typename MT1, typename MT2, typename ST >
2305 struct DMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2306 {
2307  public:
2308  //**********************************************************************************************
2309  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2310  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2311  , IsNumeric<ST> >
2312  , DMatScalarMultExprTrait_< DMatDMatMultExprTrait_<MT1,MT2>, ST >
2313  , INVALID_TYPE >;
2314  //**********************************************************************************************
2315 };
2317 //*************************************************************************************************
2318 
2319 
2320 //*************************************************************************************************
2322 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2323 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2324 {
2325  public:
2326  //**********************************************************************************************
2327  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2328  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2329  , IsNumeric<ST1>, IsNumeric<ST2> >
2330  , DMatScalarMultExprTrait_< DMatDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2331  , INVALID_TYPE >;
2332  //**********************************************************************************************
2333 };
2335 //*************************************************************************************************
2336 
2337 
2338 
2339 
2340 //=================================================================================================
2341 //
2342 // DMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2343 //
2344 //=================================================================================================
2345 
2346 //*************************************************************************************************
2348 template< typename MT1, typename ST, typename MT2 >
2349 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2350 {
2351  public:
2352  //**********************************************************************************************
2353  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2354  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2355  , IsNumeric<ST> >
2356  , DMatScalarMultExprTrait_< DMatTDMatMultExprTrait_<MT1,MT2>, ST >
2357  , INVALID_TYPE >;
2358  //**********************************************************************************************
2359 };
2361 //*************************************************************************************************
2362 
2363 
2364 //*************************************************************************************************
2366 template< typename MT1, typename MT2, typename ST >
2367 struct DMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2368 {
2369  public:
2370  //**********************************************************************************************
2371  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2372  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2373  , IsNumeric<ST> >
2374  , DMatScalarMultExprTrait_< DMatTDMatMultExprTrait_<MT1,MT2>, ST >
2375  , INVALID_TYPE >;
2376  //**********************************************************************************************
2377 };
2379 //*************************************************************************************************
2380 
2381 
2382 //*************************************************************************************************
2384 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2385 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2386 {
2387  public:
2388  //**********************************************************************************************
2389  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2390  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2391  , IsNumeric<ST1>, IsNumeric<ST2> >
2392  , DMatScalarMultExprTrait_< DMatTDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2393  , INVALID_TYPE >;
2394  //**********************************************************************************************
2395 };
2397 //*************************************************************************************************
2398 
2399 
2400 
2401 
2402 //=================================================================================================
2403 //
2404 // TDMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2405 //
2406 //=================================================================================================
2407 
2408 //*************************************************************************************************
2410 template< typename MT1, typename ST, typename MT2 >
2411 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2412 {
2413  public:
2414  //**********************************************************************************************
2415  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2416  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2417  , IsNumeric<ST> >
2418  , TDMatScalarMultExprTrait_< TDMatDMatMultExprTrait_<MT1,MT2>, ST >
2419  , INVALID_TYPE >;
2420  //**********************************************************************************************
2421 };
2423 //*************************************************************************************************
2424 
2425 
2426 //*************************************************************************************************
2428 template< typename MT1, typename MT2, typename ST >
2429 struct TDMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2430 {
2431  public:
2432  //**********************************************************************************************
2433  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2434  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2435  , IsNumeric<ST> >
2436  , TDMatScalarMultExprTrait_< TDMatDMatMultExprTrait_<MT1,MT2>, ST >
2437  , INVALID_TYPE >;
2438  //**********************************************************************************************
2439 };
2441 //*************************************************************************************************
2442 
2443 
2444 //*************************************************************************************************
2446 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2447 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2448 {
2449  public:
2450  //**********************************************************************************************
2451  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2452  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2453  , IsNumeric<ST1>, IsNumeric<ST2> >
2454  , TDMatScalarMultExprTrait_< TDMatDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2455  , INVALID_TYPE >;
2456  //**********************************************************************************************
2457 };
2459 //*************************************************************************************************
2460 
2461 
2462 
2463 
2464 //=================================================================================================
2465 //
2466 // TDMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2467 //
2468 //=================================================================================================
2469 
2470 //*************************************************************************************************
2472 template< typename MT1, typename ST, typename MT2 >
2473 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2474 {
2475  public:
2476  //**********************************************************************************************
2477  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2478  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2479  , IsNumeric<ST> >
2480  , TDMatScalarMultExprTrait_< TDMatTDMatMultExprTrait_<MT1,MT2>, ST >
2481  , INVALID_TYPE >;
2482  //**********************************************************************************************
2483 };
2485 //*************************************************************************************************
2486 
2487 
2488 //*************************************************************************************************
2490 template< typename MT1, typename MT2, typename ST >
2491 struct TDMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2492 {
2493  public:
2494  //**********************************************************************************************
2495  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2496  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2497  , IsNumeric<ST> >
2498  , TDMatScalarMultExprTrait_< TDMatTDMatMultExprTrait_<MT1,MT2>, ST >
2499  , INVALID_TYPE >;
2500  //**********************************************************************************************
2501 };
2503 //*************************************************************************************************
2504 
2505 
2506 //*************************************************************************************************
2508 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2509 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2510 {
2511  public:
2512  //**********************************************************************************************
2513  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2514  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2515  , IsNumeric<ST1>, IsNumeric<ST2> >
2516  , TDMatScalarMultExprTrait_< TDMatTDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2517  , INVALID_TYPE >;
2518  //**********************************************************************************************
2519 };
2521 //*************************************************************************************************
2522 
2523 
2524 
2525 
2526 //=================================================================================================
2527 //
2528 // DMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2529 //
2530 //=================================================================================================
2531 
2532 //*************************************************************************************************
2534 template< typename MT1, typename ST, typename MT2 >
2535 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2536 {
2537  public:
2538  //**********************************************************************************************
2539  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2540  , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2>
2541  , IsNumeric<ST> >
2542  , DMatScalarMultExprTrait_< DMatSMatMultExprTrait_<MT1,MT2>, ST >
2543  , INVALID_TYPE >;
2544  //**********************************************************************************************
2545 };
2547 //*************************************************************************************************
2548 
2549 
2550 //*************************************************************************************************
2552 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2553 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,false> >
2554 {
2555  public:
2556  //**********************************************************************************************
2557  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2558  , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2>
2559  , IsNumeric<ST1>, IsNumeric<ST2> >
2560  , DMatScalarMultExprTrait_< DMatSMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2561  , INVALID_TYPE >;
2562  //**********************************************************************************************
2563 };
2565 //*************************************************************************************************
2566 
2567 
2568 
2569 
2570 //=================================================================================================
2571 //
2572 // DMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2573 //
2574 //=================================================================================================
2575 
2576 //*************************************************************************************************
2578 template< typename MT1, typename ST, typename MT2 >
2579 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
2580 {
2581  public:
2582  //**********************************************************************************************
2583  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2584  , IsSparseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2585  , IsNumeric<ST> >
2586  , DMatScalarMultExprTrait_< DMatTSMatMultExprTrait_<MT1,MT2>, ST >
2587  , INVALID_TYPE >;
2588  //**********************************************************************************************
2589 };
2591 //*************************************************************************************************
2592 
2593 
2594 //*************************************************************************************************
2596 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2597 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,true> >
2598 {
2599  public:
2600  //**********************************************************************************************
2601  using Type = If_< And< IsDenseMatrix<MT1>, IsRowMajorMatrix<MT1>
2602  , IsSparseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2603  , IsNumeric<ST1>, IsNumeric<ST2> >
2604  , DMatScalarMultExprTrait_< DMatTSMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2605  , INVALID_TYPE >;
2606  //**********************************************************************************************
2607 };
2609 //*************************************************************************************************
2610 
2611 
2612 
2613 
2614 //=================================================================================================
2615 //
2616 // TDMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2617 //
2618 //=================================================================================================
2619 
2620 //*************************************************************************************************
2622 template< typename MT1, typename ST, typename MT2 >
2623 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2624 {
2625  public:
2626  //**********************************************************************************************
2627  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2628  , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2>
2629  , IsNumeric<ST> >
2630  , TDMatScalarMultExprTrait_< TDMatSMatMultExprTrait_<MT1,MT2>, ST >
2631  , INVALID_TYPE >;
2632  //**********************************************************************************************
2633 };
2635 //*************************************************************************************************
2636 
2637 
2638 //*************************************************************************************************
2640 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2641 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,false> >
2642 {
2643  public:
2644  //**********************************************************************************************
2645  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2646  , IsSparseMatrix<MT2>, IsRowMajorMatrix<MT2>
2647  , IsNumeric<ST1>, IsNumeric<ST2> >
2648  , TDMatScalarMultExprTrait_< TDMatSMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2649  , INVALID_TYPE >;
2650  //**********************************************************************************************
2651 };
2653 //*************************************************************************************************
2654 
2655 
2656 
2657 
2658 //=================================================================================================
2659 //
2660 // TDMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2661 //
2662 //=================================================================================================
2663 
2664 //*************************************************************************************************
2666 template< typename MT1, typename ST, typename MT2 >
2667 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2668 {
2669  public:
2670  //**********************************************************************************************
2671  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2672  , IsSparseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2673  , IsNumeric<ST> >
2674  , TDMatScalarMultExprTrait_< TDMatTSMatMultExprTrait_<MT1,MT2>, ST >
2675  , INVALID_TYPE >;
2676  //**********************************************************************************************
2677 };
2679 //*************************************************************************************************
2680 
2681 
2682 //*************************************************************************************************
2684 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2685 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,true> >
2686 {
2687  public:
2688  //**********************************************************************************************
2689  using Type = If_< And< IsDenseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2690  , IsSparseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2691  , IsNumeric<ST1>, IsNumeric<ST2> >
2692  , TDMatScalarMultExprTrait_< TDMatTSMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2693  , INVALID_TYPE >;
2694  //**********************************************************************************************
2695 };
2697 //*************************************************************************************************
2698 
2699 
2700 
2701 
2702 //=================================================================================================
2703 //
2704 // SMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2705 //
2706 //=================================================================================================
2707 
2708 //*************************************************************************************************
2710 template< typename MT1, typename ST, typename MT2 >
2711 struct SMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2712 {
2713  public:
2714  //**********************************************************************************************
2715  using Type = If_< And< IsSparseMatrix<MT1>, IsRowMajorMatrix<MT1>
2716  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2717  , IsNumeric<ST> >
2718  , DMatScalarMultExprTrait_< SMatDMatMultExprTrait_<MT1,MT2>, ST >
2719  , INVALID_TYPE >;
2720  //**********************************************************************************************
2721 };
2723 //*************************************************************************************************
2724 
2725 
2726 //*************************************************************************************************
2728 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2729 struct SMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2730 {
2731  public:
2732  //**********************************************************************************************
2733  using Type = If_< And< IsSparseMatrix<MT1>, IsRowMajorMatrix<MT1>
2734  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2735  , IsNumeric<ST1>, IsNumeric<ST2> >
2736  , DMatScalarMultExprTrait_< SMatDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2737  , INVALID_TYPE >;
2738  //**********************************************************************************************
2739 };
2741 //*************************************************************************************************
2742 
2743 
2744 
2745 
2746 //=================================================================================================
2747 //
2748 // SMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2749 //
2750 //=================================================================================================
2751 
2752 //*************************************************************************************************
2754 template< typename MT1, typename ST, typename MT2 >
2755 struct SMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2756 {
2757  public:
2758  //**********************************************************************************************
2759  using Type = If_< And< IsSparseMatrix<MT1>, IsRowMajorMatrix<MT1>
2760  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2761  , IsNumeric<ST> >
2762  , DMatScalarMultExprTrait_< SMatTDMatMultExprTrait_<MT1,MT2>, ST >
2763  , INVALID_TYPE >;
2764  //**********************************************************************************************
2765 };
2767 //*************************************************************************************************
2768 
2769 
2770 //*************************************************************************************************
2772 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2773 struct SMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2774 {
2775  public:
2776  //**********************************************************************************************
2777  using Type = If_< And< IsSparseMatrix<MT1>, IsRowMajorMatrix<MT1>
2778  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2779  , IsNumeric<ST1>, IsNumeric<ST2> >
2780  , DMatScalarMultExprTrait_< SMatTDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2781  , INVALID_TYPE >;
2782  //**********************************************************************************************
2783 };
2785 //*************************************************************************************************
2786 
2787 
2788 
2789 
2790 //=================================================================================================
2791 //
2792 // TSMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2793 //
2794 //=================================================================================================
2795 
2796 //*************************************************************************************************
2798 template< typename MT1, typename ST, typename MT2 >
2799 struct TSMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2800 {
2801  public:
2802  //**********************************************************************************************
2803  using Type = If_< And< IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2804  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2805  , IsNumeric<ST> >
2806  , TDMatScalarMultExprTrait_< TSMatDMatMultExprTrait_<MT1,MT2>, ST >
2807  , INVALID_TYPE >;
2808  //**********************************************************************************************
2809 };
2811 //*************************************************************************************************
2812 
2813 
2814 //*************************************************************************************************
2816 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2817 struct TSMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2818 {
2819  public:
2820  //**********************************************************************************************
2821  using Type = If_< And< IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2822  , IsDenseMatrix<MT2>, IsRowMajorMatrix<MT2>
2823  , IsNumeric<ST1>, IsNumeric<ST2> >
2824  , TDMatScalarMultExprTrait_< TSMatDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2825  , INVALID_TYPE >;
2826  //**********************************************************************************************
2827 };
2829 //*************************************************************************************************
2830 
2831 
2832 
2833 
2834 //=================================================================================================
2835 //
2836 // TSMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2837 //
2838 //=================================================================================================
2839 
2840 //*************************************************************************************************
2842 template< typename MT1, typename ST, typename MT2 >
2843 struct TSMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2844 {
2845  public:
2846  //**********************************************************************************************
2847  using Type = If_< And< IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2848  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2849  , IsNumeric<ST> >
2850  , TDMatScalarMultExprTrait_< TSMatTDMatMultExprTrait_<MT1,MT2>, ST >
2851  , INVALID_TYPE >;
2852  //**********************************************************************************************
2853 };
2855 //*************************************************************************************************
2856 
2857 
2858 //*************************************************************************************************
2860 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2861 struct TSMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2862 {
2863  public:
2864  //**********************************************************************************************
2865  using Type = If_< And< IsSparseMatrix<MT1>, IsColumnMajorMatrix<MT1>
2866  , IsDenseMatrix<MT2>, IsColumnMajorMatrix<MT2>
2867  , IsNumeric<ST1>, IsNumeric<ST2> >
2868  , TDMatScalarMultExprTrait_< TSMatTDMatMultExprTrait_<MT1,MT2>, MultTrait_<ST1,ST2> >
2869  , INVALID_TYPE >;
2870  //**********************************************************************************************
2871 };
2873 //*************************************************************************************************
2874 
2875 
2876 
2877 
2878 //=================================================================================================
2879 //
2880 // SUBMATRIXEXPRTRAIT SPECIALIZATIONS
2881 //
2882 //=================================================================================================
2883 
2884 //*************************************************************************************************
2886 template< typename MT, typename ST, bool SO, bool AF >
2887 struct SubmatrixExprTrait< DMatScalarMultExpr<MT,ST,SO>, AF >
2888 {
2889  public:
2890  //**********************************************************************************************
2891  using Type = MultExprTrait_< SubmatrixExprTrait_<const MT,AF>, ST >;
2892  //**********************************************************************************************
2893 };
2895 //*************************************************************************************************
2896 
2897 
2898 
2899 
2900 //=================================================================================================
2901 //
2902 // ROWEXPRTRAIT SPECIALIZATIONS
2903 //
2904 //=================================================================================================
2905 
2906 //*************************************************************************************************
2908 template< typename MT, typename ST, bool SO >
2909 struct RowExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2910 {
2911  public:
2912  //**********************************************************************************************
2913  using Type = MultExprTrait_< RowExprTrait_<const MT>, ST >;
2914  //**********************************************************************************************
2915 };
2917 //*************************************************************************************************
2918 
2919 
2920 
2921 
2922 //=================================================================================================
2923 //
2924 // COLUMNEXPRTRAIT SPECIALIZATIONS
2925 //
2926 //=================================================================================================
2927 
2928 //*************************************************************************************************
2930 template< typename MT, typename ST, bool SO >
2931 struct ColumnExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2932 {
2933  public:
2934  //**********************************************************************************************
2935  using Type = MultExprTrait_< ColumnExprTrait_<const MT>, ST >;
2936  //**********************************************************************************************
2937 };
2939 //*************************************************************************************************
2940 
2941 } // namespace blaze
2942 
2943 #endif
Pointer difference type of the Blaze library.
DifferenceType difference_type
Difference between two iterators.
Definition: DMatScalarMultExpr.h:221
Header file for auxiliary alias declarations.
Data type constraint.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
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:70
RightOperand scalar_
Scalar of the multiplication expression.
Definition: DMatScalarMultExpr.h:441
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:7800
ConstIterator_< MT > IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:224
Header file for basic type definitions.
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatScalarMultExpr.h:570
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatScalarMultExpr.h:604
ReferenceType reference
Reference return type.
Definition: DMatScalarMultExpr.h:220
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatScalarMultExpr.h:268
Header file for the IsSparseMatrix type trait.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatScalarMultExpr.h:300
Header file for the serial shim.
#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:63
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:386
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
Header file for the ColumnExprTrait class template.
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:162
Header file for the IsColumnMajorMatrix type trait.
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: DMatScalarMultExpr.h:633
Header file for the IsRowVector type trait.
IteratorCategory iterator_category
The iterator category.
Definition: DMatScalarMultExpr.h:217
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.
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatScalarMultExpr.h:320
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatScalarMultExpr.h:560
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
Header file for the UnderlyingElement type trait.
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
Header file for the RequiresEvaluation type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatScalarMultExpr.h:397
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_
Auxiliary alias declaration for the UnderlyingBuiltin type trait.The UnderlyingBuiltin_ alias declara...
Definition: UnderlyingBuiltin.h:133
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:109
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatScalarMultExpr.h:310
Constraint on the data type.
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
MultExprTrait_< RN, ST > ExprReturnType
Expression return type for the subscript operator.
Definition: DMatScalarMultExpr.h:145
Header file for the DivExprTrait class template.
ElementType ValueType
Type of the underlying elements.
Definition: DMatScalarMultExpr.h:211
MultTrait_< RT, ST > ResultType
Result type for expression template evaluations.
Definition: DMatScalarMultExpr.h:185
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: DMatScalarMultExpr.h:580
Constraint on the data type.
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
Header file for the MultExprTrait class template.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
const EnableIf_< IsNumeric< T2 >, DivExprTrait_< T1, T2 > > operator/(const DenseMatrix< T1, SO > &mat, T2 scalar)
Division operator for the division of a dense matrix by a scalar value ( ).
Definition: DMatScalarDivExpr.h:966
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatScalarMultExpr.h:496
Header file for the IsTemporary type trait class.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatScalarMultExpr.h:214
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DMatScalarMultExpr.h:191
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
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatScalarMultExpr.h:186
Header file for the If class template.
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:353
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatScalarMultExpr.h:481
Header file for the UnderlyingBuiltin type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Header file for the Or class template.
Expression object for dense matrix-scalar multiplications.The DMatScalarMultExpr class represents the...
Definition: DMatScalarMultExpr.h:123
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatScalarMultExpr.h:245
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatScalarMultExpr.h:592
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
IteratorType iterator_
Iterator to the current element.
Definition: DMatScalarMultExpr.h:440
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:375
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for all SIMD functionality.
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatScalarMultExpr.h:514
#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:71
Header file for the IsLower type trait.
ElementType * PointerType
Pointer return type.
Definition: DMatScalarMultExpr.h:212
Header file for the IsAligned type trait.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:60
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:331
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatScalarMultExpr.h:614
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatScalarMultExpr.h:550
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
CompositeType_< MT > CT
Composite type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:132
LeftOperand matrix_
Left-hand side dense matrix of the multiplication expression.
Definition: DMatScalarMultExpr.h:632
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatScalarMultExpr.h:187
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:540
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:433
Header file for the IsPadded type trait.
If_< IsExpression< MT >, const MT, const MT & > LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatScalarMultExpr.h:197
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DMatScalarMultExpr.h:233
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatScalarMultExpr.h:421
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
IfTrue_< useAssign, const ResultType, const DMatScalarMultExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatScalarMultExpr.h:194
ElementType & ReferenceType
Reference return type.
Definition: DMatScalarMultExpr.h:213
Header file for the IsSparseVector type trait.
Header file for the SubmatrixExprTrait class template.
Header file for the HasSIMDMult type trait.
Header file for the MatScalarMultExpr base class.
Header file for run time assertion macros.
Utility type for generic codes.
Header file for the division trait.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatScalarMultExpr.h:257
#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:61
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatScalarMultExpr.h:529
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:342
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatScalarMultExpr.h:364
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatScalarMultExpr.h:279
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatScalarMultExpr.h:624
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatScalarMultExpr.h:409
Header file for the IsInvertible type trait.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
Header file for the IsDenseVector type trait.
ElementType_< MT > ET
Element type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:131
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatScalarMultExpr.h:289
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DMatScalarMultExpr.h:188
Header file for the IsRowMajorMatrix type trait.
ReturnType_< MT > RN
Return type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:130
Header file for the IsComputation type trait class.
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: DMatScalarMultExpr.h:200
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
DMatScalarMultExpr(const MT &matrix, ST scalar) noexcept
Constructor for the DMatScalarMultExpr class.
Definition: DMatScalarMultExpr.h:468
#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:219
Header file for the IntegralConstant class template.
Iterator over the elements of the dense matrix.
Definition: DMatScalarMultExpr.h:206
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatScalarMultExpr.h:210
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Header file for the IsColumnVector type trait.
DMatScalarMultExpr< MT, ST, SO > This
Type of this DMatScalarMultExpr instance.
Definition: DMatScalarMultExpr.h:184
Header file for the IsHermitian type trait.
System settings for the inline keywords.
ResultType_< MT > RT
Result type of the dense matrix expression.
Definition: DMatScalarMultExpr.h:129
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:218