35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATTRANSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATTRANSEXPR_H_
86 ,
private SelectType< IsComputation<MT>::value, Computation, EmptyType >::Type
105 template<
typename MT2 >
108 enum { value = useAssign };
120 template<
typename MT2 >
121 struct UseSMPAssign {
122 enum { value = MT2::smpAssignable && useAssign };
386 enum { vectorizable = MT::vectorizable };
389 enum { smpAssignable = MT::smpAssignable };
429 return dm_.load(j,i);
471 return dm_.columns();
491 return dm_.spacing();
511 template<
typename T >
513 return dm_.canAlias( alias );
523 template<
typename T >
525 return dm_.isAliased( alias );
535 return dm_.isAligned();
545 return dm_.canSMPAssign();
568 template<
typename MT2
598 template<
typename MT2
617 const TmpType tmp(
serial( rhs ) );
637 template<
typename MT2
639 friend inline typename EnableIf< UseAssign<MT2> >::Type
647 DMatTransposer<MT2,!SO2> tmp( ~lhs );
671 template<
typename MT2
673 friend inline typename EnableIf< UseAssign<MT2> >::Type
681 DMatTransposer<MT2,!SO2> tmp( ~lhs );
713 template<
typename MT2
715 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
723 DMatTransposer<MT2,!SO2> tmp( ~lhs );
743 template<
typename MT2
745 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
750 typedef typename SelectType< SO == SO2, ResultType, OppositeType >::Type TmpType;
762 const TmpType tmp( rhs );
782 template<
typename MT2
784 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
792 DMatTransposer<MT2,!SO2> tmp( ~lhs );
816 template<
typename MT2
818 friend inline typename EnableIf< UseSMPAssign<MT2> >::Type
826 DMatTransposer<MT2,!SO2> tmp( ~lhs );
860 template<
typename MT2
862 friend inline Operand trans(
const DMatTransExpr<MT2,SO2>& dm )
905 template<
typename MT
926 template<
typename MT,
bool SO,
bool AF >
927 struct SubmatrixExprTrait< DMatTransExpr<MT,SO>, AF >
931 typedef typename TransExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
940 template<
typename MT,
bool SO >
941 struct RowExprTrait< DMatTransExpr<MT,SO> >
945 typedef typename TransExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
954 template<
typename MT,
bool SO >
955 struct ColumnExprTrait< DMatTransExpr<MT,SO> >
959 typedef typename TransExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
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.