35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECMAPEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DVECMAPEXPR_H_ 103 :
public VecMapExpr< DenseVector< DVecMapExpr<VT,OP,TF>, TF > >
121 static constexpr
bool useAssign = ( IsComputation_v<VT> && RequiresEvaluation_v<VT> );
124 template<
typename VT2 >
126 static constexpr
bool UseAssign_v =
useAssign;
138 template<
typename VT2 >
139 static constexpr
bool UseSMPAssign_v =
140 ( ( !VT2::smpAssignable || !VT::smpAssignable ) &&
useAssign );
153 using ReturnType = decltype( std::declval<OP>()( std::declval<RN>() ) );
282 inline auto load() const noexcept {
283 return op_.load(
it_.load() );
456 if( index >=
dv_.size() ) {
459 return (*
this)[index];
472 return op_.load(
dv_.load( index ) );
501 inline size_t size() const noexcept {
532 template<
typename T >
533 inline bool canAlias(
const T* alias )
const noexcept {
534 return IsExpression_v<VT> &&
dv_.canAlias( alias );
544 template<
typename T >
545 inline bool isAliased(
const T* alias )
const noexcept {
546 return dv_.isAliased( alias );
556 return dv_.isAligned();
566 return dv_.canSMPAssign();
591 template<
typename VT2 >
600 assign( ~lhs, rhs.dv_ );
601 assign( ~lhs,
map( ~lhs, rhs.op_ ) );
621 template<
typename VT2 >
635 assign( ~lhs,
map( tmp, rhs.op_ ) );
654 template<
typename VT2 >
655 friend inline auto assign( SparseVector<VT2,TF>& lhs,
const DVecMapExpr& rhs )
656 -> EnableIf_t< UseAssign_v<VT2> >
667 assign( ~lhs,
map( tmp, rhs.op_ ) );
686 template<
typename VT2 >
687 friend inline auto addAssign( DenseVector<VT2,TF>& lhs,
const DVecMapExpr& rhs )
688 -> EnableIf_t< UseAssign_v<VT2> >
699 addAssign( ~lhs,
map( tmp, rhs.op_ ) );
722 template<
typename VT2 >
723 friend inline auto subAssign( DenseVector<VT2,TF>& lhs,
const DVecMapExpr& rhs )
724 -> EnableIf_t< UseAssign_v<VT2> >
735 subAssign( ~lhs,
map( tmp, rhs.op_ ) );
758 template<
typename VT2 >
759 friend inline auto multAssign( DenseVector<VT2,TF>& lhs,
const DVecMapExpr& rhs )
760 -> EnableIf_t< UseAssign_v<VT2> >
771 multAssign( ~lhs,
map( tmp, rhs.op_ ) );
794 template<
typename VT2 >
795 friend inline auto divAssign( DenseVector<VT2,TF>& lhs,
const DVecMapExpr& rhs )
796 -> EnableIf_t< UseAssign_v<VT2> >
807 divAssign( ~lhs,
map( tmp, rhs.op_ ) );
831 template<
typename VT2 >
833 -> EnableIf_t< UseSMPAssign_v<VT2> &&
834 IsSame_v< UnderlyingNumeric_t<VT>, UnderlyingNumeric_t<VT2> > >
861 template<
typename VT2 >
863 -> EnableIf_t< UseSMPAssign_v<VT2> &&
864 !IsSame_v< UnderlyingNumeric_t<VT>, UnderlyingNumeric_t<VT2> > >
874 const RT tmp( rhs.dv_ );
894 template<
typename VT2 >
896 -> EnableIf_t< UseSMPAssign_v<VT2> >
906 const RT tmp( rhs.dv_ );
926 template<
typename VT2 >
928 -> EnableIf_t< UseSMPAssign_v<VT2> >
938 const RT tmp( rhs.dv_ );
962 template<
typename VT2 >
964 -> EnableIf_t< UseSMPAssign_v<VT2> >
974 const RT tmp( rhs.dv_ );
998 template<
typename VT2 >
1000 -> EnableIf_t< UseSMPAssign_v<VT2> >
1010 const RT tmp( rhs.dv_ );
1034 template<
typename VT2 >
1036 -> EnableIf_t< UseSMPAssign_v<VT2> >
1046 const RT tmp( rhs.dv_ );
1092 template<
typename VT
1100 return ReturnType( ~dv, op );
1123 template<
typename VT
1130 return map( ~dv, op );
1152 template<
typename VT
1158 return map( ~dv,
Abs() );
1180 template<
typename VT
1208 template<
typename VT
1236 template<
typename VT
1264 template<
typename VT
1292 template<
typename VT
1320 template<
typename VT
1357 template<
typename VT
1385 template<
typename VT
1413 template<
typename VT
1444 template<
typename VT
1475 template<
typename VT
1506 template<
typename VT
1537 template<
typename VT
1567 template<
typename VT
1597 template<
typename VT
1600 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
1628 template<
typename VT
1634 return map( ~dv,
Exp() );
1656 template<
typename VT
1684 template<
typename VT
1715 template<
typename VT
1721 return map( ~dv,
Log() );
1746 template<
typename VT
1777 template<
typename VT
1805 template<
typename VT
1811 return map( ~dv,
Sin() );
1836 template<
typename VT
1864 template<
typename VT
1892 template<
typename VT
1920 template<
typename VT
1926 return map( ~dv,
Cos() );
1951 template<
typename VT
1979 template<
typename VT
2010 template<
typename VT
2038 template<
typename VT
2044 return map( ~dv,
Tan() );
2066 template<
typename VT
2097 template<
typename VT
2128 template<
typename VT
2156 template<
typename VT
2162 return map( ~dv,
Erf() );
2184 template<
typename VT
2214 template<
typename VT
2216 inline decltype(
auto)
abs( const DVecMapExpr<VT,Abs,TF>& dv )
2237 template<
typename VT
2239 inline decltype(
auto)
sign( const DVecMapExpr<VT,Sign,TF>& dv )
2260 template<
typename VT
2262 inline decltype(
auto)
floor( const DVecMapExpr<VT,Floor,TF>& dv )
2283 template<
typename VT
2285 inline decltype(
auto)
ceil( const DVecMapExpr<VT,Ceil,TF>& dv )
2306 template<
typename VT
2308 inline decltype(
auto)
trunc( const DVecMapExpr<VT,Trunc,TF>& dv )
2329 template<
typename VT
2331 inline decltype(
auto)
round( const DVecMapExpr<VT,Round,TF>& dv )
2359 template<
typename VT
2361 inline decltype(
auto)
conj( const DVecMapExpr<VT,Conj,TF>& dv )
2365 return dv.operand();
2389 template<
typename VT
2391 inline decltype(
auto)
conj( const DVecTransExpr<DVecMapExpr<VT,Conj,TF>,!TF>& dv )
2395 return trans( dv.operand().operand() );
2412 template<
typename VT
2414 inline decltype(
auto)
real( const DVecMapExpr<VT,Real,TF>& dv )
2455 template<
typename VT
2458 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2459 inline decltype(
auto) operator+( const
DenseVector<VT,TF>& vec, ST scalar )
2492 template<
typename ST
2495 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2496 inline decltype(
auto) operator+( ST scalar, const
DenseVector<VT,TF>& vec )
2529 template<
typename VT
2532 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2533 inline decltype(
auto) operator-( const
DenseVector<VT,TF>& vec, ST scalar )
2566 template<
typename ST
2569 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2570 inline decltype(
auto) operator-( ST scalar, const
DenseVector<VT,TF>& vec )
2603 template<
typename ST
2606 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2607 inline decltype(
auto) operator/( ST scalar, const
DenseVector<VT,TF>& vec )
2633 template<
typename VT
2635 inline decltype(
auto) operator<<( const
DenseVector<VT,TF>& vec,
int count )
2660 template<
typename VT
2662 inline decltype(
auto) operator>>( const
DenseVector<VT,TF>& vec,
int count )
2687 template<
typename VT
2690 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2691 inline decltype(
auto) operator&( const
DenseVector<VT,TF>& vec, ST scalar )
2716 template<
typename VT
2719 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2720 inline decltype(
auto) operator|( const
DenseVector<VT,TF>& vec, ST scalar )
2745 template<
typename VT
2748 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2749 inline decltype(
auto) operator^( const
DenseVector<VT,TF>& vec, ST scalar )
2781 template<
typename VT
2787 return map( ~vec,
Not{} );
2802 template<
typename VT,
typename OP,
bool TF >
2803 struct IsAligned< DVecMapExpr<VT,OP,TF> >
2804 :
public IsAligned<VT>
2820 template<
typename VT,
typename OP,
bool TF >
2821 struct IsPadded< DVecMapExpr<VT,OP,TF> >
2822 :
public BoolConstant< IsPadded_v<VT> && IsPaddingEnabled_v<OP> >
BLAZE_ALWAYS_INLINE auto load(size_t index) const noexcept
Access to the SIMD elements of the vector.
Definition: DVecMapExpr.h:469
Header file for the UnderlyingNumeric type trait.
Generic wrapper for the trunc() function.
Definition: Trunc.h:81
Header file for the IsPaddingEnabled type trait.
ElementType * PointerType
Pointer return type.
Definition: DVecMapExpr.h:174
Pointer difference type of the Blaze library.
decltype(auto) acosh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2014
Header file for auxiliary alias declarations.
Generic wrapper for the ceil() function.
Definition: Ceil.h:81
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DVecMapExpr.h:230
decltype(auto) exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1688
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.The SubTrait_t alias declaration provides...
Definition: SubTrait.h:238
OP op_
The custom unary operation.
Definition: DVecMapExpr.h:403
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:81
Header file for the subtraction trait.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecMapExpr.h:545
Header file for the HasLoad type trait.
Header file for basic type definitions.
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
Generic wrapper for the uniform left-shift operation.
Definition: ShiftLI.h:76
Generic wrapper for the sin() function.
Definition: Sin.h:79
Generic wrapper for the conj() function.
Definition: Conj.h:83
Generic wrapper for the invsqrt() function.
Definition: InvSqrt.h:69
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecMapExpr.h:219
Header file for the serial shim.
decltype(auto) real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatMapExpr.h:1389
Generic wrapper for the bitwise OR ('|') operator.
Definition: Bitor.h:80
Generic wrapper for the division operator.
Definition: Div.h:79
typename DivTrait< T1, T2 >::Type DivTrait_t
Auxiliary alias declaration for the DivTrait class template.The DivTrait_t alias declaration provides...
Definition: DivTrait.h:239
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.The MapTrait_t alias declaration provides...
Definition: MapTrait.h:160
BLAZE_DEVICE_CALLABLE bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecMapExpr.h:348
ElementType_t< VT > ET
Element type of the dense vector expression.
Definition: DVecMapExpr.h:109
Header file for the IsSame and IsStrictlySame type traits.
decltype(auto) ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1240
Generic wrapper for the clamp() function.
Definition: Clamp.h:61
decltype(auto) pow(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise exponential value for the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1271
Header file for the VecMapExpr base class.
Generic wrapper for the acosh() function.
Definition: Acosh.h:69
ElementType & ReferenceType
Reference return type.
Definition: DVecMapExpr.h:175
decltype(auto) clamp(const DenseMatrix< MT, SO > &dm, const DT &min, const DT &max)
Restricts each single element of the dense matrix dm to the range .
Definition: DMatMapExpr.h:1572
BLAZE_DEVICE_CALLABLE bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecMapExpr.h:337
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecMapExpr.h:172
Header file for the DenseVector base class.
Generic wrapper for the addition operator.
Definition: Add.h:83
Operation op_
The custom unary operation.
Definition: DVecMapExpr.h:573
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DVecMapExpr.h:150
decltype(auto) sign(const DenseMatrix< MT, SO > &dm)
Applies the sign() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1184
DVecMapExpr(const VT &dv, OP op) noexcept
Constructor for the DVecMapExpr class.
Definition: DVecMapExpr.h:430
Generic wrapper for the subtraction operator.
Definition: Sub.h:83
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
If_t< useAssign, const ResultType, const DVecMapExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecMapExpr.h:156
decltype(auto) acos(const DenseMatrix< MT, SO > &dm)
Computes the inverse cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1955
IteratorCategory iterator_category
The iterator category.
Definition: DVecMapExpr.h:179
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
auto smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:220
decltype(auto) erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2160
ConstIterator_t< VT > IteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecMapExpr.h:186
PointerType pointer
Pointer return type.
Definition: DVecMapExpr.h:181
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Generic wrapper for the abs() function.
Definition: Abs.h:83
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecMapExpr.h:455
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:83
BLAZE_DEVICE_CALLABLE DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecMapExpr.h:359
If_t< IsExpression_v< VT >, const VT, const VT & > Operand
Composite data type of the dense vector expression.
Definition: DVecMapExpr.h:159
Header file for the multiplication trait.
typename UnderlyingNumeric< T >::Type UnderlyingNumeric_t
Auxiliary alias declaration for the UnderlyingNumeric type trait.The UnderlyingNumeric_t alias declar...
Definition: UnderlyingNumeric.h:117
decltype(auto) cos(const DenseMatrix< MT, SO > &dm)
Computes the cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1924
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1361
Header file for the If class template.
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecMapExpr.h:383
Generic wrapper for the imag() function.
Definition: Imag.h:74
Generic wrapper for the exp10() function.
Definition: Exp10.h:67
decltype(auto) exp2(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1660
decltype(auto) sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1868
Header file for the UnderlyingBuiltin type trait.
decltype(auto) asin(const DenseMatrix< MT, SO > &dm)
Computes the inverse sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1840
decltype(auto) cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1983
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1162
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecMapExpr.h:565
decltype(auto) cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1510
#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
BLAZE_DEVICE_CALLABLE bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecMapExpr.h:326
Generic wrapper for the log10() function.
Definition: Log10.h:69
decltype(auto) trunc(const DenseMatrix< MT, SO > &dm)
Applies the trunc() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1268
Header file for all functors.
Header file for all SIMD functionality.
constexpr Bind2nd< OP, A2 > bind2nd(const OP &op, const A2 &a2)
Binds the given object/value to the 2nd parameter of the given binary operation.
Definition: Bind2nd.h:154
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecMapExpr.h:371
BLAZE_DEVICE_CALLABLE ReturnType operator *() const
Direct access to the element at the current iterator position.
Definition: DVecMapExpr.h:272
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.The AddTrait_t alias declaration provides...
Definition: AddTrait.h:238
Header file for the IsAligned type trait.
Generic wrapper for the exp2() function.
Definition: Exp2.h:67
Generic wrapper for the asin() function.
Definition: Asin.h:79
Constraint on the data type.
decltype(auto) atan(const DenseMatrix< MT, SO > &dm)
Computes the inverse tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2070
BLAZE_DEVICE_CALLABLE bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecMapExpr.h:304
decltype(auto) asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1896
MapTrait_t< RT, OP > ResultType
Result type for expression template evaluations.
Definition: DVecMapExpr.h:148
Generic wrapper for the erf() function.
Definition: Erf.h:77
ElementType ValueType
Type of the underlying elements.
Definition: DVecMapExpr.h:173
Constraint on the data type.
Base class for all unary vector map expression templates.The VecMapExpr class serves as a tag for all...
Definition: VecMapExpr.h:66
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecMapExpr.h:416
Header file for the exception macros of the math module.
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1198
Constraint on the data type.
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DVecMapExpr.h:411
Generic wrapper for the floor() function.
Definition: Floor.h:81
decltype(auto) exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1632
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecMapExpr.h:241
decltype(std::declval< OP >()(std::declval< RN >())) ReturnType
Return type for expression template evaluations.
Definition: DVecMapExpr.h:153
Header file for the EnableIf class template.
Header file for the IsPadded type trait.
decltype(auto) abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1156
Generic wrapper for the bitwise XOR ('^') operator.
Definition: Bitxor.h:66
decltype(auto) log(const DenseMatrix< MT, SO > &dm)
Computes the natural logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1719
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.The MultTrait_t alias declaration provid...
Definition: MultTrait.h:240
Operation operation() const
Returns a copy of the custom operation.
Definition: DVecMapExpr.h:521
Header file for the IsNumeric type trait.
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecMapExpr.h:491
decltype(auto) floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1212
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecMapExpr.h:395
Operand dv_
Dense vector of the map expression.
Definition: DVecMapExpr.h:572
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecMapExpr.h:533
decltype(auto) round(const DenseMatrix< MT, SO > &dm)
Applies the round() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1296
Header file for the IsSIMDEnabled type trait.
decltype(auto) tanh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2101
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecMapExpr.h:555
decltype(auto) forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1128
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
OP Operation
Data type of the custom unary operation.
Definition: DVecMapExpr.h:162
Header file for run time assertion macros.
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DVecMapExpr.h:421
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecMapExpr.h:149
Generic wrapper for the pow() function.
Definition: Pow.h:63
Generic wrapper for the atanh() function.
Definition: Atanh.h:79
Iterator over the elements of the dense vector map expression.
Definition: DVecMapExpr.h:168
Generic wrapper for the invcbrt() function.
Definition: InvCbrt.h:67
Generic wrapper for the real() function.
Definition: Real.h:80
Header file for the addition trait.
IteratorType it_
Iterator to the current vector element.
Definition: DVecMapExpr.h:402
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
Header file for the division trait.
Generic wrapper for the bitwise AND ('&') operator.
Definition: Bitand.h:80
Generic wrapper for the asinh() function.
Definition: Asinh.h:79
ReferenceType reference
Reference return type.
Definition: DVecMapExpr.h:182
decltype(auto) invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1541
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the map expression.
Definition: DVecMapExpr.h:121
Generic wrapper for the tan() function.
Definition: Tan.h:79
Generic wrapper for the log() function.
Definition: Log.h:69
decltype(auto) atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2132
BLAZE_DEVICE_CALLABLE bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecMapExpr.h:293
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#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.
Generic wrapper for the logical NOT operator.
Definition: Not.h:58
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
Generic wrapper for the erfc() function.
Definition: Erfc.h:67
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
BLAZE_DEVICE_CALLABLE ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: DVecMapExpr.h:195
Generic wrapper for the cos() function.
Definition: Cos.h:69
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
Expression object for the dense vector map() function.The DVecMapExpr class represents the compile ti...
Definition: DVecMapExpr.h:102
ValueType value_type
Type of the underlying elements.
Definition: DVecMapExpr.h:180
Generic wrapper for the sign() function.
Definition: Sign.h:81
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type,...
Definition: DenseVector.h:61
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecMapExpr.h:176
decltype(auto) sin(const DenseMatrix< MT, SO > &dm)
Computes the sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1809
BLAZE_DEVICE_CALLABLE bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecMapExpr.h:315
decltype(auto) erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2188
Macro for CUDA compatibility.
ResultType_t< VT > RT
Result type of the dense vector expression.
Definition: DVecMapExpr.h:108
decltype(auto) sqrt(const DenseMatrix< MT, SO > &dm)
Computes the square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1448
Header file for the IsComputation type trait class.
auto load() const noexcept
Access to the SIMD elements of the vector.
Definition: DVecMapExpr.h:282
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
Generic wrapper for the acos() function.
Definition: Acos.h:69
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
decltype(auto) tan(const DenseMatrix< MT, SO > &dm)
Computes the tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2042
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecMapExpr.h:262
Generic wrapper for the atan() function.
Definition: Atan.h:79
Generic wrapper for the round() function.
Definition: Round.h:81
Generic wrapper for the sinh() function.
Definition: Sinh.h:79
Header file for the IntegralConstant class template.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecMapExpr.h:442
Header file for the map trait.
decltype(auto) log10(const DenseMatrix< MT, SO > &dm)
Computes the common logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1781
Generic wrapper for the log2() function.
Definition: Log2.h:67
Operand operand() const noexcept
Returns the dense vector operand.
Definition: DVecMapExpr.h:511
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
decltype(auto) imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatMapExpr.h:1417
Generic wrapper for the cosh() function.
Definition: Cosh.h:69
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1324
decltype(auto) log2(const DenseMatrix< MT, SO > &dm)
Computes the binary logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1750
decltype(auto) invsqrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1479
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: DVecMapExpr.h:501
Generic wrapper for the tanh() function.
Definition: Tanh.h:79
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecMapExpr.h:251
ReturnType_t< VT > RN
Return type of the dense vector expression.
Definition: DVecMapExpr.h:110
Generic wrapper for the exp() function.
Definition: Exp.h:69
System settings for the inline keywords.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
#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
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecMapExpr.h:207
constexpr Bind1st< OP, A1 > bind1st(const OP &op, const A1 &a1)
Binds the given object/value to the 1st parameter of the given binary operation.
Definition: Bind1st.h:154
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
Generic wrapper for the uniform right-shift operation.
Definition: ShiftRI.h:75
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecMapExpr.h:481
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1121