35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECEXPANDEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECEXPANDEXPR_H_
92 :
public VecExpandExpr< DenseMatrix< DVecExpandExpr<VT,TF,CEAs...>, !TF >, CEAs... >
93 ,
private If_t< IsComputation_v<VT>, Computation, Transformation >
118 template<
typename MT >
119 static constexpr bool UseAssign_v =
useAssign;
130 template<
typename MT >
131 static constexpr bool UseSMPAssign_v = ( !VT::smpAssignable &&
useAssign );
178 template<
typename... REAs >
215 if( i >= ( TF ? expansion() :
dv_.size() ) ) {
218 if( j >= ( TF ?
dv_.size() : expansion() ) ) {
277 inline size_t rows() const noexcept {
278 return ( TF ? expansion() :
dv_.size() );
288 return ( TF ?
dv_.size() : expansion() );
303 using DataType::expansion;
312 template<
typename T >
313 inline bool canAlias(
const T* alias )
const noexcept {
314 return dv_.canAlias( alias );
324 template<
typename T >
325 inline bool isAliased(
const T* alias )
const noexcept {
326 return dv_.isAliased( alias );
336 return dv_.isAligned();
346 return dv_.canSMPAssign();
369 template<
typename MT
402 template<
typename MT
435 template<
typename MT
437 friend inline auto subAssign( Matrix<MT,SO>& lhs,
const DVecExpandExpr& rhs )
468 template<
typename MT
470 friend inline auto schurAssign( Matrix<MT,SO>& lhs,
const DVecExpandExpr& rhs )
501 template<
typename MT
503 friend inline auto multAssign( Matrix<MT,SO>& lhs,
const DVecExpandExpr& rhs )
534 template<
typename MT
546 const RT tmp( *rhs.dv_ );
567 template<
typename MT
579 const RT tmp( *rhs.dv_ );
600 template<
typename MT
612 const RT tmp( *rhs.dv_ );
633 template<
typename MT
645 const RT tmp( *rhs.dv_ );
666 template<
typename MT
678 const RT tmp( *rhs.dv_ );
751 return ReturnType( *dv, expansion );
804 return ReturnType( *dv );
824inline decltype(
auto)
expand(
const DenseVector<VT,TF>& dv,
size_t expansion )
830 using ReturnType =
const DVecExpandExpr<VT,TF,E>;
831 return ReturnType( *dv );
847template<
typename VT,
bool TF,
size_t... CEAs >
865template<
typename VT,
bool TF,
size_t... CEAs >
Header file for auxiliary alias declarations.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition Aliases.h:470
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
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for run time assertion macros.
Header file for the EnableIf class template.
Header file for the implementation of the ExpandExprData class template.
Header file for the expand trait.
Header file for the function trace functionality.
Header file for the GetMemberType 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 IsComputation type trait class.
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 dense vector expansion.
Definition DVecExpandExpr.h:95
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition DVecExpandExpr.h:192
VecExpandExpr< DenseMatrix< This,!TF >, CEAs... > BaseType
Definition DVecExpandExpr.h:141
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition DVecExpandExpr.h:254
ResultType_t< VT > RT
Result type of the dense vector expression.
Definition DVecExpandExpr.h:98
static constexpr size_t SIMDSIZE
Definition DVecExpandExpr.h:169
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition DVecExpandExpr.h:266
If_t< IsExpression_v< VT >, const VT, const VT & > Operand
Definition DVecExpandExpr.h:156
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition DVecExpandExpr.h:287
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition DVecExpandExpr.h:335
ExpandTrait_t< VT, CEAs... > ResultType
Definition DVecExpandExpr.h:143
ExpandExprData< CEAs... > DataType
The type of the ExpandExprData base class.
Definition DVecExpandExpr.h:100
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition DVecExpandExpr.h:277
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
ElementType_t< VT > ElementType
Definition DVecExpandExpr.h:146
static constexpr bool useAssign
Definition DVecExpandExpr.h:114
DVecExpandExpr< VT, TF, CEAs... > This
Type of this DVecExpandExpr instance.
Definition DVecExpandExpr.h:138
static constexpr bool simdEnabled
Definition DVecExpandExpr.h:161
OppositeType_t< ResultType > OppositeType
Definition DVecExpandExpr.h:144
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition DVecExpandExpr.h:232
GetConstIterator_t< VT > ConstIterator
Definition DVecExpandExpr.h:153
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition DVecExpandExpr.h:325
Operand dv_
Definition DVecExpandExpr.h:352
If_t< useAssign, const ResultType, const DVecExpandExpr & > CompositeType
Definition DVecExpandExpr.h:150
ReturnType_t< VT > ReturnType
Definition DVecExpandExpr.h:147
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition DVecExpandExpr.h:214
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition DVecExpandExpr.h:313
TransposeType_t< ResultType > TransposeType
Definition DVecExpandExpr.h:145
DVecExpandExpr(const VT &dv, REAs... args) noexcept
Constructor for the DVecExpandExpr class.
Definition DVecExpandExpr.h:179
static constexpr bool smpAssignable
Definition DVecExpandExpr.h:164
Operand operand() const noexcept
Returns the dense vector operand.
Definition DVecExpandExpr.h:297
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition DVecExpandExpr.h:345
Base class for N-dimensional dense vectors.
Definition DenseVector.h:77
Auxiliary class template for the data members of expansion expression classes.
Definition ExpandExprData.h:64
Base class for matrices.
Definition Matrix.h:85
SIMD characteristics of data types.
Definition SIMDTrait.h:297
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseMatrix base class.
Header file for the DenseVector base class.
Header file for the VecExpandExpr base class.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition DMatSerialExpr.h:812
decltype(auto) expand(const DenseVector< VT, TF > &dv, size_t expansion)
Expansion of the given dense vector.
Definition DVecExpandExpr.h:746
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition DenseVector.h:61
typename ExpandTrait< T, CEAs... >::Type ExpandTrait_t
Auxiliary alias declaration for the ExpandTrait type trait.
Definition ExpandTrait.h:145
constexpr bool RequiresEvaluation_v
Auxiliary variable template for the RequiresEvaluation type trait.
Definition RequiresEvaluation.h:91
constexpr bool IsComputation_v
Auxiliary variable template for the IsComputation type trait.
Definition IsComputation.h:90
#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 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:192
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 EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition If.h:108
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Header file for the serial shim.
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Compile time check for data types with padding.
Definition IsPadded.h:77
Base class for all vector expansion expression templates.
Definition VecExpandExpr.h:69
System settings for the inline keywords.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.