35#ifndef _BLAZE_MATH_EXPRESSIONS_DMATNOALIASEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DMATNOALIASEXPR_H_
85 :
public MatNoAliasExpr< DenseMatrix< DMatNoAliasExpr<MT,SO>, SO > >
174 return dm_.load(i,j);
215 inline size_t rows() const noexcept {
226 return dm_.columns();
236 return dm_.spacing();
246 return dm_.nonZeros();
257 return dm_.nonZeros( i );
277 template<
typename T >
278 inline bool canAlias(
const T* alias )
const noexcept {
290 template<
typename T >
291 inline bool isAliased(
const T* alias )
const noexcept {
303 return dm_.isAligned();
313 return dm_.canSMPAssign();
336 template<
typename MT2
345 assign( *lhs, rhs.
dm_ );
364 template<
typename MT2
373 assign( *lhs, rhs.
dm_ );
392 template<
typename MT2
394 friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatNoAliasExpr& rhs )
401 addAssign( *lhs, rhs.dm_ );
424 template<
typename MT2
426 friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatNoAliasExpr& rhs )
433 subAssign( *lhs, rhs.dm_ );
456 template<
typename MT2
458 friend inline void schurAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatNoAliasExpr& rhs )
465 schurAssign( *lhs, rhs.dm_ );
496 template<
typename MT2
524 template<
typename MT2
552 template<
typename MT2
584 template<
typename MT2
616 template<
typename MT2
684 return ReturnType( *dm );
699template<
typename MT,
bool SO >
700struct HasConstDataAccess< DMatNoAliasExpr<MT,SO> >
701 :
public HasConstDataAccess<MT>
717template<
typename MT,
bool SO >
718struct IsAligned< DMatNoAliasExpr<MT,SO> >
719 :
public IsAligned<MT>
735template<
typename MT,
bool SO >
736struct IsPadded< DMatNoAliasExpr<MT,SO> >
737 :
public IsPadded<MT>
Header file for auxiliary alias declarations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition: Aliases.h:310
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
Header file for run time assertion macros.
Header file for the function trace functionality.
Header file for the GetMemberType type trait.
Header file for the HasConstDataAccess type trait.
Header file for the If class template.
Utility type for generic codes.
Header file for the IsAligned type trait.
Header file for the IsExpression type trait class.
Header file for the IsPadded type trait.
Header file for the MAYBE_UNUSED function template.
Header file for the SIMD trait.
Expression object for the non-aliased evaluation of dense matrices.
Definition: DMatNoAliasExpr.h:87
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatNoAliasExpr.h:104
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatNoAliasExpr.h:103
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatNoAliasExpr.h:120
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DMatNoAliasExpr.h:102
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatNoAliasExpr.h:302
size_t nonZeros() const
Returns the number of non-zero elements in the dense matrix.
Definition: DMatNoAliasExpr.h:245
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatNoAliasExpr.h:194
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatNoAliasExpr.h:148
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row/column.
Definition: DMatNoAliasExpr.h:256
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatNoAliasExpr.h:205
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatNoAliasExpr.h:225
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatNoAliasExpr.h:123
If_t< IsExpression_v< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatNoAliasExpr.h:115
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatNoAliasExpr.h:312
const ElementType * data() const noexcept
Low-level data access to the matrix elements.
Definition: DMatNoAliasExpr.h:183
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatNoAliasExpr.h:128
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatNoAliasExpr.h:266
Operand dm_
Dense matrix of the no-alias expression.
Definition: DMatNoAliasExpr.h:319
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatNoAliasExpr.h:106
ElementType_t< MT > ElementType
Resulting element type.
Definition: DMatNoAliasExpr.h:105
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatNoAliasExpr.h:291
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatNoAliasExpr.h:173
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatNoAliasExpr.h:161
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatNoAliasExpr.h:215
GetConstIterator_t< MT > ConstIterator
Iterator over the elements of the dense matrix.
Definition: DMatNoAliasExpr.h:112
If_t< RequiresEvaluation_v< MT >, const ResultType, const DMatNoAliasExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatNoAliasExpr.h:109
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatNoAliasExpr.h:278
size_t spacing() const noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DMatNoAliasExpr.h:235
DMatNoAliasExpr(const MT &dm) noexcept
Constructor for the DMatNoAliasExpr class.
Definition: DMatNoAliasExpr.h:136
Base class for dense matrices.
Definition: DenseMatrix.h:82
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Base class for sparse matrices.
Definition: SparseMatrix.h:77
Constraint on the data type.
Header file for the DenseMatrix base class.
Header file for the MatNoAliasExpr base class.
Header file for the Modification base class.
decltype(auto) noalias(const DenseMatrix< MT, SO > &dm)
Forces the non-aliased evaluation of the given dense matrix expression dm.
Definition: DMatNoAliasExpr.h:679
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition: StorageOrder.h:63
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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
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
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
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
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for the exception macros of the math module.
Constraints on the storage order of matrix types.
Header file for all forward declarations for expression class templates.
Base class for all matrix no-alias expression templates.
Definition: MatNoAliasExpr.h:68
Base class for all modification expression templates.
Definition: Modification.h:76
System settings for the inline keywords.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.