All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMatTransExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTRANSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATTRANSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
58 #include <blaze/util/Assert.h>
60 #include <blaze/util/EmptyType.h>
61 #include <blaze/util/EnableIf.h>
63 #include <blaze/util/SelectType.h>
64 #include <blaze/util/Types.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DMATTRANSEXPR
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
82 template< typename MT // Type of the dense matrix
83  , bool SO > // Storage order
84 class DMatTransExpr : public DenseMatrix< DMatTransExpr<MT,SO>, SO >
85  , private MatTransExpr
86  , private SelectType< IsComputation<MT>::value, Computation, EmptyType >::Type
87 {
88  private:
89  //**Type definitions****************************************************************************
90  typedef typename MT::ResultType RT;
91  typedef typename MT::CompositeType CT;
92  //**********************************************************************************************
93 
94  //**Serial evaluation strategy******************************************************************
96 
102  enum { useAssign = RequiresEvaluation<MT>::value };
103 
105  template< typename MT2 >
107  struct UseAssign {
108  enum { value = useAssign };
109  };
111  //**********************************************************************************************
112 
113  //**Parallel evaluation strategy****************************************************************
115 
120  template< typename MT2 >
121  struct UseSMPAssign {
122  enum { value = MT2::smpAssignable && useAssign };
123  };
125  //**********************************************************************************************
126 
127  public:
128  //**Type definitions****************************************************************************
130  typedef typename MT::TransposeType ResultType;
132  typedef typename MT::ResultType TransposeType;
133  typedef typename MT::ElementType ElementType;
135  typedef typename MT::ReturnType ReturnType;
136 
139 
141  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
142  //**********************************************************************************************
143 
144  //**ConstIterator class definition**************************************************************
148  {
149  public:
150  //**Type definitions*************************************************************************
151  typedef std::random_access_iterator_tag IteratorCategory;
156 
157  // STL iterator requirements
163 
165  typedef typename MT::ConstIterator IteratorType;
166  //*******************************************************************************************
167 
168  //**Constructor******************************************************************************
173  explicit inline ConstIterator( IteratorType iterator )
174  : iterator_( iterator ) // Iterator to the current element
175  {}
176  //*******************************************************************************************
177 
178  //**Addition assignment operator*************************************************************
184  inline ConstIterator& operator+=( size_t inc ) {
185  iterator_ += inc;
186  return *this;
187  }
188  //*******************************************************************************************
189 
190  //**Subtraction assignment operator**********************************************************
196  inline ConstIterator& operator-=( size_t dec ) {
197  iterator_ -= dec;
198  return *this;
199  }
200  //*******************************************************************************************
201 
202  //**Prefix increment operator****************************************************************
208  ++iterator_;
209  return *this;
210  }
211  //*******************************************************************************************
212 
213  //**Postfix increment operator***************************************************************
218  inline const ConstIterator operator++( int ) {
219  return ConstIterator( iterator_++ );
220  }
221  //*******************************************************************************************
222 
223  //**Prefix decrement operator****************************************************************
229  --iterator_;
230  return *this;
231  }
232  //*******************************************************************************************
233 
234  //**Postfix decrement operator***************************************************************
239  inline const ConstIterator operator--( int ) {
240  return ConstIterator( iterator_-- );
241  }
242  //*******************************************************************************************
243 
244  //**Element access operator******************************************************************
249  inline ReturnType operator*() const {
250  return *iterator_;
251  }
252  //*******************************************************************************************
253 
254  //**Load function****************************************************************************
259  inline IntrinsicType load() const {
260  return iterator_.load();
261  }
262  //*******************************************************************************************
263 
264  //**Equality operator************************************************************************
270  inline bool operator==( const ConstIterator& rhs ) const {
271  return iterator_ == rhs.iterator_;
272  }
273  //*******************************************************************************************
274 
275  //**Inequality operator**********************************************************************
281  inline bool operator!=( const ConstIterator& rhs ) const {
282  return iterator_ != rhs.iterator_;
283  }
284  //*******************************************************************************************
285 
286  //**Less-than operator***********************************************************************
292  inline bool operator<( const ConstIterator& rhs ) const {
293  return iterator_ < rhs.iterator_;
294  }
295  //*******************************************************************************************
296 
297  //**Greater-than operator********************************************************************
303  inline bool operator>( const ConstIterator& rhs ) const {
304  return iterator_ > rhs.iterator_;
305  }
306  //*******************************************************************************************
307 
308  //**Less-or-equal-than operator**************************************************************
314  inline bool operator<=( const ConstIterator& rhs ) const {
315  return iterator_ <= rhs.iterator_;
316  }
317  //*******************************************************************************************
318 
319  //**Greater-or-equal-than operator***********************************************************
325  inline bool operator>=( const ConstIterator& rhs ) const {
326  return iterator_ >= rhs.iterator_;
327  }
328  //*******************************************************************************************
329 
330  //**Subtraction operator*********************************************************************
336  inline DifferenceType operator-( const ConstIterator& rhs ) const {
337  return iterator_ - rhs.iterator_;
338  }
339  //*******************************************************************************************
340 
341  //**Addition operator************************************************************************
348  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
349  return ConstIterator( it.iterator_ + inc );
350  }
351  //*******************************************************************************************
352 
353  //**Addition operator************************************************************************
360  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
361  return ConstIterator( it.iterator_ + inc );
362  }
363  //*******************************************************************************************
364 
365  //**Subtraction operator*********************************************************************
372  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
373  return ConstIterator( it.iterator_ - dec );
374  }
375  //*******************************************************************************************
376 
377  private:
378  //**Member variables*************************************************************************
380  //*******************************************************************************************
381  };
382  //**********************************************************************************************
383 
384  //**Compilation flags***************************************************************************
386  enum { vectorizable = MT::vectorizable };
387 
389  enum { smpAssignable = MT::smpAssignable };
390  //**********************************************************************************************
391 
392  //**Constructor*********************************************************************************
397  explicit inline DMatTransExpr( const MT& dm )
398  : dm_( dm ) // Dense matrix of the transposition expression
399  {}
400  //**********************************************************************************************
401 
402  //**Access operator*****************************************************************************
409  inline ReturnType operator()( size_t i, size_t j ) const {
410  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
411  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
412  return dm_(j,i);
413  }
414  //**********************************************************************************************
415 
416  //**Load function*******************************************************************************
423  inline IntrinsicType load( size_t i, size_t j ) const {
424  typedef IntrinsicTrait<ElementType> IT;
425  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
426  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
427  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
428  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
429  return dm_.load(j,i);
430  }
431  //**********************************************************************************************
432 
433  //**Low-level data access***********************************************************************
438  inline const ElementType* data() const {
439  return dm_.data();
440  }
441  //**********************************************************************************************
442 
443  //**Begin function******************************************************************************
449  inline ConstIterator begin( size_t i ) const {
450  return ConstIterator( dm_.begin(i) );
451  }
452  //**********************************************************************************************
453 
454  //**End function********************************************************************************
460  inline ConstIterator end( size_t i ) const {
461  return ConstIterator( dm_.end(i) );
462  }
463  //**********************************************************************************************
464 
465  //**Rows function*******************************************************************************
470  inline size_t rows() const {
471  return dm_.columns();
472  }
473  //**********************************************************************************************
474 
475  //**Columns function****************************************************************************
480  inline size_t columns() const {
481  return dm_.rows();
482  }
483  //**********************************************************************************************
484 
485  //**Spacing function****************************************************************************
490  inline size_t spacing() const {
491  return dm_.spacing();
492  }
493  //**********************************************************************************************
494 
495  //**Operand access******************************************************************************
500  inline Operand operand() const {
501  return dm_;
502  }
503  //**********************************************************************************************
504 
505  //**********************************************************************************************
511  template< typename T >
512  inline bool canAlias( const T* alias ) const {
513  return dm_.canAlias( alias );
514  }
515  //**********************************************************************************************
516 
517  //**********************************************************************************************
523  template< typename T >
524  inline bool isAliased( const T* alias ) const {
525  return dm_.isAliased( alias );
526  }
527  //**********************************************************************************************
528 
529  //**********************************************************************************************
534  inline bool isAligned() const {
535  return dm_.isAligned();
536  }
537  //**********************************************************************************************
538 
539  //**********************************************************************************************
544  inline bool canSMPAssign() const {
545  return dm_.canSMPAssign();
546  }
547  //**********************************************************************************************
548 
549  private:
550  //**Member variables****************************************************************************
552  //**********************************************************************************************
553 
554  //**Assignment to dense matrices****************************************************************
568  template< typename MT2 // Type of the target dense matrix
569  , bool SO2 > // Storage order of the target dense matrix
570  friend inline typename EnableIf< UseAssign<MT2> >::Type
571  assign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
572  {
574 
575  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
576  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
577 
578  DMatTransposer<MT2,!SO2> tmp( ~lhs );
579  assign( tmp, rhs.dm_ );
580  }
582  //**********************************************************************************************
583 
584  //**Assignment to sparse matrices***************************************************************
598  template< typename MT2 // Type of the target sparse matrix
599  , bool SO2 > // Storage order of the target sparse matrix
600  friend inline typename EnableIf< UseAssign<MT2> >::Type
601  assign( SparseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
602  {
604 
606 
613 
614  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
615  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
616 
617  const TmpType tmp( serial( rhs ) );
618  assign( ~lhs, tmp );
619  }
621  //**********************************************************************************************
622 
623  //**Addition assignment to dense matrices*******************************************************
637  template< typename MT2 // Type of the target dense matrix
638  , bool SO2 > // Storage order of the target dense matrix
639  friend inline typename EnableIf< UseAssign<MT2> >::Type
640  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
641  {
643 
644  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
645  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
646 
647  DMatTransposer<MT2,!SO2> tmp( ~lhs );
648  addAssign( tmp, rhs.dm_ );
649  }
651  //**********************************************************************************************
652 
653  //**Addition assignment to sparse matrices******************************************************
654  // No special implementation for the addition assignment to sparse matrices.
655  //**********************************************************************************************
656 
657  //**Subtraction assignment to dense matrices****************************************************
671  template< typename MT2 // Type of the target dense matrix
672  , bool SO2 > // Storage order of the target dense matrix
673  friend inline typename EnableIf< UseAssign<MT2> >::Type
674  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
675  {
677 
678  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
679  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
680 
681  DMatTransposer<MT2,!SO2> tmp( ~lhs );
682  subAssign( tmp, rhs.dm_ );
683  }
685  //**********************************************************************************************
686 
687  //**Subtraction assignment to sparse matrices***************************************************
688  // No special implementation for the subtraction assignment to sparse matrices.
689  //**********************************************************************************************
690 
691  //**Multiplication assignment to dense matrices*************************************************
692  // No special implementation for the multiplication assignment to dense matrices.
693  //**********************************************************************************************
694 
695  //**Multiplication assignment to sparse matrices************************************************
696  // No special implementation for the multiplication assignment to sparse matrices.
697  //**********************************************************************************************
698 
699  //**SMP assignment to dense matrices************************************************************
713  template< typename MT2 // Type of the target dense matrix
714  , bool SO2 > // Storage order of the target dense matrix
715  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
716  smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
717  {
719 
720  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
721  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
722 
723  DMatTransposer<MT2,!SO2> tmp( ~lhs );
724  smpAssign( tmp, rhs.dm_ );
725  }
727  //**********************************************************************************************
728 
729  //**SMP assignment to sparse matrices***********************************************************
743  template< typename MT2 // Type of the target sparse matrix
744  , bool SO2 > // Storage order of the target sparse matrix
745  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
746  smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
747  {
749 
750  typedef typename SelectType< SO == SO2, ResultType, OppositeType >::Type TmpType;
751 
758 
759  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
760  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
761 
762  const TmpType tmp( rhs );
763  smpAssign( ~lhs, tmp );
764  }
766  //**********************************************************************************************
767 
768  //**SMP addition assignment to dense matrices***************************************************
782  template< typename MT2 // Type of the target dense matrix
783  , bool SO2 > // Storage order of the target dense matrix
784  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
785  smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
786  {
788 
789  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
790  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
791 
792  DMatTransposer<MT2,!SO2> tmp( ~lhs );
793  smpAddAssign( tmp, rhs.dm_ );
794  }
796  //**********************************************************************************************
797 
798  //**SMP addition assignment to sparse matrices**************************************************
799  // No special implementation for the SMP addition assignment to sparse matrices.
800  //**********************************************************************************************
801 
802  //**SMP subtraction assignment to dense matrices************************************************
816  template< typename MT2 // Type of the target dense matrix
817  , bool SO2 > // Storage order of the target dense matrix
818  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
819  smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
820  {
822 
823  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
824  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
825 
826  DMatTransposer<MT2,!SO2> tmp( ~lhs );
827  smpSubAssign( tmp, rhs.dm_ );
828  }
830  //**********************************************************************************************
831 
832  //**SMP subtraction assignment to sparse matrices***********************************************
833  // No special implementation for the SMP subtraction assignment to sparse matrices.
834  //**********************************************************************************************
835 
836  //**SMP multiplication assignment to dense matrices*********************************************
837  // No special implementation for the SMP multiplication assignment to dense matrices.
838  //**********************************************************************************************
839 
840  //**SMP multiplication assignment to sparse matrices********************************************
841  // No special implementation for the SMP multiplication assignment to sparse matrices.
842  //**********************************************************************************************
843 
844  //**Trans function******************************************************************************
860  template< typename MT2 // Type of the dense matrix
861  , bool SO2 > // Storage order of the dense matrix
862  friend inline Operand trans( const DMatTransExpr<MT2,SO2>& dm )
863  {
865 
866  return dm.dm_;
867  }
869  //**********************************************************************************************
870 
871  //**Compile time checks*************************************************************************
876  //**********************************************************************************************
877 };
878 //*************************************************************************************************
879 
880 
881 
882 
883 //=================================================================================================
884 //
885 // GLOBAL OPERATORS
886 //
887 //=================================================================================================
888 
889 //*************************************************************************************************
905 template< typename MT // Type of the dense matrix
906  , bool SO > // Storage order
908 {
910 
911  return DMatTransExpr<MT,!SO>( ~dm );
912 }
913 //*************************************************************************************************
914 
915 
916 
917 
918 //=================================================================================================
919 //
920 // EXPRESSION TRAIT SPECIALIZATIONS
921 //
922 //=================================================================================================
923 
924 //*************************************************************************************************
926 template< typename MT, bool SO, bool AF >
927 struct SubmatrixExprTrait< DMatTransExpr<MT,SO>, AF >
928 {
929  public:
930  //**********************************************************************************************
931  typedef typename TransExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
932  //**********************************************************************************************
933 };
935 //*************************************************************************************************
936 
937 
938 //*************************************************************************************************
940 template< typename MT, bool SO >
941 struct RowExprTrait< DMatTransExpr<MT,SO> >
942 {
943  public:
944  //**********************************************************************************************
945  typedef typename TransExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
946  //**********************************************************************************************
947 };
949 //*************************************************************************************************
950 
951 
952 //*************************************************************************************************
954 template< typename MT, bool SO >
955 struct ColumnExprTrait< DMatTransExpr<MT,SO> >
956 {
957  public:
958  //**********************************************************************************************
959  typedef typename TransExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
960  //**********************************************************************************************
961 };
963 //*************************************************************************************************
964 
965 } // namespace blaze
966 
967 #endif
Pointer difference type of the Blaze library.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatTransExpr.h:196
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatTransExpr.h:207
IteratorCategory iterator_category
The iterator category.
Definition: DMatTransExpr.h:158
DMatTransExpr(const MT &dm)
Constructor for the DMatTransExpr class.
Definition: DMatTransExpr.h:397
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatTransExpr.h:184
SelectType< useAssign, const ResultType, const DMatTransExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatTransExpr.h:138
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:152
Expression object for dense matrix transpositions.The DMatTransExpr class represents the compile time...
Definition: DMatTransExpr.h:84
#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
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:199
Header file for the MatTransExpr base class.
#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.
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatTransExpr.h:360
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTransExpr.h:131
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2408
IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatTransExpr.h:423
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatTransExpr.h:165
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:690
Header file for the Computation base class.
bool isAligned() const
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatTransExpr.h:534
Header file for the RequiresEvaluation type trait.
Operand dm_
Dense matrix of the transposition expression.
Definition: DMatTransExpr.h:551
Operand operand() const
Returns the dense matrix operand.
Definition: DMatTransExpr.h:500
ReferenceType reference
Reference return type.
Definition: DMatTransExpr.h:161
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransExpr.h:449
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:107
MT::TransposeType ResultType
Result type for expression template evaluations.
Definition: DMatTransExpr.h:130
Constraint on the data type.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatTransExpr.h:239
Constraint on the data type.
MT::ElementType ElementType
Resulting element type.
Definition: DMatTransExpr.h:133
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:122
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
IntrinsicType load() const
Access to the intrinsic elements of the matrix.
Definition: DMatTransExpr.h:259
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatTransExpr.h:348
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatTransExpr.h:524
ValueType value_type
Type of the underlying elements.
Definition: DMatTransExpr.h:159
ConstIterator(IteratorType iterator)
Constructor for the ConstIterator class.
Definition: DMatTransExpr.h:173
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
PointerType pointer
Pointer return type.
Definition: DMatTransExpr.h:160
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatTransExpr.h:155
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:281
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatTransExpr.h:141
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2412
Header file for the DenseMatrix base class.
IteratorType iterator_
Iterator to the current element.
Definition: DMatTransExpr.h:379
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:271
Expression object for the transposition of a dense matrix.The DMatTransposer class is a wrapper objec...
Definition: DMatTransposer.h:71
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DMatTransExpr.h:134
MT::ResultType RT
Result type of the dense matrix expression.
Definition: DMatTransExpr.h:90
MT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: DMatTransExpr.h:132
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatTransExpr.h:228
#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
const ElementType * data() const
Low-level data access to the matrix elements.
Definition: DMatTransExpr.h:438
DifferenceType difference_type
Difference between two iterators.
Definition: DMatTransExpr.h:162
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2405
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2406
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
Greater-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:325
Header file for the EnableIf class template.
Header file for the serial shim.
ElementType * PointerType
Pointer return type.
Definition: DMatTransExpr.h:153
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatTransExpr.h:336
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatTransExpr.h:372
Header file for the dense matrix transposer.
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:92
size_t spacing() const
Returns the spacing between the beginning of two rows/columns.
Definition: DMatTransExpr.h:490
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2407
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:748
Header file for run time assertion macros.
ElementType ValueType
Type of the underlying elements.
Definition: DMatTransExpr.h:152
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatTransExpr.h:470
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatTransExpr.h:480
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:270
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:301
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:331
Header file for the TransExprTrait class template.
Base class for all matrix transposition expression templates.The MatTransExpr class serves as a tag f...
Definition: MatTransExpr.h:65
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatTransExpr.h:409
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransExpr.h:460
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatTransExpr.h:218
#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
ElementType & ReferenceType
Reference return type.
Definition: DMatTransExpr.h:154
Iterator over the elements of the dense matrix.
Definition: DMatTransExpr.h:147
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatTransExpr.h:249
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:907
Header file for the IsComputation type trait class.
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatTransExpr.h:151
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:314
MT::CompositeType CT
Composite type of the dense matrix expression.
Definition: DMatTransExpr.h:91
#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:2403
Header file for basic type definitions.
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatTransExpr.h:544
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatTransExpr.h:135
Header file for the empty type.
DMatTransExpr< MT, SO > This
Type of this DMatTransExpr instance.
Definition: DMatTransExpr.h:129
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:303
#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
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DMatTransExpr.h:512
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:292
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.