SMatSerialExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATSERIALEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SMATSERIALEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
46 #include <blaze/math/Exception.h>
52 #include <blaze/util/Assert.h>
54 #include <blaze/util/mpl/If.h>
55 #include <blaze/util/Types.h>
56 
57 
58 namespace blaze {
59 
60 //=================================================================================================
61 //
62 // CLASS SMATSERIALEXPR
63 //
64 //=================================================================================================
65 
66 //*************************************************************************************************
73 template< typename MT // Type of the sparse matrix
74  , bool SO > // Storage order
75 class SMatSerialExpr
76  : public MatSerialExpr< SparseMatrix< SMatSerialExpr<MT,SO>, SO > >
77  , private Computation
78 {
79  public:
80  //**Type definitions****************************************************************************
88 
90  using CompositeType = const ResultType;
91 
93  using Operand = If_t< IsExpression_v<MT>, const MT, const MT& >;
94  //**********************************************************************************************
95 
96  //**Compilation flags***************************************************************************
98  static constexpr bool smpAssignable = MT::smpAssignable;
99  //**********************************************************************************************
100 
101  //**Constructor*********************************************************************************
106  explicit inline SMatSerialExpr( const MT& sm ) noexcept
107  : sm_( sm ) // Sparse matrix of the serial evaluation expression
108  {}
109  //**********************************************************************************************
110 
111  //**Access operator*****************************************************************************
118  inline ReturnType operator()( size_t i, size_t j ) const {
119  BLAZE_INTERNAL_ASSERT( i < sm_.rows() , "Invalid row access index" );
120  BLAZE_INTERNAL_ASSERT( j < sm_.columns(), "Invalid column access index" );
121  return sm_(i,j);
122  }
123  //**********************************************************************************************
124 
125  //**At function*********************************************************************************
133  inline ReturnType at( size_t i, size_t j ) const {
134  if( i >= sm_.rows() ) {
135  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
136  }
137  if( j >= sm_.columns() ) {
138  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
139  }
140  return (*this)(i,j);
141  }
142  //**********************************************************************************************
143 
144  //**Rows function*******************************************************************************
149  inline size_t rows() const noexcept {
150  return sm_.rows();
151  }
152  //**********************************************************************************************
153 
154  //**Columns function****************************************************************************
159  inline size_t columns() const noexcept {
160  return sm_.columns();
161  }
162  //**********************************************************************************************
163 
164  //**NonZeros function***************************************************************************
169  inline size_t nonZeros() const {
170  return sm_.nonZeros();
171  }
172  //**********************************************************************************************
173 
174  //**NonZeros function***************************************************************************
180  inline size_t nonZeros( size_t i ) const {
181  return sm_.nonZeros(i);
182  }
183  //**********************************************************************************************
184 
185  //**Operand access******************************************************************************
190  inline Operand operand() const noexcept {
191  return sm_;
192  }
193  //**********************************************************************************************
194 
195  //**Conversion operator*************************************************************************
200  inline operator Operand() const noexcept {
201  return sm_;
202  }
203  //**********************************************************************************************
204 
205  //**********************************************************************************************
211  template< typename T >
212  inline bool canAlias( const T* alias ) const noexcept {
213  return sm_.canAlias( alias );
214  }
215  //**********************************************************************************************
216 
217  //**********************************************************************************************
223  template< typename T >
224  inline bool isAliased( const T* alias ) const noexcept {
225  return sm_.isAliased( alias );
226  }
227  //**********************************************************************************************
228 
229  //**********************************************************************************************
234  inline bool canSMPAssign() const noexcept {
235  return sm_.canSMPAssign();
236  }
237  //**********************************************************************************************
238 
239  private:
240  //**Member variables****************************************************************************
242  //**********************************************************************************************
243 
244  //**Assignment to dense matrices****************************************************************
256  template< typename MT2 // Type of the target dense matrix
257  , bool SO2 > // Storage order of the target dense matrix
258  friend inline void assign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
259  {
261 
262  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
263  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
264 
265  assign( ~lhs, rhs.sm_ );
266  }
268  //**********************************************************************************************
269 
270  //**Assignment to sparse matrices***************************************************************
282  template< typename MT2 // Type of the target sparse matrix
283  , bool SO2 > // Storage order of the target sparse matrix
284  friend inline void assign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
285  {
287 
288  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
289  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
290 
291  assign( ~lhs, rhs.sm_ );
292  }
294  //**********************************************************************************************
295 
296  //**Addition assignment to dense matrices*******************************************************
308  template< typename MT2 // Type of the target dense matrix
309  , bool SO2 > // Storage order of the target dense matrix
310  friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
311  {
313 
314  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
315  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
316 
317  addAssign( ~lhs, rhs.sm_ );
318  }
320  //**********************************************************************************************
321 
322  //**Addition assignment to sparse matrices******************************************************
334  template< typename MT2 // Type of the target sparse matrix
335  , bool SO2 > // Storage order of the target sparse matrix
336  friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
337  {
339 
340  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
341  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
342 
343  addAssign( ~lhs, rhs.sm_ );
344  }
346  //**********************************************************************************************
347 
348  //**Subtraction assignment to dense matrices****************************************************
361  template< typename MT2 // Type of the target dense matrix
362  , bool SO2 > // Storage order of the target dense matrix
363  friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
364  {
366 
367  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
368  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
369 
370  subAssign( ~lhs, rhs.sm_ );
371  }
373  //**********************************************************************************************
374 
375  //**Subtraction assignment to sparse matrices***************************************************
388  template< typename MT2 // Type of the target sparse matrix
389  , bool SO2 > // Storage order of the target sparse matrix
390  friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
391  {
393 
394  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
395  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
396 
397  subAssign( ~lhs, rhs.sm_ );
398  }
400  //**********************************************************************************************
401 
402  //**Schur product assignment to dense matrices**************************************************
415  template< typename MT2 // Type of the target dense matrix
416  , bool SO2 > // Storage order of the target dense matrix
417  friend inline void schurAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
418  {
420 
421  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
422  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
423 
424  schurAssign( ~lhs, rhs.sm_ );
425  }
427  //**********************************************************************************************
428 
429  //**Schur product assignment to sparse matrices*************************************************
442  template< typename MT2 // Type of the target sparse matrix
443  , bool SO2 > // Storage order of the target sparse matrix
444  friend inline void schurAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
445  {
447 
448  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
449  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
450 
451  schurAssign( ~lhs, rhs.sm_ );
452  }
454  //**********************************************************************************************
455 
456  //**Multiplication assignment to dense matrices*************************************************
469  template< typename MT2 // Type of the target dense matrix
470  , bool SO2 > // Storage order of the target dense matrix
471  friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
472  {
474 
475  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
476  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
477 
478  multAssign( ~lhs, rhs.sm_ );
479  }
481  //**********************************************************************************************
482 
483  //**Multiplication assignment to sparse matrices************************************************
496  template< typename MT2 // Type of the target sparse matrix
497  , bool SO2 > // Storage order of the target sparse matrix
498  friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
499  {
501 
502  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
503  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
504 
505  multAssign( ~lhs, rhs.sm_ );
506  }
508  //**********************************************************************************************
509 
510  //**SMP assignment to dense matrices************************************************************
522  template< typename MT2 // Type of the target dense matrix
523  , bool SO2 > // Storage order of the target dense matrix
524  friend inline void smpAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
525  {
527 
528  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
529  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
530 
531  assign( ~lhs, rhs.sm_ );
532  }
534  //**********************************************************************************************
535 
536  //**SMP assignment to sparse matrices***********************************************************
548  template< typename MT2 // Type of the target sparse matrix
549  , bool SO2 > // Storage order of the target sparse matrix
550  friend inline void smpAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
551  {
553 
554  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
555  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
556 
557  assign( ~lhs, rhs.sm_ );
558  }
560  //**********************************************************************************************
561 
562  //**SMP addition assignment to dense matrices***************************************************
575  template< typename MT2 // Type of the target dense matrix
576  , bool SO2 > // Storage order of the target dense matrix
577  friend inline void smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
578  {
580 
581  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
582  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
583 
584  addAssign( ~lhs, rhs.sm_ );
585  }
587  //**********************************************************************************************
588 
589  //**SMP addition assignment to sparse matrices**************************************************
602  template< typename MT2 // Type of the target sparse matrix
603  , bool SO2 > // Storage order of the target sparse matrix
604  friend inline void smpAddAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
605  {
607 
608  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
609  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
610 
611  addAssign( ~lhs, rhs.sm_ );
612  }
614  //**********************************************************************************************
615 
616  //**SMP subtraction assignment to dense matrices************************************************
629  template< typename MT2 // Type of the target dense matrix
630  , bool SO2 > // Storage order of the target dense matrix
631  friend inline void smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
632  {
634 
635  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
636  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
637 
638  subAssign( ~lhs, rhs.sm_ );
639  }
641  //**********************************************************************************************
642 
643  //**SMP subtraction assignment to sparse matrices***********************************************
656  template< typename MT2 // Type of the target sparse matrix
657  , bool SO2 > // Storage order of the target sparse matrix
658  friend inline void smpSubAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
659  {
661 
662  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
663  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
664 
665  subAssign( ~lhs, rhs.sm_ );
666  }
668  //**********************************************************************************************
669 
670  //**SMP Schur product assignment to dense matrices**********************************************
683  template< typename MT2 // Type of the target dense matrix
684  , bool SO2 > // Storage order of the target dense matrix
685  friend inline void smpSchurAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
686  {
688 
689  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
690  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
691 
692  schurAssign( ~lhs, rhs.sm_ );
693  }
695  //**********************************************************************************************
696 
697  //**SMP Schur product assignment to sparse matrices*********************************************
710  template< typename MT2 // Type of the target sparse matrix
711  , bool SO2 > // Storage order of the target sparse matrix
712  friend inline void smpSchurAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
713  {
715 
716  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
717  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
718 
719  schurAssign( ~lhs, rhs.sm_ );
720  }
722  //**********************************************************************************************
723 
724  //**SMP multiplication assignment to dense matrices*********************************************
737  template< typename MT2 // Type of the target dense matrix
738  , bool SO2 > // Storage order of the target dense matrix
739  friend inline void smpMultAssign( DenseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
740  {
742 
743  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
744  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
745 
746  multAssign( ~lhs, rhs.sm_ );
747  }
749  //**********************************************************************************************
750 
751  //**SMP multiplication assignment to sparse matrices********************************************
764  template< typename MT2 // Type of the target sparse matrix
765  , bool SO2 > // Storage order of the target sparse matrix
766  friend inline void smpMultAssign( SparseMatrix<MT2,SO2>& lhs, const SMatSerialExpr& rhs )
767  {
769 
770  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
771  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
772 
773  multAssign( ~lhs, rhs.sm_ );
774  }
776  //**********************************************************************************************
777 
778  //**Compile time checks*************************************************************************
783  //**********************************************************************************************
784 };
785 //*************************************************************************************************
786 
787 
788 
789 
790 //=================================================================================================
791 //
792 // GLOBAL FUNCTIONS
793 //
794 //=================================================================================================
795 
796 //*************************************************************************************************
813 template< typename MT // Type of the sparse matrix
814  , bool SO > // Storage order
815 inline decltype(auto) serial( const SparseMatrix<MT,SO>& sm )
816 {
818 
819  using ReturnType = const SMatSerialExpr<MT,SO>;
820  return ReturnType( ~sm );
821 }
822 //*************************************************************************************************
823 
824 
825 
826 
827 //=================================================================================================
828 //
829 // GLOBAL RESTRUCTURING FUNCTIONS
830 //
831 //=================================================================================================
832 
833 //*************************************************************************************************
844 template< typename MT // Type of the sparse matrix
845  , bool SO > // Storage order
846 inline decltype(auto) serial( const SMatSerialExpr<MT,SO>& sm )
847 {
848  return sm;
849 }
851 //*************************************************************************************************
852 
853 } // namespace blaze
854 
855 #endif
Header file for auxiliary alias declarations.
SMatSerialExpr(const MT &sm) noexcept
Constructor for the SMatSerialExpr class.
Definition: SMatSerialExpr.h:106
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatSerialExpr.h:224
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: SMatSerialExpr.h:85
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:63
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SMatSerialExpr.h:169
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
Header file for the Computation base class.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SMatSerialExpr.h:133
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Header file for the SparseMatrix base class.
ElementType_t< MT > ElementType
Resulting element type.
Definition: SMatSerialExpr.h:86
Constraint on the data type.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Operand operand() const noexcept
Returns the sparse matrix operand.
Definition: SMatSerialExpr.h:190
Header file for the If class template.
#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
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SMatSerialExpr.h:149
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
Header file for all forward declarations for expression class templates.
Header file for the MatSerialExpr base class.
If_t< IsExpression_v< MT >, const MT, const MT &> Operand
Composite data type of the sparse matrix expression.
Definition: SMatSerialExpr.h:93
Operand sm_
Sparse matrix of the serial evaluation expression.
Definition: SMatSerialExpr.h:241
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatSerialExpr.h:84
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SMatSerialExpr.h:234
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatSerialExpr.h:212
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SMatSerialExpr.h:98
#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
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: SMatSerialExpr.h:180
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: SMatSerialExpr.h:83
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
const ResultType CompositeType
Data type for composite expression templates.
Definition: SMatSerialExpr.h:90
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: SMatSerialExpr.h:87
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatSerialExpr.h:118
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SMatSerialExpr.h:159
Expression object for the forced serial evaluation of sparse matrices.The SMatSerialExpr class repres...
Definition: Forward.h:123
#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
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:191
#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:61
Header file for the IsExpression type trait class.
Header file for the function trace functionality.