SVecDVecSubExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECDVECSUBEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECDVECSUBEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
64 #include <blaze/util/Assert.h>
66 #include <blaze/util/EnableIf.h>
67 #include <blaze/util/Exception.h>
68 #include <blaze/util/InvalidType.h>
70 #include <blaze/util/mpl/Max.h>
71 #include <blaze/util/SelectType.h>
72 #include <blaze/util/Types.h>
73 
74 
75 namespace blaze {
76 
77 //=================================================================================================
78 //
79 // CLASS SVECDVECSUBEXPR
80 //
81 //=================================================================================================
82 
83 //*************************************************************************************************
90 template< typename VT1 // Type of the left-hand side sparse vector
91  , typename VT2 // Type of the right-hand side dense vector
92  , bool TF > // Transpose flag
93 class SVecDVecSubExpr : public DenseVector< SVecDVecSubExpr<VT1,VT2,TF>, TF >
94  , private VecVecSubExpr
95  , private Computation
96 {
97  private:
98  //**Type definitions****************************************************************************
99  typedef typename VT1::ResultType RT1;
100  typedef typename VT2::ResultType RT2;
101  typedef typename VT1::ReturnType RN1;
102  typedef typename VT2::ReturnType RN2;
103  typedef typename VT1::CompositeType CT1;
104  typedef typename VT2::CompositeType CT2;
105  typedef typename VT1::TransposeType TT1;
106  typedef typename VT2::TransposeType TT2;
107  //**********************************************************************************************
108 
109  //**Return type evaluation**********************************************************************
111 
116  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
117 
120  //**********************************************************************************************
121 
122  //**Parallel evaluation strategy****************************************************************
124 
129  template< typename VT >
130  struct UseSMPAssign {
131  enum { value = ( !VT1::smpAssignable || !VT2::smpAssignable ) };
132  };
134  //**********************************************************************************************
135 
136  public:
137  //**Type definitions****************************************************************************
142 
145 
147  typedef const ResultType CompositeType;
148 
150  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
151 
153  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
154  //**********************************************************************************************
155 
156  //**Compilation flags***************************************************************************
158  enum { vectorizable = 0 };
159 
161  enum { smpAssignable = 0 };
162  //**********************************************************************************************
163 
164  //**Constructor*********************************************************************************
170  explicit inline SVecDVecSubExpr( const VT1& lhs, const VT2& rhs )
171  : lhs_( lhs ) // Left-hand side sparse vector of the subtraction expression
172  , rhs_( rhs ) // Right-hand side dense vector of the subtraction expression
173  {
174  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
175  }
176  //**********************************************************************************************
177 
178  //**Subscript operator**************************************************************************
184  inline ReturnType operator[]( size_t index ) const {
185  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
186  return lhs_[index] - rhs_[index];
187  }
188  //**********************************************************************************************
189 
190  //**At function*********************************************************************************
197  inline ReturnType at( size_t index ) const {
198  if( index >= lhs_.size() ) {
199  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
200  }
201  return (*this)[index];
202  }
203  //**********************************************************************************************
204 
205  //**Size function*******************************************************************************
210  inline size_t size() const {
211  return lhs_.size();
212  }
213  //**********************************************************************************************
214 
215  //**Left operand access*************************************************************************
220  inline LeftOperand leftOperand() const {
221  return lhs_;
222  }
223  //**********************************************************************************************
224 
225  //**Right operand access************************************************************************
230  inline RightOperand rightOperand() const {
231  return rhs_;
232  }
233  //**********************************************************************************************
234 
235  //**********************************************************************************************
241  template< typename T >
242  inline bool canAlias( const T* alias ) const {
243  return ( lhs_.canAlias( alias ) ) ||
244  ( IsExpression<VT2>::value && rhs_.canAlias( alias ) );
245  }
246  //**********************************************************************************************
247 
248  //**********************************************************************************************
254  template< typename T >
255  inline bool isAliased( const T* alias ) const {
256  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
257  }
258  //**********************************************************************************************
259 
260  private:
261  //**Member variables****************************************************************************
262  LeftOperand lhs_;
263  RightOperand rhs_;
264  //**********************************************************************************************
265 
266  //**Assignment to dense vectors*****************************************************************
278  template< typename VT > // Type of the target dense vector
279  friend inline void assign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
280  {
282 
283  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
284 
285  assign ( ~lhs, -rhs.rhs_ );
286  addAssign( ~lhs, rhs.lhs_ );
287  }
289  //**********************************************************************************************
290 
291  //**Assignment to sparse vectors****************************************************************
303  template< typename VT > // Type of the target sparse vector
304  friend inline void assign( SparseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
305  {
307 
311 
312  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
313 
314  const ResultType tmp( serial( rhs ) );
315  assign( ~lhs, tmp );
316  }
318  //**********************************************************************************************
319 
320  //**Addition assignment to dense vectors********************************************************
332  template< typename VT > // Type of the target dense vector
333  friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
334  {
336 
337  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
338 
339  subAssign( ~lhs, rhs.rhs_ );
340  addAssign( ~lhs, rhs.lhs_ );
341  }
343  //**********************************************************************************************
344 
345  //**Addition assignment to sparse vectors*******************************************************
346  // No special implementation for the addition assignment to sparse vectors.
347  //**********************************************************************************************
348 
349  //**Subtraction assignment to dense vectors*****************************************************
361  template< typename VT > // Type of the target dense vector
362  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
363  {
365 
366  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
367 
368  addAssign( ~lhs, rhs.rhs_ );
369  subAssign( ~lhs, rhs.lhs_ );
370  }
372  //**********************************************************************************************
373 
374  //**Subtraction assignment to sparse vectors****************************************************
375  // No special implementation for the subtraction assignment to sparse vectors.
376  //**********************************************************************************************
377 
378  //**Multiplication assignment to dense vectors**************************************************
390  template< typename VT > // Type of the target dense vector
391  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
392  {
394 
398 
399  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
400 
401  const ResultType tmp( serial( rhs ) );
402  multAssign( ~lhs, tmp );
403  }
405  //**********************************************************************************************
406 
407  //**Multiplication assignment to sparse vectors*************************************************
408  // No special implementation for the multiplication assignment to sparse vectors.
409  //**********************************************************************************************
410 
411  //**SMP assignment to dense vectors*************************************************************
425  template< typename VT > // Type of the target dense vector
426  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
427  smpAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
428  {
430 
431  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
432 
433  smpAssign ( ~lhs, -rhs.rhs_ );
434  smpAddAssign( ~lhs, rhs.lhs_ );
435  }
437  //**********************************************************************************************
438 
439  //**SMP assignment to sparse vectors************************************************************
453  template< typename VT > // Type of the target sparse vector
454  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
455  smpAssign( SparseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
456  {
458 
462 
463  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
464 
465  const ResultType tmp( rhs );
466  smpAssign( ~lhs, tmp );
467  }
469  //**********************************************************************************************
470 
471  //**SMP addition assignment to dense vectors****************************************************
485  template< typename VT > // Type of the target dense vector
486  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
487  smpAddAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
488  {
490 
491  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
492 
493  smpSubAssign( ~lhs, rhs.rhs_ );
494  smpAddAssign( ~lhs, rhs.lhs_ );
495  }
497  //**********************************************************************************************
498 
499  //**SMP addition assignment to sparse vectors***************************************************
500  // No special implementation for the SMP addition assignment to sparse vectors.
501  //**********************************************************************************************
502 
503  //**SMP subtraction assignment to dense vectors*************************************************
517  template< typename VT > // Type of the target dense vector
518  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
519  smpSubAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
520  {
522 
523  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
524 
525  smpAddAssign( ~lhs, rhs.rhs_ );
526  smpSubAssign( ~lhs, rhs.lhs_ );
527  }
529  //**********************************************************************************************
530 
531  //**SMP subtraction assignment to sparse vectors************************************************
532  // No special implementation for the SMP subtraction assignment to sparse vectors.
533  //**********************************************************************************************
534 
535  //**SMP multiplication assignment to dense vectors**********************************************
550  template< typename VT > // Type of the target dense vector
551  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
552  smpMultAssign( DenseVector<VT,TF>& lhs, const SVecDVecSubExpr& rhs )
553  {
555 
559 
560  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
561 
562  const ResultType tmp( rhs );
563  smpMultAssign( ~lhs, tmp );
564  }
566  //**********************************************************************************************
567 
568  //**SMP multiplication assignment to sparse vectors*********************************************
569  // No special implementation for the SMP multiplication assignment to sparse vectors.
570  //**********************************************************************************************
571 
572  //**Compile time checks*************************************************************************
580  //**********************************************************************************************
581 };
582 //*************************************************************************************************
583 
584 
585 
586 
587 //=================================================================================================
588 //
589 // GLOBAL BINARY ARITHMETIC OPERATORS
590 //
591 //=================================================================================================
592 
593 //*************************************************************************************************
619 template< typename T1 // Type of the left-hand side sparse vector
620  , typename T2 // Type of the right-hand side dense vector
621  , bool TF > // Transpose flag
622 inline const SVecDVecSubExpr<T1,T2,TF>
624 {
626 
627  if( (~lhs).size() != (~rhs).size() ) {
628  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
629  }
630 
631  return SVecDVecSubExpr<T1,T2,TF>( ~lhs, ~rhs );
632 }
633 //*************************************************************************************************
634 
635 
636 
637 
638 //=================================================================================================
639 //
640 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
641 //
642 //=================================================================================================
643 
644 //*************************************************************************************************
657 template< typename T1 // Type of the sparse vector of the left-hand side expression
658  , typename T2 // Type of the dense vector of the left-hand side expression
659  , bool TF // Transpose flag of the left-hand side expression
660  , typename T3 > // Type of right-hand side dense vector
661 inline const typename AddExprTrait< SVecDVecSubExpr<T1,T2,TF>, T3 >::Type
662  operator+( const SVecDVecSubExpr<T1,T2,TF>& lhs, const DenseVector<T3,TF>& rhs )
663 {
665 
666  return ( (~rhs) - lhs.rightOperand() ) + lhs.leftOperand();
667 }
669 //*************************************************************************************************
670 
671 
672 //*************************************************************************************************
685 template< typename T1 // Type of the sparse vector of the left-hand side expression
686  , typename T2 // Type of the dense vector of the left-hand side expression
687  , bool TF // Transpose flag of the left-hand side expression
688  , typename T3 > // Type of right-hand side dense vector
689 inline const typename SubExprTrait< SVecDVecSubExpr<T1,T2,TF>, T3 >::Type
690  operator-( const SVecDVecSubExpr<T1,T2,TF>& lhs, const DenseVector<T3,TF>& rhs )
691 {
693 
694  return lhs.leftOperand() - ( lhs.rightOperand() + (~rhs) );
695 }
697 //*************************************************************************************************
698 
699 
700 
701 
702 //=================================================================================================
703 //
704 // SIZE SPECIALIZATIONS
705 //
706 //=================================================================================================
707 
708 //*************************************************************************************************
710 template< typename VT1, typename VT2, bool TF >
711 struct Size< SVecDVecSubExpr<VT1,VT2,TF> >
712  : public Max< Size<VT1>, Size<VT2> >
713 {};
715 //*************************************************************************************************
716 
717 
718 
719 
720 //=================================================================================================
721 //
722 // EXPRESSION TRAIT SPECIALIZATIONS
723 //
724 //=================================================================================================
725 
726 //*************************************************************************************************
728 template< typename VT1, typename VT2, typename VT3 >
729 struct DVecDVecAddExprTrait< SVecDVecSubExpr<VT1,VT2,false>, VT3 >
730 {
731  public:
732  //**********************************************************************************************
734  typedef typename SelectType< IsSparseVector<VT1>::value && IsColumnVector<VT1>::value &&
735  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
736  IsDenseVector<VT3>::value && IsColumnVector<VT3>::value
737  , typename DVecSVecAddExprTrait< typename DVecDVecSubExprTrait<VT3,VT2>::Type, VT1 >::Type
738  , INVALID_TYPE >::Type Type;
740  //**********************************************************************************************
741 };
743 //*************************************************************************************************
744 
745 
746 //*************************************************************************************************
748 template< typename VT1, typename VT2, typename VT3 >
749 struct TDVecTDVecAddExprTrait< SVecDVecSubExpr<VT1,VT2,true>, VT3 >
750 {
751  public:
752  //**********************************************************************************************
754  typedef typename SelectType< IsSparseVector<VT1>::value && IsRowVector<VT1>::value &&
755  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
756  IsDenseVector<VT3>::value && IsRowVector<VT3>::value
757  , typename TDVecTSVecAddExprTrait< typename TDVecTDVecSubExprTrait<VT3,VT2>::Type, VT1 >::Type
758  , INVALID_TYPE >::Type Type;
760  //**********************************************************************************************
761 };
763 //*************************************************************************************************
764 
765 
766 //*************************************************************************************************
768 template< typename VT1, typename VT2, typename VT3 >
769 struct DVecDVecSubExprTrait< SVecDVecSubExpr<VT1,VT2,false>, VT3 >
770 {
771  public:
772  //**********************************************************************************************
774  typedef typename SelectType< IsSparseVector<VT1>::value && IsColumnVector<VT1>::value &&
775  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
776  IsDenseVector<VT3>::value && IsColumnVector<VT3>::value
777  , typename SVecDVecSubExprTrait< VT1, typename DVecDVecAddExprTrait<VT2,VT3>::Type >::Type
778  , INVALID_TYPE >::Type Type;
780  //**********************************************************************************************
781 };
783 //*************************************************************************************************
784 
785 
786 //*************************************************************************************************
788 template< typename VT1, typename VT2, typename VT3 >
789 struct TDVecTDVecSubExprTrait< SVecDVecSubExpr<VT1,VT2,true>, VT3 >
790 {
791  public:
792  //**********************************************************************************************
794  typedef typename SelectType< IsSparseVector<VT1>::value && IsRowVector<VT1>::value &&
795  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
796  IsDenseVector<VT3>::value && IsRowVector<VT3>::value
797  , typename TSVecTDVecSubExprTrait< VT1, typename TDVecTDVecAddExprTrait<VT2,VT3>::Type >::Type
798  , INVALID_TYPE >::Type Type;
800  //**********************************************************************************************
801 };
803 //*************************************************************************************************
804 
805 
806 //*************************************************************************************************
808 template< typename VT1, typename VT2, bool TF, bool AF >
809 struct SubvectorExprTrait< SVecDVecSubExpr<VT1,VT2,TF>, AF >
810 {
811  public:
812  //**********************************************************************************************
813  typedef typename SubExprTrait< typename SubvectorExprTrait<const VT1,AF>::Type
814  , typename SubvectorExprTrait<const VT2,AF>::Type >::Type Type;
815  //**********************************************************************************************
816 };
818 //*************************************************************************************************
819 
820 } // namespace blaze
821 
822 #endif
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
Header file for the Max class template.
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecDVecSubExpr.h:147
LeftOperand lhs_
Left-hand side sparse vector of the subtraction expression.
Definition: SVecDVecSubExpr.h:262
Expression object for sparse vector-dense vector subtractions.The SVecDVecSubExpr class represents th...
Definition: Forward.h:123
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
Header file for the subtraction trait.
Header file for basic type definitions.
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
SubExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SVecDVecSubExpr.h:119
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:259
Header file for the DenseVector base class.
Header file for the AddExprTrait class template.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
Header file for the Computation base class.
VT1::ReturnType RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecDVecSubExpr.h:101
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecDVecSubExpr.h:197
VT1::ResultType RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecDVecSubExpr.h:99
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: SVecDVecSubExpr.h:220
SVecDVecSubExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the SVecDVecSubExpr class.
Definition: SVecDVecSubExpr.h:170
Constraint on the data type.
VT2::CompositeType CT2
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecSubExpr.h:104
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:261
RightOperand rightOperand() const
Returns the right-hand side dense vector operand.
Definition: SVecDVecSubExpr.h:230
RightOperand rhs_
Right-hand side dense vector of the subtraction expression.
Definition: SVecDVecSubExpr.h:263
VT2::TransposeType TT2
Transpose type of the right-hand side dense vector expression.
Definition: SVecDVecSubExpr.h:106
VT2::ResultType RT2
Result type of the right-hand side dense vector expression.
Definition: SVecDVecSubExpr.h:100
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the IsTemporary type trait class.
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecDVecSubExpr.h:140
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:610
SVecDVecSubExpr< VT1, VT2, TF > This
Type of this SVecDVecSubExpr instance.
Definition: SVecDVecSubExpr.h:138
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_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:79
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:642
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
Constraint on the data type.
Evaluation of the return type of a subtraction expression.Via this type trait it is possible to evalu...
Definition: SubExprTrait.h:104
Header file for the VecVecSubExpr base class.
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
SubTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: SVecDVecSubExpr.h:139
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the serial shim.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecDVecSubExpr.h:255
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecDVecSubExpr.h:242
VT2::ReturnType RN2
Return type of the right-hand side dense vector expression.
Definition: SVecDVecSubExpr.h:102
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecSubExpr.h:150
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the IsSparseVector type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
Utility type for generic codes.
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SVecDVecSubExpr.h:144
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecDVecSubExpr.h:184
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecSubExpr.h:153
Header file for the IsDenseVector type trait.
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecDVecSubExpr.h:210
Constraint on the data type.
#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:79
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECVECSUBEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/vector ...
Definition: VecVecSubExpr.h:165
Header file for the IsComputation type trait class.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:118
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
Header file for the SubvectorExprTrait class template.
ResultType::ElementType ElementType
Resulting element type.
Definition: SVecDVecSubExpr.h:141
Base template for the SubTrait class.
Definition: SubTrait.h:138
Header file for exception macros.
Header file for the IsColumnVector type trait.
VT1::CompositeType CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecSubExpr.h:103
Header file for the SubExprTrait class template.
VT1::TransposeType TT1
Transpose type of the left-hand side sparse vector expression.
Definition: SVecDVecSubExpr.h:105
EnableIf< IsDenseVector< VT1 > >::Type 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:189
Header file for the Size type trait.
#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:81
#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
Compile time check whether the given type is an expression template.This type trait class tests wheth...
Definition: IsExpression.h:87
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.