35#ifndef _BLAZE_MATH_EXPRESSIONS_DMATNOSIMDEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DMATNOSIMDEXPR_H_
85 :
public MatNoSIMDExpr< DenseMatrix< DMatNoSIMDExpr<MT,SO>, SO > >
102 static constexpr bool useAssign = RequiresEvaluation_v<MT>;
106 template<
typename MT2 >
107 static constexpr bool UseAssign_v =
useAssign;
119 template<
typename MT2 >
120 static constexpr bool UseSMPAssign_v = ( MT2::smpAssignable &&
useAssign );
204 return dm_.load(i,j);
245 inline size_t rows() const noexcept {
256 return dm_.columns();
266 return dm_.spacing();
276 return dm_.nonZeros();
287 return dm_.nonZeros( i );
307 template<
typename T >
308 inline bool canAlias(
const T* alias )
const noexcept {
309 return dm_.canAlias( alias );
319 template<
typename T >
320 inline bool isAliased(
const T* alias )
const noexcept {
321 return dm_.isAliased( alias );
331 return dm_.isAligned();
341 return dm_.canSMPAssign();
364 template<
typename MT2
374 assign( *lhs, rhs.dm_ );
393 template<
typename MT2
403 assign( *lhs, rhs.dm_ );
422 template<
typename MT2
424 friend inline auto addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatNoSIMDExpr& rhs )
425 -> EnableIf_t< UseAssign_v<MT2> >
432 addAssign( *lhs, rhs.dm_ );
455 template<
typename MT2
457 friend inline auto subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatNoSIMDExpr& rhs )
458 -> EnableIf_t< UseAssign_v<MT2> >
465 subAssign( *lhs, rhs.dm_ );
488 template<
typename MT2
490 friend inline auto schurAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatNoSIMDExpr& rhs )
491 -> EnableIf_t< UseAssign_v<MT2> >
498 schurAssign( *lhs, rhs.dm_ );
529 template<
typename MT2
532 -> EnableIf_t< UseSMPAssign_v<MT2> >
558 template<
typename MT2
561 -> EnableIf_t< UseSMPAssign_v<MT2> >
587 template<
typename MT2
590 -> EnableIf_t< UseSMPAssign_v<MT2> >
620 template<
typename MT2
623 -> EnableIf_t< UseSMPAssign_v<MT2> >
653 template<
typename MT2
656 -> EnableIf_t< UseSMPAssign_v<MT2> >
722 return ReturnType( *dm );
737template<
typename MT,
bool SO >
738struct HasConstDataAccess< DMatNoSIMDExpr<MT,SO> >
739 :
public HasConstDataAccess<MT>
755template<
typename MT,
bool SO >
756struct IsAligned< DMatNoSIMDExpr<MT,SO> >
757 :
public IsAligned<MT>
773template<
typename MT,
bool SO >
774struct IsPadded< DMatNoSIMDExpr<MT,SO> >
775 :
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 EnableIf class template.
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 SIMD trait.
Expression object for the non-SIMD evaluation of dense matrices.
Definition: DMatNoSIMDExpr.h:87
If_t< useAssign, const ResultType, const DMatNoSIMDExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatNoSIMDExpr.h:139
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatNoSIMDExpr.h:134
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatNoSIMDExpr.h:255
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatNoSIMDExpr.h:153
If_t< IsExpression_v< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatNoSIMDExpr.h:145
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatNoSIMDExpr.h:136
Operand dm_
Dense matrix of the no-SIMD expression.
Definition: DMatNoSIMDExpr.h:347
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatNoSIMDExpr.h:340
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatNoSIMDExpr.h:191
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DMatNoSIMDExpr.h:132
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatNoSIMDExpr.h:308
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DMatNoSIMDExpr.h:235
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the no-SIMD expression.
Definition: DMatNoSIMDExpr.h:102
DMatNoSIMDExpr(const MT &dm) noexcept
Constructor for the DMatNoSIMDExpr class.
Definition: DMatNoSIMDExpr.h:166
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatNoSIMDExpr.h:330
ElementType_t< MT > ElementType
Resulting element type.
Definition: DMatNoSIMDExpr.h:135
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatNoSIMDExpr.h:203
GetConstIterator_t< MT > ConstIterator
Iterator over the elements of the dense matrix.
Definition: DMatNoSIMDExpr.h:142
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatNoSIMDExpr.h:133
const ElementType * data() const noexcept
Low-level data access to the matrix elements.
Definition: DMatNoSIMDExpr.h:213
size_t spacing() const noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DMatNoSIMDExpr.h:265
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatNoSIMDExpr.h:296
size_t nonZeros() const
Returns the number of non-zero elements in the dense matrix.
Definition: DMatNoSIMDExpr.h:275
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatNoSIMDExpr.h:320
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatNoSIMDExpr.h:245
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatNoSIMDExpr.h:158
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatNoSIMDExpr.h:150
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatNoSIMDExpr.h:178
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DMatNoSIMDExpr.h:224
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row/column.
Definition: DMatNoSIMDExpr.h:286
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 MatNoSIMDExpr base class.
Header file for the Modification base class.
decltype(auto) nosimd(const DenseMatrix< MT, SO > &dm)
Disables the SIMD evaluation of the given dense matrix expression dm.
Definition: DMatNoSIMDExpr.h:717
#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
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
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-SIMD expression templates.
Definition: MatNoSIMDExpr.h:95
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.