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>
79 #include <blaze/util/mpl/And.h>
80 #include <blaze/util/mpl/If.h>
81 #include <blaze/util/mpl/Or.h>
82 #include <blaze/util/Types.h>
84 
85 
86 namespace blaze {
87 
88 //=================================================================================================
89 //
90 // CLASS DVECSCALARMULTEXPR
91 //
92 //=================================================================================================
93 
94 //*************************************************************************************************
101 template< typename VT // Type of the left-hand side dense vector
102  , typename ST // Type of the right-hand side scalar value
103  , bool TF > // Transpose flag
105  : public VecScalarMultExpr< DenseVector< DVecScalarMultExpr<VT,ST,TF>, TF > >
106  , private Computation
107 {
108  private:
109  //**Type definitions****************************************************************************
110  using RT = ResultType_<VT>;
111  using RN = ReturnType_<VT>;
114  //**********************************************************************************************
115 
116  //**Return type evaluation**********************************************************************
118 
123  enum : bool { returnExpr = !IsTemporary<RN>::value };
124 
127  //**********************************************************************************************
128 
129  //**Serial evaluation strategy******************************************************************
131 
137  enum : bool { useAssign = IsComputation<VT>::value && RequiresEvaluation<VT>::value };
138 
140  template< typename VT2 >
142  struct UseAssign {
143  enum : bool { value = useAssign };
144  };
146  //**********************************************************************************************
147 
148  //**Parallel evaluation strategy****************************************************************
150 
156  template< typename VT2 >
157  struct UseSMPAssign {
158  enum : bool { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
159  };
161  //**********************************************************************************************
162 
163  public:
164  //**Type definitions****************************************************************************
169 
172 
175 
177  using LeftOperand = If_< IsExpression<VT>, const VT, const VT& >;
178 
180  using RightOperand = ST;
181  //**********************************************************************************************
182 
183  //**ConstIterator class definition**************************************************************
187  {
188  public:
189  //**Type definitions*************************************************************************
190  using IteratorCategory = std::random_access_iterator_tag;
195 
196  // STL iterator requirements
202 
205  //*******************************************************************************************
206 
207  //**Constructor******************************************************************************
213  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
214  : iterator_( iterator ) // Iterator to the current element
215  , scalar_ ( scalar ) // Scalar of the multiplication expression
216  {}
217  //*******************************************************************************************
218 
219  //**Addition assignment operator*************************************************************
225  inline ConstIterator& operator+=( size_t inc ) {
226  iterator_ += inc;
227  return *this;
228  }
229  //*******************************************************************************************
230 
231  //**Subtraction assignment operator**********************************************************
237  inline ConstIterator& operator-=( size_t dec ) {
238  iterator_ -= dec;
239  return *this;
240  }
241  //*******************************************************************************************
242 
243  //**Prefix increment operator****************************************************************
249  ++iterator_;
250  return *this;
251  }
252  //*******************************************************************************************
253 
254  //**Postfix increment operator***************************************************************
259  inline const ConstIterator operator++( int ) {
260  return ConstIterator( iterator_++ );
261  }
262  //*******************************************************************************************
263 
264  //**Prefix decrement operator****************************************************************
270  --iterator_;
271  return *this;
272  }
273  //*******************************************************************************************
274 
275  //**Postfix decrement operator***************************************************************
280  inline const ConstIterator operator--( int ) {
281  return ConstIterator( iterator_-- );
282  }
283  //*******************************************************************************************
284 
285  //**Element access operator******************************************************************
290  inline ReturnType operator*() const {
291  return *iterator_ * scalar_;
292  }
293  //*******************************************************************************************
294 
295  //**Load function****************************************************************************
300  inline auto load() const noexcept {
301  return iterator_.load() * set( scalar_ );
302  }
303  //*******************************************************************************************
304 
305  //**Equality operator************************************************************************
311  inline bool operator==( const ConstIterator& rhs ) const {
312  return iterator_ == rhs.iterator_;
313  }
314  //*******************************************************************************************
315 
316  //**Inequality operator**********************************************************************
322  inline bool operator!=( const ConstIterator& rhs ) const {
323  return iterator_ != rhs.iterator_;
324  }
325  //*******************************************************************************************
326 
327  //**Less-than operator***********************************************************************
333  inline bool operator<( const ConstIterator& rhs ) const {
334  return iterator_ < rhs.iterator_;
335  }
336  //*******************************************************************************************
337 
338  //**Greater-than operator********************************************************************
344  inline bool operator>( const ConstIterator& rhs ) const {
345  return iterator_ > rhs.iterator_;
346  }
347  //*******************************************************************************************
348 
349  //**Less-or-equal-than operator**************************************************************
355  inline bool operator<=( const ConstIterator& rhs ) const {
356  return iterator_ <= rhs.iterator_;
357  }
358  //*******************************************************************************************
359 
360  //**Greater-or-equal-than operator***********************************************************
366  inline bool operator>=( const ConstIterator& rhs ) const {
367  return iterator_ >= rhs.iterator_;
368  }
369  //*******************************************************************************************
370 
371  //**Subtraction operator*********************************************************************
377  inline DifferenceType operator-( const ConstIterator& rhs ) const {
378  return iterator_ - rhs.iterator_;
379  }
380  //*******************************************************************************************
381 
382  //**Addition operator************************************************************************
389  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
390  return ConstIterator( it.iterator_ + inc );
391  }
392  //*******************************************************************************************
393 
394  //**Addition operator************************************************************************
401  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
402  return ConstIterator( it.iterator_ + inc );
403  }
404  //*******************************************************************************************
405 
406  //**Subtraction operator*********************************************************************
413  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
414  return ConstIterator( it.iterator_ - dec );
415  }
416  //*******************************************************************************************
417 
418  private:
419  //**Member variables*************************************************************************
422  //*******************************************************************************************
423  };
424  //**********************************************************************************************
425 
426  //**Compilation flags***************************************************************************
428  enum : bool { simdEnabled = VT::simdEnabled &&
431  HasSIMDMult<UnderlyingElement_<ET>,ST>::value ) };
432 
434  enum : bool { smpAssignable = VT::smpAssignable };
435  //**********************************************************************************************
436 
437  //**SIMD properties*****************************************************************************
439  enum : size_t { SIMDSIZE = SIMDTrait<ElementType>::size };
440  //**********************************************************************************************
441 
442  //**Constructor*********************************************************************************
448  explicit inline DVecScalarMultExpr( const VT& vector, ST scalar ) noexcept
449  : vector_( vector ) // Left-hand side dense vector of the multiplication expression
450  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
451  {}
452  //**********************************************************************************************
453 
454  //**Subscript operator**************************************************************************
460  inline ReturnType operator[]( size_t index ) const {
461  BLAZE_INTERNAL_ASSERT( index < vector_.size(), "Invalid vector access index" );
462  return vector_[index] * scalar_;
463  }
464  //**********************************************************************************************
465 
466  //**At function*********************************************************************************
473  inline ReturnType at( size_t index ) const {
474  if( index >= vector_.size() ) {
475  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
476  }
477  return (*this)[index];
478  }
479  //**********************************************************************************************
480 
481  //**Load function*******************************************************************************
487  BLAZE_ALWAYS_INLINE auto load( size_t index ) const noexcept {
488  BLAZE_INTERNAL_ASSERT( index < vector_.size() , "Invalid vector access index" );
489  BLAZE_INTERNAL_ASSERT( index % SIMDSIZE == 0UL, "Invalid vector access index" );
490  return vector_.load( index ) * set( scalar_ );
491  }
492  //**********************************************************************************************
493 
494  //**Begin function******************************************************************************
499  inline ConstIterator begin() const {
500  return ConstIterator( vector_.begin(), scalar_ );
501  }
502  //**********************************************************************************************
503 
504  //**End function********************************************************************************
509  inline ConstIterator end() const {
510  return ConstIterator( vector_.end(), scalar_ );
511  }
512  //**********************************************************************************************
513 
514  //**Size function*******************************************************************************
519  inline size_t size() const noexcept {
520  return vector_.size();
521  }
522  //**********************************************************************************************
523 
524  //**Left operand access*************************************************************************
529  inline LeftOperand leftOperand() const noexcept {
530  return vector_;
531  }
532  //**********************************************************************************************
533 
534  //**Right operand access************************************************************************
539  inline RightOperand rightOperand() const noexcept {
540  return scalar_;
541  }
542  //**********************************************************************************************
543 
544  //**********************************************************************************************
550  template< typename T >
551  inline bool canAlias( const T* alias ) const noexcept {
552  return IsExpression<VT>::value && vector_.canAlias( alias );
553  }
554  //**********************************************************************************************
555 
556  //**********************************************************************************************
562  template< typename T >
563  inline bool isAliased( const T* alias ) const noexcept {
564  return vector_.isAliased( alias );
565  }
566  //**********************************************************************************************
567 
568  //**********************************************************************************************
573  inline bool isAligned() const noexcept {
574  return vector_.isAligned();
575  }
576  //**********************************************************************************************
577 
578  //**********************************************************************************************
583  inline bool canSMPAssign() const noexcept {
584  return vector_.canSMPAssign() || ( size() > SMP_DVECSCALARMULT_THRESHOLD );
585  }
586  //**********************************************************************************************
587 
588  private:
589  //**Member variables****************************************************************************
592  //**********************************************************************************************
593 
594  //**Assignment to dense vectors*****************************************************************
608  template< typename VT2 > // Type of the target dense vector
609  friend inline EnableIf_< UseAssign<VT2> >
610  assign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
611  {
613 
614  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
615 
616  assign( ~lhs, rhs.vector_ );
617  assign( ~lhs, (~lhs) * rhs.scalar_ );
618  }
620  //**********************************************************************************************
621 
622  //**Assignment to sparse vectors****************************************************************
636  template< typename VT2 > // Type of the target sparse vector
637  friend inline EnableIf_< UseAssign<VT2> >
638  assign( SparseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
639  {
641 
642  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
643 
644  assign( ~lhs, rhs.vector_ );
645  (~lhs) *= rhs.scalar_;
646  }
648  //**********************************************************************************************
649 
650  //**Addition assignment to dense vectors********************************************************
664  template< typename VT2 > // Type of the target dense vector
665  friend inline EnableIf_< UseAssign<VT2> >
666  addAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
667  {
669 
673 
674  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
675 
676  const ResultType tmp( serial( rhs ) );
677  addAssign( ~lhs, tmp );
678  }
680  //**********************************************************************************************
681 
682  //**Addition assignment to sparse vectors*******************************************************
683  // No special implementation for the addition assignment to sparse vectors.
684  //**********************************************************************************************
685 
686  //**Subtraction assignment to dense vectors*****************************************************
700  template< typename VT2 > // Type of the target dense vector
701  friend inline EnableIf_< UseAssign<VT2> >
702  subAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
703  {
705 
709 
710  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
711 
712  const ResultType tmp( serial( rhs ) );
713  subAssign( ~lhs, tmp );
714  }
716  //**********************************************************************************************
717 
718  //**Subtraction assignment to sparse vectors****************************************************
719  // No special implementation for the subtraction assignment to sparse vectors.
720  //**********************************************************************************************
721 
722  //**Multiplication assignment to dense vectors**************************************************
736  template< typename VT2 > // Type of the target dense vector
737  friend inline EnableIf_< UseAssign<VT2> >
738  multAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
739  {
741 
745 
746  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
747 
748  const ResultType tmp( serial( rhs ) );
749  multAssign( ~lhs, tmp );
750  }
752  //**********************************************************************************************
753 
754  //**Multiplication assignment to sparse vectors*************************************************
755  // No special implementation for the multiplication assignment to sparse vectors.
756  //**********************************************************************************************
757 
758  //**Division assignment to dense vectors********************************************************
772  template< typename VT2 > // Type of the target dense vector
773  friend inline EnableIf_< UseAssign<VT2> >
774  divAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
775  {
777 
781 
782  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
783 
784  const ResultType tmp( serial( rhs ) );
785  divAssign( ~lhs, tmp );
786  }
788  //**********************************************************************************************
789 
790  //**Division assignment to sparse vectors*******************************************************
791  // No special implementation for the division assignment to sparse vectors.
792  //**********************************************************************************************
793 
794  //**SMP assignment to dense vectors*************************************************************
808  template< typename VT2 > // Type of the target dense vector
809  friend inline EnableIf_< UseSMPAssign<VT2> >
811  {
813 
814  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
815 
816  smpAssign( ~lhs, rhs.vector_ );
817  smpAssign( ~lhs, (~lhs) * rhs.scalar_ );
818  }
820  //**********************************************************************************************
821 
822  //**SMP assignment to sparse vectors************************************************************
836  template< typename VT2 > // Type of the target sparse vector
837  friend inline EnableIf_< UseSMPAssign<VT2> >
839  {
841 
842  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
843 
844  smpAssign( ~lhs, rhs.vector_ );
845  (~lhs) *= rhs.scalar_;
846  }
848  //**********************************************************************************************
849 
850  //**SMP addition assignment to dense vectors****************************************************
864  template< typename VT2 > // Type of the target dense vector
865  friend inline EnableIf_< UseSMPAssign<VT2> >
867  {
869 
873 
874  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
875 
876  const ResultType tmp( rhs );
877  smpAddAssign( ~lhs, tmp );
878  }
880  //**********************************************************************************************
881 
882  //**SMP addition assignment to sparse vectors***************************************************
883  // No special implementation for the SMP addition assignment to sparse vectors.
884  //**********************************************************************************************
885 
886  //**SMP subtraction assignment to dense vectors*************************************************
900  template< typename VT2 > // Type of the target dense vector
901  friend inline EnableIf_< UseSMPAssign<VT2> >
903  {
905 
909 
910  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
911 
912  const ResultType tmp( rhs );
913  smpSubAssign( ~lhs, tmp );
914  }
916  //**********************************************************************************************
917 
918  //**SMP subtraction assignment to sparse vectors************************************************
919  // No special implementation for the SMP subtraction assignment to sparse vectors.
920  //**********************************************************************************************
921 
922  //**SMP multiplication assignment to dense vectors**********************************************
936  template< typename VT2 > // Type of the target dense vector
937  friend inline EnableIf_< UseSMPAssign<VT2> >
939  {
941 
945 
946  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
947 
948  const ResultType tmp( rhs );
949  smpMultAssign( ~lhs, tmp );
950  }
952  //**********************************************************************************************
953 
954  //**SMP multiplication assignment to sparse vectors*********************************************
955  // No special implementation for the SMP multiplication assignment to sparse vectors.
956  //**********************************************************************************************
957 
958  //**SMP division assignment to dense vectors****************************************************
972  template< typename VT2 > // Type of the target dense vector
973  friend inline EnableIf_< UseSMPAssign<VT2> >
975  {
977 
981 
982  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
983 
984  const ResultType tmp( rhs );
985  smpDivAssign( ~lhs, tmp );
986  }
988  //**********************************************************************************************
989 
990  //**SMP division assignment to sparse vectors***************************************************
991  // No special implementation for the SMP division assignment to sparse vectors.
992  //**********************************************************************************************
993 
994  //**Compile time checks*************************************************************************
1001  //**********************************************************************************************
1002 };
1003 //*************************************************************************************************
1004 
1005 
1006 
1007 
1008 //=================================================================================================
1009 //
1010 // GLOBAL UNARY ARITHMETIC OPERATORS
1011 //
1012 //=================================================================================================
1013 
1014 //*************************************************************************************************
1031 template< typename VT // Type of the dense vector
1032  , bool TF > // Transpose flag
1033 inline decltype(auto) operator-( const DenseVector<VT,TF>& dv )
1034 {
1036 
1037  using ScalarType = UnderlyingBuiltin_<VT>;
1039  return ReturnType( ~dv, ScalarType(-1) );
1040 }
1041 //*************************************************************************************************
1042 
1043 
1044 
1045 
1046 //=================================================================================================
1047 //
1048 // GLOBAL BINARY ARITHMETIC OPERATORS
1049 //
1050 //=================================================================================================
1051 
1052 //*************************************************************************************************
1074 template< typename VT // Type of the left-hand side dense vector
1075  , typename ST // Type of the right-hand side scalar
1076  , bool TF // Transpose flag
1077  , typename = EnableIf_< IsNumeric<ST> > >
1078 inline decltype(auto) operator*( const DenseVector<VT,TF>& vec, ST scalar )
1079 {
1081 
1082  using ScalarType = MultTrait_< UnderlyingBuiltin_<VT>, ST >;
1084  return ReturnType( ~vec, scalar );
1085 }
1086 //*************************************************************************************************
1087 
1088 
1089 //*************************************************************************************************
1111 template< typename ST // Type of the left-hand side scalar
1112  , typename VT // Type of the right-hand side dense vector
1113  , bool TF // Transpose flag
1114  , typename = EnableIf_< IsNumeric<ST> > >
1115 inline decltype(auto) operator*( ST scalar, const DenseVector<VT,TF>& vec )
1116 {
1118 
1119  using ScalarType = MultTrait_< ST, UnderlyingBuiltin_<VT> >;
1121  return ReturnType( ~vec, scalar );
1122 }
1123 //*************************************************************************************************
1124 
1125 
1126 
1127 
1128 //=================================================================================================
1129 //
1130 // GLOBAL FUNCTIONS
1131 //
1132 //=================================================================================================
1133 
1134 //*************************************************************************************************
1152 template< typename VT // Type of the dense vector
1153  , bool TF > // Transpose flag
1154 inline decltype(auto) normalize( const DenseVector<VT,TF>& vec )
1155 {
1156  using ElementType = ElementType_<VT>;
1157 
1159 
1160  const ElementType len ( length( ~vec ) );
1161  const ElementType ilen( ( len != ElementType(0) )?( ElementType(1) / len ):( 0 ) );
1162 
1164  return ReturnType( ~vec, ilen );
1165 }
1166 //*************************************************************************************************
1167 
1168 
1169 
1170 
1171 //=================================================================================================
1172 //
1173 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
1174 //
1175 //=================================================================================================
1176 
1177 //*************************************************************************************************
1189 template< typename VT // Type of the dense vector
1190  , typename ST // Type of the scalar
1191  , bool TF > // Transpose flag
1192 inline decltype(auto) operator-( const DVecScalarMultExpr<VT,ST,TF>& dv )
1193 {
1195 
1197  return ReturnType( dv.leftOperand(), -dv.rightOperand() );
1198 }
1200 //*************************************************************************************************
1201 
1202 
1203 
1204 
1205 //=================================================================================================
1206 //
1207 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1208 //
1209 //=================================================================================================
1210 
1211 //*************************************************************************************************
1224 template< typename VT // Type of the dense vector of the left-hand side expression
1225  , typename ST1 // Type of the scalar of the left-hand side expression
1226  , bool TF // Transpose flag of the dense vector
1227  , typename ST2 // Type of the right-hand side scalar
1228  , typename = EnableIf_< IsNumeric<ST2> > >
1229 inline decltype(auto) operator*( const DVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
1230 {
1232 
1233  return vec.leftOperand() * ( vec.rightOperand() * scalar );
1234 }
1236 //*************************************************************************************************
1237 
1238 
1239 //*************************************************************************************************
1252 template< typename ST1 // Type of the left-hand side scalar
1253  , typename VT // Type of the dense vector of the right-hand side expression
1254  , typename ST2 // Type of the scalar of the right-hand side expression
1255  , bool TF // Transpose flag of the dense vector
1256  , typename = EnableIf_< IsNumeric<ST1> > >
1257 inline decltype(auto) operator*( ST1 scalar, const DVecScalarMultExpr<VT,ST2,TF>& vec )
1258 {
1260 
1261  return vec.leftOperand() * ( scalar * vec.rightOperand() );
1262 }
1264 //*************************************************************************************************
1265 
1266 
1267 //*************************************************************************************************
1280 template< typename VT // Type of the dense vector of the left-hand side expression
1281  , typename ST1 // Type of the scalar of the left-hand side expression
1282  , bool TF // Transpose flag of the dense vector
1283  , typename ST2 // Type of the right-hand side scalar
1285 inline decltype(auto) operator/( const DVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
1286 {
1288 
1289  return vec.leftOperand() * ( vec.rightOperand() / scalar );
1290 }
1292 //*************************************************************************************************
1293 
1294 
1295 //*************************************************************************************************
1309 template< typename VT1 // Type of the dense vector of the left-hand side expression
1310  , typename ST // Type of the scalar of the left-hand side expression
1311  , bool TF // Transpose flag of the dense vectors
1312  , typename VT2 > // Type of the right-hand side dense vector
1313 inline decltype(auto)
1315 {
1317 
1318  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1319 }
1321 //*************************************************************************************************
1322 
1323 
1324 //*************************************************************************************************
1338 template< typename VT1 // Type of the left-hand side dense vector
1339  , bool TF // Transpose flag of the dense vectors
1340  , typename VT2 // Type of the dense vector of the right-hand side expression
1341  , typename ST > // Type of the scalar of the right-hand side expression
1342 inline decltype(auto)
1344 {
1346 
1347  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1348 }
1350 //*************************************************************************************************
1351 
1352 
1353 //*************************************************************************************************
1367 template< typename VT1 // Type of the dense vector of the left-hand side expression
1368  , typename ST1 // Type of the scalar of the left-hand side expression
1369  , bool TF // Transpose flag of the dense vectors
1370  , typename VT2 // Type of the dense vector of the right-hand side expression
1371  , typename ST2 > // Type of the scalar of the right-hand side expression
1372 inline decltype(auto)
1374 {
1376 
1377  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1378 }
1380 //*************************************************************************************************
1381 
1382 
1383 //*************************************************************************************************
1397 template< typename VT1 // Type of the dense vector of the left-hand side expression
1398  , typename ST // Type of the scalar of the left-hand side expression
1399  , typename VT2 > // Type of the right-hand side dense vector
1400 inline decltype(auto)
1402 {
1404 
1405  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1406 }
1408 //*************************************************************************************************
1409 
1410 
1411 //*************************************************************************************************
1425 template< typename VT1 // Type of the left-hand side dense vector
1426  , typename VT2 // Type of the dense vector of the right-hand side expression
1427  , typename ST > // Type of the scalar of the right-hand side expression
1428 inline decltype(auto)
1430 {
1432 
1433  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1434 }
1436 //*************************************************************************************************
1437 
1438 
1439 //*************************************************************************************************
1453 template< typename VT1 // Type of the dense vector of the left-hand side expression
1454  , typename ST1 // Type of the scalar of the left-hand side expression
1455  , typename VT2 // Type of the dense vector of the right-hand side expression
1456  , typename ST2 > // Type of the scalar of the right-hand side expression
1457 inline decltype(auto)
1459 {
1461 
1462  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1463 }
1465 //*************************************************************************************************
1466 
1467 
1468 //*************************************************************************************************
1482 template< typename VT1 // Type of the dense vector of the left-hand side expression
1483  , typename ST // Type of the scalar of the left-hand side expression
1484  , bool TF // Transpose flag of the vectors
1485  , typename VT2 > // Type of the right-hand side sparse vector
1486 inline decltype(auto)
1488 {
1490 
1491  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1492 }
1494 //*************************************************************************************************
1495 
1496 
1497 //*************************************************************************************************
1511 template< typename VT1 // Type of the left-hand side sparse vector
1512  , bool TF // Transpose flag of the vectors
1513  , typename VT2 // Type of the dense vector of the right-hand side expression
1514  , typename ST > // Type of the scalar of the right-hand side expression
1515 inline decltype(auto)
1517 {
1519 
1520  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1521 }
1523 //*************************************************************************************************
1524 
1525 
1526 //*************************************************************************************************
1541 template< typename VT1 // Type of the dense vector of the left-hand side expression
1542  , typename ST1 // Type of the scalar of the left-hand side expression
1543  , bool TF // Transpose flag of the vectors
1544  , typename VT2 // Type of the sparse vector of the right-hand side expression
1545  , typename ST2 > // Type of the scalar o the right-hand side expression
1546 inline decltype(auto)
1548 {
1550 
1551  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1552 }
1554 //*************************************************************************************************
1555 
1556 
1557 //*************************************************************************************************
1572 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1573  , typename ST1 // Type of the scalar of the left-hand side expression
1574  , bool TF // Transpose flag of the vectors
1575  , typename VT2 // Type of the dense vector of the right-hand side expression
1576  , typename ST2 > // Type of the scalar o the right-hand side expression
1577 inline decltype(auto)
1579 {
1581 
1582  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1583 }
1585 //*************************************************************************************************
1586 
1587 
1588 //*************************************************************************************************
1602 template< typename VT1 // Type of the dense vector of the left-hand side expression
1603  , typename ST // Type of the scalar of the left-hand side expression
1604  , typename VT2 > // Type of the right-hand side sparse vector
1605 inline decltype(auto)
1607 {
1609 
1610  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1611 }
1613 //*************************************************************************************************
1614 
1615 
1616 //*************************************************************************************************
1630 template< typename VT1 // Type of the left-hand side sparse vector
1631  , typename VT2 // Type of the dense vector of the right-hand side expression
1632  , typename ST > // Type of the scalar of the right-hand side expression
1633 inline decltype(auto)
1635 {
1637 
1638  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1639 }
1641 //*************************************************************************************************
1642 
1643 
1644 //*************************************************************************************************
1659 template< typename VT1 // Type of the dense vector of the left-hand side expression
1660  , typename ST1 // Type of the scalar of the left-hand side expression
1661  , typename VT2 // Type of the sparse vector of the right-hand side expression
1662  , typename ST2 > // Type of the scalar o the right-hand side expression
1663 inline decltype(auto)
1665 {
1667 
1668  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1669 }
1671 //*************************************************************************************************
1672 
1673 
1674 //*************************************************************************************************
1689 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1690  , typename ST1 // Type of the scalar of the left-hand side expression
1691  , typename VT2 // Type of the dense vector of the right-hand side expression
1692  , typename ST2 > // Type of the scalar o the right-hand side expression
1693 inline decltype(auto)
1695 {
1697 
1698  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1699 }
1701 //*************************************************************************************************
1702 
1703 
1704 //*************************************************************************************************
1718 template< typename MT // Type of the left-hand side dense matrix
1719  , bool SO // Storage order of the left-hand side dense matrix
1720  , typename VT // Type of the dense vector of the right-hand side expression
1721  , typename ST > // Type of the scalar of the right-hand side expression
1722 inline decltype(auto)
1724 {
1726 
1727  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1728 }
1730 //*************************************************************************************************
1731 
1732 
1733 //*************************************************************************************************
1747 template< typename VT // Type of the dense vector of the left-hand side expression
1748  , typename ST // Type of the scalar of the left-hand side expression
1749  , typename MT // Type of the right-hand side dense matrix
1750  , bool SO > // Storage order of the right-hand side dense matrix
1751 inline decltype(auto)
1753 {
1755 
1756  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1757 }
1759 //*************************************************************************************************
1760 
1761 
1762 //*************************************************************************************************
1776 template< typename MT // Type of the left-hand side sparse matrix
1777  , bool SO // Storage order of the left-hand side sparse matrix
1778  , typename VT // Type of the dense vector of the right-hand side expression
1779  , typename ST > // Type of the scalar of the right-hand side expression
1780 inline decltype(auto)
1782 {
1784 
1785  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1786 }
1788 //*************************************************************************************************
1789 
1790 
1791 //*************************************************************************************************
1805 template< typename VT // Type of the dense vector of the left-hand side expression
1806  , typename ST // Type of the scalar of the left-hand side expression
1807  , typename MT // Type of the right-hand side sparse matrix
1808  , bool SO > // Storage order of the right-hand side sparse matrix
1809 inline decltype(auto)
1811 {
1813 
1814  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1815 }
1817 //*************************************************************************************************
1818 
1819 
1820 
1821 
1822 //=================================================================================================
1823 //
1824 // SIZE SPECIALIZATIONS
1825 //
1826 //=================================================================================================
1827 
1828 //*************************************************************************************************
1830 template< typename VT, typename ST, bool TF >
1831 struct Size< DVecScalarMultExpr<VT,ST,TF>, 0UL >
1832  : public Size<VT,0UL>
1833 {};
1835 //*************************************************************************************************
1836 
1837 
1838 
1839 
1840 //=================================================================================================
1841 //
1842 // ISALIGNED SPECIALIZATIONS
1843 //
1844 //=================================================================================================
1845 
1846 //*************************************************************************************************
1848 template< typename VT, typename ST, bool TF >
1849 struct IsAligned< DVecScalarMultExpr<VT,ST,TF> >
1850  : public IsAligned<VT>
1851 {};
1853 //*************************************************************************************************
1854 
1855 
1856 
1857 
1858 //=================================================================================================
1859 //
1860 // ISPADDED SPECIALIZATIONS
1861 //
1862 //=================================================================================================
1863 
1864 //*************************************************************************************************
1866 template< typename VT, typename ST, bool TF >
1867 struct IsPadded< DVecScalarMultExpr<VT,ST,TF> >
1868  : public IsPadded<VT>
1869 {};
1871 //*************************************************************************************************
1872 
1873 } // namespace blaze
1874 
1875 #endif
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: SVecScalarMultExpr.h:437
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecScalarMultExpr.h:573
Pointer difference type of the Blaze library.
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecScalarMultExpr.h:529
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:71
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:69
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:487
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: DVecScalarMultExpr.h:539
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:1070
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.
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecScalarMultExpr.h:259
ValueType value_type
Type of the underlying elements.
Definition: DVecScalarMultExpr.h:198
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:519
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:113
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:291
Header file for the Computation base class.
auto load() const noexcept
Access to the SIMD elements of the vector.
Definition: DVecScalarMultExpr.h:300
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:733
Header file for the RequiresEvaluation type trait.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:311
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DVecScalarMultExpr.h:213
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:509
If_< IsExpression< VT >, const VT, const VT &> LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecScalarMultExpr.h:177
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:80
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:190
ElementType ValueType
Type of the underlying elements.
Definition: DVecScalarMultExpr.h:191
IfTrue_< useAssign, const ResultType, const DVecScalarMultExpr &> CompositeType
Data type for composite expression templates.
Definition: DVecScalarMultExpr.h:174
auto length(const DenseVector< VT, TF > &dv) -> decltype(sqrt(sqrLength(~dv)))
Calculation of the length (magnitude) of the dense vector .
Definition: DenseVector.h:714
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:110
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:71
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:126
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecScalarMultExpr.h:473
Header file for the IsTemporary type trait class.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DVecScalarMultExpr.h:168
Header file for the multiplication trait.
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecScalarMultExpr.h:167
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#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:192
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:3079
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:186
Header file for the DenseMatrix base class.
decltype(auto) normalize(const DenseVector< VT, TF > &vec)
Normalization of the dense vector ( ).
Definition: DVecScalarMultExpr.h:1154
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:355
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecScalarMultExpr.h:499
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:76
#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:112
Constraint on the data type.
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DVecScalarMultExpr.h:171
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:590
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:248
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:563
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecScalarMultExpr.h:377
ReturnType_< VT > RN
Return type of the dense vector expression.
Definition: DVecScalarMultExpr.h:111
ReferenceType reference
Reference return type.
Definition: DVecScalarMultExpr.h:200
ElementType & ReferenceType
Reference return type.
Definition: DVecScalarMultExpr.h:193
MultTrait_< RT, ST > ResultType
Result type for expression template evaluations.
Definition: DVecScalarMultExpr.h:166
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecScalarMultExpr.h:389
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:333
Header file for the IsNumeric type trait.
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: DVecScalarMultExpr.h:591
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecScalarMultExpr.h:460
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:583
IteratorCategory iterator_category
The iterator category.
Definition: DVecScalarMultExpr.h:197
IteratorType iterator_
Iterator to the current element.
Definition: DVecScalarMultExpr.h:420
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:322
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:401
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsInvertible.h:82
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
#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:413
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
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:551
Header file for the IsComputation type trait class.
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:344
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecScalarMultExpr.h:280
Expression object for dense vector-scalar multiplications.The DVecScalarMultExpr class represents the...
Definition: DVecScalarMultExpr.h:104
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:225
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
Compile time logical &#39;or&#39; evaluation.The Or alias declaration performs at compile time a logical &#39;or&#39;...
Definition: Or.h:76
DVecScalarMultExpr(const VT &vector, ST scalar) noexcept
Constructor for the DVecScalarMultExpr class.
Definition: DVecScalarMultExpr.h:448
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
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:237
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:290
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:366
ConstIterator_< VT > IteratorType
ConstIterator type of the dense vector expression.
Definition: DVecScalarMultExpr.h:204
System settings for the inline keywords.
Header file for the Size type trait.
RightOperand scalar_
Scalar of the multiplication expression.
Definition: DVecScalarMultExpr.h:421
#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:427
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:199
Header file for the function trace functionality.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecScalarMultExpr.h:269
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: DVecScalarMultExpr.h:180