All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecSVecSubExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSVECSUBEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECSVECSUBEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
63 #include <blaze/util/Assert.h>
66 #include <blaze/util/SelectType.h>
67 #include <blaze/util/Types.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS DVECSVECSUBEXPR
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
85 template< typename VT1 // Type of the left-hand side dense vector
86  , typename VT2 // Type of the right-hand side sparse vector
87  , bool TF > // Transpose flag
88 class DVecSVecSubExpr : public DenseVector< DVecSVecSubExpr<VT1,VT2,TF>, TF >
89  , private VecVecSubExpr
90  , private Computation
91 {
92  private:
93  //**Type definitions****************************************************************************
94  typedef typename VT1::ResultType RT1;
95  typedef typename VT2::ResultType RT2;
96  typedef typename VT1::ReturnType RN1;
97  typedef typename VT2::ReturnType RN2;
98  typedef typename VT1::CompositeType CT1;
99  typedef typename VT2::CompositeType CT2;
100  typedef typename VT1::TransposeType TT1;
101  typedef typename VT2::TransposeType TT2;
102  //**********************************************************************************************
103 
104  //**Return type evaluation**********************************************************************
106 
111  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
112 
115  //**********************************************************************************************
116 
117  //**Parallel evaluation strategy****************************************************************
119 
124  template< typename VT >
125  struct UseSMPAssign {
126  enum { value = ( !VT1::smpAssignable || !VT2::smpAssignable ) };
127  };
129  //**********************************************************************************************
130 
131  public:
132  //**Type definitions****************************************************************************
137 
140 
142  typedef const ResultType CompositeType;
143 
145  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
146 
148  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
149  //**********************************************************************************************
150 
151  //**Compilation flags***************************************************************************
153  enum { vectorizable = 0 };
154 
156  enum { smpAssignable = 0 };
157  //**********************************************************************************************
158 
159  //**Constructor*********************************************************************************
165  explicit inline DVecSVecSubExpr( const VT1& lhs, const VT2& rhs )
166  : lhs_( lhs ) // Left-hand side dense vector of the subtraction expression
167  , rhs_( rhs ) // Right-hand side sparse vector of the subtraction expression
168  {
169  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
170  }
171  //**********************************************************************************************
172 
173  //**Subscript operator**************************************************************************
179  inline ReturnType operator[]( size_t index ) const {
180  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
181  return lhs_[index] - rhs_[index];
182  }
183  //**********************************************************************************************
184 
185  //**Size function*******************************************************************************
190  inline size_t size() const {
191  return lhs_.size();
192  }
193  //**********************************************************************************************
194 
195  //**Left operand access*************************************************************************
200  inline LeftOperand leftOperand() const {
201  return lhs_;
202  }
203  //**********************************************************************************************
204 
205  //**Right operand access************************************************************************
210  inline RightOperand rightOperand() const {
211  return rhs_;
212  }
213  //**********************************************************************************************
214 
215  //**********************************************************************************************
221  template< typename T >
222  inline bool canAlias( const T* alias ) const {
223  return ( IsExpression<VT1>::value && lhs_.canAlias( alias ) ) ||
224  ( rhs_.canAlias( alias ) );
225  }
226  //**********************************************************************************************
227 
228  //**********************************************************************************************
234  template< typename T >
235  inline bool isAliased( const T* alias ) const {
236  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
237  }
238  //**********************************************************************************************
239 
240  private:
241  //**Member variables****************************************************************************
244  //**********************************************************************************************
245 
246  //**Assignment to dense vectors*****************************************************************
258  template< typename VT > // Type of the target dense vector
259  friend inline void assign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
260  {
262 
263  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
264 
265  if( !IsComputation<VT1>::value && isSame( ~lhs, rhs.lhs_ ) ) {
266  subAssign( ~lhs, rhs.rhs_ );
267  }
268  else {
269  assign ( ~lhs, rhs.lhs_ );
270  subAssign( ~lhs, rhs.rhs_ );
271  }
272  }
274  //**********************************************************************************************
275 
276  //**Assignment to sparse vectors****************************************************************
288  template< typename VT > // Type of the target sparse vector
289  friend inline void assign( SparseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
290  {
292 
296 
297  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
298 
299  const ResultType tmp( serial( rhs ) );
300  assign( ~lhs, tmp );
301  }
303  //**********************************************************************************************
304 
305  //**Addition assignment to dense vectors********************************************************
317  template< typename VT > // Type of the target dense vector
318  friend inline void addAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
319  {
321 
322  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
323 
324  addAssign( ~lhs, rhs.lhs_ );
325  subAssign( ~lhs, rhs.rhs_ );
326  }
328  //**********************************************************************************************
329 
330  //**Addition assignment to sparse vectors*******************************************************
331  // No special implementation for the addition assignment to sparse vectors.
332  //**********************************************************************************************
333 
334  //**Subtraction assignment to dense vectors*****************************************************
346  template< typename VT > // Type of the target dense vector
347  friend inline void subAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
348  {
350 
351  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
352 
353  subAssign( ~lhs, rhs.lhs_ );
354  addAssign( ~lhs, rhs.rhs_ );
355  }
357  //**********************************************************************************************
358 
359  //**Subtraction assignment to sparse vectors****************************************************
360  // No special implementation for the subtraction assignment to sparse vectors.
361  //**********************************************************************************************
362 
363  //**Multiplication assignment to dense vectors**************************************************
375  template< typename VT > // Type of the target dense vector
376  friend inline void multAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
377  {
379 
383 
384  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
385 
386  const ResultType tmp( serial( rhs ) );
387  multAssign( ~lhs, tmp );
388  }
390  //**********************************************************************************************
391 
392  //**Multiplication assignment to sparse vectors*************************************************
393  // No special implementation for the multiplication assignment to sparse vectors.
394  //**********************************************************************************************
395 
396  //**SMP assignment to dense vectors*************************************************************
410  template< typename VT > // Type of the target dense vector
411  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
412  smpAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
413  {
415 
416  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
417 
418  if( !IsComputation<VT1>::value && isSame( ~lhs, rhs.lhs_ ) ) {
419  smpSubAssign( ~lhs, rhs.rhs_ );
420  }
421  else {
422  smpAssign ( ~lhs, rhs.lhs_ );
423  smpSubAssign( ~lhs, rhs.rhs_ );
424  }
425  }
427  //**********************************************************************************************
428 
429  //**SMP assignment to sparse vectors************************************************************
443  template< typename VT > // Type of the target sparse vector
444  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
445  smpAssign( SparseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
446  {
448 
452 
453  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
454 
455  const ResultType tmp( rhs );
456  smpAssign( ~lhs, tmp );
457  }
459  //**********************************************************************************************
460 
461  //**SMP addition assignment to dense vectors****************************************************
475  template< typename VT > // Type of the target dense vector
476  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
477  smpAddAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
478  {
480 
481  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
482 
483  smpAddAssign( ~lhs, rhs.lhs_ );
484  smpSubAssign( ~lhs, rhs.rhs_ );
485  }
487  //**********************************************************************************************
488 
489  //**SMP addition assignment to sparse vectors***************************************************
490  // No special implementation for the SMP addition assignment to sparse vectors.
491  //**********************************************************************************************
492 
493  //**SMP subtraction assignment to dense vectors*************************************************
508  template< typename VT > // Type of the target dense vector
509  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
510  smpSubAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
511  {
513 
514  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
515 
516  smpSubAssign( ~lhs, rhs.lhs_ );
517  smpAddAssign( ~lhs, rhs.rhs_ );
518  }
520  //**********************************************************************************************
521 
522  //**SMP subtraction assignment to sparse vectors************************************************
523  // No special implementation for the SMP subtraction assignment to sparse vectors.
524  //**********************************************************************************************
525 
526  //**SMP multiplication assignment to dense vectors**********************************************
541  template< typename VT > // Type of the target dense vector
542  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
543  smpMultAssign( DenseVector<VT,TF>& lhs, const DVecSVecSubExpr& rhs )
544  {
546 
550 
551  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
552 
553  const ResultType tmp( rhs );
554  smpMultAssign( ~lhs, tmp );
555  }
557  //**********************************************************************************************
558 
559  //**SMP multiplication assignment to sparse vectors*********************************************
560  // No special implementation for the SMP multiplication assignment to sparse vectors.
561  //**********************************************************************************************
562 
563  //**Compile time checks*************************************************************************
570  //**********************************************************************************************
571 };
572 //*************************************************************************************************
573 
574 
575 
576 
577 //=================================================================================================
578 //
579 // GLOBAL BINARY ARITHMETIC OPERATORS
580 //
581 //=================================================================================================
582 
583 //*************************************************************************************************
609 template< typename T1 // Type of the left-hand side dense vector
610  , typename T2 // Type of the right-hand side sparse vector
611  , bool TF > // Transpose flag
612 inline const DVecSVecSubExpr<T1,T2,TF>
614 {
616 
617  if( (~lhs).size() != (~rhs).size() )
618  throw std::invalid_argument( "Vector sizes do not match" );
619 
620  return DVecSVecSubExpr<T1,T2,TF>( ~lhs, ~rhs );
621 }
622 //*************************************************************************************************
623 
624 
625 
626 
627 //=================================================================================================
628 //
629 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
630 //
631 //=================================================================================================
632 
633 //*************************************************************************************************
646 template< typename T1 // Type of the dense vector of the left-hand side expression
647  , typename T2 // Type of the sparse vector of the left-hand side expression
648  , bool TF // Transpose flag of the left-hand side expression
649  , typename T3 > // Type of the right-hand side dense vector
650 inline const typename AddExprTrait< DVecSVecSubExpr<T1,T2,TF>, T3 >::Type
651  operator+( const DVecSVecSubExpr<T1,T2,TF>& lhs, const DenseVector<T3,TF>& rhs )
652 {
654 
655  return ( lhs.leftOperand() + (~rhs) ) - lhs.rightOperand();
656 }
658 //*************************************************************************************************
659 
660 
661 //*************************************************************************************************
674 template< typename T1 // Type of the dense vector of the left-hand side expression
675  , typename T2 // Type of the sparse vector of the left-hand side expression
676  , bool TF // Transpose flag of the left-hand side expression
677  , typename T3 > // Type of the right-hand side dense vector
678 inline const typename SubExprTrait< DVecSVecSubExpr<T1,T2,TF>, T3 >::Type
679  operator-( const DVecSVecSubExpr<T1,T2,TF>& lhs, const DenseVector<T3,TF>& rhs )
680 {
682 
683  return ( lhs.leftOperand() - (~rhs) ) - lhs.rightOperand();
684 }
686 //*************************************************************************************************
687 
688 
689 
690 
691 //=================================================================================================
692 //
693 // EXPRESSION TRAIT SPECIALIZATIONS
694 //
695 //=================================================================================================
696 
697 //*************************************************************************************************
699 template< typename VT1, typename VT2, typename VT3 >
700 struct DVecDVecAddExprTrait< DVecSVecSubExpr<VT1,VT2,false>, VT3 >
701 {
702  public:
703  //**********************************************************************************************
705  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
706  IsSparseVector<VT2>::value && IsColumnVector<VT2>::value &&
707  IsDenseVector<VT3>::value && IsColumnVector<VT3>::value
708  , typename DVecSVecSubExprTrait< typename DVecDVecAddExprTrait<VT1,VT3>::Type, VT2 >::Type
709  , INVALID_TYPE >::Type Type;
711  //**********************************************************************************************
712 };
714 //*************************************************************************************************
715 
716 
717 //*************************************************************************************************
719 template< typename VT1, typename VT2, typename VT3 >
720 struct TDVecTDVecAddExprTrait< DVecSVecSubExpr<VT1,VT2,true>, VT3 >
721 {
722  public:
723  //**********************************************************************************************
725  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
726  IsSparseVector<VT2>::value && IsRowVector<VT2>::value &&
727  IsDenseVector<VT3>::value && IsRowVector<VT3>::value
728  , typename TDVecTSVecSubExprTrait< typename TDVecTDVecAddExprTrait<VT1,VT3>::Type, VT2 >::Type
729  , INVALID_TYPE >::Type Type;
731  //**********************************************************************************************
732 };
734 //*************************************************************************************************
735 
736 
737 //*************************************************************************************************
739 template< typename VT1, typename VT2, typename VT3 >
740 struct DVecDVecSubExprTrait< DVecSVecSubExpr<VT1,VT2,false>, VT3 >
741 {
742  public:
743  //**********************************************************************************************
745  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
746  IsSparseVector<VT2>::value && IsColumnVector<VT2>::value &&
747  IsDenseVector<VT3>::value && IsColumnVector<VT3>::value
748  , typename DVecSVecSubExprTrait< typename DVecDVecSubExprTrait<VT1,VT3>::Type, VT2 >::Type
749  , INVALID_TYPE >::Type Type;
751  //**********************************************************************************************
752 };
754 //*************************************************************************************************
755 
756 
757 //*************************************************************************************************
759 template< typename VT1, typename VT2, typename VT3 >
760 struct TDVecTDVecSubExprTrait< DVecSVecSubExpr<VT1,VT2,true>, VT3 >
761 {
762  public:
763  //**********************************************************************************************
765  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
766  IsSparseVector<VT2>::value && IsRowVector<VT2>::value &&
767  IsDenseVector<VT3>::value && IsRowVector<VT3>::value
768  , typename TDVecTSVecSubExprTrait< typename TDVecTDVecSubExprTrait<VT1,VT3>::Type, VT2 >::Type
769  , INVALID_TYPE >::Type Type;
771  //**********************************************************************************************
772 };
774 //*************************************************************************************************
775 
776 
777 //*************************************************************************************************
779 template< typename VT1, typename VT2, bool TF, bool AF >
780 struct SubvectorExprTrait< DVecSVecSubExpr<VT1,VT2,TF>, AF >
781 {
782  public:
783  //**********************************************************************************************
784  typedef typename SubExprTrait< typename SubvectorExprTrait<const VT1,AF>::Type
785  , typename SubvectorExprTrait<const VT2,AF>::Type >::Type Type;
786  //**********************************************************************************************
787 };
789 //*************************************************************************************************
790 
791 } // namespace blaze
792 
793 #endif
ResultType::ElementType ElementType
Resulting element type.
Definition: DVecSVecSubExpr.h:136
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
VT2::ReturnType RN2
Return type of the right-hand side sparse vector expression.
Definition: DVecSVecSubExpr.h:97
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.
VT1::ResultType RT1
Result type of the left-hand side dense vector expression.
Definition: DVecSVecSubExpr.h:94
RightOperand rightOperand() const
Returns the right-hand side sparse vector operand.
Definition: DVecSVecSubExpr.h:210
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:152
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:199
void smpMultAssign(DenseVector< 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:179
RightOperand rhs_
Right-hand side sparse vector of the subtraction expression.
Definition: DVecSVecSubExpr.h:243
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecSVecSubExpr.h:139
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2408
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:251
Header file for the DenseVector base class.
Header file for the AddExprTrait class template.
DVecSVecSubExpr< VT1, VT2, TF > This
Type of this DVecSVecSubExpr instance.
Definition: DVecSVecSubExpr.h:133
SubTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: DVecSVecSubExpr.h:134
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:690
Header file for the Computation base class.
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b)
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:409
Constraint on the data type.
Expression object for dense vector-sparse vector subtractions.The DVecSVecSubExpr class represents th...
Definition: DVecSVecSubExpr.h:88
void smpAddAssign(DenseMatrix< 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:122
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecSVecSubExpr.h:222
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:253
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.
const ResultType CompositeType
Data type for composite expression templates.
Definition: DVecSVecSubExpr.h:142
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecSVecSubExpr.h:135
VT2::TransposeType TT2
Transpose type of the right-hand side sparse vector expression.
Definition: DVecSVecSubExpr.h:101
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:271
const DenseIterator< Type > operator+(const DenseIterator< Type > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:556
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
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:2405
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:103
SubExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecSVecSubExpr.h:114
VT2::CompositeType CT2
Composite type of the right-hand side sparse vector expression.
Definition: DVecSVecSubExpr.h:99
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:361
Header file for the VecVecSubExpr base class.
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
LeftOperand leftOperand() const
Returns the left-hand side dense vector operand.
Definition: DVecSVecSubExpr.h:200
VT1::TransposeType TT1
Transpose type of the left-hand side dense vector expression.
Definition: DVecSVecSubExpr.h:100
Header file for the serial shim.
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:92
DVecSVecSubExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the DVecSVecSubExpr class.
Definition: DVecSVecSubExpr.h:165
Header file for the IsSparseVector type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2407
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: DVecSVecSubExpr.h:148
Header file for run time assertion macros.
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:301
const DenseIterator< Type > operator-(const DenseIterator< Type > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:585
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:331
VT1::ReturnType RN1
Return type of the left-hand side dense vector expression.
Definition: DVecSVecSubExpr.h:96
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecSVecSubExpr.h:145
Header file for the IsDenseVector type trait.
LeftOperand lhs_
Left-hand side dense vector of the subtraction expression.
Definition: DVecSVecSubExpr.h:242
#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
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecSVecSubExpr.h:190
Header file for the IsComputation type trait class.
VT2::ResultType RT2
Result type of the right-hand side sparse vector expression.
Definition: DVecSVecSubExpr.h:95
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
#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:2403
Header file for basic type definitions.
Header file for the SubvectorExprTrait class template.
Base template for the SubTrait class.
Definition: SubTrait.h:141
Header file for the IsColumnVector type trait.
Base class for all vector/vector subtraction expression templates.The VecVecSubExpr class serves as a...
Definition: VecVecSubExpr.h:65
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecSVecSubExpr.h:179
Header file for the SubExprTrait class template.
#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:238
#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
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecSVecSubExpr.h:235
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
VT1::CompositeType CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecSVecSubExpr.h:98