All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSVecSMatMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSVECSMATMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TSVECSMATMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
52 #include <blaze/math/shims/Reset.h>
60 #include <blaze/util/Assert.h>
62 #include <blaze/util/DisableIf.h>
63 #include <blaze/util/EnableIf.h>
65 #include <blaze/util/SelectType.h>
66 #include <blaze/util/Types.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS TSVECSMATMULTEXPR
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
85 template< typename VT // Type of the left-hand side sparse vector
86  , typename MT > // Type of the right-hand side sparse matrix
87 class TSVecSMatMultExpr : public SparseVector< TSVecSMatMultExpr<VT,MT>, true >
88  , private TVecMatMultExpr
89  , private Computation
90 {
91  private:
92  //**Type definitions****************************************************************************
93  typedef typename VT::ResultType VRT;
94  typedef typename MT::ResultType MRT;
95  typedef typename VT::CompositeType VCT;
96  typedef typename MT::CompositeType MCT;
97  //**********************************************************************************************
98 
99  public:
100  //**Type definitions****************************************************************************
105  typedef const ElementType ReturnType;
106  typedef const ResultType CompositeType;
107 
109  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type LeftOperand;
110 
112  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type RightOperand;
113 
115  typedef typename SelectType< IsComputation<VT>::value, const VRT, VCT >::Type LT;
116 
118  typedef MCT RT;
119  //**********************************************************************************************
120 
121  public:
122  //**Constructor*********************************************************************************
128  explicit inline TSVecSMatMultExpr( const VT& vec, const MT& mat )
129  : vec_( vec ) // Left-hand side sparse vector of the multiplication expression
130  , mat_( mat ) // Right-hand side sparse matrix of the multiplication expression
131  {
132  BLAZE_INTERNAL_ASSERT( vec_.size() == mat_.rows(), "Invalid vector and matrix sizes" );
133  }
134  //**********************************************************************************************
135 
136  //**Subscript operator**************************************************************************
142  inline ReturnType operator[]( size_t index ) const {
143  BLAZE_INTERNAL_ASSERT( index < mat_.columns(), "Invalid vector access index" );
144 
145  typedef typename RemoveReference<VCT>::Type::ConstIterator VectorIterator;
146 
147  VCT x( vec_ ); // Evaluation of the left-hand side sparse vector operand
148  MCT A( mat_ ); // Evaluation of the right-hand side sparse matrix operand
149 
150  BLAZE_INTERNAL_ASSERT( x.size() == vec_.size() , "Invalid vector size" );
151  BLAZE_INTERNAL_ASSERT( A.rows() == mat_.rows() , "Invalid number of rows" );
152  BLAZE_INTERNAL_ASSERT( A.columns() == mat_.columns(), "Invalid number of columns" );
153 
154  const VectorIterator vend( x.end() );
155  VectorIterator velem( x.begin() );
156  ElementType res;
157 
158  if( velem != vend ) {
159  res = velem->value() * A(velem->index(),index);
160  ++velem;
161  for( ; velem!=vend; ++velem ) {
162  res += velem->value() * A(velem->index(),index);
163  }
164  }
165  else {
166  reset( res );
167  }
168 
169  return res;
170  }
171  //**********************************************************************************************
172 
173  //**Size function*******************************************************************************
178  inline size_t size() const {
179  return mat_.columns();
180  }
181  //**********************************************************************************************
182 
183  //**NonZeros function***************************************************************************
188  inline size_t nonZeros() const {
189  return mat_.columns();
190  }
191  //**********************************************************************************************
192 
193  //**Left operand access*************************************************************************
198  inline LeftOperand leftOperand() const {
199  return vec_;
200  }
201  //**********************************************************************************************
202 
203  //**Right operand access************************************************************************
208  inline RightOperand rightOperand() const {
209  return mat_;
210  }
211  //**********************************************************************************************
212 
213  //**********************************************************************************************
219  template< typename T >
220  inline bool canAlias( const T* alias ) const {
221  return ( vec_.isAliased( alias ) || mat_.isAliased( alias ) );
222  }
223  //**********************************************************************************************
224 
225  //**********************************************************************************************
231  template< typename T >
232  inline bool isAliased( const T* alias ) const {
233  return ( vec_.isAliased( alias ) || mat_.isAliased( alias ) );
234  }
235  //**********************************************************************************************
236 
237  private:
238  //**Member variables****************************************************************************
241  //**********************************************************************************************
242 
243  //**Default assignment to dense vectors*********************************************************
257  template< typename VT1 > // Type of the target dense vector
258  friend inline typename EnableIf< IsResizable<typename VT1::ElementType> >::Type
260  {
262 
263  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
264 
265  typedef typename RemoveReference<LT>::Type::ConstIterator VectorIterator;
266  typedef typename RemoveReference<RT>::Type::ConstIterator MatrixIterator;
267 
268  // Evaluation of the left-hand side sparse vector operand
269  LT x( rhs.vec_ );
270  if( x.nonZeros() == 0UL ) {
271  reset( ~lhs );
272  return;
273  }
274 
275  // Evaluation of the right-hand side sparse matrix operand
276  RT A( rhs.mat_ );
277 
278  // Checking the evaluated operands
279  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
280  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
281  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
282  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
283 
284  // Performing the sparse vector-sparse matrix multiplication
285  const VectorIterator vend( x.end() );
286 
287  for( size_t i=0UL; i<(~lhs).size(); ++i )
288  {
289  VectorIterator velem( x.begin() );
290 
291  (~lhs)[i] = velem->value() * A(velem->index(),i);
292  ++velem;
293  for( ; velem!=vend; ++velem ) {
294  (~lhs)[i] += velem->value() * A(velem->index(),i);
295  }
296  }
297  }
299  //**********************************************************************************************
300 
301  //**Optimized assignment to dense vectors*******************************************************
315  template< typename VT1 > // Type of the target dense vector
316  friend inline typename DisableIf< IsResizable<typename VT1::ElementType> >::Type
318  {
320 
321  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
322 
323  typedef typename RemoveReference<LT>::Type::ConstIterator VectorIterator;
324  typedef typename RemoveReference<RT>::Type::ConstIterator MatrixIterator;
325 
326  // Resetting the left-hand side target dense vector
327  reset( ~lhs );
328 
329  // Evaluation of the left-hand side sparse vector operand
330  LT x( rhs.vec_ );
331  if( x.nonZeros() == 0UL ) return;
332 
333  // Evaluation of the right-hand side sparse matrix operand
334  RT A( rhs.mat_ );
335 
336  // Checking the evaluated operands
337  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
338  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
339  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
340  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
341 
342  // Performing the sparse vector-sparse matrix multiplication
343  const VectorIterator vend( x.end() );
344  VectorIterator velem( x.begin() );
345 
346  for( ; velem!=vend; ++velem )
347  {
348  const MatrixIterator mend( A.end( velem->index() ) );
349  MatrixIterator melem( A.begin( velem->index() ) );
350 
351  for( ; melem!=mend; ++melem ) {
352  (~lhs)[melem->index()] += velem->value() * melem->value();
353  }
354  }
355  }
357  //**********************************************************************************************
358 
359  //**Assignment to sparse vectors****************************************************************
371  template< typename VT1 > // Type of the target sparse vector
372  friend inline void assign( SparseVector<VT1,true>& lhs, const TSVecSMatMultExpr& rhs )
373  {
375 
376  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
377 
378  typedef typename RemoveReference<LT>::Type::ConstIterator VectorIterator;
379  typedef typename RemoveReference<RT>::Type::ConstIterator MatrixIterator;
380 
381  // Evaluation of the left-hand side sparse vector operand
382  LT x( rhs.vec_ );
383  if( x.nonZeros() == 0UL ) return;
384 
385  // Evaluation of the right-hand side sparse matrix operand
386  RT A( rhs.mat_ );
387 
388  // Checking the evaluated operands
389  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
390  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
391  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
392  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
393 
394  // Performing the sparse vector-sparse matrix multiplication
395  const VectorIterator vend( x.end() );
396  VectorIterator velem( x.begin() );
397 
398  for( ; velem!=vend; ++velem )
399  {
400  const MatrixIterator mend( A.end( velem->index() ) );
401  MatrixIterator melem( A.begin( velem->index() ) );
402 
403  for( ; melem!=mend; ++melem )
404  {
405  typename VT1::Iterator pos( (~lhs).find( melem->index() ) );
406  if( pos != (~lhs).end() )
407  pos->value() += velem->value() * melem->value();
408  else
409  (~lhs).insert( melem->index(), velem->value() * melem->value() );
410  }
411  }
412  }
414  //**********************************************************************************************
415 
416  //**Addition assignment to dense vectors********************************************************
429  template< typename VT1 > // Type of the target dense vector
430  friend inline void addAssign( DenseVector<VT1,true>& lhs, const TSVecSMatMultExpr& rhs )
431  {
433 
434  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
435 
436  typedef typename RemoveReference<LT>::Type::ConstIterator VectorIterator;
437  typedef typename RemoveReference<RT>::Type::ConstIterator MatrixIterator;
438 
439  // Evaluation of the left-hand side sparse vector operand
440  LT x( rhs.vec_ );
441  if( x.nonZeros() == 0UL ) return;
442 
443  // Evaluation of the right-hand side sparse matrix operand
444  RT A( rhs.mat_ );
445 
446  // Checking the evaluated operands
447  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
448  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
449  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
450  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
451 
452  // Performing the sparse vector-sparse matrix multiplication
453  const VectorIterator vend( x.end() );
454  VectorIterator velem( x.begin() );
455 
456  for( ; velem!=vend; ++velem )
457  {
458  const MatrixIterator mend( A.end( velem->index() ) );
459  MatrixIterator melem( A.begin( velem->index() ) );
460 
461  for( ; melem!=mend; ++melem ) {
462  (~lhs)[melem->index()] += velem->value() * melem->value();
463  }
464  }
465  }
467  //**********************************************************************************************
468 
469  //**Addition assignment to sparse vectors*******************************************************
470  // No special implementation for the addition assignment to sparse vectors.
471  //**********************************************************************************************
472 
473  //**Subtraction assignment to dense vectors*****************************************************
486  template< typename VT1 > // Type of the target dense vector
487  friend inline void subAssign( DenseVector<VT1,true>& lhs, const TSVecSMatMultExpr& rhs )
488  {
490 
491  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
492 
493  typedef typename RemoveReference<LT>::Type::ConstIterator VectorIterator;
494  typedef typename RemoveReference<RT>::Type::ConstIterator MatrixIterator;
495 
496  // Evaluation of the left-hand side sparse vector operand
497  LT x( rhs.vec_ );
498  if( x.nonZeros() == 0UL ) return;
499 
500  // Evaluation of the right-hand side sparse matrix operand
501  RT A( rhs.mat_ );
502 
503  // Checking the evaluated operands
504  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
505  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
506  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
507  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).size() , "Invalid vector size" );
508 
509  // Performing the sparse vector-sparse matrix multiplication
510  const VectorIterator vend( x.end() );
511  VectorIterator velem( x.begin() );
512 
513  for( ; velem!=vend; ++velem )
514  {
515  const MatrixIterator mend( A.end( velem->index() ) );
516  MatrixIterator melem( A.begin( velem->index() ) );
517 
518  for( ; melem!=mend; ++melem ) {
519  (~lhs)[melem->index()] -= velem->value() * melem->value();
520  }
521  }
522  }
524  //**********************************************************************************************
525 
526  //**Subtraction assignment to sparse vectors****************************************************
527  // No special implementation for the subtraction assignment to sparse vectors.
528  //**********************************************************************************************
529 
530  //**Multiplication assignment to dense vectors**************************************************
543  template< typename VT1 > // Type of the target dense vector
544  friend inline void multAssign( DenseVector<VT1,true>& lhs, const TSVecSMatMultExpr& rhs )
545  {
547 
551 
552  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
553 
554  const ResultType tmp( rhs );
555  multAssign( ~lhs, tmp );
556  }
558  //**********************************************************************************************
559 
560  //**Multiplication assignment to sparse vectors*************************************************
561  // No special implementation for the multiplication assignment to sparse vectors.
562  //**********************************************************************************************
563 
564  //**Compile time checks*************************************************************************
571  //**********************************************************************************************
572 };
573 //*************************************************************************************************
574 
575 
576 
577 
578 //=================================================================================================
579 //
580 // GLOBAL BINARY ARITHMETIC OPERATORS
581 //
582 //=================================================================================================
583 
584 //*************************************************************************************************
615 template< typename T1 // Type of the left-hand side sparse vector
616  , typename T2 > // Type of the right-hand side sparse matrix
617 inline const typename DisableIf< IsMatMatMultExpr<T2>, TSVecSMatMultExpr<T1,T2> >::Type
619 {
621 
622  if( (~vec).size() != (~mat).rows() )
623  throw std::invalid_argument( "Vector and matrix sizes do not match" );
624 
625  return TSVecSMatMultExpr<T1,T2>( ~vec, ~mat );
626 }
627 //*************************************************************************************************
628 
629 
630 
631 
632 //=================================================================================================
633 //
634 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
635 //
636 //=================================================================================================
637 
638 //*************************************************************************************************
651 template< typename T1 // Type of the left-hand side sparse vector
652  , typename T2 // Type of the right-hand side sparse matrix
653  , bool SO > // Storage order of the right-hand side sparse matrix
654 inline const typename EnableIf< IsMatMatMultExpr<T2>, MultExprTrait<T1,T2> >::Type::Type
656 {
658 
659  return ( vec * (~mat).leftOperand() ) * (~mat).rightOperand();
660 }
661 //*************************************************************************************************
662 
663 
664 
665 
666 //=================================================================================================
667 //
668 // EXPRESSION TRAIT SPECIALIZATIONS
669 //
670 //=================================================================================================
671 
672 //*************************************************************************************************
674 template< typename VT, typename MT >
675 struct SubvectorExprTrait< TSVecSMatMultExpr<VT,MT> >
676 {
677  public:
678  //**********************************************************************************************
679  typedef typename MultExprTrait< VT, typename SubmatrixExprTrait<const MT>::Type >::Type Type;
680  //**********************************************************************************************
681 };
683 //*************************************************************************************************
684 
685 } // namespace blaze
686 
687 #endif
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4512
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TSVecSMatMultExpr.h:103
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:3703
Header file for the SparseVector base class.
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSVecSMatMultExpr.h:106
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: TSVecSMatMultExpr.h:112
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:248
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
VT::CompositeType VCT
Composite type of the left-hand side sparse vector expression.
Definition: TSVecSMatMultExpr.h:95
MultTrait< VRT, MRT >::Type ResultType
Result type for expression template evaluations.
Definition: TSVecSMatMultExpr.h:102
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:104
Constraint on the data type.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TSVecSMatMultExpr.h:142
Constraint on the data type.
Header file for the MultExprTrait class template.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:250
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 DisableIf class template.
Header file for the multiplication trait.
RightOperand rightOperand() const
Returns the right-hand side sparse matrix operand.
Definition: TSVecSMatMultExpr.h:208
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
Expression object for sparse vector-sparse matrix multiplications.The TSVecSMatMultExpr class represe...
Definition: Forward.h:144
TSVecSMatMultExpr< VT, MT > This
Type of this TSVecSMatMultExpr instance.
Definition: TSVecSMatMultExpr.h:101
Header file for the IsMatMatMultExpr type trait class.
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
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
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
Constraints on the storage order of matrix types.
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSVecSMatMultExpr.h:105
MCT RT
Type for the assignment of the right-hand side sparse matrix operand.
Definition: TSVecSMatMultExpr.h:118
LeftOperand vec_
Left-hand side sparse vector of the multiplication expression.
Definition: TSVecSMatMultExpr.h:239
ResultType::ElementType ElementType
Resulting element type.
Definition: TSVecSMatMultExpr.h:104
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:269
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
VT::ResultType VRT
Result type of the left-hand side sparse vector expression.
Definition: TSVecSMatMultExpr.h:93
size_t nonZeros() const
Returns an estimation for the number of non-zero elements in the sparse vector.
Definition: TSVecSMatMultExpr.h:188
Header file for the EnableIf class template.
RightOperand mat_
Right-hand side sparse matrix of the multiplication expression.
Definition: TSVecSMatMultExpr.h:240
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: StorageOrder.h:81
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Header file for run time assertion macros.
Base template for the MultTrait class.
Definition: MultTrait.h:141
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
SelectType< IsComputation< VT >::value, const VRT, VCT >::Type LT
Type for the assignment of the left-hand side sparse vector operand.
Definition: TSVecSMatMultExpr.h:115
size_t size() const
Returns the current size/dimension of the vector.
Definition: TSVecSMatMultExpr.h:178
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the reset shim.
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2378
Header file for the TVecMatMultExpr base class.
TSVecSMatMultExpr(const VT &vec, const MT &mat)
Constructor for the TSVecSMatMultExpr class.
Definition: TSVecSMatMultExpr.h:128
Header file for the RemoveReference type trait.
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
Header file for the IsComputation type trait class.
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: TSVecSMatMultExpr.h:198
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
#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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
Header file for basic type definitions.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: TransposeFlag.h:81
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: TSVecSMatMultExpr.h:109
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TSVecSMatMultExpr.h:220
MT::CompositeType MCT
Composite type of the right-hand side sparse matrix expression.
Definition: TSVecSMatMultExpr.h:96
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TSVecSMatMultExpr.h:232
Header file for the IsResizable type trait.
MT::ResultType MRT
Result type of the right-hand side sparse matrix expression.
Definition: TSVecSMatMultExpr.h:94
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:138
#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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:79
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.