All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSMatSVecMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_TSMATSVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_TSMATSVECMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <stdexcept>
44 #include <vector>
54 #include <blaze/math/shims/Reset.h>
61 #include <blaze/util/Assert.h>
63 #include <blaze/util/DisableIf.h>
64 #include <blaze/util/EnableIf.h>
66 #include <blaze/util/SelectType.h>
67 #include <blaze/util/Types.h>
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // CLASS SMATDVECMULTEXPR
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
86 template< typename MT // Type of the left-hand side sparse matrix
87  , typename VT > // Type of the right-hand side sparse vector
88 class TSMatSVecMultExpr : public SparseVector< TSMatSVecMultExpr<MT,VT>, false >
89  , private MatVecMultExpr
90  , private Computation
91 {
92  private:
93  //**Type definitions****************************************************************************
94  typedef typename MT::ResultType MRT;
95  typedef typename VT::ResultType VRT;
96  typedef typename MT::CompositeType MCT;
97  typedef typename VT::CompositeType VCT;
98  //**********************************************************************************************
99 
100  public:
101  //**Type definitions****************************************************************************
106  typedef const ElementType ReturnType;
107 
109  typedef const ResultType CompositeType;
110 
112  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type LeftOperand;
113 
115  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type RightOperand;
116 
118  typedef MCT LT;
119 
121  typedef typename SelectType< IsComputation<VT>::value, const VRT, VCT >::Type RT;
122  //**********************************************************************************************
123 
124  //**Constructor*********************************************************************************
130  explicit inline TSMatSVecMultExpr( const MT& mat, const VT& vec )
131  : mat_( mat ) // Left-hand side sparse matrix of the multiplication expression
132  , vec_( vec ) // Right-hand side sparse vector of the multiplication expression
133  {
134  BLAZE_INTERNAL_ASSERT( mat_.columns() == vec_.size(), "Invalid matrix and vector sizes" );
135  }
136  //**********************************************************************************************
137 
138  //**Subscript operator**************************************************************************
144  inline ReturnType operator[]( size_t index ) const {
145  BLAZE_INTERNAL_ASSERT( index < mat_.rows(), "Invalid vector access index" );
146 
147  typedef typename RemoveReference<MCT>::Type::ConstIterator MatrixIterator;
148  typedef typename RemoveReference<VCT>::Type::ConstIterator VectorIterator;
149 
150  MCT A( mat_ ); // Evaluation of the left-hand side sparse matrix operand
151  VCT x( vec_ ); // Evaluation of the right-hand side sparse vector operand
152 
153  BLAZE_INTERNAL_ASSERT( A.rows() == mat_.rows() , "Invalid number of rows" );
154  BLAZE_INTERNAL_ASSERT( A.columns() == mat_.columns(), "Invalid number of columns" );
155  BLAZE_INTERNAL_ASSERT( x.size() == vec_.size() , "Invalid vector size" );
156 
157  ElementType res;
158 
159  const VectorIterator vend( x.end() );
160  VectorIterator velem( x.begin() );
161 
162  if( vec_.size() > 0UL && velem != vend ) {
163  res = A( index, velem->index() ) * velem->value();
164  ++velem;
165  for( ; velem!=vend; ++velem )
166  res += A( index, velem->index() ) * velem->value();
167  }
168  else {
169  reset( res );
170  }
171 
172  return res;
173  }
174  //**********************************************************************************************
175 
176  //**Size function*******************************************************************************
181  inline size_t size() const {
182  return mat_.rows();
183  }
184  //**********************************************************************************************
185 
186  //**NonZeros function***************************************************************************
191  inline size_t nonZeros() const {
192  return mat_.rows();
193  }
194  //**********************************************************************************************
195 
196  //**Left operand access*************************************************************************
201  inline LeftOperand leftOperand() const {
202  return mat_;
203  }
204  //**********************************************************************************************
205 
206  //**Right operand function**********************************************************************
211  inline RightOperand rightOperand() const {
212  return vec_;
213  }
214  //**********************************************************************************************
215 
216  //**********************************************************************************************
222  template< typename T >
223  inline bool canAlias( const T* alias ) const {
224  return ( mat_.isAliased( alias ) || vec_.isAliased( alias ) );
225  }
226  //**********************************************************************************************
227 
228  //**********************************************************************************************
234  template< typename T >
235  inline bool isAliased( const T* alias ) const {
236  return ( mat_.isAliased( alias ) || vec_.isAliased( alias ) );
237  }
238  //**********************************************************************************************
239 
240  private:
241  //**Member variables****************************************************************************
244  //**********************************************************************************************
245 
246  //**Default assignment to dense vectors*********************************************************
260  template< typename VT1 > // Type of the target dense vector
261  friend inline typename EnableIf< IsResizable<typename VT1::ElementType> >::Type
263  {
265 
266  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
267 
268  typedef typename RemoveReference<LT>::Type::ConstIterator MatrixIterator;
269  typedef typename RemoveReference<RT>::Type::ConstIterator VectorIterator;
270 
271  // Resetting the left-hand side target dense vector
272  reset( ~lhs );
273 
274  // Evaluation of the right-hand side sparse vector operand
275  RT x( rhs.vec_ );
276  if( x.nonZeros() == 0UL ) return;
277 
278  // Evaluation of the left-hand side sparse matrix operand
279  LT A( rhs.mat_ );
280 
281  // Checking the evaluated operators
282  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
283  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
284  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
285  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).size() , "Invalid vector size" );
286 
287  // Performing the transpose sparse matrix-sparse vector multiplication
288  const VectorIterator vend ( x.end() );
289  VectorIterator velem( x.begin() );
290 
291  for( ; velem!=vend; ++velem )
292  {
293  const MatrixIterator mend ( A.end( velem->index() ) );
294  MatrixIterator melem( A.begin( velem->index() ) );
295 
296  for( ; melem!=mend; ++melem ) {
297  if( isDefault( (~lhs)[melem->index()] ) )
298  (~lhs)[melem->index()] = melem->value() * velem->value();
299  else
300  (~lhs)[melem->index()] += melem->value() * velem->value();
301  }
302  }
303  }
305  //**********************************************************************************************
306 
307  //**Optimized assignment to dense vectors*******************************************************
321  template< typename VT1 > // Type of the target dense vector
322  friend inline typename DisableIf< IsResizable<typename VT1::ElementType> >::Type
324  {
326 
327  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
328 
329  typedef typename RemoveReference<LT>::Type::ConstIterator MatrixIterator;
330  typedef typename RemoveReference<RT>::Type::ConstIterator VectorIterator;
331 
332  // Resetting the left-hand side target dense vector
333  reset( ~lhs );
334 
335  // Evaluation of the right-hand side sparse vector operand
336  RT x( rhs.vec_ );
337  if( x.nonZeros() == 0UL ) return;
338 
339  // Evaluation of the left-hand side sparse matrix operand
340  LT A( rhs.mat_ );
341 
342  // Checking the evaluated operators
343  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
344  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
345  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
346  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).size() , "Invalid vector size" );
347 
348  // Performing the transpose sparse matrix-sparse vector multiplication
349  const VectorIterator vend ( x.end() );
350  VectorIterator velem( x.begin() );
351 
352  for( ; velem!=vend; ++velem )
353  {
354  const MatrixIterator mend ( A.end( velem->index() ) );
355  MatrixIterator melem( A.begin( velem->index() ) );
356 
357  for( ; melem!=mend; ++melem ) {
358  (~lhs)[melem->index()] += melem->value() * velem->value();
359  }
360  }
361  }
363  //**********************************************************************************************
364 
365  //**Assignment to sparse vectors****************************************************************
377  template< typename VT1 > // Type of the target sparse vector
378  friend inline void assign( SparseVector<VT1,false>& lhs, const TSMatSVecMultExpr& rhs )
379  {
381 
382  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
383 
384  typedef typename RemoveReference<LT>::Type::ConstIterator MatrixIterator;
385  typedef typename RemoveReference<RT>::Type::ConstIterator VectorIterator;
386 
387  RT x( rhs.vec_ ); // Evaluation of the right-hand side sparse vector operand
388  if( x.nonZeros() == 0UL ) return;
389 
390  LT A( rhs.mat_ ); // Evaluation of the left-hand side sparse matrix operand
391 
392  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
393  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
394  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
395  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).size() , "Invalid vector size" );
396 
397  DynamicVector<ElementType> tmp( (~lhs).size() );
398  std::vector<bool> indices( (~lhs).size(), false );
399  size_t nonzeros( 0UL );
400 
401  const VectorIterator vend ( x.end() );
402  VectorIterator velem( x.begin() );
403 
404  for( ; velem!=vend; ++velem )
405  {
406  const MatrixIterator mend ( A.end( velem->index() ) );
407  MatrixIterator melem( A.begin( velem->index() ) );
408 
409  for( ; melem!=mend; ++melem ) {
410  if( !indices[melem->index()] ) {
411  indices[melem->index()] = true;
412  ++nonzeros;
413  tmp[melem->index()] = melem->value() * velem->value();
414  }
415  else {
416  tmp[melem->index()] += melem->value() * velem->value();
417  }
418  }
419  }
420 
421  (~lhs).reserve( nonzeros );
422 
423  for( size_t i=0UL; i<(~lhs).size(); ++i ) {
424  if( indices[i] ) {
425  (~lhs).append( i, tmp[i] );
426  }
427  }
428  }
430  //**********************************************************************************************
431 
432  //**Addition assignment to dense vectors********************************************************
445  template< typename VT1 > // Type of the target dense vector
446  friend inline void addAssign( DenseVector<VT1,false>& lhs, const TSMatSVecMultExpr& rhs )
447  {
449 
450  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
451 
452  typedef typename RemoveReference<LT>::Type::ConstIterator MatrixIterator;
453  typedef typename RemoveReference<RT>::Type::ConstIterator VectorIterator;
454 
455  // Evaluation of the right-hand side sparse vector operand
456  RT x( rhs.vec_ );
457  if( x.nonZeros() == 0UL ) return;
458 
459  // Evaluation of the left-hand side sparse matrix operand
460  LT A( rhs.mat_ );
461 
462  // Checking the evaluated operators
463  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
464  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
465  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
466  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).size() , "Invalid vector size" );
467 
468  // Performing the transpose sparse matrix-sparse vector multiplication
469  const VectorIterator vend ( x.end() );
470  VectorIterator velem( x.begin() );
471 
472  for( ; velem!=vend; ++velem )
473  {
474  const MatrixIterator mend ( A.end( velem->index() ) );
475  MatrixIterator melem( A.begin( velem->index() ) );
476 
477  for( ; melem!=mend; ++melem ) {
478  (~lhs)[melem->index()] += melem->value() * velem->value();
479  }
480  }
481  }
483  //**********************************************************************************************
484 
485  //**Addition assignment to sparse vectors*******************************************************
486  // No special implementation for the addition assignment to sparse vectors.
487  //**********************************************************************************************
488 
489  //**Subtraction assignment to dense vectors*****************************************************
502  template< typename VT1 > // Type of the target dense vector
503  friend inline void subAssign( DenseVector<VT1,false>& lhs, const TSMatSVecMultExpr& rhs )
504  {
506 
507  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
508 
509  typedef typename RemoveReference<LT>::Type::ConstIterator MatrixIterator;
510  typedef typename RemoveReference<RT>::Type::ConstIterator VectorIterator;
511 
512  // Evaluation of the right-hand side sparse vector operand
513  RT x( rhs.vec_ );
514  if( x.nonZeros() == 0UL ) return;
515 
516  // Evaluation of the left-hand side sparse matrix operand
517  LT A( rhs.mat_ );
518 
519  // Checking the evaluated operators
520  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.mat_.rows() , "Invalid number of rows" );
521  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.mat_.columns(), "Invalid number of columns" );
522  BLAZE_INTERNAL_ASSERT( x.size() == rhs.vec_.size() , "Invalid vector size" );
523  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).size() , "Invalid vector size" );
524 
525  // Performing the transpose sparse matrix-sparse vector multiplication
526  const VectorIterator vend ( x.end() );
527  VectorIterator velem( x.begin() );
528 
529  for( ; velem!=vend; ++velem )
530  {
531  const MatrixIterator mend ( A.end( velem->index() ) );
532  MatrixIterator melem( A.begin( velem->index() ) );
533 
534  for( ; melem!=mend; ++melem ) {
535  (~lhs)[melem->index()] -= melem->value() * velem->value();
536  }
537  }
538  }
540  //**********************************************************************************************
541 
542  //**Subtraction assignment to sparse vectors****************************************************
543  // No special implementation for the subtraction assignment to sparse vectors.
544  //**********************************************************************************************
545 
546  //**Multiplication assignment to dense vectors**************************************************
559  template< typename VT1 > // Type of the target dense vector
560  friend inline void multAssign( DenseVector<VT1,false>& lhs, const TSMatSVecMultExpr& rhs )
561  {
563 
567 
568  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
569 
570  const ResultType tmp( rhs );
571  multAssign( ~lhs, tmp );
572  }
574  //**********************************************************************************************
575 
576  //**Multiplication assignment to sparse vectors*************************************************
577  // No special implementation for the multiplication assignment to sparse vectors.
578  //**********************************************************************************************
579 
580  //**Compile time checks*************************************************************************
587  //**********************************************************************************************
588 };
589 //*************************************************************************************************
590 
591 
592 
593 
594 //=================================================================================================
595 //
596 // GLOBAL BINARY ARITHMETIC OPERATORS
597 //
598 //=================================================================================================
599 
600 //*************************************************************************************************
631 template< typename T1 // Type of the left-hand side sparse matrix
632  , typename T2 > // Type of the right-hand side sparse vector
633 inline const typename DisableIf< IsMatMatMultExpr<T1>, TSMatSVecMultExpr<T1,T2> >::Type
635 {
637 
638  if( (~mat).columns() != (~vec).size() )
639  throw std::invalid_argument( "Matrix and vector sizes do not match" );
640 
641  return TSMatSVecMultExpr<T1,T2>( ~mat, ~vec );
642 }
643 //*************************************************************************************************
644 
645 
646 
647 
648 //=================================================================================================
649 //
650 // EXPRESSION TRAIT SPECIALIZATIONS
651 //
652 //=================================================================================================
653 
654 //*************************************************************************************************
656 template< typename MT, typename VT >
657 struct SubvectorExprTrait< TSMatSVecMultExpr<MT,VT> >
658 {
659  public:
660  //**********************************************************************************************
661  typedef typename MultExprTrait< typename SubmatrixExprTrait<const MT>::Type, VT >::Type Type;
662  //**********************************************************************************************
663 };
665 //*************************************************************************************************
666 
667 } // namespace blaze
668 
669 #endif
VT::CompositeType VCT
Composite type of the right-hand side sparse vector expression.
Definition: TSMatSVecMultExpr.h:97
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4512
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
size_t nonZeros() const
Returns an estimation for the number of non-zero elements in the sparse vector.
Definition: TSMatSVecMultExpr.h:191
Header file for the SparseVector base class.
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type LeftOperand
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatSVecMultExpr.h:112
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: TransposeFlag.h:159
const ResultType CompositeType
Data type for composite expression templates.
Definition: TSMatSVecMultExpr.h:109
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4555
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: TSMatSVecMultExpr.h:235
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:248
size_t size() const
Returns the current size/dimension of the vector.
Definition: TSMatSVecMultExpr.h:181
Header file for the Computation base class.
MCT LT
Type for the assignment of the left-hand side sparse matrix operand.
Definition: TSMatSVecMultExpr.h:118
Header file for the RequiresEvaluation type trait.
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: TSMatSVecMultExpr.h:115
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.
MT::ResultType MRT
Result type of the left-hand side sparse matrix expression.
Definition: TSMatSVecMultExpr.h:94
Constraint on the data type.
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.
Expression object for sparse matrix-sparse vector multiplications.The TSMatSVecMultExpr class represe...
Definition: Forward.h:138
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: StorageOrder.h:161
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
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
ResultType::ElementType ElementType
Resulting element type.
Definition: TSMatSVecMultExpr.h:105
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.
SelectType< IsComputation< VT >::value, const VRT, VCT >::Type RT
Type for the assignment of the right-hand side sparse vector operand.
Definition: TSMatSVecMultExpr.h:121
LeftOperand leftOperand() const
Returns the left-hand side transpose sparse matrix operand.
Definition: TSMatSVecMultExpr.h:201
#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
TSMatSVecMultExpr< MT, VT > This
Type of this TSMatSVecMultExpr instance.
Definition: TSMatSVecMultExpr.h:102
LeftOperand mat_
Left-hand side sparse matrix of the multiplication expression.
Definition: TSMatSVecMultExpr.h:242
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: TSMatSVecMultExpr.h:223
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.
Header file for the complete DynamicVector implementation.
Header file for the EnableIf class template.
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.
RightOperand vec_
Right-hand side sparse vector of the multiplication expression.
Definition: TSMatSVecMultExpr.h:243
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
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
Header file for the isDefault shim.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: TSMatSVecMultExpr.h:144
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
const ElementType ReturnType
Return type for expression template evaluations.
Definition: TSMatSVecMultExpr.h:106
VT::ResultType VRT
Result type of the right-hand side sparse vector expression.
Definition: TSMatSVecMultExpr.h:95
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: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
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: TSMatSVecMultExpr.h:104
size_t columns(const Matrix< MT, SO > &m)
Returns the current number of columns of the matrix.
Definition: Matrix.h:154
MultTrait< MRT, VRT >::Type ResultType
Result type for expression template evaluations.
Definition: TSMatSVecMultExpr.h:103
Header file for basic type definitions.
TSMatSVecMultExpr(const MT &mat, const VT &vec)
Constructor for the TSMatSVecMultExpr class.
Definition: TSMatSVecMultExpr.h:130
RightOperand rightOperand() const
Returns the right-hand side sparse vector operand.
Definition: TSMatSVecMultExpr.h:211
Header file for the MatVecMultExpr base class.
Header file for the IsResizable type trait.
#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
MT::CompositeType MCT
Composite type of the left-hand side sparse matrix expression.
Definition: TSMatSVecMultExpr.h:96
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.