Blaze  3.6
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 
43 #include <iterator>
44 #include <blaze/math/Aliases.h>
48 #include <blaze/math/Exception.h>
63 #include <blaze/system/Inline.h>
64 #include <blaze/util/Assert.h>
65 #include <blaze/util/EnableIf.h>
67 #include <blaze/util/InvalidType.h>
68 #include <blaze/util/mpl/If.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
91  : public MatTransExpr< DenseMatrix< DMatTransExpr<MT,SO>, SO > >
92  , private If< IsComputation_v<MT>, Computation, Transformation >::Type
93 {
94  private:
95  //**Type definitions****************************************************************************
96  using RT = ResultType_t<MT>;
98 
100  BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT( GetConstIterator, ConstIterator, INVALID_TYPE );
101  //**********************************************************************************************
102 
103  //**Serial evaluation strategy******************************************************************
105 
111  static constexpr bool useAssign = RequiresEvaluation_v<MT>;
112 
114  template< typename MT2 >
116  static constexpr bool UseAssign_v = useAssign;
118  //**********************************************************************************************
119 
120  //**Parallel evaluation strategy****************************************************************
122 
128  template< typename MT2 >
129  static constexpr bool UseSMPAssign_v = ( MT2::smpAssignable && useAssign );
131  //**********************************************************************************************
132 
133  public:
134  //**Type definitions****************************************************************************
142 
145 
147  using ConstIterator = GetConstIterator_t<MT>;
148 
150  using Operand = If_t< IsExpression_v<MT>, const MT, const MT& >;
151  //**********************************************************************************************
152 
153  //**Compilation flags***************************************************************************
155  static constexpr bool simdEnabled = MT::simdEnabled;
156 
158  static constexpr bool smpAssignable = MT::smpAssignable;
159  //**********************************************************************************************
160 
161  //**SIMD properties*****************************************************************************
163  static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
164  //**********************************************************************************************
165 
166  //**Constructor*********************************************************************************
171  explicit inline DMatTransExpr( const MT& dm ) noexcept
172  : dm_( dm ) // Dense matrix of the transposition expression
173  {}
174  //**********************************************************************************************
175 
176  //**Access operator*****************************************************************************
183  inline ReturnType operator()( size_t i, size_t j ) const {
184  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
185  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
186  return dm_(j,i);
187  }
188  //**********************************************************************************************
189 
190  //**At function*********************************************************************************
198  inline ReturnType at( size_t i, size_t j ) const {
199  if( i >= dm_.columns() ) {
200  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
201  }
202  if( j >= dm_.rows() ) {
203  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
204  }
205  return (*this)(i,j);
206  }
207  //**********************************************************************************************
208 
209  //**Load function*******************************************************************************
216  BLAZE_ALWAYS_INLINE auto load( size_t i, size_t j ) const noexcept {
217  BLAZE_INTERNAL_ASSERT( i < dm_.columns(), "Invalid row access index" );
218  BLAZE_INTERNAL_ASSERT( j < dm_.rows() , "Invalid column access index" );
219  BLAZE_INTERNAL_ASSERT( !SO || ( i % SIMDSIZE == 0UL ), "Invalid row access index" );
220  BLAZE_INTERNAL_ASSERT( SO || ( j % SIMDSIZE == 0UL ), "Invalid column access index" );
221  return dm_.load(j,i);
222  }
223  //**********************************************************************************************
224 
225  //**Low-level data access***********************************************************************
230  inline const ElementType* data() const noexcept {
231  return dm_.data();
232  }
233  //**********************************************************************************************
234 
235  //**Begin function******************************************************************************
241  inline ConstIterator begin( size_t i ) const {
242  return ConstIterator( dm_.begin(i) );
243  }
244  //**********************************************************************************************
245 
246  //**End function********************************************************************************
252  inline ConstIterator end( size_t i ) const {
253  return ConstIterator( dm_.end(i) );
254  }
255  //**********************************************************************************************
256 
257  //**Rows function*******************************************************************************
262  inline size_t rows() const noexcept {
263  return dm_.columns();
264  }
265  //**********************************************************************************************
266 
267  //**Columns function****************************************************************************
272  inline size_t columns() const noexcept {
273  return dm_.rows();
274  }
275  //**********************************************************************************************
276 
277  //**Spacing function****************************************************************************
282  inline size_t spacing() const noexcept {
283  return dm_.spacing();
284  }
285  //**********************************************************************************************
286 
287  //**NonZeros function***************************************************************************
292  inline size_t nonZeros() const {
293  return dm_.nonZeros();
294  }
295  //**********************************************************************************************
296 
297  //**NonZeros function***************************************************************************
303  inline size_t nonZeros( size_t i ) const {
304  return dm_.nonZeros( i );
305  }
306  //**********************************************************************************************
307 
308  //**Operand access******************************************************************************
313  inline Operand operand() const noexcept {
314  return dm_;
315  }
316  //**********************************************************************************************
317 
318  //**********************************************************************************************
324  template< typename T >
325  inline bool canAlias( const T* alias ) const noexcept {
326  return dm_.isAliased( alias );
327  }
328  //**********************************************************************************************
329 
330  //**********************************************************************************************
336  template< typename T >
337  inline bool isAliased( const T* alias ) const noexcept {
338  return dm_.isAliased( alias );
339  }
340  //**********************************************************************************************
341 
342  //**********************************************************************************************
347  inline bool isAligned() const noexcept {
348  return dm_.isAligned();
349  }
350  //**********************************************************************************************
351 
352  //**********************************************************************************************
357  inline bool canSMPAssign() const noexcept {
358  return dm_.canSMPAssign();
359  }
360  //**********************************************************************************************
361 
362  private:
363  //**Member variables****************************************************************************
365  //**********************************************************************************************
366 
367  //**Assignment to dense matrices****************************************************************
381  template< typename MT2 // Type of the target dense matrix
382  , bool SO2 > // Storage order of the target dense matrix
383  friend inline auto assign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
385  {
387 
388  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
389  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
390 
391  DMatTransposer<MT2,!SO2> tmp( ~lhs );
392  assign( tmp, rhs.dm_ );
393  }
395  //**********************************************************************************************
396 
397  //**Assignment to sparse matrices***************************************************************
411  template< typename MT2 // Type of the target sparse matrix
412  , bool SO2 > // Storage order of the target sparse matrix
413  friend inline auto assign( SparseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
415  {
417 
419 
426 
427  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
428  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
429 
430  const TmpType tmp( serial( rhs ) );
431  assign( ~lhs, tmp );
432  }
434  //**********************************************************************************************
435 
436  //**Addition assignment to dense matrices*******************************************************
450  template< typename MT2 // Type of the target dense matrix
451  , bool SO2 > // Storage order of the target dense matrix
452  friend inline auto addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
453  -> EnableIf_t< UseAssign_v<MT2> >
454  {
456 
457  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
458  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
459 
460  DMatTransposer<MT2,!SO2> tmp( ~lhs );
461  addAssign( tmp, rhs.dm_ );
462  }
464  //**********************************************************************************************
465 
466  //**Addition assignment to sparse matrices******************************************************
467  // No special implementation for the addition assignment to sparse matrices.
468  //**********************************************************************************************
469 
470  //**Subtraction assignment to dense matrices****************************************************
484  template< typename MT2 // Type of the target dense matrix
485  , bool SO2 > // Storage order of the target dense matrix
486  friend inline auto subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
487  -> EnableIf_t< UseAssign_v<MT2> >
488  {
490 
491  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
492  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
493 
494  DMatTransposer<MT2,!SO2> tmp( ~lhs );
495  subAssign( tmp, rhs.dm_ );
496  }
498  //**********************************************************************************************
499 
500  //**Subtraction assignment to sparse matrices***************************************************
501  // No special implementation for the subtraction assignment to sparse matrices.
502  //**********************************************************************************************
503 
504  //**Schur product assignment to dense matrices**************************************************
518  template< typename MT2 // Type of the target dense matrix
519  , bool SO2 > // Storage order of the target dense matrix
520  friend inline auto schurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
521  -> EnableIf_t< UseAssign_v<MT2> >
522  {
524 
525  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
526  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
527 
528  DMatTransposer<MT2,!SO2> tmp( ~lhs );
529  schurAssign( tmp, rhs.dm_ );
530  }
532  //**********************************************************************************************
533 
534  //**Schur product assignment to sparse matrices*************************************************
535  // No special implementation for the Schur product assignment to sparse matrices.
536  //**********************************************************************************************
537 
538  //**Multiplication assignment to dense matrices*************************************************
539  // No special implementation for the multiplication assignment to dense matrices.
540  //**********************************************************************************************
541 
542  //**Multiplication assignment to sparse matrices************************************************
543  // No special implementation for the multiplication assignment to sparse matrices.
544  //**********************************************************************************************
545 
546  //**SMP assignment to dense matrices************************************************************
560  template< typename MT2 // Type of the target dense matrix
561  , bool SO2 > // Storage order of the target dense matrix
562  friend inline auto smpAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
563  -> EnableIf_t< UseSMPAssign_v<MT2> >
564  {
566 
567  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
568  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
569 
570  DMatTransposer<MT2,!SO2> tmp( ~lhs );
571  smpAssign( tmp, rhs.dm_ );
572  }
574  //**********************************************************************************************
575 
576  //**SMP assignment to sparse matrices***********************************************************
590  template< typename MT2 // Type of the target sparse matrix
591  , bool SO2 > // Storage order of the target sparse matrix
592  friend inline auto smpAssign( SparseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
593  -> EnableIf_t< UseSMPAssign_v<MT2> >
594  {
596 
597  using TmpType = If_t< SO == SO2, ResultType, OppositeType >;
598 
605 
606  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
607  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
608 
609  const TmpType tmp( rhs );
610  smpAssign( ~lhs, tmp );
611  }
613  //**********************************************************************************************
614 
615  //**SMP addition assignment to dense matrices***************************************************
629  template< typename MT2 // Type of the target dense matrix
630  , bool SO2 > // Storage order of the target dense matrix
631  friend inline auto smpAddAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
632  -> EnableIf_t< UseSMPAssign_v<MT2> >
633  {
635 
636  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
637  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
638 
639  DMatTransposer<MT2,!SO2> tmp( ~lhs );
640  smpAddAssign( tmp, rhs.dm_ );
641  }
643  //**********************************************************************************************
644 
645  //**SMP addition assignment to sparse matrices**************************************************
646  // No special implementation for the SMP addition assignment to sparse matrices.
647  //**********************************************************************************************
648 
649  //**SMP subtraction assignment to dense matrices************************************************
663  template< typename MT2 // Type of the target dense matrix
664  , bool SO2 > // Storage order of the target dense matrix
665  friend inline auto smpSubAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
666  -> EnableIf_t< UseSMPAssign_v<MT2> >
667  {
669 
670  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
671  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
672 
673  DMatTransposer<MT2,!SO2> tmp( ~lhs );
674  smpSubAssign( tmp, rhs.dm_ );
675  }
677  //**********************************************************************************************
678 
679  //**SMP subtraction assignment to sparse matrices***********************************************
680  // No special implementation for the SMP subtraction assignment to sparse matrices.
681  //**********************************************************************************************
682 
683  //**SMP Schur product 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 auto smpSchurAssign( DenseMatrix<MT2,SO2>& lhs, const DMatTransExpr& rhs )
701  -> EnableIf_t< UseSMPAssign_v<MT2> >
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  smpSchurAssign( tmp, rhs.dm_ );
710  }
712  //**********************************************************************************************
713 
714  //**SMP Schur product assignment to sparse matrices*********************************************
715  // No special implementation for the SMP Schur product assignment to sparse matrices.
716  //**********************************************************************************************
717 
718  //**SMP multiplication assignment to dense matrices*********************************************
719  // No special implementation for the SMP multiplication assignment to dense matrices.
720  //**********************************************************************************************
721 
722  //**SMP multiplication assignment to sparse matrices********************************************
723  // No special implementation for the SMP multiplication assignment to sparse matrices.
724  //**********************************************************************************************
725 
726  //**Compile time checks*************************************************************************
731  //**********************************************************************************************
732 };
733 //*************************************************************************************************
734 
735 
736 
737 
738 //=================================================================================================
739 //
740 // GLOBAL OPERATORS
741 //
742 //=================================================================================================
743 
744 //*************************************************************************************************
763 template< typename MT // Type of the dense matrix
764  , bool SO > // Storage order
765 inline decltype(auto) trans( const DenseMatrix<MT,SO>& dm )
766 {
768 
769  using ReturnType = const DMatTransExpr<MT,!SO>;
770  return ReturnType( ~dm );
771 }
772 //*************************************************************************************************
773 
774 
775 
776 
777 //=================================================================================================
778 //
779 // GLOBAL RESTRUCTURING FUNCTIONS
780 //
781 //=================================================================================================
782 
783 //*************************************************************************************************
803 template< typename MT // Type of the dense matrix
804  , bool SO > // Storage order
805 inline decltype(auto) trans( const DMatTransExpr<MT,SO>& dm )
806 {
808 
809  return dm.operand();
810 }
812 //*************************************************************************************************
813 
814 
815 //*************************************************************************************************
827 template< typename MT // Type of the left-hand side dense matrix
828  , typename ST // Type of the right-hand side scalar value
829  , bool SO > // Storage order
830 inline decltype(auto) trans( const DMatScalarMultExpr<MT,ST,SO>& dm )
831 {
833 
834  return trans( dm.leftOperand() ) * dm.rightOperand();
835 }
837 //*************************************************************************************************
838 
839 
840 
841 
842 //=================================================================================================
843 //
844 // HASCONSTDATAACCESS SPECIALIZATIONS
845 //
846 //=================================================================================================
847 
848 //*************************************************************************************************
850 template< typename MT, bool SO >
851 struct HasConstDataAccess< DMatTransExpr<MT,SO> >
852  : public HasConstDataAccess<MT>
853 {};
855 //*************************************************************************************************
856 
857 
858 
859 
860 //=================================================================================================
861 //
862 // ISALIGNED SPECIALIZATIONS
863 //
864 //=================================================================================================
865 
866 //*************************************************************************************************
868 template< typename MT, bool SO >
869 struct IsAligned< DMatTransExpr<MT,SO> >
870  : public IsAligned<MT>
871 {};
873 //*************************************************************************************************
874 
875 
876 
877 
878 //=================================================================================================
879 //
880 // ISPADDED SPECIALIZATIONS
881 //
882 //=================================================================================================
883 
884 //*************************************************************************************************
886 template< typename MT, bool SO >
887 struct IsPadded< DMatTransExpr<MT,SO> >
888  : public IsPadded<MT>
889 {};
891 //*************************************************************************************************
892 
893 } // namespace blaze
894 
895 #endif
Header file for auxiliary alias declarations.
size_t spacing() const noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DMatTransExpr.h:282
Compile time type selection.The If class template selects one of the two given types T1 and T2 depend...
Definition: If.h:59
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatTransExpr.h:347
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
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:63
Header file for the MatTransExpr base class.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatTransExpr.h:357
#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:61
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatTransExpr.h:138
const ElementType * data() const noexcept
Low-level data access to the matrix elements.
Definition: DMatTransExpr.h:230
Header file for the Computation base class.
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatTransExpr.h:313
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatTransExpr.h:272
Header file for the RequiresEvaluation type trait.
Operand dm_
Dense matrix of the transposition expression.
Definition: DMatTransExpr.h:364
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Header file for the SIMD trait.
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatTransExpr.h:158
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatTransExpr.h:216
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes....
Definition: Forward.h:145
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Constraint on the data type.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
ElementType_t< MT > ElementType
Resulting element type.
Definition: DMatTransExpr.h:140
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
GetConstIterator_t< MT > ConstIterator
Iterator over the elements of the dense matrix.
Definition: DMatTransExpr.h:147
Header file for the If class template.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatTransExpr.h:252
Header file for the Transformation base class.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatTransExpr.h:262
TransposeType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DMatTransExpr.h:137
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Expression object for the transposition of a dense matrix.The DMatTransposer class is a wrapper objec...
Definition: DMatTransposer.h:77
Header file for the GetMemberType type trait.
Header file for the IsAligned type trait.
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the transposition expression.
Definition: DMatTransExpr.h:111
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
Constraint on the data type.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatTransExpr.h:325
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatTransExpr.h:163
Header file for the EnableIf class template.
Header file for the IsPadded type trait.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatTransExpr.h:337
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatTransExpr.h:183
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
Header file for the dense matrix transposer.
Header file for the HasConstDataAccess type trait.
DMatTransExpr(const MT &dm) noexcept
Constructor for the DMatTransExpr class.
Definition: DMatTransExpr.h:171
ResultType_t< MT > RT
Result type of the dense matrix expression.
Definition: DMatTransExpr.h:96
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
Utility type for generic codes.
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
size_t nonZeros() const
Returns the number of non-zero elements in the dense matrix.
Definition: DMatTransExpr.h:292
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatTransExpr.h:241
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Header file for all forward declarations for expression class templates.
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Base class for all matrix transposition expression templates.The MatTransExpr class serves as a tag f...
Definition: MatTransExpr.h:66
CompositeType_t< MT > CT
Composite type of the dense matrix expression.
Definition: DMatTransExpr.h:97
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatTransExpr.h:141
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
#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:84
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
Header file for the IsComputation type trait class.
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatTransExpr.h:155
ResultType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatTransExpr.h:139
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row/column.
Definition: DMatTransExpr.h:303
System settings for the inline keywords.
If_t< useAssign, const ResultType, const DMatTransExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatTransExpr.h:144
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
If_t< IsExpression_v< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatTransExpr.h:150
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatTransExpr.h:198