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 
63 #include <blaze/util/Assert.h>
65 #include <blaze/util/EmptyType.h>
66 #include <blaze/util/EnableIf.h>
68 #include <blaze/util/SelectType.h>
69 #include <blaze/util/Types.h>
71 
72 
73 namespace blaze {
74 
75 //=================================================================================================
76 //
77 // CLASS DMATTRANSEXPR
78 //
79 //=================================================================================================
80 
81 //*************************************************************************************************
88 template< typename MT // Type of the dense matrix
89  , bool SO > // Storage order
90 class DMatTransExpr : public DenseMatrix< DMatTransExpr<MT,SO>, SO >
91  , private MatTransExpr
92  , private SelectType< IsComputation<MT>::value, Computation, EmptyType >::Type
93 {
94  private:
95  //**Type definitions****************************************************************************
96  typedef typename MT::ResultType RT;
97  typedef typename MT::CompositeType CT;
98  //**********************************************************************************************
99 
100  //**Serial evaluation strategy******************************************************************
102 
108  enum { useAssign = RequiresEvaluation<MT>::value };
109 
111  template< typename MT2 >
113  struct UseAssign {
114  enum { value = useAssign };
115  };
117  //**********************************************************************************************
118 
119  //**Parallel evaluation strategy****************************************************************
121 
126  template< typename MT2 >
127  struct UseSMPAssign {
128  enum { value = MT2::smpAssignable && useAssign };
129  };
131  //**********************************************************************************************
132 
133  public:
134  //**Type definitions****************************************************************************
136  typedef typename MT::TransposeType ResultType;
138  typedef typename MT::ResultType TransposeType;
139  typedef typename MT::ElementType ElementType;
141  typedef typename MT::ReturnType ReturnType;
142 
145 
147  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
148  //**********************************************************************************************
149 
150  //**ConstIterator class definition**************************************************************
154  {
155  public:
156  //**Type definitions*************************************************************************
157  typedef std::random_access_iterator_tag IteratorCategory;
162 
163  // STL iterator requirements
169 
171  typedef typename MT::ConstIterator IteratorType;
172  //*******************************************************************************************
173 
174  //**Constructor******************************************************************************
179  explicit inline ConstIterator( IteratorType iterator )
180  : iterator_( iterator ) // Iterator to the current element
181  {}
182  //*******************************************************************************************
183 
184  //**Addition assignment operator*************************************************************
190  inline ConstIterator& operator+=( size_t inc ) {
191  iterator_ += inc;
192  return *this;
193  }
194  //*******************************************************************************************
195 
196  //**Subtraction assignment operator**********************************************************
202  inline ConstIterator& operator-=( size_t dec ) {
203  iterator_ -= dec;
204  return *this;
205  }
206  //*******************************************************************************************
207 
208  //**Prefix increment operator****************************************************************
214  ++iterator_;
215  return *this;
216  }
217  //*******************************************************************************************
218 
219  //**Postfix increment operator***************************************************************
224  inline const ConstIterator operator++( int ) {
225  return ConstIterator( iterator_++ );
226  }
227  //*******************************************************************************************
228 
229  //**Prefix decrement operator****************************************************************
235  --iterator_;
236  return *this;
237  }
238  //*******************************************************************************************
239 
240  //**Postfix decrement operator***************************************************************
245  inline const ConstIterator operator--( int ) {
246  return ConstIterator( iterator_-- );
247  }
248  //*******************************************************************************************
249 
250  //**Element access operator******************************************************************
255  inline ReturnType operator*() const {
256  return *iterator_;
257  }
258  //*******************************************************************************************
259 
260  //**Load function****************************************************************************
265  inline IntrinsicType load() const {
266  return iterator_.load();
267  }
268  //*******************************************************************************************
269 
270  //**Equality operator************************************************************************
276  inline bool operator==( const ConstIterator& rhs ) const {
277  return iterator_ == rhs.iterator_;
278  }
279  //*******************************************************************************************
280 
281  //**Inequality operator**********************************************************************
287  inline bool operator!=( const ConstIterator& rhs ) const {
288  return iterator_ != rhs.iterator_;
289  }
290  //*******************************************************************************************
291 
292  //**Less-than operator***********************************************************************
298  inline bool operator<( const ConstIterator& rhs ) const {
299  return iterator_ < rhs.iterator_;
300  }
301  //*******************************************************************************************
302 
303  //**Greater-than operator********************************************************************
309  inline bool operator>( const ConstIterator& rhs ) const {
310  return iterator_ > rhs.iterator_;
311  }
312  //*******************************************************************************************
313 
314  //**Less-or-equal-than operator**************************************************************
320  inline bool operator<=( const ConstIterator& rhs ) const {
321  return iterator_ <= rhs.iterator_;
322  }
323  //*******************************************************************************************
324 
325  //**Greater-or-equal-than operator***********************************************************
331  inline bool operator>=( const ConstIterator& rhs ) const {
332  return iterator_ >= rhs.iterator_;
333  }
334  //*******************************************************************************************
335 
336  //**Subtraction operator*********************************************************************
342  inline DifferenceType operator-( const ConstIterator& rhs ) const {
343  return iterator_ - rhs.iterator_;
344  }
345  //*******************************************************************************************
346 
347  //**Addition operator************************************************************************
354  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
355  return ConstIterator( it.iterator_ + inc );
356  }
357  //*******************************************************************************************
358 
359  //**Addition operator************************************************************************
366  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
367  return ConstIterator( it.iterator_ + inc );
368  }
369  //*******************************************************************************************
370 
371  //**Subtraction operator*********************************************************************
378  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
379  return ConstIterator( it.iterator_ - dec );
380  }
381  //*******************************************************************************************
382 
383  private:
384  //**Member variables*************************************************************************
386  //*******************************************************************************************
387  };
388  //**********************************************************************************************
389 
390  //**Compilation flags***************************************************************************
392  enum { vectorizable = MT::vectorizable };
393 
395  enum { smpAssignable = MT::smpAssignable };
396  //**********************************************************************************************
397 
398  //**Constructor*********************************************************************************
403  explicit inline DMatTransExpr( const MT& dm )
404  : dm_( dm ) // Dense matrix of the transposition expression
405  {}
406  //**********************************************************************************************
407 
408  //**Access operator*****************************************************************************
415  inline ReturnType operator()( size_t i, size_t j ) const {
416  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
417  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
418  return dm_(j,i);
419  }
420  //**********************************************************************************************
421 
422  //**Load function*******************************************************************************
429  inline IntrinsicType load( size_t i, size_t j ) const {
430  typedef IntrinsicTrait<ElementType> IT;
431  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
432  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
433  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
434  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
435  return dm_.load(j,i);
436  }
437  //**********************************************************************************************
438 
439  //**Low-level data access***********************************************************************
444  inline const ElementType* data() const {
445  return dm_.data();
446  }
447  //**********************************************************************************************
448 
449  //**Begin function******************************************************************************
455  inline ConstIterator begin( size_t i ) const {
456  return ConstIterator( dm_.begin(i) );
457  }
458  //**********************************************************************************************
459 
460  //**End function********************************************************************************
466  inline ConstIterator end( size_t i ) const {
467  return ConstIterator( dm_.end(i) );
468  }
469  //**********************************************************************************************
470 
471  //**Rows function*******************************************************************************
476  inline size_t rows() const {
477  return dm_.columns();
478  }
479  //**********************************************************************************************
480 
481  //**Columns function****************************************************************************
486  inline size_t columns() const {
487  return dm_.rows();
488  }
489  //**********************************************************************************************
490 
491  //**Spacing function****************************************************************************
496  inline size_t spacing() const {
497  return dm_.spacing();
498  }
499  //**********************************************************************************************
500 
501  //**NonZeros function***************************************************************************
506  inline size_t nonZeros() const {
507  return dm_.nonZeros();
508  }
509  //**********************************************************************************************
510 
511  //**NonZeros function***************************************************************************
517  inline size_t nonZeros( size_t i ) const {
518  return dm_.nonZeros( i );
519  }
520  //**********************************************************************************************
521 
522  //**Operand access******************************************************************************
527  inline Operand operand() const {
528  return dm_;
529  }
530  //**********************************************************************************************
531 
532  //**********************************************************************************************
538  template< typename T >
539  inline bool canAlias( const T* alias ) const {
540  return dm_.canAlias( alias );
541  }
542  //**********************************************************************************************
543 
544  //**********************************************************************************************
550  template< typename T >
551  inline bool isAliased( const T* alias ) const {
552  return dm_.isAliased( alias );
553  }
554  //**********************************************************************************************
555 
556  //**********************************************************************************************
561  inline bool isAligned() const {
562  return dm_.isAligned();
563  }
564  //**********************************************************************************************
565 
566  //**********************************************************************************************
571  inline bool canSMPAssign() const {
572  return dm_.canSMPAssign();
573  }
574  //**********************************************************************************************
575 
576  private:
577  //**Member variables****************************************************************************
579  //**********************************************************************************************
580 
581  //**Assignment to dense matrices****************************************************************
595  template< typename MT2 // Type of the target dense matrix
596  , bool SO2 > // Storage order of the target dense matrix
597  friend inline typename EnableIf< UseAssign<MT2> >::Type
598  assign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
599  {
601 
602  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
603  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
604 
605  DMatTransposer<MT2,!SO2> tmp( ~lhs );
606  assign( tmp, rhs.dm_ );
607  }
609  //**********************************************************************************************
610 
611  //**Assignment to sparse matrices***************************************************************
625  template< typename MT2 // Type of the target sparse matrix
626  , bool SO2 > // Storage order of the target sparse matrix
627  friend inline typename EnableIf< UseAssign<MT2> >::Type
628  assign( SparseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
629  {
631 
633 
640 
641  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
642  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
643 
644  const TmpType tmp( serial( rhs ) );
645  assign( ~lhs, tmp );
646  }
648  //**********************************************************************************************
649 
650  //**Addition assignment to dense matrices*******************************************************
664  template< typename MT2 // Type of the target dense matrix
665  , bool SO2 > // Storage order of the target dense matrix
666  friend inline typename EnableIf< UseAssign<MT2> >::Type
667  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
668  {
670 
671  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
672  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
673 
674  DMatTransposer<MT2,!SO2> tmp( ~lhs );
675  addAssign( tmp, rhs.dm_ );
676  }
678  //**********************************************************************************************
679 
680  //**Addition assignment to sparse matrices******************************************************
681  // No special implementation for the addition assignment to sparse matrices.
682  //**********************************************************************************************
683 
684  //**Subtraction assignment to dense matrices****************************************************
698  template< typename MT2 // Type of the target dense matrix
699  , bool SO2 > // Storage order of the target dense matrix
700  friend inline typename EnableIf< UseAssign<MT2> >::Type
701  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
702  {
704 
705  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
706  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
707 
708  DMatTransposer<MT2,!SO2> tmp( ~lhs );
709  subAssign( tmp, rhs.dm_ );
710  }
712  //**********************************************************************************************
713 
714  //**Subtraction assignment to sparse matrices***************************************************
715  // No special implementation for the subtraction assignment to sparse matrices.
716  //**********************************************************************************************
717 
718  //**Multiplication assignment to dense matrices*************************************************
719  // No special implementation for the multiplication assignment to dense matrices.
720  //**********************************************************************************************
721 
722  //**Multiplication assignment to sparse matrices************************************************
723  // No special implementation for the multiplication assignment to sparse matrices.
724  //**********************************************************************************************
725 
726  //**SMP assignment to dense matrices************************************************************
740  template< typename MT2 // Type of the target dense matrix
741  , bool SO2 > // Storage order of the target dense matrix
742  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
743  smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
744  {
746 
747  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
748  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
749 
750  DMatTransposer<MT2,!SO2> tmp( ~lhs );
751  smpAssign( tmp, rhs.dm_ );
752  }
754  //**********************************************************************************************
755 
756  //**SMP assignment to sparse matrices***********************************************************
770  template< typename MT2 // Type of the target sparse matrix
771  , bool SO2 > // Storage order of the target sparse matrix
772  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
773  smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
774  {
776 
777  typedef typename SelectType< SO == SO2, ResultType, OppositeType >::Type TmpType;
778 
785 
786  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
787  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
788 
789  const TmpType tmp( rhs );
790  smpAssign( ~lhs, tmp );
791  }
793  //**********************************************************************************************
794 
795  //**SMP addition assignment to dense matrices***************************************************
809  template< typename MT2 // Type of the target dense matrix
810  , bool SO2 > // Storage order of the target dense matrix
811  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
812  smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
813  {
815 
816  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
817  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
818 
819  DMatTransposer<MT2,!SO2> tmp( ~lhs );
820  smpAddAssign( tmp, rhs.dm_ );
821  }
823  //**********************************************************************************************
824 
825  //**SMP addition assignment to sparse matrices**************************************************
826  // No special implementation for the SMP addition assignment to sparse matrices.
827  //**********************************************************************************************
828 
829  //**SMP subtraction assignment to dense matrices************************************************
843  template< typename MT2 // Type of the target dense matrix
844  , bool SO2 > // Storage order of the target dense matrix
845  friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
846  smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
847  {
849 
850  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
851  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
852 
853  DMatTransposer<MT2,!SO2> tmp( ~lhs );
854  smpSubAssign( tmp, rhs.dm_ );
855  }
857  //**********************************************************************************************
858 
859  //**SMP subtraction assignment to sparse matrices***********************************************
860  // No special implementation for the SMP subtraction assignment to sparse matrices.
861  //**********************************************************************************************
862 
863  //**SMP multiplication assignment to dense matrices*********************************************
864  // No special implementation for the SMP multiplication assignment to dense matrices.
865  //**********************************************************************************************
866 
867  //**SMP multiplication assignment to sparse matrices********************************************
868  // No special implementation for the SMP multiplication assignment to sparse matrices.
869  //**********************************************************************************************
870 
871  //**Trans function******************************************************************************
887  friend inline Operand trans( const DMatTransExpr<MT,SO>& dm )
888  {
890 
891  return dm.dm_;
892  }
894  //**********************************************************************************************
895 
896  //**Compile time checks*************************************************************************
901  //**********************************************************************************************
902 };
903 //*************************************************************************************************
904 
905 
906 
907 
908 //=================================================================================================
909 //
910 // GLOBAL OPERATORS
911 //
912 //=================================================================================================
913 
914 //*************************************************************************************************
930 template< typename MT // Type of the dense matrix
931  , bool SO > // Storage order
933 {
935 
936  return DMatTransExpr<MT,!SO>( ~dm );
937 }
938 //*************************************************************************************************
939 
940 
941 
942 
943 //=================================================================================================
944 //
945 // ROWS SPECIALIZATIONS
946 //
947 //=================================================================================================
948 
949 //*************************************************************************************************
951 template< typename MT, bool SO >
952 struct Rows< DMatTransExpr<MT,SO> > : public Columns<MT>
953 {};
955 //*************************************************************************************************
956 
957 
958 
959 
960 //=================================================================================================
961 //
962 // COLUMNS SPECIALIZATIONS
963 //
964 //=================================================================================================
965 
966 //*************************************************************************************************
968 template< typename MT, bool SO >
969 struct Columns< DMatTransExpr<MT,SO> > : public Rows<MT>
970 {};
972 //*************************************************************************************************
973 
974 
975 
976 
977 //=================================================================================================
978 //
979 // ISSYMMETRIC SPECIALIZATIONS
980 //
981 //=================================================================================================
982 
983 //*************************************************************************************************
985 template< typename MT, bool SO >
986 struct IsSymmetric< DMatTransExpr<MT,SO> > : public IsTrue< IsSymmetric<MT>::value >
987 {};
989 //*************************************************************************************************
990 
991 
992 
993 
994 //=================================================================================================
995 //
996 // ISLOWER SPECIALIZATIONS
997 //
998 //=================================================================================================
999 
1000 //*************************************************************************************************
1002 template< typename MT, bool SO >
1003 struct IsLower< DMatTransExpr<MT,SO> > : public IsTrue< IsLower<MT>::value >
1004 {};
1006 //*************************************************************************************************
1007 
1008 
1009 
1010 
1011 //=================================================================================================
1012 //
1013 // ISUPPER SPECIALIZATIONS
1014 //
1015 //=================================================================================================
1016 
1017 //*************************************************************************************************
1019 template< typename MT, bool SO >
1020 struct IsUpper< DMatTransExpr<MT,SO> > : public IsTrue< IsUpper<MT>::value >
1021 {};
1023 //*************************************************************************************************
1024 
1025 
1026 
1027 
1028 //=================================================================================================
1029 //
1030 // EXPRESSION TRAIT SPECIALIZATIONS
1031 //
1032 //=================================================================================================
1033 
1034 //*************************************************************************************************
1036 template< typename MT, bool SO, bool AF >
1037 struct SubmatrixExprTrait< DMatTransExpr<MT,SO>, AF >
1038 {
1039  public:
1040  //**********************************************************************************************
1041  typedef typename TransExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
1042  //**********************************************************************************************
1043 };
1045 //*************************************************************************************************
1046 
1047 
1048 //*************************************************************************************************
1050 template< typename MT, bool SO >
1051 struct RowExprTrait< DMatTransExpr<MT,SO> >
1052 {
1053  public:
1054  //**********************************************************************************************
1055  typedef typename TransExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
1056  //**********************************************************************************************
1057 };
1059 //*************************************************************************************************
1060 
1061 
1062 //*************************************************************************************************
1064 template< typename MT, bool SO >
1065 struct ColumnExprTrait< DMatTransExpr<MT,SO> >
1066 {
1067  public:
1068  //**********************************************************************************************
1069  typedef typename TransExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
1070  //**********************************************************************************************
1071 };
1073 //*************************************************************************************************
1074 
1075 } // namespace blaze
1076 
1077 #endif
Pointer difference type of the Blaze library.
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatTransExpr.h:202
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatTransExpr.h:213
Header file for the Rows type trait.
IteratorCategory iterator_category
The iterator category.
Definition: DMatTransExpr.h:164
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:258
DMatTransExpr(const MT &dm)
Constructor for the DMatTransExpr class.
Definition: DMatTransExpr.h:403
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatTransExpr.h:190
SelectType< useAssign, const ResultType, const DMatTransExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DMatTransExpr.h:144
Expression object for dense matrix transpositions.The DMatTransExpr class represents the compile time...
Definition: DMatTransExpr.h:90
#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:205
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:366
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTransExpr.h:137
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2478
IntrinsicType load(size_t i, size_t j) const
Access to the intrinsic elements of the matrix.
Definition: DMatTransExpr.h:429
MT::ConstIterator IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatTransExpr.h:171
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:695
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:561
Header file for the RequiresEvaluation type trait.
Operand dm_
Dense matrix of the transposition expression.
Definition: DMatTransExpr.h:578
Operand operand() const
Returns the dense matrix operand.
Definition: DMatTransExpr.h:527
ReferenceType reference
Reference return type.
Definition: DMatTransExpr.h:167
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransExpr.h:455
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:136
Constraint on the data type.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatTransExpr.h:245
Constraint on the data type.
MT::ElementType ElementType
Resulting element type.
Definition: DMatTransExpr.h:139
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:265
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatTransExpr.h:354
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DMatTransExpr.h:551
ValueType value_type
Type of the underlying elements.
Definition: DMatTransExpr.h:165
ConstIterator(IteratorType iterator)
Constructor for the ConstIterator class.
Definition: DMatTransExpr.h:179
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:166
Header file for the IsSymmetric type trait.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatTransExpr.h:161
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:287
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the dense matrix expression.
Definition: DMatTransExpr.h:147
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
Header file for the DenseMatrix base class.
BLAZE_ALWAYS_INLINE 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:635
Header file for the Columns type trait.
IteratorType iterator_
Iterator to the current element.
Definition: DMatTransExpr.h:385
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:140
Header file for the IsLower type trait.
MT::ResultType RT
Result type of the dense matrix expression.
Definition: DMatTransExpr.h:96
MT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: DMatTransExpr.h:138
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatTransExpr.h:234
#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:444
DifferenceType difference_type
Difference between two iterators.
Definition: DMatTransExpr.h:168
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2475
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
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:331
Header file for the EnableIf class template.
Header file for the serial shim.
ElementType * PointerType
Pointer return type.
Definition: DMatTransExpr.h:159
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatTransExpr.h:342
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatTransExpr.h:378
Header file for the dense matrix transposer.
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
size_t spacing() const
Returns the spacing between the beginning of two rows/columns.
Definition: DMatTransExpr.h:496
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2477
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
ElementType ValueType
Type of the underlying elements.
Definition: DMatTransExpr.h:158
size_t rows() const
Returns the current number of rows of the matrix.
Definition: DMatTransExpr.h:476
BLAZE_ALWAYS_INLINE 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:742
size_t columns() const
Returns the current number of columns of the matrix.
Definition: DMatTransExpr.h:486
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:276
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
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:415
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransExpr.h:466
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatTransExpr.h:224
#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:160
Iterator over the elements of the dense matrix.
Definition: DMatTransExpr.h:153
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatTransExpr.h:255
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:932
Header file for the IsComputation type trait class.
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatTransExpr.h:157
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< 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:129
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:320
MT::CompositeType CT
Composite type of the dense matrix expression.
Definition: DMatTransExpr.h:97
#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:2473
Header file for the IsTrue value trait.
Header file for basic type definitions.
size_t nonZeros() const
Returns the number of non-zero elements in the dense matrix.
Definition: DMatTransExpr.h:506
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: DMatTransExpr.h:571
Header file for the IsUpper type trait.
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DMatTransExpr.h:141
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row/column.
Definition: DMatTransExpr.h:517
Header file for the empty type.
DMatTransExpr< MT, SO > This
Type of this DMatTransExpr instance.
Definition: DMatTransExpr.h:135
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:309
#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:539
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatTransExpr.h:298
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE 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:849