DVecScalarMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSCALARMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECSCALARMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
44 #include <blaze/math/Aliases.h>
48 #include <blaze/math/Exception.h>
57 #include <blaze/math/SIMD.h>
71 #include <blaze/system/Inline.h>
73 #include <blaze/util/Assert.h>
77 #include <blaze/util/EnableIf.h>
80 #include <blaze/util/InvalidType.h>
81 #include <blaze/util/mpl/And.h>
82 #include <blaze/util/mpl/If.h>
83 #include <blaze/util/mpl/Or.h>
84 #include <blaze/util/Types.h>
86 
87 
88 namespace blaze {
89 
90 //=================================================================================================
91 //
92 // CLASS DVECSCALARMULTEXPR
93 //
94 //=================================================================================================
95 
96 //*************************************************************************************************
103 template< typename VT // Type of the left-hand side dense vector
104  , typename ST // Type of the right-hand side scalar value
105  , bool TF > // Transpose flag
107  : public VecScalarMultExpr< DenseVector< DVecScalarMultExpr<VT,ST,TF>, TF > >
108  , private Computation
109 {
110  private:
111  //**Type definitions****************************************************************************
112  using RT = ResultType_<VT>;
113  using RN = ReturnType_<VT>;
116  //**********************************************************************************************
117 
118  //**Return type evaluation**********************************************************************
120 
125  enum : bool { returnExpr = !IsTemporary<RN>::value };
126 
129  //**********************************************************************************************
130 
131  //**Serial evaluation strategy******************************************************************
133 
139  enum : bool { useAssign = IsComputation<VT>::value && RequiresEvaluation<VT>::value };
140 
142  template< typename VT2 >
144  struct UseAssign {
145  enum : bool { value = useAssign };
146  };
148  //**********************************************************************************************
149 
150  //**Parallel evaluation strategy****************************************************************
152 
158  template< typename VT2 >
159  struct UseSMPAssign {
160  enum : bool { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
161  };
163  //**********************************************************************************************
164 
165  public:
166  //**Type definitions****************************************************************************
171 
174 
177 
179  using LeftOperand = If_< IsExpression<VT>, const VT, const VT& >;
180 
182  using RightOperand = ST;
183  //**********************************************************************************************
184 
185  //**ConstIterator class definition**************************************************************
189  {
190  public:
191  //**Type definitions*************************************************************************
192  using IteratorCategory = std::random_access_iterator_tag;
197 
198  // STL iterator requirements
204 
207  //*******************************************************************************************
208 
209  //**Constructor******************************************************************************
215  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
216  : iterator_( iterator ) // Iterator to the current element
217  , scalar_ ( scalar ) // Scalar of the multiplication expression
218  {}
219  //*******************************************************************************************
220 
221  //**Addition assignment operator*************************************************************
227  inline ConstIterator& operator+=( size_t inc ) {
228  iterator_ += inc;
229  return *this;
230  }
231  //*******************************************************************************************
232 
233  //**Subtraction assignment operator**********************************************************
239  inline ConstIterator& operator-=( size_t dec ) {
240  iterator_ -= dec;
241  return *this;
242  }
243  //*******************************************************************************************
244 
245  //**Prefix increment operator****************************************************************
251  ++iterator_;
252  return *this;
253  }
254  //*******************************************************************************************
255 
256  //**Postfix increment operator***************************************************************
261  inline const ConstIterator operator++( int ) {
262  return ConstIterator( iterator_++ );
263  }
264  //*******************************************************************************************
265 
266  //**Prefix decrement operator****************************************************************
272  --iterator_;
273  return *this;
274  }
275  //*******************************************************************************************
276 
277  //**Postfix decrement operator***************************************************************
282  inline const ConstIterator operator--( int ) {
283  return ConstIterator( iterator_-- );
284  }
285  //*******************************************************************************************
286 
287  //**Element access operator******************************************************************
292  inline ReturnType operator*() const {
293  return *iterator_ * scalar_;
294  }
295  //*******************************************************************************************
296 
297  //**Load function****************************************************************************
302  inline auto load() const noexcept {
303  return iterator_.load() * set( scalar_ );
304  }
305  //*******************************************************************************************
306 
307  //**Equality operator************************************************************************
313  inline bool operator==( const ConstIterator& rhs ) const {
314  return iterator_ == rhs.iterator_;
315  }
316  //*******************************************************************************************
317 
318  //**Inequality operator**********************************************************************
324  inline bool operator!=( const ConstIterator& rhs ) const {
325  return iterator_ != rhs.iterator_;
326  }
327  //*******************************************************************************************
328 
329  //**Less-than operator***********************************************************************
335  inline bool operator<( const ConstIterator& rhs ) const {
336  return iterator_ < rhs.iterator_;
337  }
338  //*******************************************************************************************
339 
340  //**Greater-than operator********************************************************************
346  inline bool operator>( const ConstIterator& rhs ) const {
347  return iterator_ > rhs.iterator_;
348  }
349  //*******************************************************************************************
350 
351  //**Less-or-equal-than operator**************************************************************
357  inline bool operator<=( const ConstIterator& rhs ) const {
358  return iterator_ <= rhs.iterator_;
359  }
360  //*******************************************************************************************
361 
362  //**Greater-or-equal-than operator***********************************************************
368  inline bool operator>=( const ConstIterator& rhs ) const {
369  return iterator_ >= rhs.iterator_;
370  }
371  //*******************************************************************************************
372 
373  //**Subtraction operator*********************************************************************
379  inline DifferenceType operator-( const ConstIterator& rhs ) const {
380  return iterator_ - rhs.iterator_;
381  }
382  //*******************************************************************************************
383 
384  //**Addition operator************************************************************************
391  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
392  return ConstIterator( it.iterator_ + inc );
393  }
394  //*******************************************************************************************
395 
396  //**Addition operator************************************************************************
403  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
404  return ConstIterator( it.iterator_ + inc );
405  }
406  //*******************************************************************************************
407 
408  //**Subtraction operator*********************************************************************
415  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
416  return ConstIterator( it.iterator_ - dec );
417  }
418  //*******************************************************************************************
419 
420  private:
421  //**Member variables*************************************************************************
424  //*******************************************************************************************
425  };
426  //**********************************************************************************************
427 
428  //**Compilation flags***************************************************************************
430  enum : bool { simdEnabled = VT::simdEnabled &&
433  HasSIMDMult<UnderlyingElement_<ET>,ST>::value ) };
434 
436  enum : bool { smpAssignable = VT::smpAssignable };
437  //**********************************************************************************************
438 
439  //**SIMD properties*****************************************************************************
441  enum : size_t { SIMDSIZE = SIMDTrait<ElementType>::size };
442  //**********************************************************************************************
443 
444  //**Constructor*********************************************************************************
450  explicit inline DVecScalarMultExpr( const VT& vector, ST scalar ) noexcept
451  : vector_( vector ) // Left-hand side dense vector of the multiplication expression
452  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
453  {}
454  //**********************************************************************************************
455 
456  //**Subscript operator**************************************************************************
462  inline ReturnType operator[]( size_t index ) const {
463  BLAZE_INTERNAL_ASSERT( index < vector_.size(), "Invalid vector access index" );
464  return vector_[index] * scalar_;
465  }
466  //**********************************************************************************************
467 
468  //**At function*********************************************************************************
475  inline ReturnType at( size_t index ) const {
476  if( index >= vector_.size() ) {
477  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
478  }
479  return (*this)[index];
480  }
481  //**********************************************************************************************
482 
483  //**Load function*******************************************************************************
489  BLAZE_ALWAYS_INLINE auto load( size_t index ) const noexcept {
490  BLAZE_INTERNAL_ASSERT( index < vector_.size() , "Invalid vector access index" );
491  BLAZE_INTERNAL_ASSERT( index % SIMDSIZE == 0UL, "Invalid vector access index" );
492  return vector_.load( index ) * set( scalar_ );
493  }
494  //**********************************************************************************************
495 
496  //**Begin function******************************************************************************
501  inline ConstIterator begin() const {
502  return ConstIterator( vector_.begin(), scalar_ );
503  }
504  //**********************************************************************************************
505 
506  //**End function********************************************************************************
511  inline ConstIterator end() const {
512  return ConstIterator( vector_.end(), scalar_ );
513  }
514  //**********************************************************************************************
515 
516  //**Size function*******************************************************************************
521  inline size_t size() const noexcept {
522  return vector_.size();
523  }
524  //**********************************************************************************************
525 
526  //**Left operand access*************************************************************************
531  inline LeftOperand leftOperand() const noexcept {
532  return vector_;
533  }
534  //**********************************************************************************************
535 
536  //**Right operand access************************************************************************
541  inline RightOperand rightOperand() const noexcept {
542  return scalar_;
543  }
544  //**********************************************************************************************
545 
546  //**********************************************************************************************
552  template< typename T >
553  inline bool canAlias( const T* alias ) const noexcept {
554  return IsExpression<VT>::value && vector_.canAlias( alias );
555  }
556  //**********************************************************************************************
557 
558  //**********************************************************************************************
564  template< typename T >
565  inline bool isAliased( const T* alias ) const noexcept {
566  return vector_.isAliased( alias );
567  }
568  //**********************************************************************************************
569 
570  //**********************************************************************************************
575  inline bool isAligned() const noexcept {
576  return vector_.isAligned();
577  }
578  //**********************************************************************************************
579 
580  //**********************************************************************************************
585  inline bool canSMPAssign() const noexcept {
586  return vector_.canSMPAssign() || ( size() > SMP_DVECSCALARMULT_THRESHOLD );
587  }
588  //**********************************************************************************************
589 
590  private:
591  //**Member variables****************************************************************************
594  //**********************************************************************************************
595 
596  //**Assignment to dense vectors*****************************************************************
610  template< typename VT2 > // Type of the target dense vector
611  friend inline EnableIf_< UseAssign<VT2> >
612  assign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
613  {
615 
616  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
617 
618  assign( ~lhs, rhs.vector_ );
619  assign( ~lhs, (~lhs) * rhs.scalar_ );
620  }
622  //**********************************************************************************************
623 
624  //**Assignment to sparse vectors****************************************************************
638  template< typename VT2 > // Type of the target sparse vector
639  friend inline EnableIf_< UseAssign<VT2> >
640  assign( SparseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
641  {
643 
644  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
645 
646  assign( ~lhs, rhs.vector_ );
647  (~lhs) *= rhs.scalar_;
648  }
650  //**********************************************************************************************
651 
652  //**Addition assignment to dense vectors********************************************************
666  template< typename VT2 > // Type of the target dense vector
667  friend inline EnableIf_< UseAssign<VT2> >
668  addAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
669  {
671 
675 
676  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
677 
678  const ResultType tmp( serial( rhs ) );
679  addAssign( ~lhs, tmp );
680  }
682  //**********************************************************************************************
683 
684  //**Addition assignment to sparse vectors*******************************************************
685  // No special implementation for the addition assignment to sparse vectors.
686  //**********************************************************************************************
687 
688  //**Subtraction assignment to dense vectors*****************************************************
702  template< typename VT2 > // Type of the target dense vector
703  friend inline EnableIf_< UseAssign<VT2> >
704  subAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
705  {
707 
711 
712  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
713 
714  const ResultType tmp( serial( rhs ) );
715  subAssign( ~lhs, tmp );
716  }
718  //**********************************************************************************************
719 
720  //**Subtraction assignment to sparse vectors****************************************************
721  // No special implementation for the subtraction assignment to sparse vectors.
722  //**********************************************************************************************
723 
724  //**Multiplication assignment to dense vectors**************************************************
738  template< typename VT2 > // Type of the target dense vector
739  friend inline EnableIf_< UseAssign<VT2> >
740  multAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
741  {
743 
747 
748  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
749 
750  const ResultType tmp( serial( rhs ) );
751  multAssign( ~lhs, tmp );
752  }
754  //**********************************************************************************************
755 
756  //**Multiplication assignment to sparse vectors*************************************************
757  // No special implementation for the multiplication assignment to sparse vectors.
758  //**********************************************************************************************
759 
760  //**Division assignment to dense vectors********************************************************
774  template< typename VT2 > // Type of the target dense vector
775  friend inline EnableIf_< UseAssign<VT2> >
776  divAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
777  {
779 
783 
784  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
785 
786  const ResultType tmp( serial( rhs ) );
787  divAssign( ~lhs, tmp );
788  }
790  //**********************************************************************************************
791 
792  //**Division assignment to sparse vectors*******************************************************
793  // No special implementation for the division assignment to sparse vectors.
794  //**********************************************************************************************
795 
796  //**SMP assignment to dense vectors*************************************************************
810  template< typename VT2 > // Type of the target dense vector
811  friend inline EnableIf_< UseSMPAssign<VT2> >
813  {
815 
816  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
817 
818  smpAssign( ~lhs, rhs.vector_ );
819  smpAssign( ~lhs, (~lhs) * rhs.scalar_ );
820  }
822  //**********************************************************************************************
823 
824  //**SMP assignment to sparse vectors************************************************************
838  template< typename VT2 > // Type of the target sparse vector
839  friend inline EnableIf_< UseSMPAssign<VT2> >
841  {
843 
844  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
845 
846  smpAssign( ~lhs, rhs.vector_ );
847  (~lhs) *= rhs.scalar_;
848  }
850  //**********************************************************************************************
851 
852  //**SMP addition assignment to dense vectors****************************************************
866  template< typename VT2 > // Type of the target dense vector
867  friend inline EnableIf_< UseSMPAssign<VT2> >
869  {
871 
875 
876  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
877 
878  const ResultType tmp( rhs );
879  smpAddAssign( ~lhs, tmp );
880  }
882  //**********************************************************************************************
883 
884  //**SMP addition assignment to sparse vectors***************************************************
885  // No special implementation for the SMP addition assignment to sparse vectors.
886  //**********************************************************************************************
887 
888  //**SMP subtraction assignment to dense vectors*************************************************
902  template< typename VT2 > // Type of the target dense vector
903  friend inline EnableIf_< UseSMPAssign<VT2> >
905  {
907 
911 
912  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
913 
914  const ResultType tmp( rhs );
915  smpSubAssign( ~lhs, tmp );
916  }
918  //**********************************************************************************************
919 
920  //**SMP subtraction assignment to sparse vectors************************************************
921  // No special implementation for the SMP subtraction assignment to sparse vectors.
922  //**********************************************************************************************
923 
924  //**SMP multiplication assignment to dense vectors**********************************************
938  template< typename VT2 > // Type of the target dense vector
939  friend inline EnableIf_< UseSMPAssign<VT2> >
941  {
943 
947 
948  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
949 
950  const ResultType tmp( rhs );
951  smpMultAssign( ~lhs, tmp );
952  }
954  //**********************************************************************************************
955 
956  //**SMP multiplication assignment to sparse vectors*********************************************
957  // No special implementation for the SMP multiplication assignment to sparse vectors.
958  //**********************************************************************************************
959 
960  //**SMP division assignment to dense vectors****************************************************
974  template< typename VT2 > // Type of the target dense vector
975  friend inline EnableIf_< UseSMPAssign<VT2> >
977  {
979 
983 
984  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
985 
986  const ResultType tmp( rhs );
987  smpDivAssign( ~lhs, tmp );
988  }
990  //**********************************************************************************************
991 
992  //**SMP division assignment to sparse vectors***************************************************
993  // No special implementation for the SMP division assignment to sparse vectors.
994  //**********************************************************************************************
995 
996  //**Compile time checks*************************************************************************
1003  //**********************************************************************************************
1004 };
1005 //*************************************************************************************************
1006 
1007 
1008 
1009 
1010 //=================================================================================================
1011 //
1012 // GLOBAL UNARY ARITHMETIC OPERATORS
1013 //
1014 //=================================================================================================
1015 
1016 //*************************************************************************************************
1033 template< typename VT // Type of the dense vector
1034  , bool TF > // Transpose flag
1035 inline decltype(auto) operator-( const DenseVector<VT,TF>& dv )
1036 {
1038 
1039  using ScalarType = UnderlyingBuiltin_<VT>;
1041  return ReturnType( ~dv, ScalarType(-1) );
1042 }
1043 //*************************************************************************************************
1044 
1045 
1046 
1047 
1048 //=================================================================================================
1049 //
1050 // GLOBAL BINARY ARITHMETIC OPERATORS
1051 //
1052 //=================================================================================================
1053 
1054 //*************************************************************************************************
1076 template< typename VT // Type of the left-hand side dense vector
1077  , typename ST // Type of the right-hand side scalar
1078  , bool TF // Transpose flag
1079  , typename = EnableIf_< IsNumeric<ST> > >
1080 inline decltype(auto) operator*( const DenseVector<VT,TF>& vec, ST scalar )
1081 {
1083 
1084  using ScalarType = MultTrait_< UnderlyingBuiltin_<VT>, ST >;
1086  return ReturnType( ~vec, scalar );
1087 }
1088 //*************************************************************************************************
1089 
1090 
1091 //*************************************************************************************************
1113 template< typename ST // Type of the left-hand side scalar
1114  , typename VT // Type of the right-hand side dense vector
1115  , bool TF // Transpose flag
1116  , typename = EnableIf_< IsNumeric<ST> > >
1117 inline decltype(auto) operator*( ST scalar, const DenseVector<VT,TF>& vec )
1118 {
1120 
1121  using ScalarType = MultTrait_< ST, UnderlyingBuiltin_<VT> >;
1123  return ReturnType( ~vec, scalar );
1124 }
1125 //*************************************************************************************************
1126 
1127 
1128 
1129 
1130 //=================================================================================================
1131 //
1132 // GLOBAL FUNCTIONS
1133 //
1134 //=================================================================================================
1135 
1136 //*************************************************************************************************
1154 template< typename VT // Type of the dense vector
1155  , bool TF > // Transpose flag
1156 inline decltype(auto) normalize( const DenseVector<VT,TF>& vec )
1157 {
1158  using ElementType = ElementType_<VT>;
1159 
1161 
1162  const ElementType len ( length( ~vec ) );
1163  const ElementType ilen( ( len != ElementType(0) )?( ElementType(1) / len ):( 0 ) );
1164 
1166  return ReturnType( ~vec, ilen );
1167 }
1168 //*************************************************************************************************
1169 
1170 
1171 
1172 
1173 //=================================================================================================
1174 //
1175 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
1176 //
1177 //=================================================================================================
1178 
1179 //*************************************************************************************************
1191 template< typename VT // Type of the dense vector
1192  , typename ST // Type of the scalar
1193  , bool TF > // Transpose flag
1194 inline decltype(auto) operator-( const DVecScalarMultExpr<VT,ST,TF>& dv )
1195 {
1197 
1199  return ReturnType( dv.leftOperand(), -dv.rightOperand() );
1200 }
1202 //*************************************************************************************************
1203 
1204 
1205 
1206 
1207 //=================================================================================================
1208 //
1209 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1210 //
1211 //=================================================================================================
1212 
1213 //*************************************************************************************************
1226 template< typename VT // Type of the dense vector of the left-hand side expression
1227  , typename ST1 // Type of the scalar of the left-hand side expression
1228  , bool TF // Transpose flag of the dense vector
1229  , typename ST2 // Type of the right-hand side scalar
1230  , typename = EnableIf_< IsNumeric<ST2> > >
1231 inline decltype(auto) operator*( const DVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
1232 {
1234 
1235  return vec.leftOperand() * ( vec.rightOperand() * scalar );
1236 }
1238 //*************************************************************************************************
1239 
1240 
1241 //*************************************************************************************************
1254 template< typename ST1 // Type of the left-hand side scalar
1255  , typename VT // Type of the dense vector of the right-hand side expression
1256  , typename ST2 // Type of the scalar of the right-hand side expression
1257  , bool TF // Transpose flag of the dense vector
1258  , typename = EnableIf_< IsNumeric<ST1> > >
1259 inline decltype(auto) operator*( ST1 scalar, const DVecScalarMultExpr<VT,ST2,TF>& vec )
1260 {
1262 
1263  return vec.leftOperand() * ( scalar * vec.rightOperand() );
1264 }
1266 //*************************************************************************************************
1267 
1268 
1269 //*************************************************************************************************
1282 template< typename VT // Type of the dense vector of the left-hand side expression
1283  , typename ST1 // Type of the scalar of the left-hand side expression
1284  , bool TF // Transpose flag of the dense vector
1285  , typename ST2 // Type of the right-hand side scalar
1287 inline decltype(auto) operator/( const DVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
1288 {
1290 
1291  return vec.leftOperand() * ( vec.rightOperand() / scalar );
1292 }
1294 //*************************************************************************************************
1295 
1296 
1297 //*************************************************************************************************
1311 template< typename VT1 // Type of the dense vector of the left-hand side expression
1312  , typename ST // Type of the scalar of the left-hand side expression
1313  , bool TF // Transpose flag of the dense vectors
1314  , typename VT2 > // Type of the right-hand side dense vector
1315 inline decltype(auto)
1317 {
1319 
1320  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1321 }
1323 //*************************************************************************************************
1324 
1325 
1326 //*************************************************************************************************
1340 template< typename VT1 // Type of the left-hand side dense vector
1341  , bool TF // Transpose flag of the dense vectors
1342  , typename VT2 // Type of the dense vector of the right-hand side expression
1343  , typename ST > // Type of the scalar of the right-hand side expression
1344 inline decltype(auto)
1346 {
1348 
1349  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1350 }
1352 //*************************************************************************************************
1353 
1354 
1355 //*************************************************************************************************
1369 template< typename VT1 // Type of the dense vector of the left-hand side expression
1370  , typename ST1 // Type of the scalar of the left-hand side expression
1371  , bool TF // Transpose flag of the dense vectors
1372  , typename VT2 // Type of the dense vector of the right-hand side expression
1373  , typename ST2 > // Type of the scalar of the right-hand side expression
1374 inline decltype(auto)
1376 {
1378 
1379  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1380 }
1382 //*************************************************************************************************
1383 
1384 
1385 //*************************************************************************************************
1399 template< typename VT1 // Type of the dense vector of the left-hand side expression
1400  , typename ST // Type of the scalar of the left-hand side expression
1401  , typename VT2 > // Type of the right-hand side dense vector
1402 inline decltype(auto)
1404 {
1406 
1407  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1408 }
1410 //*************************************************************************************************
1411 
1412 
1413 //*************************************************************************************************
1427 template< typename VT1 // Type of the left-hand side dense vector
1428  , typename VT2 // Type of the dense vector of the right-hand side expression
1429  , typename ST > // Type of the scalar of the right-hand side expression
1430 inline decltype(auto)
1432 {
1434 
1435  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1436 }
1438 //*************************************************************************************************
1439 
1440 
1441 //*************************************************************************************************
1455 template< typename VT1 // Type of the dense vector of the left-hand side expression
1456  , typename ST1 // Type of the scalar of the left-hand side expression
1457  , typename VT2 // Type of the dense vector of the right-hand side expression
1458  , typename ST2 > // Type of the scalar of the right-hand side expression
1459 inline decltype(auto)
1461 {
1463 
1464  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1465 }
1467 //*************************************************************************************************
1468 
1469 
1470 //*************************************************************************************************
1484 template< typename VT1 // Type of the dense vector of the left-hand side expression
1485  , typename ST // Type of the scalar of the left-hand side expression
1486  , bool TF // Transpose flag of the vectors
1487  , typename VT2 > // Type of the right-hand side sparse vector
1488 inline decltype(auto)
1490 {
1492 
1493  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1494 }
1496 //*************************************************************************************************
1497 
1498 
1499 //*************************************************************************************************
1513 template< typename VT1 // Type of the left-hand side sparse vector
1514  , bool TF // Transpose flag of the vectors
1515  , typename VT2 // Type of the dense vector of the right-hand side expression
1516  , typename ST > // Type of the scalar of the right-hand side expression
1517 inline decltype(auto)
1519 {
1521 
1522  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1523 }
1525 //*************************************************************************************************
1526 
1527 
1528 //*************************************************************************************************
1543 template< typename VT1 // Type of the dense vector of the left-hand side expression
1544  , typename ST1 // Type of the scalar of the left-hand side expression
1545  , bool TF // Transpose flag of the vectors
1546  , typename VT2 // Type of the sparse vector of the right-hand side expression
1547  , typename ST2 > // Type of the scalar o the right-hand side expression
1548 inline decltype(auto)
1550 {
1552 
1553  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1554 }
1556 //*************************************************************************************************
1557 
1558 
1559 //*************************************************************************************************
1574 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1575  , typename ST1 // Type of the scalar of the left-hand side expression
1576  , bool TF // Transpose flag of the vectors
1577  , typename VT2 // Type of the dense vector of the right-hand side expression
1578  , typename ST2 > // Type of the scalar o the right-hand side expression
1579 inline decltype(auto)
1581 {
1583 
1584  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1585 }
1587 //*************************************************************************************************
1588 
1589 
1590 //*************************************************************************************************
1604 template< typename VT1 // Type of the dense vector of the left-hand side expression
1605  , typename ST // Type of the scalar of the left-hand side expression
1606  , typename VT2 > // Type of the right-hand side sparse vector
1607 inline decltype(auto)
1609 {
1611 
1612  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1613 }
1615 //*************************************************************************************************
1616 
1617 
1618 //*************************************************************************************************
1632 template< typename VT1 // Type of the left-hand side sparse vector
1633  , typename VT2 // Type of the dense vector of the right-hand side expression
1634  , typename ST > // Type of the scalar of the right-hand side expression
1635 inline decltype(auto)
1637 {
1639 
1640  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1641 }
1643 //*************************************************************************************************
1644 
1645 
1646 //*************************************************************************************************
1661 template< typename VT1 // Type of the dense vector of the left-hand side expression
1662  , typename ST1 // Type of the scalar of the left-hand side expression
1663  , typename VT2 // Type of the sparse vector of the right-hand side expression
1664  , typename ST2 > // Type of the scalar o the right-hand side expression
1665 inline decltype(auto)
1667 {
1669 
1670  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1671 }
1673 //*************************************************************************************************
1674 
1675 
1676 //*************************************************************************************************
1691 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1692  , typename ST1 // Type of the scalar of the left-hand side expression
1693  , typename VT2 // Type of the dense vector of the right-hand side expression
1694  , typename ST2 > // Type of the scalar o the right-hand side expression
1695 inline decltype(auto)
1697 {
1699 
1700  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1701 }
1703 //*************************************************************************************************
1704 
1705 
1706 //*************************************************************************************************
1720 template< typename MT // Type of the left-hand side dense matrix
1721  , bool SO // Storage order of the left-hand side dense matrix
1722  , typename VT // Type of the dense vector of the right-hand side expression
1723  , typename ST > // Type of the scalar of the right-hand side expression
1724 inline decltype(auto)
1726 {
1728 
1729  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1730 }
1732 //*************************************************************************************************
1733 
1734 
1735 //*************************************************************************************************
1749 template< typename VT // Type of the dense vector of the left-hand side expression
1750  , typename ST // Type of the scalar of the left-hand side expression
1751  , typename MT // Type of the right-hand side dense matrix
1752  , bool SO > // Storage order of the right-hand side dense matrix
1753 inline decltype(auto)
1755 {
1757 
1758  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1759 }
1761 //*************************************************************************************************
1762 
1763 
1764 //*************************************************************************************************
1778 template< typename MT // Type of the left-hand side sparse matrix
1779  , bool SO // Storage order of the left-hand side sparse matrix
1780  , typename VT // Type of the dense vector of the right-hand side expression
1781  , typename ST > // Type of the scalar of the right-hand side expression
1782 inline decltype(auto)
1784 {
1786 
1787  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1788 }
1790 //*************************************************************************************************
1791 
1792 
1793 //*************************************************************************************************
1807 template< typename VT // Type of the dense vector of the left-hand side expression
1808  , typename ST // Type of the scalar of the left-hand side expression
1809  , typename MT // Type of the right-hand side sparse matrix
1810  , bool SO > // Storage order of the right-hand side sparse matrix
1811 inline decltype(auto)
1813 {
1815 
1816  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1817 }
1819 //*************************************************************************************************
1820 
1821 
1822 
1823 
1824 //=================================================================================================
1825 //
1826 // SIZE SPECIALIZATIONS
1827 //
1828 //=================================================================================================
1829 
1830 //*************************************************************************************************
1832 template< typename VT, typename ST, bool TF >
1833 struct Size< DVecScalarMultExpr<VT,ST,TF> >
1834  : public Size<VT>
1835 {};
1837 //*************************************************************************************************
1838 
1839 
1840 
1841 
1842 //=================================================================================================
1843 //
1844 // ISALIGNED SPECIALIZATIONS
1845 //
1846 //=================================================================================================
1847 
1848 //*************************************************************************************************
1850 template< typename VT, typename ST, bool TF >
1851 struct IsAligned< DVecScalarMultExpr<VT,ST,TF> >
1852  : public BoolConstant< IsAligned<VT>::value >
1853 {};
1855 //*************************************************************************************************
1856 
1857 
1858 
1859 
1860 //=================================================================================================
1861 //
1862 // ISPADDED SPECIALIZATIONS
1863 //
1864 //=================================================================================================
1865 
1866 //*************************************************************************************************
1868 template< typename VT, typename ST, bool TF >
1869 struct IsPadded< DVecScalarMultExpr<VT,ST,TF> >
1870  : public BoolConstant< IsPadded<VT>::value >
1871 {};
1873 //*************************************************************************************************
1874 
1875 } // namespace blaze
1876 
1877 #endif
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: SVecScalarMultExpr.h:438
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecScalarMultExpr.h:575
Pointer difference type of the Blaze library.
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecScalarMultExpr.h:531
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
Header file for basic type definitions.
Header file for the SparseVector base class.
BLAZE_ALWAYS_INLINE auto load(size_t index) const noexcept
Access to the SIMD elements of the vector.
Definition: DVecScalarMultExpr.h:489
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: DVecScalarMultExpr.h:541
decltype(auto) operator/(const DenseMatrix< MT, SO > &mat, ST scalar)
Division operator for the division of a dense matrix by a scalar value ( ).
Definition: DMatScalarDivExpr.h:1073
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:164
Header file for the serial shim.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecScalarMultExpr.h:261
ValueType value_type
Type of the underlying elements.
Definition: DVecScalarMultExpr.h:200
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:172
EnableIf_< IsDenseVector< VT1 > > smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:193
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: DVecScalarMultExpr.h:521
Header file for the And class template.
Header file for the DenseVector base class.
CompositeType_< VT > CT
Composite type of the dense vector expression.
Definition: DVecScalarMultExpr.h:115
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:250
Header file for the Computation base class.
auto load() const noexcept
Access to the SIMD elements of the vector.
Definition: DVecScalarMultExpr.h:302
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.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:313
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DVecScalarMultExpr.h:215
Header file for the VecScalarMultExpr base class.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
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:133
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecScalarMultExpr.h:511
If_< IsExpression< VT >, const VT, const VT &> LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecScalarMultExpr.h:179
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:78
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecScalarMultExpr.h:192
ElementType ValueType
Type of the underlying elements.
Definition: DVecScalarMultExpr.h:193
IfTrue_< useAssign, const ResultType, const DVecScalarMultExpr &> CompositeType
Data type for composite expression templates.
Definition: DVecScalarMultExpr.h:176
auto length(const DenseVector< VT, TF > &dv) -> decltype(sqrt(sqrLength(~dv)))
Calculation of the length (magnitude) of the dense vector .
Definition: DenseVector.h:576
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:363
ResultType_< VT > RT
Result type of the dense vector expression.
Definition: DVecScalarMultExpr.h:112
Header file for the SparseMatrix base class.
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:112
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
MultExprTrait_< RN, ST > ExprReturnType
Expression return type for the subscript operator.
Definition: DVecScalarMultExpr.h:128
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecScalarMultExpr.h:475
Header file for the IsTemporary type trait class.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DVecScalarMultExpr.h:170
Header file for the multiplication trait.
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecScalarMultExpr.h:169
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
Header file for the If class template.
ElementType * PointerType
Pointer return type.
Definition: DVecScalarMultExpr.h:194
Header file for the UnderlyingBuiltin type trait.
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
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:102
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3081
Header file for the Or class template.
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Iterator over the elements of the dense vector.
Definition: DVecScalarMultExpr.h:188
Header file for the DenseMatrix base class.
decltype(auto) normalize(const DenseVector< VT, TF > &vec)
Normalization of the dense vector ( ).
Definition: DVecScalarMultExpr.h:1156
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:357
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecScalarMultExpr.h:501
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.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
#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 IsAligned type trait.
ElementType_< VT > ET
Element type of the dense vector expression.
Definition: DVecScalarMultExpr.h:114
Constraint on the data type.
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DVecScalarMultExpr.h:173
Constraint on the data type.
Header file for the exception macros of the math module.
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:8893
Constraint on the data type.
LeftOperand vector_
Left-hand side dense vector of the multiplication expression.
Definition: DVecScalarMultExpr.h:592
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecScalarMultExpr.h:250
Header file for the IsPadded type trait.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecScalarMultExpr.h:565
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecScalarMultExpr.h:379
ReturnType_< VT > RN
Return type of the dense vector expression.
Definition: DVecScalarMultExpr.h:113
ReferenceType reference
Reference return type.
Definition: DVecScalarMultExpr.h:202
ElementType & ReferenceType
Reference return type.
Definition: DVecScalarMultExpr.h:195
MultTrait_< RT, ST > ResultType
Result type for expression template evaluations.
Definition: DVecScalarMultExpr.h:168
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecScalarMultExpr.h:391
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:335
Header file for the IsNumeric type trait.
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: DVecScalarMultExpr.h:593
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecScalarMultExpr.h:462
Base class for all vector/scalar multiplication expression templates.The VecScalarMultExpr class serv...
Definition: VecScalarMultExpr.h:67
Header file for the HasSIMDMult type trait.
Header file for run time assertion macros.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecScalarMultExpr.h:585
Utility type for generic codes.
IteratorCategory iterator_category
The iterator category.
Definition: DVecScalarMultExpr.h:199
IteratorType iterator_
Iterator to the current element.
Definition: DVecScalarMultExpr.h:422
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:324
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:154
EnableIf_< IsDenseVector< VT1 > > smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:222
Constraint on the data type.
#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
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecScalarMultExpr.h:403
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsInvertible.h:83
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
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:224
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecScalarMultExpr.h:415
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:61
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecScalarMultExpr.h:553
Header file for the IsComputation type trait class.
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:346
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecScalarMultExpr.h:282
Expression object for dense vector-scalar multiplications.The DVecScalarMultExpr class represents the...
Definition: DVecScalarMultExpr.h:106
Expression object for sparse vector-scalar multiplications.The SVecScalarMultExpr class represents th...
Definition: Forward.h:139
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecScalarMultExpr.h:227
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
Compile time logical or evaluation.The Or alias declaration performs at compile time a logical or (&#39;&&&#3...
Definition: Or.h:76
DVecScalarMultExpr(const VT &vector, ST scalar) noexcept
Constructor for the DVecScalarMultExpr class.
Definition: DVecScalarMultExpr.h:450
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:74
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecScalarMultExpr.h:239
Header file for the IntegralConstant class template.
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecScalarMultExpr.h:292
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:368
ConstIterator_< VT > IteratorType
ConstIterator type of the dense vector expression.
Definition: DVecScalarMultExpr.h:206
System settings for the inline keywords.
Header file for the Size type trait.
RightOperand scalar_
Scalar of the multiplication expression.
Definition: DVecScalarMultExpr.h:423
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
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
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecScalarMultExpr.h:428
Compile time check whether the given type is an expression template.This type trait class tests wheth...
Definition: IsExpression.h:95
#define BLAZE_CONSTRAINT_MUST_BE_FLOATING_POINT_TYPE(T)
Constraint on the data type.In case the given data type T is not a floating point data type...
Definition: FloatingPoint.h:61
Header file for the IsExpression type trait class.
PointerType pointer
Pointer return type.
Definition: DVecScalarMultExpr.h:201
Header file for the function trace functionality.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecScalarMultExpr.h:271
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: DVecScalarMultExpr.h:182