Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
blaze::DMatTransposer< MT, SO > Class Template Reference

Expression object for the transposition of a dense matrix.The DMatTransposer class is a wrapper object for the temporary transposition of a dense matrix. More...

#include <DMatTransposer.h>

Inherits blaze::DenseMatrix< DMatTransposer< MT, SO >, SO >.

Public Types

enum  { vectorizable = MT::vectorizable }
 Compilation flag for intrinsic optimization. More...
 
enum  { smpAssignable = MT::smpAssignable }
 Compilation flag for SMP assignments. More...
 
typedef DMatTransposer< MT, SO > This
 Type of this DMatTransposer instance.
 
typedef MT::TransposeType ResultType
 Result type for expression template evaluations.
 
typedef MT::OppositeType OppositeType
 Result type with opposite storage order for expression template evaluations.
 
typedef MT::ResultType TransposeType
 Transpose type for expression template evaluations.
 
typedef MT::ElementType ElementType
 Type of the matrix elements.
 
typedef IT::Type IntrinsicType
 Intrinsic type of the matrix elements.
 
typedef MT::ReturnType ReturnType
 Return type for expression template evaluations.
 
typedef const ThisCompositeType
 Data type for composite expression templates.
 
typedef MT::Reference Reference
 Reference to a non-constant matrix value.
 
typedef MT::ConstReference ConstReference
 Reference to a constant matrix value.
 
typedef MT::Iterator Iterator
 Iterator over non-constant elements.
 
typedef MT::ConstIterator ConstIterator
 Iterator over constant elements.
 
typedef MT MatrixType
 Type of the matrix.
 

Public Member Functions

 DMatTransposer (MT &dm)
 Constructor for the DMatTransposer class. More...
 
Reference operator() (size_t i, size_t j)
 2D-access to the matrix elements. More...
 
ConstReference operator() (size_t i, size_t j) const
 2D-access to the matrix elements. More...
 
ElementTypedata ()
 Low-level data access to the matrix elements. More...
 
Iterator begin (size_t i)
 Returns an iterator to the first non-zero element of row/column i. More...
 
ConstIterator begin (size_t i) const
 Returns an iterator to the first non-zero element of row/column i. More...
 
ConstIterator cbegin (size_t i) const
 Returns an iterator to the first non-zero element of row/column i. More...
 
Iterator end (size_t i)
 Returns an iterator just past the last non-zero element of row/column i. More...
 
ConstIterator end (size_t i) const
 Returns an iterator just past the last non-zero element of row/column i. More...
 
ConstIterator cend (size_t i) const
 Returns an iterator just past the last non-zero element of row/column i. More...
 
template<typename Other >
EnableIf< IsNumeric< Other >, DMatTransposer >::Type & operator*= (Other rhs)
 Multiplication assignment operator for the multiplication between a matrix and a scalar value ( $ A*=s $). More...
 
template<typename Other >
EnableIf< IsNumeric< Other >, DMatTransposer >::Type & operator/= (Other rhs)
 Division assignment operator for the division of a matrix by a scalar value ( $ A/=s $). More...
 
size_t rows () const
 Returns the current number of rows of the matrix. More...
 
size_t columns () const
 Returns the current number of columns of the matrix. More...
 
size_t spacing () const
 Returns the spacing between the beginning of two rows. More...
 
void reset ()
 Resets the matrix elements. More...
 
template<typename Other >
bool canAlias (const Other *alias) const
 Returns whether the matrix can alias with the given address alias. More...
 
template<typename Other >
bool isAliased (const Other *alias) const
 Returns whether the matrix is aliased with the given address alias. More...
 
bool isAligned () const
 Returns whether the matrix is properly aligned in memory. More...
 
bool canSMPAssign () const
 Returns whether the matrix can be used in SMP assignments. More...
 
BLAZE_ALWAYS_INLINE IntrinsicType load (size_t i, size_t j) const
 Aligned load of an intrinsic element of the matrix. More...
 
BLAZE_ALWAYS_INLINE IntrinsicType loadu (size_t i, size_t j) const
 Unaligned load of an intrinsic element of the matrix. More...
 
BLAZE_ALWAYS_INLINE void store (size_t i, size_t j, const IntrinsicType &value)
 Aligned store of an intrinsic element of the matrix. More...
 
BLAZE_ALWAYS_INLINE void storeu (size_t i, size_t j, const IntrinsicType &value)
 Unaligned store of an intrinsic element of the matrix. More...
 
BLAZE_ALWAYS_INLINE void stream (size_t i, size_t j, const IntrinsicType &value)
 Aligned, non-temporal store of an intrinsic element of the matrix. More...
 
