SVecSVecMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECSVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECSVECMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
47 #include <blaze/math/Exception.h>
52 #include <blaze/math/Functions.h>
53 #include <blaze/math/shims/Reset.h>
62 #include <blaze/util/Assert.h>
65 #include <blaze/util/mpl/If.h>
66 #include <blaze/util/mpl/Max.h>
67 #include <blaze/util/Types.h>
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // CLASS SVECSVECMULTEXPR
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
86 template< typename VT1 // Type of the left-hand side sparse vector
87  , typename VT2 // Type of the right-hand side sparse vector
88  , bool TF > // Transpose flag
89 class SVecSVecMultExpr : public SparseVector< SVecSVecMultExpr<VT1,VT2,TF>, TF >
90  , private VecVecMultExpr
91  , private Computation
92 {
93  private:
94  //**Type definitions****************************************************************************
101  //**********************************************************************************************
102 
103  //**Return type evaluation**********************************************************************
105 
110  enum : bool { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
111 
114  //**********************************************************************************************
115 
116  public:
117  //**Type definitions****************************************************************************
122 
125 
127  typedef const ResultType CompositeType;
128 
130  typedef If_< IsExpression<VT1>, const VT1, const VT1& > LeftOperand;
131 
133  typedef If_< IsExpression<VT2>, const VT2, const VT2& > RightOperand;
134  //**********************************************************************************************
135 
136  //**Compilation flags***************************************************************************
138  enum : bool { smpAssignable = false };
139  //**********************************************************************************************
140 
141  //**Constructor*********************************************************************************
144  explicit inline SVecSVecMultExpr( const VT1& lhs, const VT2& rhs ) noexcept
145  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
146  , rhs_( rhs ) // Right-hand side sparse vector of the multiplication expression
147  {
148  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
149  }
150  //**********************************************************************************************
151 
152  //**Subscript operator**************************************************************************
158  inline ReturnType operator[]( size_t index ) const {
159  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
160  return lhs_[index] * rhs_[index];
161  }
162  //**********************************************************************************************
163 
164  //**At function*********************************************************************************
171  inline ReturnType at( size_t index ) const {
172  if( index >= lhs_.size() ) {
173  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
174  }
175  return (*this)[index];
176  }
177  //**********************************************************************************************
178 
179  //**Size function*******************************************************************************
184  inline size_t size() const noexcept {
185  return lhs_.size();
186  }
187  //**********************************************************************************************
188 
189  //**NonZeros function***************************************************************************
194  inline size_t nonZeros() const {
195  return min( lhs_.nonZeros(), rhs_.nonZeros() );
196  }
197  //**********************************************************************************************
198 
199  //**Left operand access*************************************************************************
204  inline LeftOperand leftOperand() const noexcept {
205  return lhs_;
206  }
207  //**********************************************************************************************
208 
209  //**Right operand access************************************************************************
214  inline RightOperand rightOperand() const noexcept {
215  return rhs_;
216  }
217  //**********************************************************************************************
218 
219  //**********************************************************************************************
225  template< typename T >
226  inline bool canAlias( const T* alias ) const noexcept {
227  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
228  }
229  //**********************************************************************************************
230 
231  //**********************************************************************************************
237  template< typename T >
238  inline bool isAliased( const T* alias ) const noexcept {
239  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
240  }
241  //**********************************************************************************************
242 
243  private:
244  //**Member variables****************************************************************************
245  LeftOperand lhs_;
246  RightOperand rhs_;
247  //**********************************************************************************************
248 
249  //**Assignment to dense vectors*****************************************************************
261  template< typename VT > // Type of the target dense vector
262  friend inline void assign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
263  {
265 
266  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
267 
268  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
269  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
270 
271  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
272  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
273 
274  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
275  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
276  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
277 
278  const LeftIterator lend( x.end() );
279  const RightIterator rend( y.end() );
280 
281  LeftIterator l( x.begin() );
282  RightIterator r( y.begin() );
283 
284  for( ; l!=lend; ++l ) {
285  while( r!=rend && r->index() < l->index() ) ++r;
286  if( r==rend ) break;
287  if( l->index() == r->index() ) {
288  (~lhs)[l->index()] = l->value() * r->value();
289  ++r;
290  }
291  }
292  }
294  //**********************************************************************************************
295 
296  //**Assignment to sparse vectors****************************************************************
308  template< typename VT > // Type of the target sparse vector
309  friend inline void assign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
310  {
312 
313  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
314 
315  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
316  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
317 
318  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
319  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
320 
321  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
322  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
323  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
324 
325  const LeftIterator lend( x.end() );
326  const RightIterator rend( y.end() );
327 
328  LeftIterator l( x.begin() );
329  RightIterator r( y.begin() );
330 
331  for( ; l!=lend; ++l ) {
332  while( r!=rend && r->index() < l->index() ) ++r;
333  if( r==rend ) break;
334  if( l->index() == r->index() ) {
335  (~lhs).append( l->index(), l->value() * r->value() );
336  ++r;
337  }
338  }
339  }
341  //**********************************************************************************************
342 
343  //**Addition assignment to dense vectors********************************************************
355  template< typename VT > // Type of the target dense vector
356  friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
357  {
359 
360  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
361 
362  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
363  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
364 
365  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
366  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
367 
368  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
369  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
370  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
371 
372  const LeftIterator lend( x.end() );
373  const RightIterator rend( y.end() );
374 
375  LeftIterator l( x.begin() );
376  RightIterator r( y.begin() );
377 
378  for( ; l!=lend; ++l ) {
379  while( r!=rend && r->index() < l->index() ) ++r;
380  if( r==rend ) break;
381  if( l->index() == r->index() ) {
382  (~lhs)[l->index()] += l->value() * r->value();
383  ++r;
384  }
385  }
386  }
388  //**********************************************************************************************
389 
390  //**Addition assignment to sparse vectors*******************************************************
391  // No special implementation for the addition assignment to sparse vectors.
392  //**********************************************************************************************
393 
394  //**Subtraction assignment to dense vectors*****************************************************
406  template< typename VT > // Type of the target dense vector
407  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
408  {
410 
411  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
412 
413  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
414  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
415 
416  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
417  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
418 
419  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
420  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
421  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
422 
423  const LeftIterator lend( x.end() );
424  const RightIterator rend( y.end() );
425 
426  LeftIterator l( x.begin() );
427  RightIterator r( y.begin() );
428 
429  for( ; l!=lend; ++l ) {
430  while( r!=rend && r->index() < l->index() ) ++r;
431  if( r==rend ) break;
432  if( l->index() == r->index() ) {
433  (~lhs)[l->index()] -= l->value() * r->value();
434  ++r;
435  }
436  }
437  }
439  //**********************************************************************************************
440 
441  //**Subtraction assignment to sparse vectors****************************************************
442  // No special implementation for the subtraction assignment to sparse vectors.
443  //**********************************************************************************************
444 
445  //**Multiplication assignment to dense vectors**************************************************
457  template< typename VT > // Type of the target dense vector
458  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
459  {
461 
462  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
463 
464  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
465  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
466 
467  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
468  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
469 
470  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
471  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
472  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
473 
474  const LeftIterator lend( x.end() );
475  const RightIterator rend( y.end() );
476 
477  LeftIterator l( x.begin() );
478  RightIterator r( y.begin() );
479 
480  size_t i( 0 );
481 
482  for( ; l!=lend; ++l ) {
483  while( r!=rend && r->index() < l->index() ) ++r;
484  if( r==rend ) break;
485  if( l->index() == r->index() ) {
486  for( ; i<r->index(); ++i )
487  reset( (~lhs)[i] );
488  (~lhs)[l->index()] *= l->value() * r->value();
489  ++r;
490  ++i;
491  }
492  }
493 
494  for( ; i<rhs.size(); ++i )
495  reset( (~lhs)[i] );
496  }
498  //**********************************************************************************************
499 
500  //**Multiplication assignment to sparse vectors*************************************************
512  template< typename VT > // Type of the target sparse vector
513  friend inline void multAssign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
514  {
516 
517  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
518 
519  typedef ConstIterator_<VT> Iterator1;
520  typedef ConstIterator_< RemoveReference_<CT1> > Iterator2;
521  typedef ConstIterator_< RemoveReference_<CT2> > Iterator3;
522 
523  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
524  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
525 
526  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
527  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
528  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
529 
530  VT tmp( rhs.size(), rhs.nonZeros() );
531 
532  const Iterator1 end1( (~lhs).end() );
533  const Iterator2 end2( x.end() );
534  const Iterator3 end3( y.end() );
535 
536  Iterator1 i1( (~lhs).begin() );
537  Iterator2 i2( x.begin() );
538  Iterator3 i3( y.begin() );
539 
540  for( ; i1!=end1; ++i1 ) {
541  while( i2!=end2 && i2->index() < i1->index() ) ++i2;
542  if( i2==end2 ) break;
543  while( i3!=end3 && i3->index() < i1->index() ) ++i3;
544  if( i3==end3 ) break;
545  if( i1->index() == i2->index() && i1->index() == i3->index() ) {
546  tmp.append( i1->index(), i1->value() * i2->value() * i3->value() );
547  ++i2;
548  ++i3;
549  }
550  }
551 
552  swap( ~lhs, tmp );
553  }
555  //**********************************************************************************************
556 
557  //**Compile time checks*************************************************************************
565  //**********************************************************************************************
566 };
567 //*************************************************************************************************
568 
569 
570 
571 
572 //=================================================================================================
573 //
574 // GLOBAL BINARY ARITHMETIC OPERATORS
575 //
576 //=================================================================================================
577 
578 //*************************************************************************************************
603 template< typename T1 // Type of the left-hand side sparse vector
604  , typename T2 // Type of the right-hand side sparse vector
605  , bool TF > // Transpose flag
606 inline const SVecSVecMultExpr<T1,T2,TF>
608 {
610 
611  if( (~lhs).size() != (~rhs).size() ) {
612  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
613  }
614 
615  return SVecSVecMultExpr<T1,T2,TF>( ~lhs, ~rhs );
616 }
617 //*************************************************************************************************
618 
619 
620 
621 
622 //=================================================================================================
623 //
624 // SIZE SPECIALIZATIONS
625 //
626 //=================================================================================================
627 
628 //*************************************************************************************************
630 template< typename VT1, typename VT2, bool TF >
631 struct Size< SVecSVecMultExpr<VT1,VT2,TF> >
632  : public Max< Size<VT1>, Size<VT2> >
633 {};
635 //*************************************************************************************************
636 
637 
638 
639 
640 //=================================================================================================
641 //
642 // EXPRESSION TRAIT SPECIALIZATIONS
643 //
644 //=================================================================================================
645 
646 //*************************************************************************************************
648 template< typename VT1, typename VT2, bool TF, bool AF >
649 struct SubvectorExprTrait< SVecSVecMultExpr<VT1,VT2,TF>, AF >
650 {
651  public:
652  //**********************************************************************************************
653  using Type = MultExprTrait_< SubvectorExprTrait_<const VT1,AF>
654  , SubvectorExprTrait_<const VT2,AF> >;
655  //**********************************************************************************************
656 };
658 //*************************************************************************************************
659 
660 } // namespace blaze
661 
662 #endif
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
SVecSVecMultExpr(const VT1 &lhs, const VT2 &rhs) noexcept
Constructor for the SVecSVecMultExpr class.
Definition: SVecSVecMultExpr.h:144
Header file for auxiliary alias declarations.
Header file for the Max class template.
Header file for mathematical functions.
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:70
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7800
Header file for basic type definitions.
Header file for the SparseVector base class.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecMultExpr.h:171
ResultType_< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:95
Header file for the serial shim.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:188
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
CompositeType_< VT2 > CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:100
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
ReturnType_< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:97
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SVecSVecMultExpr.h:121
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
Constraint on the data type.
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
SVecSVecMultExpr< VT1, VT2, TF > This
Type of this SVecSVecMultExpr instance.
Definition: SVecSVecMultExpr.h:118
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
Header file for the MultExprTrait class template.
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:204
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecMultExpr.h:238
Header file for the IsTemporary type trait class.
Header file for the multiplication trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecSVecMultExpr.h:184
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecMultExpr.h:120
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSVecMultExpr.h:158
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
If_< IsExpression< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:133
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecSVecMultExpr.h:119
#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:61
ReturnType_< VT2 > RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:98
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecMultExpr.h:127
Constraint on the data type.
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:246
Header file for the exception macros of the math module.
Header file for the VecVecMultExpr base class.
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:254
Header file for all forward declarations for expression class templates.
Constraint on the data type.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:214
MultExprTrait_< RN1, RN2 > ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecMultExpr.h:113
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecMultExpr.h:194
Expression object for sparse vector-sparse vector multiplications.The SVecSVecMultExpr class represen...
Definition: Forward.h:122
Header file for run time assertion macros.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
Header file for the reset shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:258
Header file for the RemoveReference type trait.
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecSVecMultExpr.h:124
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:245
If_< IsExpression< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:130
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_VECVECMULTEXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid vector/vector ...
Definition: VecVecMultExpr.h:109
Header file for the IsComputation type trait class.
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:110
#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
Header file for the SubvectorExprTrait class template.
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
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:63
#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
CompositeType_< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:99
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecMultExpr.h:226
ResultType_< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:96
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.