SVecSVecAddExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECSVECADDEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECSVECADDEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
50 #include <blaze/math/Functions.h>
61 #include <blaze/util/Assert.h>
63 #include <blaze/util/DisableIf.h>
64 #include <blaze/util/EnableIf.h>
65 #include <blaze/util/Exception.h>
67 #include <blaze/util/mpl/Max.h>
68 #include <blaze/util/SelectType.h>
69 #include <blaze/util/Types.h>
71 
72 
73 namespace blaze {
74 
75 //=================================================================================================
76 //
77 // CLASS SVECSVECADDEXPR
78 //
79 //=================================================================================================
80 
81 //*************************************************************************************************
88 template< typename VT1 // Type of the left-hand side sparse vector
89  , typename VT2 // Type of the right-hand side sparse vector
90  , bool TF > // Transpose flag
91 class SVecSVecAddExpr : public SparseVector< SVecSVecAddExpr<VT1,VT2,TF>, TF >
92  , private VecVecAddExpr
93  , private Computation
94 {
95  private:
96  //**Type definitions****************************************************************************
97  typedef typename VT1::ResultType RT1;
98  typedef typename VT2::ResultType RT2;
99  typedef typename VT1::ReturnType RN1;
100  typedef typename VT2::ReturnType RN2;
101  typedef typename VT1::CompositeType CT1;
102  typedef typename VT2::CompositeType CT2;
103  typedef typename VT1::TransposeType TT1;
104  typedef typename VT2::TransposeType TT2;
105  //**********************************************************************************************
106 
107  //**Return type evaluation**********************************************************************
109 
114  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
115 
118  //**********************************************************************************************
119 
120  //**Parallel evaluation strategy****************************************************************
122 
127  template< typename VT >
128  struct UseSMPAssign {
129  enum { value = VT::smpAssignable };
130  };
132  //**********************************************************************************************
133 
134  public:
135  //**Type definitions****************************************************************************
140 
143 
145  typedef const ResultType CompositeType;
146 
148  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
149 
151  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
152  //**********************************************************************************************
153 
154  //**Compilation flags***************************************************************************
156  enum { smpAssignable = 0 };
157  //**********************************************************************************************
158 
159  //**Constructor*********************************************************************************
162  explicit inline SVecSVecAddExpr( const VT1& lhs, const VT2& rhs )
163  : lhs_( lhs ) // Left-hand side sparse vector of the addition expression
164  , rhs_( rhs ) // Right-hand side sparse vector of the addition expression
165  {
166  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
167  }
168  //**********************************************************************************************
169 
170  //**Subscript operator**************************************************************************
176  inline ReturnType operator[]( size_t index ) const {
177  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
178  return lhs_[index] + rhs_[index];
179  }
180  //**********************************************************************************************
181 
182  //**At function*********************************************************************************
189  inline ReturnType at( size_t index ) const {
190  if( index >= lhs_.size() ) {
191  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
192  }
193  return (*this)[index];
194  }
195  //**********************************************************************************************
196 
197  //**Size function*******************************************************************************
202  inline size_t size() const {
203  return lhs_.size();
204  }
205  //**********************************************************************************************
206 
207  //**NonZeros function***************************************************************************
212  inline size_t nonZeros() const {
213  return min( lhs_.size(), lhs_.nonZeros() + rhs_.nonZeros() );
214  }
215  //**********************************************************************************************
216 
217  //**Left operand access*************************************************************************
222  inline LeftOperand leftOperand() const {
223  return lhs_;
224  }
225  //**********************************************************************************************
226 
227  //**Right operand access************************************************************************
232  inline RightOperand rightOperand() const {
233  return rhs_;
234  }
235  //**********************************************************************************************
236 
237  //**********************************************************************************************
243  template< typename T >
244  inline bool canAlias( const T* alias ) const {
245  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
246  }
247  //**********************************************************************************************
248 
249  //**********************************************************************************************
255  template< typename T >
256  inline bool isAliased( const T* alias ) const {
257  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
258  }
259  //**********************************************************************************************
260 
261  private:
262  //**Member variables****************************************************************************
263  LeftOperand lhs_;
264  RightOperand rhs_;
265  //**********************************************************************************************
266 
267  //**Default assignment to dense vectors*********************************************************
280  template< typename VT > // Type of the target dense vector
281  friend inline typename EnableIf< IsResizable<typename VT::ElementType> >::Type
282  assign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
283  {
285 
286  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
287 
288  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
289  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
290 
291  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
292  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
293 
294  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
295  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
296  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
297 
298  const LeftIterator lend( x.end() );
299  const RightIterator rend( y.end() );
300 
301  for( LeftIterator l=x.begin(); l!=lend; ++l ) {
302  (~lhs)[l->index()] = l->value();
303  }
304 
305  for( RightIterator r=y.begin(); r!=rend; ++r ) {
306  if( isDefault( (~lhs)[r->index()] ) )
307  (~lhs)[r->index()] = r->value();
308  else
309  (~lhs)[r->index()] += r->value();
310  }
311  }
313  //**********************************************************************************************
314 
315  //**Optimized assignment to dense vectors*******************************************************
328  template< typename VT > // Type of the target dense vector
329  friend inline typename DisableIf< IsResizable<typename VT::ElementType> >::Type
330  assign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
331  {
333 
334  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
335 
336  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
337  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
338 
339  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
340  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
341 
342  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
343  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
344  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
345 
346  const LeftIterator lend( x.end() );
347  const RightIterator rend( y.end() );
348 
349  for( LeftIterator l=x.begin(); l!=lend; ++l ) {
350  (~lhs)[l->index()] = l->value();
351  }
352 
353  for( RightIterator r=y.begin(); r!=rend; ++r ) {
354  (~lhs)[r->index()] += r->value();
355  }
356  }
358  //**********************************************************************************************
359 
360  //**Assignment to sparse vectors****************************************************************
372  template< typename VT > // Type of the target sparse vector
373  friend inline void assign( SparseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
374  {
376 
377  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
378 
379  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
380  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
381 
382  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
383  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
384 
385  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
386  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
387  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
388 
389  const LeftIterator lend( x.end() );
390  const RightIterator rend( y.end() );
391 
392  LeftIterator l( x.begin() );
393  RightIterator r( y.begin() );
394 
395  while( l != lend && r != rend )
396  {
397  if( l->index() < r->index() ) {
398  (~lhs).append( l->index(), l->value() );
399  ++l;
400  }
401  else if( l->index() > r->index() ) {
402  (~lhs).append( r->index(), r->value() );
403  ++r;
404  }
405  else {
406  (~lhs).append( l->index(), l->value() + r->value() );
407  ++l;
408  ++r;
409  }
410  }
411 
412  while( l != lend ) {
413  (~lhs).append( l->index(), l->value() );
414  ++l;
415  }
416 
417  while( r != rend ) {
418  (~lhs).append( r->index(), r->value() );
419  ++r;
420  }
421  }
423  //**********************************************************************************************
424 
425  //**Addition assignment to dense vectors********************************************************
437  template< typename VT > // Type of the target dense vector
438  friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
439  {
441 
442  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
443 
444  addAssign( ~lhs, rhs.lhs_ );
445  addAssign( ~lhs, rhs.rhs_ );
446  }
448  //**********************************************************************************************
449 
450  //**Addition assignment to sparse vectors*******************************************************
451  // No special implementation for the addition assignment to sparse vectors.
452  //**********************************************************************************************
453 
454  //**Subtraction assignment to dense vectors*****************************************************
466  template< typename VT > // Type of the target dense vector
467  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
468  {
470 
471  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
472 
473  subAssign( ~lhs, rhs.lhs_ );
474  subAssign( ~lhs, rhs.rhs_ );
475  }
477  //**********************************************************************************************
478 
479  //**Subtraction assignment to sparse vectors****************************************************
480  // No special implementation for the subtraction assignment to sparse vectors.
481  //**********************************************************************************************
482 
483  //**Multiplication assignment to dense vectors**************************************************
495  template< typename VT > // Type of the target dense vector
496  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
497  {
499 
503 
504  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
505 
506  const ResultType tmp( serial( rhs ) );
507  multAssign( ~lhs, tmp );
508  }
510  //**********************************************************************************************
511 
512  //**Multiplication assignment to sparse vectors*************************************************
513  // No special implementation for the multiplication assignment to sparse vectors.
514  //**********************************************************************************************
515 
516  //**SMP assignment to dense vectors*************************************************************
517  // No special implementation for the SMP assignment to dense vectors.
518  //**********************************************************************************************
519 
520  //**SMP assignment to sparse vectors************************************************************
521  // No special implementation for the SMP assignment to sparse vectors.
522  //**********************************************************************************************
523 
524  //**SMP addition assignment to dense vectors****************************************************
538  template< typename VT > // Type of the target dense vector
539  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
540  smpAddAssign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
541  {
543 
544  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
545 
546  smpAddAssign( ~lhs, rhs.lhs_ );
547  smpAddAssign( ~lhs, rhs.rhs_ );
548  }
550  //**********************************************************************************************
551 
552  //**SMP addition assignment to sparse vectors***************************************************
553  // No special implementation for the SMP addition assignment to sparse vectors.
554  //**********************************************************************************************
555 
556  //**SMP subtraction assignment to dense vectors*************************************************
570  template< typename VT > // Type of the target dense vector
571  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
572  smpSubAssign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
573  {
575 
576  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
577 
578  smpSubAssign( ~lhs, rhs.lhs_ );
579  smpSubAssign( ~lhs, rhs.rhs_ );
580  }
582  //**********************************************************************************************
583 
584  //**SMP subtraction assignment to sparse vectors************************************************
585  // No special implementation for the SMP subtraction assignment to sparse vectors.
586  //**********************************************************************************************
587 
588  //**SMP multiplication assignment to dense vectors**********************************************
603  template< typename VT > // Type of the target dense vector
604  friend inline typename EnableIf< UseSMPAssign<VT> >::Type
605  smpMultAssign( DenseVector<VT,TF>& lhs, const SVecSVecAddExpr& rhs )
606  {
608 
612 
613  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
614 
615  const ResultType tmp( rhs );
616  smpMultAssign( ~lhs, tmp );
617  }
619  //**********************************************************************************************
620 
621  //**SMP multiplication assignment to sparse vectors*********************************************
622  // No special implementation for the SMP multiplication assignment to sparse vectors.
623  //**********************************************************************************************
624 
625  //**Compile time checks*************************************************************************
633  //**********************************************************************************************
634 };
635 //*************************************************************************************************
636 
637 
638 
639 
640 //=================================================================================================
641 //
642 // GLOBAL BINARY ARITHMETIC OPERATORS
643 //
644 //=================================================================================================
645 
646 //*************************************************************************************************
670 template< typename T1 // Type of the left-hand side sparse vector
671  , typename T2 // Type of the right-hand side sparse vector
672  , bool TF > // Transpose flag
673 inline const SVecSVecAddExpr<T1,T2,TF>
675 {
677 
678  if( (~lhs).size() != (~rhs).size() ) {
679  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
680  }
681 
682  return SVecSVecAddExpr<T1,T2,TF>( ~lhs, ~rhs );
683 }
684 //*************************************************************************************************
685 
686 
687 
688 
689 //=================================================================================================
690 //
691 // SIZE SPECIALIZATIONS
692 //
693 //=================================================================================================
694 
695 //*************************************************************************************************
697 template< typename VT1, typename VT2, bool TF >
698 struct Size< SVecSVecAddExpr<VT1,VT2,TF> >
699  : public Max< Size<VT1>, Size<VT2> >
700 {};
702 //*************************************************************************************************
703 
704 
705 
706 
707 //=================================================================================================
708 //
709 // EXPRESSION TRAIT SPECIALIZATIONS
710 //
711 //=================================================================================================
712 
713 //*************************************************************************************************
715 template< typename VT1, typename VT2, bool TF, bool AF >
716 struct SubvectorExprTrait< SVecSVecAddExpr<VT1,VT2,TF>, AF >
717 {
718  public:
719  //**********************************************************************************************
720  typedef typename AddExprTrait< typename SubvectorExprTrait<const VT1,AF>::Type
721  , typename SubvectorExprTrait<const VT2,AF>::Type >::Type Type;
722  //**********************************************************************************************
723 };
725 //*************************************************************************************************
726 
727 } // namespace blaze
728 
729 #endif
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecAddExpr.h:212
#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
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SVecSVecAddExpr.h:142
Header file for the Max class template.
Header file for mathematical functions.
Evaluation of the return type of an addition expression.Via this type trait it is possible to evaluat...
Definition: AddExprTrait.h:104
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
AddTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: SVecSVecAddExpr.h:137
VT1::ResultType RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:97
Header file for basic type definitions.
Header file for the SparseVector base class.
VT2::ReturnType RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:100
LeftOperand lhs_
Left-hand side sparse vector of the addition expression.
Definition: SVecSVecAddExpr.h:263
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
ResultType::ElementType ElementType
Resulting element type.
Definition: SVecSVecAddExpr.h:139
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecAddExpr.h:244
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSVecAddExpr.h:176
VT2::CompositeType CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:102
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:259
Header file for the AddExprTrait class template.
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:148
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::TransposeType TT1
Transpose type of the left-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:103
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: SVecSVecAddExpr.h:222
Expression object for sparse vector-sparse vector additions.The SVecSVecAddExpr class represents the ...
Definition: Forward.h:130
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:261
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecAddExpr.h:189
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 DisableIf class template.
Header file for the IsTemporary type trait class.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the VecVecAddExpr base class.
VT1::CompositeType CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:101
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
#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
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECVECADDEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/vector ...
Definition: VecVecAddExpr.h:165
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1682
VT2::ResultType RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:98
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.
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecSVecAddExpr.h:202
#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
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:151
Header file for the EnableIf class template.
RightOperand rightOperand() const
Returns the right-hand side sparse vector operand.
Definition: SVecSVecAddExpr.h:232
Header file for the serial shim.
Constraint on the data type.
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
VT2::TransposeType TT2
Transpose type of the right-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:104
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
SVecSVecAddExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the SVecSVecAddExpr class.
Definition: SVecSVecAddExpr.h:162
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:138
Header file for the addition trait.
VT1::ReturnType RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecAddExpr.h:99
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the isDefault shim.
AddExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecAddExpr.h:117
Header file for the RemoveReference type trait.
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
RightOperand rhs_
Right-hand side sparse vector of the addition expression.
Definition: SVecSVecAddExpr.h:264
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
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecAddExpr.h:256
#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::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecAddExpr.h:138
Header file for exception macros.
Header file for the IsResizable type trait.
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
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecAddExpr.h:145
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
SVecSVecAddExpr< VT1, VT2, TF > This
Type of this SVecSVecAddExpr instance.
Definition: SVecSVecAddExpr.h:136