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/shims/Reset.h>
61 #include <blaze/util/Assert.h>
63 #include <blaze/util/mpl/If.h>
64 #include <blaze/util/mpl/Maximum.h>
65 #include <blaze/util/Types.h>
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // CLASS SVECSVECMULTEXPR
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
84 template< typename VT1 // Type of the left-hand side sparse vector
85  , typename VT2 // Type of the right-hand side sparse vector
86  , bool TF > // Transpose flag
87 class SVecSVecMultExpr
88  : public VecVecMultExpr< SparseVector< SVecSVecMultExpr<VT1,VT2,TF>, TF > >
89  , private Computation
90 {
91  private:
92  //**Type definitions****************************************************************************
99  //**********************************************************************************************
100 
101  //**Return type evaluation**********************************************************************
103 
108  enum : bool { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
109 
112  //**********************************************************************************************
113 
114  public:
115  //**Type definitions****************************************************************************
120 
123 
125  using CompositeType = const ResultType;
126 
128  using LeftOperand = If_< IsExpression<VT1>, const VT1, const VT1& >;
129 
131  using RightOperand = If_< IsExpression<VT2>, const VT2, const VT2& >;
132  //**********************************************************************************************
133 
134  //**Compilation flags***************************************************************************
136  enum : bool { smpAssignable = false };
137  //**********************************************************************************************
138 
139  //**Constructor*********************************************************************************
142  explicit inline SVecSVecMultExpr( const VT1& lhs, const VT2& rhs ) noexcept
143  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
144  , rhs_( rhs ) // Right-hand side sparse vector of the multiplication expression
145  {
146  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
147  }
148  //**********************************************************************************************
149 
150  //**Subscript operator**************************************************************************
156  inline ReturnType operator[]( size_t index ) const {
157  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
158  return lhs_[index] * rhs_[index];
159  }
160  //**********************************************************************************************
161 
162  //**At function*********************************************************************************
169  inline ReturnType at( size_t index ) const {
170  if( index >= lhs_.size() ) {
171  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
172  }
173  return (*this)[index];
174  }
175  //**********************************************************************************************
176 
177  //**Size function*******************************************************************************
182  inline size_t size() const noexcept {
183  return lhs_.size();
184  }
185  //**********************************************************************************************
186 
187  //**NonZeros function***************************************************************************
192  inline size_t nonZeros() const {
193  return min( lhs_.nonZeros(), rhs_.nonZeros() );
194  }
195  //**********************************************************************************************
196 
197  //**Left operand access*************************************************************************
202  inline LeftOperand leftOperand() const noexcept {
203  return lhs_;
204  }
205  //**********************************************************************************************
206 
207  //**Right operand access************************************************************************
212  inline RightOperand rightOperand() const noexcept {
213  return rhs_;
214  }
215  //**********************************************************************************************
216 
217  //**********************************************************************************************
223  template< typename T >
224  inline bool canAlias( const T* alias ) const noexcept {
225  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
226  }
227  //**********************************************************************************************
228 
229  //**********************************************************************************************
235  template< typename T >
236  inline bool isAliased( const T* alias ) const noexcept {
237  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
238  }
239  //**********************************************************************************************
240 
241  private:
242  //**Member variables****************************************************************************
245  //**********************************************************************************************
246 
247  //**Assignment to dense vectors*****************************************************************
259  template< typename VT > // Type of the target dense vector
260  friend inline void assign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
261  {
263 
264  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
265 
266  using LeftIterator = ConstIterator_< RemoveReference_<CT1> >;
267  using RightIterator = ConstIterator_< RemoveReference_<CT2> >;
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 LeftIterator lend( x.end() );
277  const RightIterator rend( y.end() );
278 
279  LeftIterator l( x.begin() );
280  RightIterator 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  using LeftIterator = ConstIterator_< RemoveReference_<CT1> >;
314  using RightIterator = ConstIterator_< RemoveReference_<CT2> >;
315 
316  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
317  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
318 
319  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
320  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
321  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
322 
323  const LeftIterator lend( x.end() );
324  const RightIterator rend( y.end() );
325 
326  LeftIterator l( x.begin() );
327  RightIterator r( y.begin() );
328 
329  for( ; l!=lend; ++l ) {
330  while( r!=rend && r->index() < l->index() ) ++r;
331  if( r==rend ) break;
332  if( l->index() == r->index() ) {
333  (~lhs).append( l->index(), l->value() * r->value() );
334  ++r;
335  }
336  }
337  }
339  //**********************************************************************************************
340 
341  //**Addition assignment to dense vectors********************************************************
353  template< typename VT > // Type of the target dense vector
354  friend inline void addAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
355  {
357 
358  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
359 
360  using LeftIterator = ConstIterator_< RemoveReference_<CT1> >;
361  using RightIterator = ConstIterator_< RemoveReference_<CT2> >;
362 
363  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
364  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
365 
366  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
367  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
368  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
369 
370  const LeftIterator lend( x.end() );
371  const RightIterator rend( y.end() );
372 
373  LeftIterator l( x.begin() );
374  RightIterator r( y.begin() );
375 
376  for( ; l!=lend; ++l ) {
377  while( r!=rend && r->index() < l->index() ) ++r;
378  if( r==rend ) break;
379  if( l->index() == r->index() ) {
380  (~lhs)[l->index()] += l->value() * r->value();
381  ++r;
382  }
383  }
384  }
386  //**********************************************************************************************
387 
388  //**Addition assignment to sparse vectors*******************************************************
389  // No special implementation for the addition assignment to sparse vectors.
390  //**********************************************************************************************
391 
392  //**Subtraction assignment to dense vectors*****************************************************
404  template< typename VT > // Type of the target dense vector
405  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
406  {
408 
409  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
410 
411  using LeftIterator = ConstIterator_< RemoveReference_<CT1> >;
412  using RightIterator = ConstIterator_< RemoveReference_<CT2> >;
413 
414  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
415  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
416 
417  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
418  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
419  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
420 
421  const LeftIterator lend( x.end() );
422  const RightIterator rend( y.end() );
423 
424  LeftIterator l( x.begin() );
425  RightIterator r( y.begin() );
426 
427  for( ; l!=lend; ++l ) {
428  while( r!=rend && r->index() < l->index() ) ++r;
429  if( r==rend ) break;
430  if( l->index() == r->index() ) {
431  (~lhs)[l->index()] -= l->value() * r->value();
432  ++r;
433  }
434  }
435  }
437  //**********************************************************************************************
438 
439  //**Subtraction assignment to sparse vectors****************************************************
440  // No special implementation for the subtraction assignment to sparse vectors.
441  //**********************************************************************************************
442 
443  //**Multiplication assignment to dense vectors**************************************************
455  template< typename VT > // Type of the target dense vector
456  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
457  {
459 
460  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
461 
462  using LeftIterator = ConstIterator_< RemoveReference_<CT1> >;
463  using RightIterator = ConstIterator_< RemoveReference_<CT2> >;
464 
465  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
466  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
467 
468  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
469  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
470  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
471 
472  const LeftIterator lend( x.end() );
473  const RightIterator rend( y.end() );
474 
475  LeftIterator l( x.begin() );
476  RightIterator r( y.begin() );
477 
478  size_t i( 0 );
479 
480  for( ; l!=lend; ++l ) {
481  while( r!=rend && r->index() < l->index() ) ++r;
482  if( r==rend ) break;
483  if( l->index() == r->index() ) {
484  for( ; i<r->index(); ++i )
485  reset( (~lhs)[i] );
486  (~lhs)[l->index()] *= l->value() * r->value();
487  ++r;
488  ++i;
489  }
490  }
491 
492  for( ; i<rhs.size(); ++i )
493  reset( (~lhs)[i] );
494  }
496  //**********************************************************************************************
497 
498  //**Multiplication assignment to sparse vectors*************************************************
510  template< typename VT > // Type of the target sparse vector
511  friend inline void multAssign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
512  {
514 
515  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
516 
517  using Iterator1 = ConstIterator_<VT>;
518  using Iterator2 = ConstIterator_< RemoveReference_<CT1> >;
519  using Iterator3 = ConstIterator_< RemoveReference_<CT2> >;
520 
521  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
522  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
523 
524  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
525  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
526  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
527 
528  VT tmp( rhs.size(), rhs.nonZeros() );
529 
530  const Iterator1 end1( (~lhs).end() );
531  const Iterator2 end2( x.end() );
532  const Iterator3 end3( y.end() );
533 
534  Iterator1 i1( (~lhs).begin() );
535  Iterator2 i2( x.begin() );
536  Iterator3 i3( y.begin() );
537 
538  for( ; i1!=end1; ++i1 ) {
539  while( i2!=end2 && i2->index() < i1->index() ) ++i2;
540  if( i2==end2 ) break;
541  while( i3!=end3 && i3->index() < i1->index() ) ++i3;
542  if( i3==end3 ) break;
543  if( i1->index() == i2->index() && i1->index() == i3->index() ) {
544  tmp.append( i1->index(), i1->value() * i2->value() * i3->value() );
545  ++i2;
546  ++i3;
547  }
548  }
549 
550  swap( ~lhs, tmp );
551  }
553  //**********************************************************************************************
554 
555  //**Compile time checks*************************************************************************
563  //**********************************************************************************************
564 };
565 //*************************************************************************************************
566 
567 
568 
569 
570 //=================================================================================================
571 //
572 // GLOBAL BINARY ARITHMETIC OPERATORS
573 //
574 //=================================================================================================
575 
576 //*************************************************************************************************
601 template< typename VT1 // Type of the left-hand side sparse vector
602  , typename VT2 // Type of the right-hand side sparse vector
603  , bool TF > // Transpose flag
604 inline decltype(auto)
605  operator*( const SparseVector<VT1,TF>& lhs, const SparseVector<VT2,TF>& rhs )
606 {
608 
609  if( (~lhs).size() != (~rhs).size() ) {
610  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
611  }
612 
614  return ReturnType( ~lhs, ~rhs );
615 }
616 //*************************************************************************************************
617 
618 
619 
620 
621 //=================================================================================================
622 //
623 // SIZE SPECIALIZATIONS
624 //
625 //=================================================================================================
626 
627 //*************************************************************************************************
629 template< typename VT1, typename VT2, bool TF >
630 struct Size< SVecSVecMultExpr<VT1,VT2,TF> >
631  : public Maximum< Size<VT1>, Size<VT2> >
632 {};
634 //*************************************************************************************************
635 
636 } // namespace blaze
637 
638 #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:142
Header file for auxiliary alias declarations.
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecMultExpr.h:118
Headerfile for the generic min algorithm.
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:70
Header file for basic type definitions.
Header file for the SparseVector base class.
MultTrait_< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: SVecSVecMultExpr.h:117
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SVecSVecMultExpr.h:119
Header file for the serial shim.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecMultExpr.h:169
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecMultExpr.h:192
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:198
CompositeType_< VT2 > CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:98
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecMultExpr.h:224
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
If_< IsExpression< VT2 >, const VT2, const VT2 &> RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:131
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:212
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1762
Compile time value evaluation.The Maximum alias declaration selects the larger of the two given templ...
Definition: Maximum.h:73
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:250
Header file for the Computation base class.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSVecMultExpr.h:156
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
CompositeType_< VT1 > CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:97
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:363
Header file for the Maximum class template.
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:112
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
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:182
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecMultExpr.h:125
#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
MultExprTrait_< RN1, RN2 > ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecMultExpr.h:111
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:61
Constraint on the data type.
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:202
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:244
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:264
ReturnType_< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:95
Header file for all forward declarations for expression class templates.
Constraint on the data type.
ReturnType_< VT2 > RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:96
ResultType_< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:94
Expression object for sparse vector-sparse vector multiplications.The SVecSVecMultExpr class represen...
Definition: Forward.h:143
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecSVecMultExpr.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:154
Header file for the reset shim.
#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
If_< IsExpression< VT1 >, const VT1, const VT1 &> LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:128
ResultType_< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:93
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:270
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
Header file for the RemoveReference type trait.
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:243
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
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:108
Header file for the IsComputation type trait class.
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:74
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
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
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecMultExpr.h:236
Header file for the IsExpression type trait class.
Header file for the function trace functionality.