All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMatAbsExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATABSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATABSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <cmath>
50 #include <blaze/math/Intrinsics.h>
64 #include <blaze/util/Assert.h>
66 #include <blaze/util/EnableIf.h>
67 #include <blaze/util/InvalidType.h>
69 #include <blaze/util/SelectType.h>
70 #include <blaze/util/Types.h>
71 
72 
73 namespace blaze {
74 
75 //=================================================================================================
76 //
77 // CLASS DMATABSEXPR
78 //
79 //=================================================================================================
80 
81 //*************************************************************************************************
88 template< typename MT // Type of the dense matrix
89  , bool SO > // Storage order
90 class DMatAbsExpr : public DenseMatrix< DMatAbsExpr<MT,SO>, SO >
91  , private MatAbsExpr
92  , private Computation
93 {
94  private:
95  //**Type definitions****************************************************************************
96  typedef typename MT::ReturnType RN;
97  typedef typename MT::ElementType ET;
98  //**********************************************************************************************
99 
100  //**Return type evaluation**********************************************************************
102 
107  enum { returnExpr = !IsTemporary<RN>::value };
108 
111  //**********************************************************************************************
112 
113  //**Evaluation strategy*************************************************************************
115 
121  enum { useAssign = RequiresEvaluation<MT>::value };
122 
124  template< typename MT2 >
126  struct UseAssign {
127  enum { value = useAssign };
128  };
130  //**********************************************************************************************
131 
132  public:
133  //**Type definitions****************************************************************************
135  typedef typename MT::ResultType ResultType;
136  typedef typename MT::OppositeType OppositeType;
137  typedef typename MT::TransposeType TransposeType;
138  typedef typename MT::ElementType ElementType;
140 
143 
146 
148  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
149  //**********************************************************************************************
150 
151  //**ConstIterator class definition**************************************************************
155  {
156  public:
157  //**Type definitions*************************************************************************
158  typedef std::random_access_iterator_tag IteratorCategory;
163 
164  // STL iterator requirements
170 
172  typedef typename MT::ConstIterator IteratorType;
173  //*******************************************************************************************
174 
175  //**Constructor******************************************************************************
180  explicit inline ConstIterator( IteratorType it )
181  : it_( it ) // Iterator to the current matrix element
182  {}
183  //*******************************************************************************************
184 
185  //**Addition assignment operator*************************************************************
191  inline ConstIterator& operator+=( size_t inc ) {
192  it_ += inc;
193  return *this;
194  }
195  //*******************************************************************************************
196 
197  //**Subtraction assignment operator**********************************************************
203  inline ConstIterator& operator-=( size_t dec ) {
204  it_ -= dec;
205  return *this;
206  }
207  //*******************************************************************************************
208 
209  //**Prefix increment operator****************************************************************
215  ++it_;
216  return *this;
217  }
218  //*******************************************************************************************
219 
220  //**Postfix increment operator***************************************************************
225  inline const ConstIterator operator++( int ) {
226  return ConstIterator( it_++ );
227  }
228  //*******************************************************************************************
229 
230  //**Prefix decrement operator****************************************************************
236  --it_;
237  return *this;
238  }
239  //*******************************************************************************************
240 
241  //**Postfix decrement operator***************************************************************
246  inline const ConstIterator operator--( int ) {
247  return ConstIterator( it_-- );
248  }
249  //*******************************************************************************************
250 
251  //**Element access operator******************************************************************
256  inline ReturnType operator*() const {
257  using std::abs;
258  return abs( *it_ );
259  }
260  //*******************************************************************************************
261 
262  //**Load function****************************************************************************
267  inline IntrinsicType load() const {
268  return abs( it_.load() );
269  }
270  //*******************************************************************************************
271 
272  //**Equality operator************************************************************************
278  inline bool operator==( const ConstIterator& rhs ) const {
279  return it_ == rhs.it_;
280  }
281  //*******************************************************************************************
282 
283  //**Inequality operator**********************************************************************
289  inline bool operator!=( const ConstIterator& rhs ) const {
290  return it_ != rhs.it_;
291  }
292  //*******************************************************************************************
293 
294  //**Less-than operator***********************************************************************
300  inline bool operator<( const ConstIterator& rhs ) const {
301  return it_ < rhs.it_;
302  }
303  //*******************************************************************************************
304 
305  //**Greater-than operator********************************************************************
311  inline bool operator>( const ConstIterator& rhs ) const {
312  return it_ > rhs.it_;
313  }
314  //*******************************************************************************************
315 
316  //**Less-or-equal-than operator**************************************************************
322  inline bool operator<=( const ConstIterator& rhs ) const {
323  return it_ <= rhs.it_;
324  }
325  //*******************************************************************************************
326 
327  //**Greater-or-equal-than operator***********************************************************
333  inline bool operator>=( const ConstIterator& rhs ) const {
334  return it_ >= rhs.it_;
335  }
336  //*******************************************************************************************
337 
338  //**Subtraction operator*********************************************************************
344  inline DifferenceType operator-( const ConstIterator& rhs ) const {
345  return it_ - rhs.it_;
346  }
347  //*******************************************************************************************
348 
349  //**Addition operator************************************************************************
356  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
357  return ConstIterator( it.it_ + inc );
358  }
359  //*******************************************************************************************
360 
361  //**Addition operator************************************************************************
368  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
369  return ConstIterator( it.it_ + inc );
370  }
371  //*******************************************************************************************
372 
373  //**Subtraction operator*********************************************************************
380  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
381  return ConstIterator( it.it_ - dec );
382  }
383  //*******************************************************************************************
384 
385  private:
386  //**Member variables*************************************************************************
388  //*******************************************************************************************
389  };
390  //**********************************************************************************************
391 
392  //**Compilation flags***************************************************************************
394  enum { vectorizable = MT::vectorizable &&
396  //**********************************************************************************************
397 
398  //**Constructor*********************************************************************************
403  explicit inline DMatAbsExpr( const MT& dm )
404  : dm_( dm ) // Dense matrix of the absolute value expression
405  {}
406  //**********************************************************************************************
407 
408  //**Access operator*****************************************************************************
415  inline ReturnType operator()( size_t i, size_t j ) const {
416  using std::abs;
417  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
418  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
419  return abs( dm_(i,j) );
420  }
421  //**********************************************************************************************
422 
423  //**Load function*******************************************************************************
430  inline IntrinsicType load( size_t i, size_t j ) const {
431  typedef IntrinsicTrait<ElementType> IT;
432  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
433  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
434  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
435  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
436  return abs( dm_.load(i,j) );
437  }
438  //**********************************************************************************************
439 
440  //**Begin function******************************************************************************
446  inline ConstIterator begin( size_t i ) const {
447  return ConstIterator( dm_.begin(i) );
448  }
449  //**********************************************************************************************
450 
451  //**End function********************************************************************************
457  inline ConstIterator end( size_t i ) const {
458  return ConstIterator( dm_.end(i) );
459  }
460  //**********************************************************************************************
461 
462  //**Rows function*******************************************************************************
467  inline size_t rows() const {
468  return dm_.rows();
469  }
470  //**********************************************************************************************
471 
472  //**Columns function****************************************************************************
477  inline size_t columns() const {
478  return dm_.columns();
479  }
480  //**********************************************************************************************
481 
482  //**Operand access******************************************************************************
487  inline Operand operand() const {
488  return dm_;
489  }
490  //**********************************************************************************************
491 
492  //**********************************************************************************************
498  template< typename T >
499  inline bool canAlias( const T* alias ) const {
500  return IsComputation<MT>::value && dm_.canAlias( alias );
501  }
502  //**********************************************************************************************
503 
504  //**********************************************************************************************
510  template< typename T >
511  inline bool isAliased( const T* alias ) const {
512  return dm_.isAliased( alias );
513  }
514  //**********************************************************************************************
515 
516  private:
517  //**Member variables****************************************************************************
519  //**********************************************************************************************
520 
521  //**Assignment to dense matrices****************************************************************
535  template< typename MT2 > // Type of the target dense matrix
536  friend inline typename EnableIf< UseAssign<MT2> >::Type
537  assign( DenseMatrix<MT2,false>& lhs, const DMatAbsExpr& rhs )
538  {
540 
541  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
542  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
543 
544  assign( ~lhs, rhs.dm_ );
545  assign( ~lhs, abs( ~lhs ) );
546  }
548  //**********************************************************************************************
549 
550  //**Assignment to dense matrices****************************************************************
564  template< typename MT2 > // Type of the target dense matrix
565  friend inline typename EnableIf< UseAssign<MT2> >::Type
566  assign( DenseMatrix<MT2,true>& lhs, const DMatAbsExpr& rhs )
567  {
569 
570  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
571  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
572 
573  assign( ~lhs, rhs.dm_ );
574  assign( ~lhs, abs( ~lhs ) );
575  }
577  //**********************************************************************************************
578 
579  //**Assignment to sparse matrices***************************************************************
593  template< typename MT2 // Type of the target sparse matrix
594  , bool SO2 > // Storage order or the target sparse matrix
595  friend inline typename EnableIf< UseAssign<MT2> >::Type
596  assign( SparseMatrix<MT2,SO2>& lhs, const DMatAbsExpr& rhs )
597  {
599 
600  typedef typename SelectType< SO == SO2, ResultType, OppositeType >::Type TmpType;
601 
608 
609  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
610  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
611 
612  const TmpType tmp( rhs );
613  assign( ~lhs, tmp );
614  }
616  //**********************************************************************************************
617 
618  //**Addition assignment to dense matrices*******************************************************
632  template< typename MT2 // Type of the target dense matrix
633  , bool SO2 > // Storage order of the target dense matrix
634  friend inline typename EnableIf< UseAssign<MT2> >::Type
635  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatAbsExpr& rhs )
636  {
638 
642 
643  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
644  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
645 
646  const ResultType tmp( rhs );
647  addAssign( ~lhs, tmp );
648  }
650  //**********************************************************************************************
651 
652  //**Addition assignment to sparse matrices******************************************************
653  // No special implementation for the addition assignment to sparse matrices.
654  //**********************************************************************************************
655 
656  //**Subtraction assignment to dense matrices****************************************************
670  template< typename MT2 // Type of the target dense matrix
671  , bool SO2 > // Storage order of the target dense matrix
672  friend inline typename EnableIf< UseAssign<MT2> >::Type
673  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatAbsExpr& rhs )
674  {
676 
680 
681  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
682  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
683 
684  const ResultType tmp( rhs );
685  subAssign( ~lhs, tmp );
686  }
688  //**********************************************************************************************
689 
690  //**Subtraction assignment to sparse matrices***************************************************
691  // No special implementation for the subtraction assignment to sparse matrices.
692  //**********************************************************************************************
693 
694  //**Multiplication assignment to dense matrices*************************************************
695  // No special implementation for the multiplication assignment to dense matrices.
696  //**********************************************************************************************
697 
698  //**Multiplication assignment to sparse matrices************************************************
699  // No special implementation for the multiplication assignment to sparse matrices.
700  //**********************************************************************************************
701 
702  //**Compile time checks*************************************************************************
707  //**********************************************************************************************
708 };
709 //*************************************************************************************************
710 
711 
712 
713 
714 //=================================================================================================
715 //
716 // GLOBAL FUNCTIONS
717 //
718 //=================================================================================================
719 
720 //*************************************************************************************************
737 template< typename MT // Type of the dense matrix
738  , bool SO > // Storage order
739 inline const DMatAbsExpr<MT,SO> abs( const DenseMatrix<MT,SO>& dm )
740 {
742 
743  return DMatAbsExpr<MT,SO>( ~dm );
744 }
745 //*************************************************************************************************
746 
747 
748 
749 
750 //=================================================================================================
751 //
752 // GLOBAL RESTRUCTURING FUNCTIONS
753 //
754 //=================================================================================================
755 
756 //*************************************************************************************************
767 template< typename MT // Type of the dense matrix
768  , bool SO > // Storage order
769 inline const DMatAbsExpr<MT,SO>& abs( const DMatAbsExpr<MT,SO>& dm )
770 {
772 
773  return dm;
774 }
776 //*************************************************************************************************
777 
778 
779 
780 
781 //=================================================================================================
782 //
783 // EXPRESSION TRAIT SPECIALIZATIONS
784 //
785 //=================================================================================================
786 
787 //*************************************************************************************************
789 template< typename MT >
790 struct DMatAbsExprTrait< DMatAbsExpr<MT,false> >
791 {
792  public:
793  //**********************************************************************************************
794  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
795  , DMatAbsExpr<MT,false>
796  , INVALID_TYPE >::Type Type;
797  //**********************************************************************************************
798 };
800 //*************************************************************************************************
801 
802 
803 //*************************************************************************************************
805 template< typename MT >
806 struct TDMatAbsExprTrait< DMatAbsExpr<MT,true> >
807 {
808  public:
809  //**********************************************************************************************
810  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
811  , DMatAbsExpr<MT,true>
812  , INVALID_TYPE >::Type Type;
813  //**********************************************************************************************
814 };
816 //*************************************************************************************************
817 
818 
819 //*************************************************************************************************
821 template< typename MT, bool SO >
822 struct SubmatrixExprTrait< DMatAbsExpr<MT,SO> >
823 {
824  public:
825  //**********************************************************************************************
826  typedef typename AbsExprTrait< typename SubmatrixExprTrait<const MT>::Type >::Type Type;
827  //**********************************************************************************************
828 };
830 //*************************************************************************************************
831 
832 
833 //*************************************************************************************************
835 template< typename MT, bool SO >
836 struct RowExprTrait< DMatAbsExpr<MT,SO> >
837 {
838  public:
839  //**********************************************************************************************
840  typedef typename AbsExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
841  //**********************************************************************************************
842 };
844 //*************************************************************************************************
845 
846 
847 //*************************************************************************************************
849 template< typename MT, bool SO >
850 struct ColumnExprTrait< DMatAbsExpr<MT,SO> >
851 {
852  public:
853  //**********************************************************************************************
854  typedef typename AbsExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
855  //**********************************************************************************************
856 };
858 //*************************************************************************************************
859 
860 } // namespace blaze
861 
862 #endif
IntrinsicTrait< ET >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatAbsExpr.h:139
Pointer difference type of the Blaze library.
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatAbsExpr.h:256
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatAbsExpr.h:148
ValueType value_type
Type of the underlying elements.
Definition: DMatAbsExpr.h:166
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:311
IteratorCategory iterator_category
The iterator category.
Definition: DMatAbsExpr.h:165
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatAbsExpr.h:191
#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
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:79
Header file for the ColumnExprTrait class template.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatAbsExpr.h:477
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
Header file for the IsRowVector type trait.
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatAbsExpr.h:137
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
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatAbsExpr.h:380
AbsExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DMatAbsExpr.h:110
Header file for the Computation base class.
SelectType< useAssign, const ResultType, const DMatAbsExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatAbsExpr.h:145
Header file for the RequiresEvaluation type trait.
ElementType * PointerType
Pointer return type.
Definition: DMatAbsExpr.h:160
Operand dm_
Dense matrix of the absolute value expression.
Definition: DMatAbsExpr.h:518
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
Header file for the TDVecAbsExprTrait class template.
PointerType pointer
Pointer return type.
Definition: DMatAbsExpr.h:167
Constraint on the data type.
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DMatAbsExpr.h:142
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:278
Expression object for the dense matrix abs() function.The DMatAbsExpr class represents the compile ti...
Definition: DMatAbsExpr.h:90
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
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatAbsExpr.h:235
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DMatAbsExpr.h:135
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.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
Operand operand() const
Returns the dense matrix operand.
Definition: DMatAbsExpr.h:487
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatAbsExpr.h:415
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:322
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatAbsExpr.h:225
Header file for the DenseMatrix base 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
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatAbsExpr.h:356
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatAbsExpr.h:368
ReferenceType reference
Reference return type.
Definition: DMatAbsExpr.h:168
Header file for the DVecAbsExprTrait class template.
Header file for the MatAbsExpr base class.
DifferenceType difference_type
Difference between two iterators.
Definition: DMatAbsExpr.h:169
#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
ElementType & ReferenceType
Reference return type.
Definition: DMatAbsExpr.h:161
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.
Iterator over the elements of the dense matrix.
Definition: DMatAbsExpr.h:154
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatAbsExpr.h:446
IteratorType it_
Iterator to the current matrix element.
Definition: DMatAbsExpr.h:387
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
Header file for run time assertion macros.
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatAbsExpr.h:267
Utility type for generic codes.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:289
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatAbsExpr.h:511
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
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatAbsExpr.h:467
DMatAbsExpr(const MT &dm)
Constructor for the DMatAbsExpr class.
Definition: DMatAbsExpr.h:403
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
MT::ElementType ET
Element type of the dense matrix expression.
Definition: DMatAbsExpr.h:97
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
ElementType ValueType
Type of the underlying elements.
Definition: DMatAbsExpr.h:159
Base class for all matrix absolute value expression templates.The MatAbsExpr class serves as a tag fo...
Definition: MatAbsExpr.h:65
DMatAbsExpr< MT, SO > This
Type of this DMatAbsExpr instance.
Definition: DMatAbsExpr.h:134
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: DMatAbsExpr.h:180
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatAbsExpr.h:158
IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatAbsExpr.h:430
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatAbsExpr.h:136
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:283
Header file for the IsDenseVector type trait.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatAbsExpr.h:162
Header file for all intrinsic functionality.
MT::ReturnType RN
Return type of the dense matrix expression.
Definition: DMatAbsExpr.h:96
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatAbsExpr.h:214
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatAbsExpr.h:457
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatAbsExpr.h:246
Header file for the IsComputation type trait class.
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:333
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:300
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
#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
MT::ElementType ElementType
Resulting element type.
Definition: DMatAbsExpr.h:138
Header file for basic type definitions.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatAbsExpr.h:203
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatAbsExpr.h:344
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatAbsExpr.h:499
Header file for the AbsExprTrait class template.
Header file for the IsColumnVector type trait.
Evaluation of the return type of an absolute value expression.Via this type trait it is possible to e...
Definition: AbsExprTrait.h:86
#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
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatAbsExpr.h:172