All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SMatAbsExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATABSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SMATABSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <cmath>
44 #include <iterator>
65 #include <blaze/util/Assert.h>
67 #include <blaze/util/EnableIf.h>
68 #include <blaze/util/InvalidType.h>
70 #include <blaze/util/SelectType.h>
71 #include <blaze/util/Types.h>
73 
74 
75 namespace blaze {
76 
77 //=================================================================================================
78 //
79 // CLASS SMATABSEXPR
80 //
81 //=================================================================================================
82 
83 //*************************************************************************************************
90 template< typename MT // Type of the sparse matrix
91  , bool SO > // Storage order
92 class SMatAbsExpr : public SparseMatrix< SMatAbsExpr<MT,SO>, SO >
93  , private MatAbsExpr
94  , private Computation
95 {
96  private:
97  //**Type definitions****************************************************************************
98  typedef typename MT::ResultType RT;
99  typedef typename MT::ReturnType RN;
100  typedef typename MT::CompositeType CT;
101  //**********************************************************************************************
102 
103  //**Return type evaluation**********************************************************************
105 
110  enum { returnExpr = !IsTemporary<RN>::value };
111 
114  //**********************************************************************************************
115 
116  //**Evaluation strategy*************************************************************************
118 
124  enum { useAssign = RequiresEvaluation<MT>::value };
125 
127  template< typename MT2 >
129  struct UseAssign {
130  enum { value = useAssign };
131  };
133  //**********************************************************************************************
134 
135  public:
136  //**Type definitions****************************************************************************
138  typedef typename MT::ResultType ResultType;
139  typedef typename MT::OppositeType OppositeType;
140  typedef typename MT::TransposeType TransposeType;
141  typedef typename MT::ElementType ElementType;
142 
145 
148 
150  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
151  //**********************************************************************************************
152 
153  //**ConstIterator class definition**************************************************************
157  {
158  public:
159  //**Type definitions*************************************************************************
162 
165 
166  typedef std::forward_iterator_tag IteratorCategory;
167  typedef Element ValueType;
171 
172  // STL iterator requirements
178  //*******************************************************************************************
179 
180  //**Constructor******************************************************************************
184  : it_( it ) // Iterator over the elements of the sparse matrix expression
185  {}
186  //*******************************************************************************************
187 
188  //**Prefix increment operator****************************************************************
194  ++it_;
195  return *this;
196  }
197  //*******************************************************************************************
198 
199  //**Element access operator******************************************************************
204  inline const Element operator*() const {
205  using std::abs;
206  return Element( abs( it_->value() ), it_->index() );
207  }
208  //*******************************************************************************************
209 
210  //**Element access operator******************************************************************
215  inline const ConstIterator* operator->() const {
216  return this;
217  }
218  //*******************************************************************************************
219 
220  //**Value function***************************************************************************
225  inline ReturnType value() const {
226  using std::abs;
227  return abs( it_->value() );
228  }
229  //*******************************************************************************************
230 
231  //**Index function***************************************************************************
236  inline size_t index() const {
237  return it_->index();
238  }
239  //*******************************************************************************************
240 
241  //**Equality operator************************************************************************
247  inline bool operator==( const ConstIterator& rhs ) const {
248  return it_ == rhs.it_;
249  }
250  //*******************************************************************************************
251 
252  //**Inequality operator**********************************************************************
258  inline bool operator!=( const ConstIterator& rhs ) const {
259  return it_ != rhs.it_;
260  }
261  //*******************************************************************************************
262 
263  //**Subtraction operator*********************************************************************
269  inline DifferenceType operator-( const ConstIterator& rhs ) const {
270  return it_ - rhs.it_;
271  }
272  //*******************************************************************************************
273 
274  private:
275  //**Member variables*************************************************************************
277  //*******************************************************************************************
278  };
279  //**********************************************************************************************
280 
281  //**Constructor*********************************************************************************
286  explicit inline SMatAbsExpr( const MT& sm )
287  : sm_( sm ) // Sparse matrix of the absolute value expression
288  {}
289  //**********************************************************************************************
290 
291  //**Access operator*****************************************************************************
298  inline ReturnType operator()( size_t i, size_t j ) const {
299  using std::abs;
300  BLAZE_INTERNAL_ASSERT( i < sm_.rows() , "Invalid row access index" );
301  BLAZE_INTERNAL_ASSERT( j < sm_.columns(), "Invalid column access index" );
302  return abs( sm_(i,j) );
303  }
304  //**********************************************************************************************
305 
306  //**Begin function******************************************************************************
312  inline ConstIterator begin( size_t i ) const {
313  return ConstIterator( sm_.begin(i) );
314  }
315  //**********************************************************************************************
316 
317  //**End function********************************************************************************
323  inline ConstIterator end( size_t i ) const {
324  return ConstIterator( sm_.end(i) );
325  }
326  //**********************************************************************************************
327 
328  //**Rows function*******************************************************************************
333  inline size_t rows() const {
334  return sm_.rows();
335  }
336  //**********************************************************************************************
337 
338  //**Columns function****************************************************************************
343  inline size_t columns() const {
344  return sm_.columns();
345  }
346  //**********************************************************************************************
347 
348  //**NonZeros function***************************************************************************
353  inline size_t nonZeros() const {
354  return sm_.nonZeros();
355  }
356  //**********************************************************************************************
357 
358  //**NonZeros function***************************************************************************
364  inline size_t nonZeros( size_t i ) const {
365  return sm_.nonZeros(i);
366  }
367  //**********************************************************************************************
368 
369  //**Operand access******************************************************************************
374  inline Operand operand() const {
375  return sm_;
376  }
377  //**********************************************************************************************
378 
379  //**********************************************************************************************
385  template< typename T >
386  inline bool canAlias( const T* alias ) const {
387  return sm_.canAlias( alias );
388  }
389  //**********************************************************************************************
390 
391  //**********************************************************************************************
397  template< typename T >
398  inline bool isAliased( const T* alias ) const {
399  return sm_.isAliased( alias );
400  }
401  //**********************************************************************************************
402 
403  private:
404  //**Member variables****************************************************************************
406  //**********************************************************************************************
407 
408  //**Assignment to dense matrices****************************************************************
422  template< typename MT2 // Type of the target dense matrix
423  , bool SO2 > // Storage order of the target dense matrix
424  friend inline typename EnableIf< UseAssign<MT2> >::Type
425  assign( DenseMatrix<MT2,SO2>& lhs, const SMatAbsExpr& rhs )
426  {
428 
429  using std::abs;
430 
431  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
432  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
433 
434  assign( ~lhs, rhs.sm_ );
435 
436  const size_t m( rhs.rows() );
437  const size_t n( rhs.columns() );
438 
439  for( size_t i=0UL; i<m; ++i ) {
440  for( size_t j=0UL; j<n; ++j ) {
441  (~lhs)(i,j) = abs( (~lhs)(i,j) );
442  }
443  }
444  }
446  //**********************************************************************************************
447 
448  //**Assignment to row-major sparse matrices*****************************************************
462  template< typename MT2 > // Type of the target sparse matrix
463  friend inline typename EnableIf< UseAssign<MT2> >::Type
464  assign( SparseMatrix<MT2,false>& lhs, const SMatAbsExpr& rhs )
465  {
467 
468  using std::abs;
469 
470  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
471  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
472 
473  typedef typename MT2::Iterator Iterator;
474 
475  assign( ~lhs, rhs.sm_ );
476 
477  const size_t m( rhs.rows() );
478 
479  for( size_t i=0UL; i<m; ++i ) {
480  const Iterator end( (~lhs).end(i) );
481  for( Iterator element=(~lhs).begin(i); element!=end; ++element ) {
482  element->value() = abs( element->value() );
483  }
484  }
485  }
487  //**********************************************************************************************
488 
489  //**Assignment to column-major sparse matrices**************************************************
503  template< typename MT2 > // Type of the target sparse matrix
504  friend inline typename EnableIf< UseAssign<MT2> >::Type
505  assign( SparseMatrix<MT2,true>& lhs, const SMatAbsExpr& rhs )
506  {
508 
509  using std::abs;
510 
511  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
512  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
513 
514  typedef typename MT2::Iterator Iterator;
515 
516  assign( ~lhs, rhs.sm_ );
517 
518  const size_t n( rhs.columns() );
519 
520  for( size_t j=0UL; j<n; ++j ) {
521  const Iterator end( (~lhs).end(j) );
522  for( Iterator element=(~lhs).begin(j); element!=end; ++element ) {
523  element->value() = abs( element->value() );
524  }
525  }
526  }
528  //**********************************************************************************************
529 
530  //**Addition assignment to dense matrices*******************************************************
544  template< typename MT2 // Type of the target dense matrix
545  , bool SO2 > // Storage order of the target dense matrix
546  friend inline typename EnableIf< UseAssign<MT2> >::Type
547  addAssign( DenseMatrix<MT2,SO2>& lhs, const SMatAbsExpr& rhs )
548  {
550 
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  const ResultType tmp( rhs );
558  addAssign( ~lhs, tmp );
559  }
561  //**********************************************************************************************
562 
563  //**Addition assignment to sparse matrices******************************************************
564  // No special implementation for the addition assignment to sparse matrices.
565  //**********************************************************************************************
566 
567  //**Subtraction assignment to dense matrices****************************************************
581  template< typename MT2 // Type of the target dense matrix
582  , bool SO2 > // Storage order of the target sparse matrix
583  friend inline typename EnableIf< UseAssign<MT2> >::Type
584  subAssign( DenseMatrix<MT2,SO2>& lhs, const SMatAbsExpr& rhs )
585  {
587 
590 
591  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
592  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
593 
594  const ResultType tmp( rhs );
595  subAssign( ~lhs, tmp );
596  }
598  //**********************************************************************************************
599 
600  //**Subtraction assignment to sparse matrices***************************************************
601  // No special implementation for the subtraction assignment to sparse matrices.
602  //**********************************************************************************************
603 
604  //**Multiplication assignment to dense matrices*************************************************
605  // No special implementation for the multiplication assignment to dense matrices.
606  //**********************************************************************************************
607 
608  //**Multiplication assignment to sparse matrices************************************************
609  // No special implementation for the multiplication assignment to sparse matrices.
610  //**********************************************************************************************
611 
612  //**Compile time checks*************************************************************************
617  //**********************************************************************************************
618 };
619 //*************************************************************************************************
620 
621 
622 
623 
624 //=================================================================================================
625 //
626 // GLOBAL FUNCTIONS
627 //
628 //=================================================================================================
629 
630 //*************************************************************************************************
647 template< typename MT // Type of the sparse matrix
648  , bool SO > // Storage order
649 inline const SMatAbsExpr<MT,SO> abs( const SparseMatrix<MT,SO>& sm )
650 {
652 
653  return SMatAbsExpr<MT,SO>( ~sm );
654 }
655 //*************************************************************************************************
656 
657 
658 
659 
660 //=================================================================================================
661 //
662 // GLOBAL RESTRUCTURING FUNCTIONS
663 //
664 //=================================================================================================
665 
666 //*************************************************************************************************
677 template< typename MT // Type of the sparse matrix
678  , bool TF > // Transpose flag
679 inline const SMatAbsExpr<MT,TF>& abs( const SMatAbsExpr<MT,TF>& sm )
680 {
682 
683  return sm;
684 }
686 //*************************************************************************************************
687 
688 
689 
690 
691 //=================================================================================================
692 //
693 // EXPRESSION TRAIT SPECIALIZATIONS
694 //
695 //=================================================================================================
696 
697 //*************************************************************************************************
699 template< typename MT >
700 struct SMatAbsExprTrait< SMatAbsExpr<MT,false> >
701 {
702  public:
703  //**********************************************************************************************
704  typedef typename SelectType< IsSparseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
705  , SMatAbsExpr<MT,false>
706  , INVALID_TYPE >::Type Type;
707  //**********************************************************************************************
708 };
710 //*************************************************************************************************
711 
712 
713 //*************************************************************************************************
715 template< typename MT >
716 struct TSMatAbsExprTrait< SMatAbsExpr<MT,true> >
717 {
718  public:
719  //**********************************************************************************************
720  typedef typename SelectType< IsSparseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
721  , SMatAbsExpr<MT,true>
722  , INVALID_TYPE >::Type Type;
723  //**********************************************************************************************
724 };
726 //*************************************************************************************************
727 
728 
729 //*************************************************************************************************
731 template< typename MT, bool SO >
732 struct SubmatrixExprTrait< SMatAbsExpr<MT,SO> >
733 {
734  public:
735  //**********************************************************************************************
736  typedef typename AbsExprTrait< typename SubmatrixExprTrait<const MT>::Type >::Type Type;
737  //**********************************************************************************************
738 };
740 //*************************************************************************************************
741 
742 
743 //*************************************************************************************************
745 template< typename MT, bool SO >
746 struct RowExprTrait< SMatAbsExpr<MT,SO> >
747 {
748  public:
749  //**********************************************************************************************
750  typedef typename AbsExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
751  //**********************************************************************************************
752 };
754 //*************************************************************************************************
755 
756 
757 //*************************************************************************************************
759 template< typename MT, bool SO >
760 struct ColumnExprTrait< SMatAbsExpr<MT,SO> >
761 {
762  public:
763  //**********************************************************************************************
764  typedef typename AbsExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
765  //**********************************************************************************************
766 };
768 //*************************************************************************************************
769 
770 } // namespace blaze
771 
772 #endif
IteratorCategory iterator_category
The iterator category.
Definition: SMatAbsExpr.h:173
Pointer difference type of the Blaze library.
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: SMatAbsExpr.h:138
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SMatAbsExpr.h:144
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SMatAbsExpr.h:170
ReferenceType reference
Reference return type.
Definition: SMatAbsExpr.h:176
RemoveReference< Operand >::Type::ConstIterator IteratorType
Iterator type of the sparse matrix expression.
Definition: SMatAbsExpr.h:164
PointerType pointer
Pointer return type.
Definition: SMatAbsExpr.h:175
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatAbsExpr.h:139
#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:242
ReturnType value() const
Access to the current value of the sparse element.
Definition: SMatAbsExpr.h:225
Header file for the ColumnExprTrait class template.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
Header file for the IsRowVector type trait.
const DMatAbsExpr< MT, SO > abs(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the absolute values of each single element of dm.
Definition: DMatAbsExpr.h:739
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: SMatAbsExpr.h:312
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SMatAbsExpr.h:398
ValueType & ReferenceType
Reference return type.
Definition: SMatAbsExpr.h:169
MT::ElementType ElementType
Resulting element type.
Definition: SMatAbsExpr.h:141
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2371
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
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.
Operand operand() const
Returns the sparse matrix operand.
Definition: SMatAbsExpr.h:374
Header file for the SparseMatrix base class.
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: SMatAbsExpr.h:364
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: SMatAbsExpr.h:183
Constraint on the data type.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:250
Header file for the ValueIndexPair class.
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 IsTemporary type trait class.
Element ValueType
Type of the underlying pointers.
Definition: SMatAbsExpr.h:167
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SMatAbsExpr.h:258
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatAbsExpr.h:298
ValueType * PointerType
Pointer return type.
Definition: SMatAbsExpr.h:168
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
size_t index() const
Access to the current index of the sparse element.
Definition: SMatAbsExpr.h:236
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
SMatAbsExpr(const MT &sm)
Constructor for the SMatAbsExpr class.
Definition: SMatAbsExpr.h:286
Header file for the MatAbsExpr base class.
Iterator over the elements of the sparse matrix absolute value expression.
Definition: SMatAbsExpr.h:156
#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
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2372
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SMatAbsExpr.h:247
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatAbsExpr.h:215
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatAbsExpr.h:204
Header file for the EnableIf class template.
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SMatAbsExpr.h:140
Header file for the TSMatAbsExprTrait class template.
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SMatAbsExpr.h:353
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SMatAbsExpr.h:386
Header file for the IsSparseVector type trait.
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
size_t rows() const
Returns the current number of rows of the matrix.
Definition: SMatAbsExpr.h:333
Header file for run time assertion macros.
Utility type for generic codes.
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
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 RemoveReference type trait.
IteratorType it_
Iterator over the elements of the sparse matrix expression.
Definition: SMatAbsExpr.h:276
ConstIterator & operator++()
Pre-increment operator.
Definition: SMatAbsExpr.h:193
Header file for the SMatAbsExprTrait class template.
SelectType< useAssign, const ResultType, const SMatAbsExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: SMatAbsExpr.h:147
MT::ResultType RT
Result type of the sparse matrix expression.
Definition: SMatAbsExpr.h:98
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: SMatAbsExpr.h:323
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SMatAbsExpr.h:166
ValueType value_type
Type of the underlying pointers.
Definition: SMatAbsExpr.h:174
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:69
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: SMatAbsExpr.h:161
AbsExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SMatAbsExpr.h:113
Header file for the IsComputation type trait class.
DifferenceType difference_type
Difference between two iterators.
Definition: SMatAbsExpr.h:177
MT::CompositeType CT
Composite type of the sparse matrix expression.
Definition: SMatAbsExpr.h:100
#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.
Expression object for the sparse matrix abs() function.The SMatAbsExpr class represents the compile t...
Definition: Forward.h:86
MT::ReturnType RN
Return type of the sparse matrix expression.
Definition: SMatAbsExpr.h:99
Header file for the AbsExprTrait class template.
Header file for the IsColumnVector type trait.
Operand sm_
Sparse matrix of the absolute value expression.
Definition: SMatAbsExpr.h:405
Evaluation of the return type of an absolute value expression.Via this type trait it is possible to e...
Definition: AbsExprTrait.h:86
size_t columns() const
Returns the current number of columns of the matrix.
Definition: SMatAbsExpr.h:343
#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
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SMatAbsExpr.h:269
#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
SMatAbsExpr< MT, SO > This
Type of this SMatAbsExpr instance.
Definition: SMatAbsExpr.h:137
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the sparse matrix expression.
Definition: SMatAbsExpr.h:150
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.