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>
64 #include <blaze/util/mpl/If.h>
65 #include <blaze/util/mpl/Max.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****************************************************************************
100  //**********************************************************************************************
101 
102  //**Return type evaluation**********************************************************************
104 
109  enum : bool { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
110 
113  //**********************************************************************************************
114 
115  public:
116  //**Type definitions****************************************************************************
121 
124 
126  typedef const ResultType CompositeType;
127 
129  typedef If_< IsExpression<VT1>, const VT1, const VT1& > LeftOperand;
130 
132  typedef If_< IsExpression<VT2>, const VT2, const VT2& > RightOperand;
133  //**********************************************************************************************
134 
135  //**Compilation flags***************************************************************************
137  enum : bool { smpAssignable = false };
138  //**********************************************************************************************
139 
140  //**Constructor*********************************************************************************
143  explicit inline SVecSVecMultExpr( const VT1& lhs, const VT2& rhs ) noexcept
144  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
145  , rhs_( rhs ) // Right-hand side sparse vector of the multiplication expression
146  {
147  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
148  }
149  //**********************************************************************************************
150 
151  //**Subscript operator**************************************************************************
157  inline ReturnType operator[]( size_t index ) const {
158  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
159  return lhs_[index] * rhs_[index];
160  }
161  //**********************************************************************************************
162 
163  //**At function*********************************************************************************
170  inline ReturnType at( size_t index ) const {
171  if( index >= lhs_.size() ) {
172  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
173  }
174  return (*this)[index];
175  }
176  //**********************************************************************************************
177 
178  //**Size function*******************************************************************************
183  inline size_t size() const noexcept {
184  return lhs_.size();
185  }
186  //**********************************************************************************************
187 
188  //**NonZeros function***************************************************************************
193  inline size_t nonZeros() const {
194  return min( lhs_.nonZeros(), rhs_.nonZeros() );
195  }
196  //**********************************************************************************************
197 
198  //**Left operand access*************************************************************************
203  inline LeftOperand leftOperand() const noexcept {
204  return lhs_;
205  }
206  //**********************************************************************************************
207 
208  //**Right operand access************************************************************************
213  inline RightOperand rightOperand() const noexcept {
214  return rhs_;
215  }
216  //**********************************************************************************************
217 
218  //**********************************************************************************************
224  template< typename T >
225  inline bool canAlias( const T* alias ) const noexcept {
226  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
227  }
228  //**********************************************************************************************
229 
230  //**********************************************************************************************
236  template< typename T >
237  inline bool isAliased( const T* alias ) const noexcept {
238  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
239  }
240  //**********************************************************************************************
241 
242  private:
243  //**Member variables****************************************************************************
244  LeftOperand lhs_;
245  RightOperand rhs_;
246  //**********************************************************************************************
247 
248  //**Assignment to dense vectors*****************************************************************
260  template< typename VT > // Type of the target dense vector
261  friend inline void assign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
262  {
264 
265  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
266 
267  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
268  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
269 
270  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
271  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
272 
273  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
274  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
275  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
276 
277  const LeftIterator lend( x.end() );
278  const RightIterator rend( y.end() );
279 
280  LeftIterator l( x.begin() );
281  RightIterator r( y.begin() );
282 
283  for( ; l!=lend; ++l ) {
284  while( r!=rend && r->index() < l->index() ) ++r;
285  if( r==rend ) break;
286  if( l->index() == r->index() ) {
287  (~lhs)[l->index()] = l->value() * r->value();
288  ++r;
289  }
290  }
291  }
293  //**********************************************************************************************
294 
295  //**Assignment to sparse vectors****************************************************************
307  template< typename VT > // Type of the target sparse vector
308  friend inline void assign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
309  {
311 
312  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
313 
314  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
315  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
316 
317  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
318  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
319 
320  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
321  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
322  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
323 
324  const LeftIterator lend( x.end() );
325  const RightIterator rend( y.end() );
326 
327  LeftIterator l( x.begin() );
328  RightIterator 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  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
362  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
363 
364  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
365  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
366 
367  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
368  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
369  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
370 
371  const LeftIterator lend( x.end() );
372  const RightIterator rend( y.end() );
373 
374  LeftIterator l( x.begin() );
375  RightIterator r( y.begin() );
376 
377  for( ; l!=lend; ++l ) {
378  while( r!=rend && r->index() < l->index() ) ++r;
379  if( r==rend ) break;
380  if( l->index() == r->index() ) {
381  (~lhs)[l->index()] += l->value() * r->value();
382  ++r;
383  }
384  }
385  }
387  //**********************************************************************************************
388 
389  //**Addition assignment to sparse vectors*******************************************************
390  // No special implementation for the addition assignment to sparse vectors.
391  //**********************************************************************************************
392 
393  //**Subtraction assignment to dense vectors*****************************************************
405  template< typename VT > // Type of the target dense vector
406  friend inline void subAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
407  {
409 
410  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
411 
412  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
413  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
414 
415  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
416  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
417 
418  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
419  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
420  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
421 
422  const LeftIterator lend( x.end() );
423  const RightIterator rend( y.end() );
424 
425  LeftIterator l( x.begin() );
426  RightIterator r( y.begin() );
427 
428  for( ; l!=lend; ++l ) {
429  while( r!=rend && r->index() < l->index() ) ++r;
430  if( r==rend ) break;
431  if( l->index() == r->index() ) {
432  (~lhs)[l->index()] -= l->value() * r->value();
433  ++r;
434  }
435  }
436  }
438  //**********************************************************************************************
439 
440  //**Subtraction assignment to sparse vectors****************************************************
441  // No special implementation for the subtraction assignment to sparse vectors.
442  //**********************************************************************************************
443 
444  //**Multiplication assignment to dense vectors**************************************************
456  template< typename VT > // Type of the target dense vector
457  friend inline void multAssign( DenseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
458  {
460 
461  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
462 
463  typedef ConstIterator_< RemoveReference_<CT1> > LeftIterator;
464  typedef ConstIterator_< RemoveReference_<CT2> > RightIterator;
465 
466  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
467  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
468 
469  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
470  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
471  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
472 
473  const LeftIterator lend( x.end() );
474  const RightIterator rend( y.end() );
475 
476  LeftIterator l( x.begin() );
477  RightIterator r( y.begin() );
478 
479  size_t i( 0 );
480 
481  for( ; l!=lend; ++l ) {
482  while( r!=rend && r->index() < l->index() ) ++r;
483  if( r==rend ) break;
484  if( l->index() == r->index() ) {
485  for( ; i<r->index(); ++i )
486  reset( (~lhs)[i] );
487  (~lhs)[l->index()] *= l->value() * r->value();
488  ++r;
489  ++i;
490  }
491  }
492 
493  for( ; i<rhs.size(); ++i )
494  reset( (~lhs)[i] );
495  }
497  //**********************************************************************************************
498 
499  //**Multiplication assignment to sparse vectors*************************************************
511  template< typename VT > // Type of the target sparse vector
512  friend inline void multAssign( SparseVector<VT,TF>& lhs, const SVecSVecMultExpr& rhs )
513  {
515 
516  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
517 
518  typedef ConstIterator_<VT> Iterator1;
519  typedef ConstIterator_< RemoveReference_<CT1> > Iterator2;
520  typedef ConstIterator_< RemoveReference_<CT2> > Iterator3;
521 
522  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
523  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse vector operand
524 
525  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
526  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
527  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
528 
529  VT tmp( rhs.size(), rhs.nonZeros() );
530 
531  const Iterator1 end1( (~lhs).end() );
532  const Iterator2 end2( x.end() );
533  const Iterator3 end3( y.end() );
534 
535  Iterator1 i1( (~lhs).begin() );
536  Iterator2 i2( x.begin() );
537  Iterator3 i3( y.begin() );
538 
539  for( ; i1!=end1; ++i1 ) {
540  while( i2!=end2 && i2->index() < i1->index() ) ++i2;
541  if( i2==end2 ) break;
542  while( i3!=end3 && i3->index() < i1->index() ) ++i3;
543  if( i3==end3 ) break;
544  if( i1->index() == i2->index() && i1->index() == i3->index() ) {
545  tmp.append( i1->index(), i1->value() * i2->value() * i3->value() );
546  ++i2;
547  ++i3;
548  }
549  }
550 
551  swap( ~lhs, tmp );
552  }
554  //**********************************************************************************************
555 
556  //**Compile time checks*************************************************************************
564  //**********************************************************************************************
565 };
566 //*************************************************************************************************
567 
568 
569 
570 
571 //=================================================================================================
572 //
573 // GLOBAL BINARY ARITHMETIC OPERATORS
574 //
575 //=================================================================================================
576 
577 //*************************************************************************************************
602 template< typename T1 // Type of the left-hand side sparse vector
603  , typename T2 // Type of the right-hand side sparse vector
604  , bool TF > // Transpose flag
605 inline const SVecSVecMultExpr<T1,T2,TF>
607 {
609 
610  if( (~lhs).size() != (~rhs).size() ) {
611  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
612  }
613 
614  return SVecSVecMultExpr<T1,T2,TF>( ~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 Max< Size<VT1>, Size<VT2> >
632 {};
634 //*************************************************************************************************
635 
636 
637 
638 
639 //=================================================================================================
640 //
641 // EXPRESSION TRAIT SPECIALIZATIONS
642 //
643 //=================================================================================================
644 
645 //*************************************************************************************************
647 template< typename VT1, typename VT2, bool TF, bool AF >
648 struct SubvectorExprTrait< SVecSVecMultExpr<VT1,VT2,TF>, AF >
649 {
650  public:
651  //**********************************************************************************************
654  //**********************************************************************************************
655 };
657 //*************************************************************************************************
658 
659 } // namespace blaze
660 
661 #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:143
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
Evaluation of the expression type type of a subvector operation.Via this type trait it is possible to...
Definition: SubvectorExprTrait.h:79
Header file for basic type definitions.
Header file for the SparseVector base class.
ResultType_< VT1 > RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:94
Header file for the serial shim.
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecSVecMultExpr.h:170
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecSVecMultExpr.h:193
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:194
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecSVecMultExpr.h:225
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:99
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:213
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
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
ReturnType_< VT1 > RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:96
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.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecSVecMultExpr.h:157
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SVecSVecMultExpr.h:120
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
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:117
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
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:183
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecSVecMultExpr.h:119
#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 SubvectorExprTrait< VT, AF >::Type SubvectorExprTrait_
Auxiliary alias declaration for the SubvectorExprTrait type trait.The SubvectorExprTrait_ alias decla...
Definition: SubvectorExprTrait.h:133
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:132
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:118
#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:97
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecSVecMultExpr.h:126
Constraint on the data type.
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecSVecMultExpr.h:203
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:245
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:260
Header file for all forward declarations for expression class templates.
Constraint on the data type.
MultExprTrait_< RN1, RN2 > ExprReturnType
Expression return type for the subscript operator.
Definition: SVecSVecMultExpr.h:112
Expression object for sparse vector-sparse vector multiplications.The SVecSVecMultExpr class represen...
Definition: Forward.h:133
Header file for run time assertion macros.
Compile time value evaluation.The Max class template selects the larger of the two given template arg...
Definition: Max.h:72
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.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:267
Header file for the RemoveReference type trait.
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecSVecMultExpr.h:123
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecSVecMultExpr.h:244
If_< IsExpression< VT1 >, const VT1, const VT1 &> LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:129
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.
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:75
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
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
const DMatDMatMultExpr< T1, T2, false, false, false, false > 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:7505
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:98
ResultType_< VT2 > RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecSVecMultExpr.h:95
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecSVecMultExpr.h:237
Header file for the IsExpression type trait class.
Header file for the function trace functionality.