template<typename MT2 >
void assign (const DenseMatrix< MT2, SO > &rhs)
 Implementation of the transpose assignment of a row-major dense matrix. More...
 
template<typename MT2 >
void assign (const DenseMatrix< MT2,!SO > &rhs)
 Implementation of the transpose assignment of a column-major dense matrix. More...
 
template<typename MT2 >
void assign (const SparseMatrix< MT2, SO > &rhs)
 Implementation of the transpose assignment of a row-major sparse matrix. More...
 
template<typename MT2 >
void assign (const SparseMatrix< MT2,!SO > &rhs)
 Implementation of the transpose assignment of a column-major sparse matrix. More...
 
template<typename MT2 >
void addAssign (const DenseMatrix< MT2, SO > &rhs)
 Implementation of the transpose addition assignment of a row-major dense matrix. More...
 
template<typename MT2 >
void addAssign (const DenseMatrix< MT2,!SO > &rhs)
 Implementation of the transpose addition assignment of a column-major dense matrix. More...
 
template<typename MT2 >
void addAssign (const SparseMatrix< MT2, SO > &rhs)
 Implementation of the transpose addition assignment of a row-major sparse matrix. More...
 
template<typename MT2 >
void addAssign (const SparseMatrix< MT2,!SO > &rhs)
 Implementation of the transpose addition assignment of a column-major sparse matrix. More...
 
template<typename MT2 >
void subAssign (const DenseMatrix< MT2, SO > &rhs)
 Implementation of the transpose subtraction assignment of a row-major dense matrix. More...
 
template<typename MT2 >
void subAssign (const DenseMatrix< MT2,!SO > &rhs)
 Implementation of the transpose subtraction assignment of a column-major dense matrix. More...
 
template<typename MT2 >
void subAssign (const SparseMatrix< MT2, SO > &rhs)
 Implementation of the transpose subtraction assignment of a row-major sparse matrix. More...
 
template<typename MT2 >
void subAssign (const SparseMatrix< MT2,!SO > &rhs)
 Implementation of the transpose subtraction assignment of a column-major sparse matrix. More...
 
BLAZE_ALWAYS_INLINE MatrixTypeoperator~ ()
 Conversion operator for non-constant matrices. More...
 
BLAZE_ALWAYS_INLINE const MatrixTypeoperator~ () const
 Conversion operator for constant matrices. More...
 

Private Types

typedef IntrinsicTrait< typename MT::ElementType > IT
 Intrinsic trait for the vector element type.
 

Private Attributes

MT & dm_
 The dense matrix operand.
 

Detailed Description

template<typename MT, bool SO>
class blaze::DMatTransposer< MT, SO >

Expression object for the transposition of a dense matrix.

The DMatTransposer class is a wrapper object for the temporary transposition of a dense matrix.

Constructor & Destructor Documentation

template<typename MT , bool SO>
blaze::DMatTransposer< MT, SO >::DMatTransposer ( MT &  dm)
inlineexplicit

Constructor for the DMatTransposer class.

Parameters
dmThe dense matrix operand.

Member Function Documentation

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::addAssign ( const DenseMatrix< MT2, SO > &  rhs)
inline

Implementation of the transpose addition assignment of a row-major dense matrix.

Parameters
rhsThe right-hand side dense matrix to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::addAssign ( const DenseMatrix< MT2,!SO > &  rhs)
inline

Implementation of the transpose addition assignment of a column-major dense matrix.

Parameters
rhsThe right-hand side dense matrix to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::addAssign ( const SparseMatrix< MT2, SO > &  rhs)
inline

Implementation of the transpose addition assignment of a row-major sparse matrix.

Parameters
rhsThe right-hand side sparse matrix to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::addAssign ( const SparseMatrix< MT2,!SO > &  rhs)
inline

Implementation of the transpose addition assignment of a column-major sparse matrix.

Parameters
rhsThe right-hand side sparse matrix to be added.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::assign ( const DenseMatrix< MT2, SO > &  rhs)
inline

Implementation of the transpose assignment of a row-major dense matrix.

Parameters
rhsThe right-hand side dense matrix to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::assign ( const DenseMatrix< MT2,!SO > &  rhs)
inline

Implementation of the transpose assignment of a column-major dense matrix.

Parameters
rhsThe right-hand side dense matrix to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::assign ( const SparseMatrix< MT2, SO > &  rhs)
inline

Implementation of the transpose assignment of a row-major sparse matrix.

Parameters
rhsThe right-hand side sparse matrix to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::assign ( const SparseMatrix< MT2,!SO > &  rhs)
inline

Implementation of the transpose assignment of a column-major sparse matrix.

Parameters
rhsThe right-hand side sparse matrix to be assigned.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
Iterator blaze::DMatTransposer< MT, SO >::begin ( size_t  i)
inline

