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 
50 #include <blaze/math/Functions.h>
51 #include <blaze/math/shims/Reset.h>
60 #include <blaze/util/Assert.h>
62 #include <blaze/util/Exception.h>
64 #include <blaze/util/mpl/Max.h>
65 #include <blaze/util/SelectType.h>
66 #include <blaze/util/Types.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS SVECSVECMULTEXPR
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
85 template< typename VT1 // Type of the left-hand side sparse vector
86  , typename VT2 // Type of the right-hand side sparse vector
87  , bool TF > // Transpose flag
88 class SVecSVecMultExpr : public SparseVector< SVecSVecMultExpr<VT1,VT2,TF>, TF >
89  , private VecVecMultExpr
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  public:
118  //**Type definitions****************************************************************************
123 
126 
128  typedef const ResultType CompositeType;
129 
131  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
132 
134  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
135  //**********************************************************************************************
136 
137  //**Compilation flags***************************************************************************
139  enum { smpAssignable = 0 };
140  //**********************************************************************************************
141 
142  //**Constructor*********************************************************************************
145  explicit inline SVecSVecMultExpr( const VT1& lhs, const VT2& rhs )
146  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
147  , rhs_( rhs ) // Right-hand side sparse vector of the multiplication expression
148  {
149  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
150  }
151  //**********************************************************************************************
152 
153  //**Subscript operator**************************************************************************
159  inline ReturnType operator[]( size_t index ) const {
160  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
161  return lhs_[index] * rhs_[index];
162  }
163  //**********************************************************************************************
164 
165  //**At function*********************************************************************************
172  inline ReturnType at( size_t index ) const {
173  if( index >= lhs_.size() ) {
174  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
175  }
176  return (*this)[index];
177  }
178  //**********************************************************************************************
179 
180  //**Size function*******************************************************************************
185  inline size_t size() const {
186  return lhs_.size();
187  }
188  //**********************************************************************************************
189 
190  //**NonZeros function***************************************************************************
195  inline size_t nonZeros() const {
196  return min( lhs_.nonZeros(), rhs_.nonZeros() );
197  }
198  //**********************************************************************************************
199 
200  //**Left operand access*************************************************************************
205  inline LeftOperand leftOperand() const {
206  return lhs_;
207  }
208  //**********************************************************************************************
209 
210  //**Right operand access************************************************************************
215  inline RightOperand rightOperand() const {
216  return rhs_;
217  }
218  //**********************************************************************************************
219 
220  //**********************************************************************************************
226  template< typename T >
227  inline bool canAlias( const T* alias ) const {
228  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
229  }
230  //**********************************************************************************************
231 
232  //**********************************************************************************************
238  template< typename T >
239  inline bool isAliased( const T* alias ) const {
240  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
241  }
242  //**********************************************************************************************
243 
244  private:
245  //**Member variables****************************************************************************
246  LeftOperand lhs_;
247  RightOperand rhs_;
248  //**********************************************************************************************
249 
250  //**Assignment to dense vectors*****************************************************************
262  template< typename VT > // Type of the target dense vector
263  friend inline void assign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
264  {
266 
267  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
268 
269  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
270  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
271 
272  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
273  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
274 
275  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
276  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
277  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
278 
279  const LeftIterator lend( x.end() );
280  const RightIterator rend( y.end() );
281 
282  LeftIterator l( x.begin() );
283  RightIterator r( y.begin() );
284 
285  for( ; l!=lend; ++l ) {
286  while( r!=rend && r->index() < l->index() ) ++r;
287  if( r==rend ) break;
288  if( l->index() == r->index() ) {
289  (~lhs)[l->index()] = l->value() * r->value();
290  ++r;
291  }
292  }
293  }
295  //**********************************************************************************************
296 
297  //**Assignment to sparse vectors****************************************************************
309  template< typename VT > // Type of the target sparse vector
310  friend inline void assign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
311  {
313 
314  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
315 
316  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
317  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
318 
319  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
320  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
321 
322  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
323  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
324  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
325 
326  const LeftIterator lend( x.end() );
327  const RightIterator rend( y.end() );
328 
329  LeftIterator l( x.begin() );
330  RightIterator r( y.begin() );
331 
332  for( ; l!=lend; ++l ) {
333  while( r!=rend && r->index() < l->index() ) ++r;
334  if( r==rend ) break;
335  if( l->index() == r->index() ) {
336  (~lhs).append( l->index(), l->value() * r->value() );
337  ++r;
338  }
339  }
340  }
342  //**********************************************************************************************
343 
344  //**Addition assignment to dense vectors********************************************************
356  template< typename VT > // Type of the target dense vector
357  friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
358  {
360 
361  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
362 
363  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
364  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
365 
366  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
367  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
368 
369  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
370  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
371  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
372 
373  const LeftIterator lend( x.end() );
374  const RightIterator rend( y.end() );
375 
376  LeftIterator l( x.begin() );
377  RightIterator r( y.begin() );
378 
379  for( ; l!=lend; ++l ) {
380  while( r!=rend && r->index() < l->index() ) ++r;
381  if( r==rend ) break;
382  if( l->index() == r->index() ) {
383  (~lhs)[l->index()] += l->value() * r->value();
384  ++r;
385  }
386  }
387  }
389  //**********************************************************************************************
390 
391  //**Addition assignment to sparse vectors*******************************************************
392  // No special implementation for the addition assignment to sparse vectors.
393  //**********************************************************************************************
394 
395  //**Subtraction assignment to dense vectors*****************************************************
407  template< typename VT > // Type of the target dense vector
408  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
409  {
411 
412  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
413 
414  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
415  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
416 
417  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
418  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
419 
420  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
421  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
422  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
423 
424  const LeftIterator lend( x.end() );
425  const RightIterator rend( y.end() );
426 
427  LeftIterator l( x.begin() );
428  RightIterator r( y.begin() );
429 
430  for( ; l!=lend; ++l ) {
431  while( r!=rend && r->index() < l->index() ) ++r;
432  if( r==rend ) break;
433  if( l->index() == r->index() ) {
434  (~lhs)[l->index()] -= l->value() * r->value();
435  ++r;
436  }
437  }
438  }
440  //**********************************************************************************************
441 
442  //**Subtraction assignment to sparse vectors****************************************************
443  // No special implementation for the subtraction assignment to sparse vectors.
444  //**********************************************************************************************
445 
446  //**Multiplication assignment to dense vectors**************************************************
458  template< typename VT > // Type of the target dense vector
459  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
460  {
462 
463  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
464 
465  typedef typename RemoveReference<CT1>::Type::ConstIterator LeftIterator;
466  typedef typename RemoveReference<CT2>::Type::ConstIterator RightIterator;
467 
468  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
469  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
470 
471  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
472  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
473  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
474 
475  const LeftIterator lend( x.end() );
476  const RightIterator rend( y.end() );
477 
478  LeftIterator l( x.begin() );
479  RightIterator r( y.begin() );
480 
481  size_t i( 0 );
482 
483  for( ; l!=lend; ++l ) {
484  while( r!=rend && r->index() < l->index() ) ++r;
485  if( r==rend ) break;
486  if( l->index() == r->index() ) {
487  for( ; i<r->index(); ++i )
488  reset( (~lhs)[i] );
489  (~lhs)[l->index()] *= l->value() * r->value();
490  ++r;
491  ++i;
492  }
493  }
494 
495  for( ; i<rhs.size(); ++i )
496  reset( (~lhs)[i] );
497  }
499  //**********************************************************************************************
500 
501  //**Multiplication assignment to sparse vectors*************************************************
513  template< typename VT > // Type of the target sparse vector
514  friend inline void multAssign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
515  {
517 
518  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
519 
520  typedef typename VT::ConstIterator Iterator1;
521  typedef typename RemoveReference<CT1>::Type::ConstIterator Iterator2;
522  typedef typename RemoveReference<CT2>::Type::ConstIterator Iterator3;
523 
524  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
525  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
526 
527  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
528  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
529  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
530 
531  VT tmp( rhs.size(), rhs.nonZeros() );
532 
533  const Iterator1 end1( (~lhs).end() );
534  const Iterator2 end2( x.end() );
535  const Iterator3 end3( y.end() );
536 
537  Iterator1 i1( (~lhs).begin() );
538  Iterator2 i2( x.begin() );
539  Iterator3 i3( y.begin() );
540 
541  for( ; i1!=end1; ++i1 ) {
542  while( i2!=end2 && i2->index() < i1->index() ) ++i2;
543  if( i2==end2 ) break;
544  while( i3!=end3 && i3->index() < i1->index() ) ++i3;
545  if( i3==end3 ) break;
546  if( i1->index() == i2->index() && i1->index() == i3->index() ) {
547  tmp.append( i1->index(), i1->value() * i2->value() * i3->value() );
548  ++i2;
549  ++i3;
550  }
551  }
552 
553  swap( ~lhs, tmp );
554  }
556  //**********************************************************************************************
557 
558  //**Compile time checks*************************************************************************
566  //**********************************************************************************************
567 };
568 //*************************************************************************************************
569 
570 
571 
572 
573 //=================================================================================================
574 //
575 // GLOBAL BINARY ARITHMETIC OPERATORS
576 //
577 //=================================================================================================
578 
579 //*************************************************************************************************
604 template< typename T1 // Type of the left-hand side sparse vector
605  , typename T2 // Type of the right-hand side sparse vector
606  , bool TF > // Transpose flag
607 inline const SVecSVecMultExpr<T1,T2,TF>
609 {
611 
612  if( (~lhs).size() != (~rhs).size() ) {
613  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
614  }
615 
616  return SVecSVecMultExpr<T1,T2,TF>( ~lhs, ~rhs );
617 }
618 //*************************************************************************************************
619 
620 
621 
622 
623 //=================================================================================================
624 //
625 // SIZE SPECIALIZATIONS
626 //
627 //=================================================================================================
628 
629 //*************************************************************************************************
631 template< typename VT1, typename VT2, bool TF >
632 struct Size< SVecSVecMultExpr<VT1,VT2,TF> >
633  : public Max< Size<VT1>, Size<VT2> >
634 {};
636 //*************************************************************************************************
637 
638 
639 
640 
641 //=================================================================================================
642 //
643 // EXPRESSION TRAIT SPECIALIZATIONS
644 //
645 //=================================================================================================
646 
647 //*************************************************************************************************
649 template< typename VT1, typename VT2, bool TF, bool AF >
650 struct SubvectorExprTrait< SVecSVecMultExpr<VT1,VT2,TF>, AF >
651 {
652  public:
653  //**********************************************************************************************
654  typedef typename MultExprTrait< typename SubvectorExprTrait<const VT1,AF>::Type
655  , typename SubvectorExprTrait<const VT2,AF>::Type >::Type Type;
656  //**********************************************************************************************
657 };
659 //*************************************************************************************************
660 
661 } // namespace blaze
662 
663 #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
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SVecSVecMultExpr.h:125
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:87
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:7820
Header file for basic type definitions.
Header file for the SparseVector base class.
VT1::TransposeType TT1
Transpose type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:100
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
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:250
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:205
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecMultExpr.h:172
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecSVecMultExpr.h:185
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecMultExpr.h:121
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:207
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
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
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.
RightOperand rightOperand() const
Returns the right-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:215
VT2::TransposeType TT2
Transpose type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:101
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecMultExpr.h:227
VT2::CompositeType CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:99
Constraint on the data type.
SVecSVecMultExpr< VT1, VT2, TF > This
Type of this SVecSVecMultExpr instance.
Definition: SVecSVecMultExpr.h:119
Header file for the MultExprTrait class template.
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.
Header file for the multiplication trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
ResultType::ElementType ElementType
Resulting element type.
Definition: SVecSVecMultExpr.h:122
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
VT1::ResultType RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:94
MultTrait< RT1, RT2 >::Type ResultType
Result 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:159
#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 MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1682
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 ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecMultExpr.h:128
Constraint on the data type.
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:247
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
VT2::ResultType RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:95
MultExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecMultExpr.h:114
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:187
Header file for the VecVecMultExpr base class.
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the serial shim.
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
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecMultExpr.h:195
Expression object for sparse vector-sparse vector multiplications.The SVecSVecMultExpr class represen...
Definition: Forward.h:132
Header file for run time assertion macros.
Base template for the MultTrait class.
Definition: MultTrait.h:138
Header file for the reset shim.
VT2::ReturnType RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:97
Header file for the RemoveReference type trait.
VT1::ReturnType RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:96
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:256
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:246
VT1::CompositeType CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:98
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:165
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: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
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:131
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecMultExpr.h:239
Header file for the SubvectorExprTrait class template.
Header file for exception macros.
Header file for the Size type trait.
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
#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
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:134
SVecSVecMultExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the SVecSVecMultExpr class.
Definition: SVecSVecMultExpr.h:145
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.