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>
66 #include <blaze/util/Assert.h>
68 #include <blaze/util/EnableIf.h>
69 #include <blaze/util/InvalidType.h>
71 #include <blaze/util/SelectType.h>
72 #include <blaze/util/Types.h>
73 
74 
75 namespace blaze {
76 
77 //=================================================================================================
78 //
79 // CLASS DMATABSEXPR
80 //
81 //=================================================================================================
82 
83 //*************************************************************************************************
90 template< typename MT // Type of the dense matrix
91  , bool SO > // Storage order
92 class DMatAbsExpr : public DenseMatrix< DMatAbsExpr<MT,SO>, SO >
93  , private MatAbsExpr
94  , private Computation
95 {
96  private:
97  //**Type definitions****************************************************************************
98  typedef typename MT::ReturnType RN;
99  typedef typename MT::ElementType ET;
100  //**********************************************************************************************
101 
102  //**Return type evaluation**********************************************************************
104 
109  enum { returnExpr = !IsTemporary<RN>::value };
110 
113  //**********************************************************************************************
114 
115  //**Evaluation strategy*************************************************************************
117 
123  enum { useAssign = RequiresEvaluation<MT>::value };
124 
126  template< typename MT2 >
128  struct UseAssign {
129  enum { value = useAssign };
130  };
132  //**********************************************************************************************
133 
134  public:
135  //**Type definitions****************************************************************************
137  typedef typename MT::ResultType ResultType;
138  typedef typename MT::OppositeType OppositeType;
139  typedef typename MT::TransposeType TransposeType;
140  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*************************************************************************
160  typedef std::random_access_iterator_tag IteratorCategory;
165 
166  // STL iterator requirements
172 
174  typedef typename MT::ConstIterator IteratorType;
175  //*******************************************************************************************
176 
177  //**Constructor******************************************************************************
182  explicit inline ConstIterator( IteratorType it )
183  : it_( it ) // Iterator to the current matrix element
184  {}
185  //*******************************************************************************************
186 
187  //**Addition assignment operator*************************************************************
193  inline ConstIterator& operator+=( size_t inc ) {
194  it_ += inc;
195  return *this;
196  }
197  //*******************************************************************************************
198 
199  //**Subtraction assignment operator**********************************************************
205  inline ConstIterator& operator-=( size_t dec ) {
206  it_ -= dec;
207  return *this;
208  }
209  //*******************************************************************************************
210 
211  //**Prefix increment operator****************************************************************
217  ++it_;
218  return *this;
219  }
220  //*******************************************************************************************
221 
222  //**Postfix increment operator***************************************************************
227  inline const ConstIterator operator++( int ) {
228  return ConstIterator( it_++ );
229  }
230  //*******************************************************************************************
231 
232  //**Prefix decrement operator****************************************************************
238  --it_;
239  return *this;
240  }
241  //*******************************************************************************************
242 
243  //**Postfix decrement operator***************************************************************
248  inline const ConstIterator operator--( int ) {
249  return ConstIterator( it_-- );
250  }
251  //*******************************************************************************************
252 
253  //**Element access operator******************************************************************
258  inline ReturnType operator*() const {
259  using std::abs;
260  return abs( *it_ );
261  }
262  //*******************************************************************************************
263 
264  //**Load function****************************************************************************
269  inline IntrinsicType load() const {
270  return abs( it_.load() );
271  }
272  //*******************************************************************************************
273 
274  //**Equality operator************************************************************************
280  inline bool operator==( const ConstIterator& rhs ) const {
281  return it_ == rhs.it_;
282  }
283  //*******************************************************************************************
284 
285  //**Inequality operator**********************************************************************
291  inline bool operator!=( const ConstIterator& rhs ) const {
292  return it_ != rhs.it_;
293  }
294  //*******************************************************************************************
295 
296  //**Less-than operator***********************************************************************
302  inline bool operator<( const ConstIterator& rhs ) const {
303  return it_ < rhs.it_;
304  }
305  //*******************************************************************************************
306 
307  //**Greater-than operator********************************************************************
313  inline bool operator>( const ConstIterator& rhs ) const {
314  return it_ > rhs.it_;
315  }
316  //*******************************************************************************************
317 
318  //**Less-or-equal-than operator**************************************************************
324  inline bool operator<=( const ConstIterator& rhs ) const {
325  return it_ <= rhs.it_;
326  }
327  //*******************************************************************************************
328 
329  //**Greater-or-equal-than operator***********************************************************
335  inline bool operator>=( const ConstIterator& rhs ) const {
336  return it_ >= rhs.it_;
337  }
338  //*******************************************************************************************
339 
340  //**Subtraction operator*********************************************************************
346  inline DifferenceType operator-( const ConstIterator& rhs ) const {
347  return it_ - rhs.it_;
348  }
349  //*******************************************************************************************
350 
351  //**Addition operator************************************************************************
358  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
359  return ConstIterator( it.it_ + inc );
360  }
361  //*******************************************************************************************
362 
363  //**Addition operator************************************************************************
370  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
371  return ConstIterator( it.it_ + inc );
372  }
373  //*******************************************************************************************
374 
375  //**Subtraction operator*********************************************************************
382  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
383  return ConstIterator( it.it_ - dec );
384  }
385  //*******************************************************************************************
386 
387  private:
388  //**Member variables*************************************************************************
390  //*******************************************************************************************
391  };
392  //**********************************************************************************************
393 
394  //**Compilation flags***************************************************************************
396  enum { vectorizable = MT::vectorizable &&
398 
400  enum { smpAssignable = MT::smpAssignable };
401  //**********************************************************************************************
402 
403  //**Constructor*********************************************************************************
408  explicit inline DMatAbsExpr( const MT& dm )
409  : dm_( dm ) // Dense matrix of the absolute value expression
410  {}
411  //**********************************************************************************************
412 
413  //**Access operator*****************************************************************************
420  inline ReturnType operator()( size_t i, size_t j ) const {
421  using std::abs;
422  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
423  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
424  return abs( dm_(i,j) );
425  }
426  //**********************************************************************************************
427 
428  //**Load function*******************************************************************************
435  inline IntrinsicType load( size_t i, size_t j ) const {
436  typedef IntrinsicTrait<ElementType> IT;
437  BLAZE_INTERNAL_ASSERT( i < dm_.rows() , "Invalid row access index" );
438  BLAZE_INTERNAL_ASSERT( j < dm_.columns(), "Invalid column access index" );
439  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
440  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
441  return abs( dm_.load(i,j) );
442  }
443  //**********************************************************************************************
444 
445  //**Begin function******************************************************************************
451  inline ConstIterator begin( size_t i ) const {
452  return ConstIterator( dm_.begin(i) );
453  }
454  //**********************************************************************************************
455 
456  //**End function********************************************************************************
462  inline ConstIterator end( size_t i ) const {
463  return ConstIterator( dm_.end(i) );
464  }
465  //**********************************************************************************************
466 
467  //**Rows function*******************************************************************************
472  inline size_t rows() const {
473  return dm_.rows();
474  }
475  //**********************************************************************************************
476 
477  //**Columns function****************************************************************************
482  inline size_t columns() const {
483  return dm_.columns();
484  }
485  //**********************************************************************************************
486 
487  //**Operand access******************************************************************************
492  inline Operand operand() const {
493  return dm_;
494  }
495  //**********************************************************************************************
496 
497  //**********************************************************************************************
503  template< typename T >
504  inline bool canAlias( const T* alias ) const {
505  return IsComputation<MT>::value && dm_.canAlias( alias );
506  }
507  //**********************************************************************************************
508 
509  //**********************************************************************************************
515  template< typename T >
516  inline bool isAliased( const T* alias ) const {
517  return dm_.isAliased( alias );
518  }
519  //**********************************************************************************************
520 
521  //**********************************************************************************************
526  inline bool isAligned() const {
527  return dm_.isAligned();
528  }
529  //**********************************************************************************************
530 
531  //**********************************************************************************************
536  inline bool canSMPAssign() const {
537  return dm_.canSMPAssign();
538  }
539  //**********************************************************************************************
540 
541  private:
542  //**Member variables****************************************************************************
544  //**********************************************************************************************
545 
546  //**Assignment to dense matrices****************************************************************
560  template< typename MT2 > // Type of the target dense matrix
561  friend inline typename EnableIf< UseAssign<MT2> >::Type
562  assign( DenseMatrix<MT2,false>& lhs, const DMatAbsExpr& rhs )
563  {
565 
566  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
567  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
568 
569  assign ( ~lhs, rhs.dm_ );
570  smpAssign( ~lhs, abs( ~lhs ) );
571  }
573  //**********************************************************************************************
574 
575  //**Assignment to dense matrices****************************************************************
589  template< typename MT2 > // Type of the target dense matrix
590  friend inline typename EnableIf< UseAssign<MT2> >::Type
591  assign( DenseMatrix<MT2,true>& lhs, const DMatAbsExpr& rhs )
592  {
594 
595  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
596  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
597 
598  assign ( ~lhs, rhs.dm_ );
599  smpAssign( ~lhs, abs( ~lhs ) );
600  }
602  //**********************************************************************************************
603 
604  //**Assignment to sparse matrices***************************************************************
618  template< typename MT2 // Type of the target sparse matrix
619  , bool SO2 > // Storage order or the target sparse matrix
620  friend inline typename EnableIf< UseAssign<MT2> >::Type
621  assign( SparseMatrix<MT2,SO2>& lhs, const DMatAbsExpr& rhs )
622  {
624 
625  typedef typename SelectType< SO == SO2, ResultType, OppositeType >::Type TmpType;
626 
633 
634  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
635  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
636 
637  const TmpType tmp( rhs );
638  smpAssign( ~lhs, tmp );
639  }
641  //**********************************************************************************************
642 
643  //**Addition assignment to dense matrices*******************************************************
657  template< typename MT2 // Type of the target dense matrix
658  , bool SO2 > // Storage order of the target dense matrix
659  friend inline typename EnableIf< UseAssign<MT2> >::Type
660  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatAbsExpr& rhs )
661  {
663 
667 
668  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
669  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
670 
671  const ResultType tmp( rhs );
672  smpAddAssign( ~lhs, tmp );
673  }
675  //**********************************************************************************************
676 
677  //**Addition assignment to sparse matrices******************************************************
678  // No special implementation for the addition assignment to sparse matrices.
679  //**********************************************************************************************
680 
681  //**Subtraction assignment to dense matrices****************************************************
695  template< typename MT2 // Type of the target dense matrix
696  , bool SO2 > // Storage order of the target dense matrix
697  friend inline typename EnableIf< UseAssign<MT2> >::Type
698  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatAbsExpr& rhs )
699  {
701 
705 
706  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
707  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
708 
709  const ResultType tmp( rhs );
710  smpSubAssign( ~lhs, tmp );
711  }
713  //**********************************************************************************************
714 
715  //**Subtraction assignment to sparse matrices***************************************************
716  // No special implementation for the subtraction assignment to sparse matrices.
717  //**********************************************************************************************
718 
719  //**Multiplication assignment to dense matrices*************************************************
720  // No special implementation for the multiplication assignment to dense matrices.
721  //**********************************************************************************************
722 
723  //**Multiplication assignment to sparse matrices************************************************
724  // No special implementation for the multiplication assignment to sparse matrices.
725  //**********************************************************************************************
726 
727  //**Compile time checks*************************************************************************
732  //**********************************************************************************************
733 };
734 //*************************************************************************************************
735 
736 
737 
738 
739 //=================================================================================================
740 //
741 // GLOBAL FUNCTIONS
742 //
743 //=================================================================================================
744 
745 //*************************************************************************************************
762 template< typename MT // Type of the dense matrix
763  , bool SO > // Storage order
764 inline const DMatAbsExpr<MT,SO> abs( const DenseMatrix<MT,SO>& dm )
765 {
767 
768  return DMatAbsExpr<MT,SO>( ~dm );
769 }
770 //*************************************************************************************************
771 
772 
773 
774 
775 //=================================================================================================
776 //
777 // GLOBAL RESTRUCTURING FUNCTIONS
778 //
779 //=================================================================================================
780 
781 //*************************************************************************************************
792 template< typename MT // Type of the dense matrix
793  , bool SO > // Storage order
794 inline const DMatAbsExpr<MT,SO>& abs( const DMatAbsExpr<MT,SO>& dm )
795 {
797 
798  return dm;
799 }
801 //*************************************************************************************************
802 
803 
804 
805 
806 //=================================================================================================
807 //
808 // EXPRESSION TRAIT SPECIALIZATIONS
809 //
810 //=================================================================================================
811 
812 //*************************************************************************************************
814 template< typename MT >
815 struct DMatAbsExprTrait< DMatAbsExpr<MT,false> >
816 {
817  public:
818  //**********************************************************************************************
819  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
820  , DMatAbsExpr<MT,false>
821  , INVALID_TYPE >::Type Type;
822  //**********************************************************************************************
823 };
825 //*************************************************************************************************
826 
827 
828 //*************************************************************************************************
830 template< typename MT >
831 struct TDMatAbsExprTrait< DMatAbsExpr<MT,true> >
832 {
833  public:
834  //**********************************************************************************************
835  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
836  , DMatAbsExpr<MT,true>
837  , INVALID_TYPE >::Type Type;
838  //**********************************************************************************************
839 };
841 //*************************************************************************************************
842 
843 
844 //*************************************************************************************************
846 template< typename MT, bool SO, bool AF >
847 struct SubmatrixExprTrait< DMatAbsExpr<MT,SO>, AF >
848 {
849  public:
850  //**********************************************************************************************
851  typedef typename AbsExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
852  //**********************************************************************************************
853 };
855 //*************************************************************************************************
856 
857 
858 //*************************************************************************************************
860 template< typename MT, bool SO >
861 struct RowExprTrait< DMatAbsExpr<MT,SO> >
862 {
863  public:
864  //**********************************************************************************************
865  typedef typename AbsExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
866  //**********************************************************************************************
867 };
869 //*************************************************************************************************
870 
871 
872 //*************************************************************************************************
874 template< typename MT, bool SO >
875 struct ColumnExprTrait< DMatAbsExpr<MT,SO> >
876 {
877  public:
878  //**********************************************************************************************
879  typedef typename AbsExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
880  //**********************************************************************************************
881 };
883 //*************************************************************************************************
884 
885 } // namespace blaze
886 
887 #endif
IntrinsicTrait< ET >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatAbsExpr.h:141
Pointer difference type of the Blaze library.
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatAbsExpr.h:258
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:150
ValueType value_type
Type of the underlying elements.
Definition: DMatAbsExpr.h:168
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:313
IteratorCategory iterator_category
The iterator category.
Definition: DMatAbsExpr.h:167
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatAbsExpr.h:193
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:151
#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.
Header file for the sparse matrix SMP implementation.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatAbsExpr.h:482
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2384
Header file for the IsRowVector type trait.
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DMatAbsExpr.h:139
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:764
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatAbsExpr.h:382
AbsExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DMatAbsExpr.h:112
Header file for the Computation base class.
SelectType< useAssign, const ResultType, const DMatAbsExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatAbsExpr.h:147
Header file for the RequiresEvaluation type trait.
ElementType * PointerType
Pointer return type.
Definition: DMatAbsExpr.h:162
Operand dm_
Dense matrix of the absolute value expression.
Definition: DMatAbsExpr.h:543
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2380
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:169
Constraint on the data type.
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DMatAbsExpr.h:144
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:280
Expression object for the dense matrix abs() function.The DMatAbsExpr class represents the compile ti...
Definition: DMatAbsExpr.h:92
Constraint on the data type.
void smpAddAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:121
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatAbsExpr.h:536
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:251
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatAbsExpr.h:237
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DMatAbsExpr.h:137
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:2388
Operand operand() const
Returns the dense matrix operand.
Definition: DMatAbsExpr.h:492
Header file for the dense matrix SMP implementation.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatAbsExpr.h:420
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:324
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatAbsExpr.h:227
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:358
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatAbsExpr.h:370
ReferenceType reference
Reference return type.
Definition: DMatAbsExpr.h:170
Header file for the DVecAbsExprTrait class template.
Header file for the MatAbsExpr base class.
DifferenceType difference_type
Difference between two iterators.
Definition: DMatAbsExpr.h:171
#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:163
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2381
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2382
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:156
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:451
IteratorType it_
Iterator to the current matrix element.
Definition: DMatAbsExpr.h:389
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:91
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2383
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:748
Header file for run time assertion macros.
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatAbsExpr.h:269
Utility type for generic codes.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:291
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatAbsExpr.h:516
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:472
DMatAbsExpr(const MT &dm)
Constructor for the DMatAbsExpr class.
Definition: DMatAbsExpr.h:408
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:99
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
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatAbsExpr.h:526
ElementType ValueType
Type of the underlying elements.
Definition: DMatAbsExpr.h:161
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:136
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: DMatAbsExpr.h:182
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatAbsExpr.h:160
IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatAbsExpr.h:435
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatAbsExpr.h:138
#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:164
Header file for all intrinsic functionality.
MT::ReturnType RN
Return type of the dense matrix expression.
Definition: DMatAbsExpr.h:98
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatAbsExpr.h:216
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatAbsExpr.h:462
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatAbsExpr.h:248
Header file for the IsComputation type trait class.
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:335
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatAbsExpr.h:302
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:2379
MT::ElementType ElementType
Resulting element type.
Definition: DMatAbsExpr.h:140
Header file for basic type definitions.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatAbsExpr.h:205
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatAbsExpr.h:346
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatAbsExpr.h:504
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:174