Returns an iterator to the first non-zero element of row/column i.

Parameters
iThe row/column index.
Returns
Iterator to the first non-zero element of row/column i.

This function returns a row/column iterator to the first non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator to the first non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator to the first non-zero element of column i.

template<typename MT , bool SO>
ConstIterator blaze::DMatTransposer< MT, SO >::begin ( size_t  i) const
inline

Returns an iterator to the first non-zero element of row/column i.

Parameters
iThe row/column index.
Returns
Iterator to the first non-zero element of row/column i.

This function returns a row/column iterator to the first non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator to the first non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator to the first non-zero element of column i.

template<typename MT , bool SO>
template<typename Other >
bool blaze::DMatTransposer< MT, SO >::canAlias ( const Other *  alias) const
inline

Returns whether the matrix can alias with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the alias corresponds to this matrix, false if not.
template<typename MT , bool SO>
bool blaze::DMatTransposer< MT, SO >::canSMPAssign ( ) const
inline

Returns whether the matrix can be used in SMP assignments.

Returns
true in case the matrix can be used in SMP assignments, false if not.
template<typename MT , bool SO>
ConstIterator blaze::DMatTransposer< MT, SO >::cbegin ( size_t  i) const
inline

Returns an iterator to the first non-zero element of row/column i.

Parameters
iThe row/column index.
Returns
Iterator to the first non-zero element of row/column i.

This function returns a row/column iterator to the first non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator to the first non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator to the first non-zero element of column i.

template<typename MT , bool SO>
ConstIterator blaze::DMatTransposer< MT, SO >::cend ( size_t  i) const
inline

Returns an iterator just past the last non-zero element of row/column i.

Parameters
iThe row/column index.
Returns
Iterator just past the last non-zero element of row/column i.

This function returns an row/column iterator just past the last non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator just past the last non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator just past the last non-zero element of column i.

template<typename MT , bool SO>
size_t blaze::DMatTransposer< MT, SO >::columns ( ) const
inline

Returns the current number of columns of the matrix.

Returns
The number of columns of the matrix.
template<typename MT , bool SO>
ElementType* blaze::DMatTransposer< MT, SO >::data ( )
inline

Low-level data access to the matrix elements.

Returns
Pointer to the internal element storage.
template<typename MT , bool SO>
Iterator blaze::DMatTransposer< MT, SO >::end ( size_t  i)
inline

Returns an iterator just past the last non-zero element of row/column i.

Parameters
iThe row/column index.
Returns
Iterator just past the last non-zero element of row/column i.

This function returns an row/column iterator just past the last non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator just past the last non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator just past the last non-zero element of column i.

template<typename MT , bool SO>
ConstIterator blaze::DMatTransposer< MT, SO >::end ( size_t  i) const
inline

Returns an iterator just past the last non-zero element of row/column i.

Parameters
iThe row/column index.
Returns
Iterator just past the last non-zero element of row/column i.

This function returns an row/column iterator just past the last non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator just past the last non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator just past the last non-zero element of column i.

template<typename MT , bool SO>
template<typename Other >
bool blaze::DMatTransposer< MT, SO >::isAliased ( const Other *  alias) const
inline

Returns whether the matrix is aliased with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the alias corresponds to this matrix, false if not.
template<typename MT , bool SO>
bool blaze::DMatTransposer< MT, SO >::isAligned ( ) const
inline

Returns whether the matrix is properly aligned in memory.

Returns
true in case the matrix is aligned, false if not.
template<typename MT , bool SO>
BLAZE_ALWAYS_INLINE IntrinsicType blaze::DMatTransposer< MT, SO >::load ( size_t  i,
size_t  j 
) const
inline

Aligned load of an intrinsic element of the matrix.

Parameters
iAccess index for the row. The index has to be in the range [0..M-1].
jAccess index for the column. The index has to be in the range [0..N-1].
Returns
The loaded intrinsic element.

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename MT , bool SO>
BLAZE_ALWAYS_INLINE IntrinsicType blaze::DMatTransposer< MT, SO >::loadu ( size_t  i,
size_t  j 
) const
inline

Unaligned load of an intrinsic element of the matrix.

Parameters
iAccess index for the row. The index has to be in the range [0..M-1].
jAccess index for the column. The index has to be in the range [0..N-1].
Returns
The loaded intrinsic element.

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename MT , bool SO>
Reference blaze::DMatTransposer< MT, SO >::operator() ( size_t  i,
size_t  j 
)
inline

2D-access to the matrix elements.

