35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSERIALEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATSERIALEXPR_H_ 77 :
public MatSerialExpr< DenseMatrix< DMatSerialExpr<MT,SO>, SO > >
138 if( i >=
dm_.rows() ) {
141 if( j >=
dm_.columns() ) {
153 inline size_t rows() const noexcept {
164 return dm_.columns();
194 template<
typename T >
195 inline bool canAlias(
const T* alias )
const noexcept {
196 return dm_.canAlias( alias );
206 template<
typename T >
207 inline bool isAliased(
const T* alias )
const noexcept {
208 return dm_.isAliased( alias );
218 return dm_.isAligned();
228 return dm_.canSMPAssign();
249 template<
typename MT2
258 assign( ~lhs, rhs.
dm_ );
275 template<
typename MT2
284 assign( ~lhs, rhs.
dm_ );
301 template<
typename MT2
303 friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
310 addAssign( ~lhs, rhs.dm_ );
327 template<
typename MT2
329 friend inline void addAssign( SparseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
336 addAssign( ~lhs, rhs.dm_ );
354 template<
typename MT2
356 friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
363 subAssign( ~lhs, rhs.dm_ );
381 template<
typename MT2
383 friend inline void subAssign( SparseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
390 subAssign( ~lhs, rhs.dm_ );
408 template<
typename MT2
410 friend inline void schurAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
417 schurAssign( ~lhs, rhs.dm_ );
435 template<
typename MT2
437 friend inline void schurAssign( SparseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
444 schurAssign( ~lhs, rhs.dm_ );
462 template<
typename MT2
464 friend inline void multAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
471 multAssign( ~lhs, rhs.sm_ );
489 template<
typename MT2
491 friend inline void multAssign( SparseMatrix<MT2,SO2>& lhs,
const DMatSerialExpr& rhs )
498 multAssign( ~lhs, rhs.sm_ );
515 template<
typename MT2
524 assign( ~lhs, rhs.dm_ );
541 template<
typename MT2
550 assign( ~lhs, rhs.dm_ );
568 template<
typename MT2
577 addAssign( ~lhs, rhs.dm_ );
595 template<
typename MT2
604 addAssign( ~lhs, rhs.dm_ );
622 template<
typename MT2
631 subAssign( ~lhs, rhs.dm_ );
649 template<
typename MT2
658 subAssign( ~lhs, rhs.dm_ );
676 template<
typename MT2
685 schurAssign( ~lhs, rhs.dm_ );
703 template<
typename MT2
712 schurAssign( ~lhs, rhs.dm_ );
730 template<
typename MT2
739 multAssign( ~lhs, rhs.sm_ );
757 template<
typename MT2
766 multAssign( ~lhs, rhs.sm_ );
806 template<
typename MT
813 return ReturnType( ~dm );
837 template<
typename MT
839 inline decltype(
auto)
serial( const DMatSerialExpr<MT,SO>& dm )
857 template<
typename MT,
bool SO >
858 struct IsAligned< DMatSerialExpr<MT,SO> >
859 :
public IsAligned<MT>
Header file for auxiliary alias declarations.
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatSerialExpr.h:99
DMatSerialExpr(const MT &dm) noexcept
Constructor for the DMatSerialExpr class.
Definition: DMatSerialExpr.h:110
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatSerialExpr.h:207
Header file for basic type definitions.
Base class for all matrix serial evaluation expression templates.The MatSerialExpr class serves as a ...
Definition: MatSerialExpr.h:67
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
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSerialExpr.h:85
#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
#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
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatSerialExpr.h:217
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSerialExpr.h:195
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatSerialExpr.h:88
Header file for the Computation base class.
ElementType_t< MT > ElementType
Resulting element type.
Definition: DMatSerialExpr.h:87
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatSerialExpr.h:102
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.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Expression object for the forced serial evaluation of dense matrices.The DMatSerialExpr class represe...
Definition: DMatSerialExpr.h:76
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSerialExpr.h:122
#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.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSerialExpr.h:153
Header file for the IsAligned type trait.
If_t< IsExpression_v< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatSerialExpr.h:94
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DMatSerialExpr.h:84
Header file for the MatSerialExpr base class.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatSerialExpr.h:227
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatSerialExpr.h:91
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
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.
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_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.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatSerialExpr.h:163
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
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 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
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSerialExpr.h:137
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatSerialExpr.h:173
Operand dm_
Dense matrix of the serial evaluation expression.
Definition: DMatSerialExpr.h:234
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatSerialExpr.h:86
#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
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector.
Definition: DenseVector.h:191
Header file for the IsExpression type trait class.
Header file for the function trace functionality.