Blaze  3.6
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 <utility>
44 #include <blaze/math/Aliases.h>
49 #include <blaze/math/Exception.h>
54 #include <blaze/math/shims/Reset.h>
62 #include <blaze/util/Assert.h>
63 #include <blaze/util/DisableIf.h>
64 #include <blaze/util/EnableIf.h>
66 #include <blaze/util/MaybeUnused.h>
67 #include <blaze/util/mpl/If.h>
68 #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
90  : public VecVecMultExpr< SparseVector< SVecSVecMultExpr<VT1,VT2,TF>, TF > >
91  , private Computation
92 {
93  private:
94  //**Type definitions****************************************************************************
101  //**********************************************************************************************
102 
103  //**Return type evaluation**********************************************************************
105 
110  static constexpr bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
111 
113  using ExprReturnType = decltype( std::declval<RN1>() * std::declval<RN2>() );
114  //**********************************************************************************************
115 
116  public:
117  //**Type definitions****************************************************************************
123 
126 
128  using CompositeType = const ResultType;
129 
131  using LeftOperand = If_t< IsExpression_v<VT1>, const VT1, const VT1& >;
132 
134  using RightOperand = If_t< IsExpression_v<VT2>, const VT2, const VT2& >;
135  //**********************************************************************************************
136 
137  //**Compilation flags***************************************************************************
139  static constexpr bool smpAssignable = false;
140  //**********************************************************************************************
141 
142  //**Constructor*********************************************************************************
145  explicit inline SVecSVecMultExpr( const VT1& lhs, const VT2& rhs ) noexcept
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 noexcept {
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 noexcept {
206  return lhs_;
207  }
208  //**********************************************************************************************
209 
210  //**Right operand access************************************************************************
215  inline RightOperand rightOperand() const noexcept {
216  return rhs_;
217  }
218  //**********************************************************************************************
219 
220  //**********************************************************************************************
226  template< typename T >
227  inline bool canAlias( const T* alias ) const noexcept {
228  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
229  }
230  //**********************************************************************************************
231 
232  //**********************************************************************************************
238  template< typename T >
239  inline bool isAliased( const T* alias ) const noexcept {
240  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
241  }
242  //**********************************************************************************************
243 
244  private:
245  //**Member variables****************************************************************************
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  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
270  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
271 
272  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
273  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
274  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
275 
276  const auto lend( x.end() );
277  const auto rend( y.end() );
278 
279  auto l( x.begin() );
280  auto r( y.begin() );
281 
282  for( ; l!=lend; ++l ) {
283  while( r!=rend && r->index() < l->index() ) ++r;
284  if( r==rend ) break;
285  if( l->index() == r->index() ) {
286  (~lhs)[l->index()] = l->value() * r->value();
287  ++r;
288  }
289  }
290  }
292  //**********************************************************************************************
293 
294  //**Assignment to sparse vectors****************************************************************
306  template< typename VT > // Type of the target sparse vector
307  friend inline void assign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
308  {
310 
311  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
312 
313  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
314  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
315 
316  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
317  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
318  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
319 
320  // Final memory allocation (based on the evaluated operands)
321  (~lhs).reserve( min( x.nonZeros(), y.nonZeros() ) );
322 
323  // Performing the vector multiplication
324  const auto lend( x.end() );
325  const auto rend( y.end() );
326 
327  auto l( x.begin() );
328  auto r( y.begin() );
329 
330  for( ; l!=lend; ++l ) {
331  while( r!=rend && r->index() < l->index() ) ++r;
332  if( r==rend ) break;
333  if( l->index() == r->index() ) {
334  (~lhs).append( l->index(), l->value() * r->value() );
335  ++r;
336  }
337  }
338  }
340  //**********************************************************************************************
341 
342  //**Addition assignment to dense vectors********************************************************
354  template< typename VT > // Type of the target dense vector
355  friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
356  {
358 
359  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
360 
361  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
362  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
363 
364  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
365  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
366  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
367 
368  const auto lend( x.end() );
369  const auto rend( y.end() );
370 
371  auto l( x.begin() );
372  auto r( y.begin() );
373 
374  for( ; l!=lend; ++l ) {
375  while( r!=rend && r->index() < l->index() ) ++r;
376  if( r==rend ) break;
377  if( l->index() == r->index() ) {
378  (~lhs)[l->index()] += l->value() * r->value();
379  ++r;
380  }
381  }
382  }
384  //**********************************************************************************************
385 
386  //**Addition assignment to sparse vectors*******************************************************
387  // No special implementation for the addition assignment to sparse vectors.
388  //**********************************************************************************************
389 
390  //**Subtraction assignment to dense vectors*****************************************************
402  template< typename VT > // Type of the target dense vector
403  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
404  {
406 
407  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
408 
409  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
410  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
411 
412  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
413  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
414  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
415 
416  const auto lend( x.end() );
417  const auto rend( y.end() );
418 
419  auto l( x.begin() );
420  auto r( y.begin() );
421 
422  for( ; l!=lend; ++l ) {
423  while( r!=rend && r->index() < l->index() ) ++r;
424  if( r==rend ) break;
425  if( l->index() == r->index() ) {
426  (~lhs)[l->index()] -= l->value() * r->value();
427  ++r;
428  }
429  }
430  }
432  //**********************************************************************************************
433 
434  //**Subtraction assignment to sparse vectors****************************************************
435  // No special implementation for the subtraction assignment to sparse vectors.
436  //**********************************************************************************************
437 
438  //**Multiplication assignment to dense vectors**************************************************
450  template< typename VT > // Type of the target dense vector
451  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
452  {
454 
455  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
456 
457  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
458  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
459 
460  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
461  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
462  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
463 
464  const auto lend( x.end() );
465  const auto rend( y.end() );
466 
467  auto l( x.begin() );
468  auto r( y.begin() );
469 
470  size_t i( 0UL );
471 
472  for( ; l!=lend; ++l ) {
473  while( r!=rend && r->index() < l->index() ) ++r;
474  if( r==rend ) break;
475  if( l->index() == r->index() ) {
476  for( ; i<r->index(); ++i )
477  reset( (~lhs)[i] );
478  (~lhs)[l->index()] *= l->value() * r->value();
479  ++r;
480  ++i;
481  }
482  }
483 
484  for( ; i<rhs.size(); ++i )
485  reset( (~lhs)[i] );
486  }
488  //**********************************************************************************************
489 
490  //**Multiplication assignment to sparse vectors*************************************************
502  template< typename VT > // Type of the target sparse vector
503  friend inline void multAssign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
504  {
506 
507  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
508 
509  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
510  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
511 
512  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
513  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
514  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
515 
516  VT tmp( rhs.size(), rhs.nonZeros() );
517 
518  const auto end1( (~lhs).end() );
519  const auto end2( x.end() );
520  const auto end3( y.end() );
521 
522  auto i1( (~lhs).begin() );
523  auto i2( x.begin() );
524  auto i3( y.begin() );
525 
526  for( ; i1!=end1; ++i1 ) {
527  while( i2!=end2 && i2->index() < i1->index() ) ++i2;
528  if( i2==end2 ) break;
529  while( i3!=end3 && i3->index() < i1->index() ) ++i3;
530  if( i3==end3 ) break;
531  if( i1->index() == i2->index() && i1->index() == i3->index() ) {
532  tmp.append( i1->index(), i1->value() * i2->value() * i3->value() );
533  ++i2;
534  ++i3;
535  }
536  }
537 
538  swap( ~lhs, tmp );
539  }
541  //**********************************************************************************************
542 
543  //**Compile time checks*************************************************************************
553  //**********************************************************************************************
554 };
555 //*************************************************************************************************
556 
557 
558 
559 
560 //=================================================================================================
561 //
562 // GLOBAL BINARY ARITHMETIC OPERATORS
563 //
564 //=================================================================================================
565 
566 //*************************************************************************************************
579 template< typename VT1 // Type of the left-hand side sparse vector
580  , typename VT2 // Type of the right-hand side sparse vector
581  , bool TF // Transpose flag
582  , DisableIf_t< IsZero_v<VT1> || IsZero_v<VT2> >* = nullptr >
583 inline const SVecSVecMultExpr<VT1,VT2,TF>
584  svecsvecmult( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
585 {
587 
588  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
589 
590  return SVecSVecMultExpr<VT1,VT2,TF>( ~lhs, ~rhs );
591 }
593 //*************************************************************************************************
594 
595 
596 //*************************************************************************************************
609 template< typename VT1 // Type of the left-hand side sparse vector
610  , typename VT2 // Type of the right-hand side sparse vector
611  , bool TF // Transpose flag
612  , EnableIf_t< IsZero_v<VT1> || IsZero_v<VT2> >* = nullptr >
613 inline decltype(auto)
614  svecsvecmult( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
615 {
617 
618  MAYBE_UNUSED( rhs );
619 
620  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
621 
622  using ReturnType = const MultTrait_t< ResultType_t<VT1>, ResultType_t<VT2> >;
623 
626 
627  return ReturnType( (~lhs).size() );
628 }
630 //*************************************************************************************************
631 
632 
633 //*************************************************************************************************
658 template< typename VT1 // Type of the left-hand side sparse vector
659  , typename VT2 // Type of the right-hand side sparse vector
660  , bool TF > // Transpose flag
661 inline decltype(auto)
662  operator*( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
663 {
665 
666  if( (~lhs).size() != (~rhs).size() ) {
667  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
668  }
669 
670  return svecsvecmult( ~lhs, ~rhs );
671 }
672 //*************************************************************************************************
673 
674 } // namespace blaze
675 
676 #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:145
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
Header file for basic type definitions.
Header file for the SparseVector base class.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
CompositeType_t< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:99
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecMultExpr.h:172
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecMultExpr.h:195
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecMultExpr.h:227
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
Constraint on the data type.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:215
Header file for the MAYBE_UNUSED function template.
Header file for the Computation base class.
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: SVecSVecMultExpr.h:110
Header file for the reset shim.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSVecMultExpr.h:159
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecSVecMultExpr.h:125
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
CompositeType_t< VT2 > CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:100
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:131
Header file for the DisableIf class template.
Header file for the IsTemporary type trait class.
Header file for the multiplication trait.
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecSVecMultExpr.h:185
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is not a zero vector or matrix type,...
Definition: Zero.h:61
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1162
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecMultExpr.h:128
#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
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:134
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecSVecMultExpr.h:139
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#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
Constraint on the data type.
MultTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecSVecMultExpr.h:120
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:205
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:247
ResultType_t< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:95
Header file for the exception macros of the math module.
Header file for the VecVecMultExpr base class.
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:438
Constraint on the data type.
Header file for the EnableIf class template.
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.The MultTrait_t alias declaration provid...
Definition: MultTrait.h:240
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecMultExpr.h:121
Expression object for sparse vector-sparse vector multiplications.The SVecSVecMultExpr class represen...
Definition: Forward.h:162
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecMultExpr.h:113
Header file for the IsZero type trait.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
ReturnType_t< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:97
Header file for all forward declarations for expression class templates.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:282
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SVecSVecMultExpr.h:122
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:246
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:104
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:146
ResultType_t< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:96
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is a zero vector or matrix type,...
Definition: Zero.h:81
#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
ReturnType_t< VT2 > RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:98
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecMultExpr.h:239
Header file for the IsExpression type trait class.
Header file for the function trace functionality.