Parameters
iAccess index for the row. The index has to be in the range $[0..M-1]$.
jAccess index for the column. The index has to be in the range $[0..N-1]$.
Returns
Reference to the accessed value.
template<typename MT , bool SO>
ConstReference blaze::DMatTransposer< MT, SO >::operator() ( size_t  i,
size_t  j 
) const
inline

2D-access to the matrix elements.

Parameters
iAccess index for the row. The index has to be in the range $[0..M-1]$.
jAccess index for the column. The index has to be in the range $[0..N-1]$.
Returns
Reference to the accessed value.
template<typename MT , bool SO>
template<typename Other >
EnableIf< IsNumeric<Other>, DMatTransposer >::Type& blaze::DMatTransposer< MT, SO >::operator*= ( Other  rhs)
inline

Multiplication assignment operator for the multiplication between a matrix and a scalar value ( $ A*=s $).

Parameters
rhsThe right-hand side scalar value for the multiplication.
Returns
Reference to this DMatTransposer.
template<typename MT , bool SO>
template<typename Other >
EnableIf< IsNumeric<Other>, DMatTransposer >::Type& blaze::DMatTransposer< MT, SO >::operator/= ( Other  rhs)
inline

Division assignment operator for the division of a matrix by a scalar value ( $ A/=s $).

Parameters
rhsThe right-hand side scalar value for the division.
Returns
Reference to this DMatTransposer.

Note: A division by zero is only checked by an user assert.

template<typename MT, bool SO>
BLAZE_ALWAYS_INLINE MatrixType& blaze::Matrix< MT, SO >::operator~ ( )
inlineinherited

Conversion operator for non-constant matrices.

Returns
Reference of the actual type of the matrix.
template<typename MT, bool SO>
BLAZE_ALWAYS_INLINE const MatrixType& blaze::Matrix< MT, SO >::operator~ ( ) const
inlineinherited

Conversion operator for constant matrices.

Returns
Constant reference of the actual type of the matrix.
template<typename MT , bool SO>
void blaze::DMatTransposer< MT, SO >::reset ( )
inline

Resets the matrix elements.

Returns
void
template<typename MT , bool SO>
size_t blaze::DMatTransposer< MT, SO >::rows ( ) const
inline

Returns the current number of rows of the matrix.

Returns
The number of rows of the matrix.
template<typename MT , bool SO>
size_t blaze::DMatTransposer< MT, SO >::spacing ( ) const
inline

Returns the spacing between the beginning of two rows.

Returns
The spacing between the beginning of two rows.
template<typename MT , bool SO>
BLAZE_ALWAYS_INLINE void blaze::DMatTransposer< MT, SO >::store ( size_t  i,
size_t  j,
const IntrinsicType value 
)
inline

Aligned store of an intrinsic element of the matrix.

Parameters
iAccess index for the row. The index has to be in the range [0..M-1].
jAccess index for the column. The index has to be in the range [0..N-1].
valueThe intrinsic element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename MT , bool SO>
BLAZE_ALWAYS_INLINE void blaze::DMatTransposer< MT, SO >::storeu ( size_t  i,
size_t  j,
const IntrinsicType value 
)
inline

Unaligned store of an intrinsic element of the matrix.

Parameters
iAccess index for the row. The index has to be in the range [0..M-1].
jAccess index for the column. The index has to be in the range [0..N-1].
valueThe intrinsic element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename MT , bool SO>
BLAZE_ALWAYS_INLINE void blaze::DMatTransposer< MT, SO >::stream ( size_t  i,
size_t  j,
const IntrinsicType value 
)
inline

Aligned, non-temporal store of an intrinsic element of the matrix.

Parameters
iAccess index for the row. The index has to be in the range [0..M-1].
jAccess index for the column. The index has to be in the range [0..N-1].
valueThe intrinsic element to be stored.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::subAssign ( const DenseMatrix< MT2, SO > &  rhs)
inline

Implementation of the transpose subtraction assignment of a row-major dense matrix.

Parameters
rhsThe right-hand side dense matrix to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::subAssign ( const DenseMatrix< MT2,!SO > &  rhs)
inline

Implementation of the transpose subtraction assignment of a column-major dense matrix.

Parameters
rhsThe right-hand side dense matrix to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::subAssign ( const SparseMatrix< MT2, SO > &  rhs)
inline

Implementation of the transpose subtraction assignment of a row-major sparse matrix.

Parameters
rhsThe right-hand side sparse matrix to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.

template<typename MT , bool SO>
template<typename MT2 >
void blaze::DMatTransposer< MT, SO >::subAssign ( const SparseMatrix< MT2,!SO > &  rhs)
inline

Implementation of the transpose subtraction assignment of a column-major sparse matrix.

Parameters
rhsThe right-hand side sparse matrix to be subtracted.
Returns
void

This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.


The documentation for this class was generated from the following file: