35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECFOREACHEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECFOREACHEXPR_H_
128 template<
typename VT2 >
131 enum :
bool { value = useAssign };
144 template<
typename VT2 >
145 struct UseSMPAssign {
146 enum :
bool { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
153 struct UseSIMDEnabledFlag {
155 enum :
bool { value = OP::BLAZE_TEMPLATE simdEnabled<ET>() };
168 typedef decltype( std::declval<OP>()( std::declval<RN>() ) )
ReturnType;
297 inline auto load() const noexcept {
298 return op_.load( it_.load() );
309 return it_ == rhs.
it_;
320 return it_ != rhs.
it_;
330 inline bool operator<(
const ConstIterator& rhs )
const {
331 return it_ < rhs.
it_;
341 inline bool operator>(
const ConstIterator& rhs )
const {
342 return it_ > rhs.
it_;
353 return it_ <= rhs.
it_;
364 return it_ >= rhs.
it_;
374 inline DifferenceType
operator-(
const ConstIterator& rhs )
const {
375 return it_ - rhs.
it_;
386 friend inline const ConstIterator
operator+(
const ConstIterator& it,
size_t inc ) {
398 friend inline const ConstIterator
operator+(
size_t inc,
const ConstIterator& it ) {
410 friend inline const ConstIterator
operator-(
const ConstIterator& it,
size_t dec ) {
426 enum :
bool { simdEnabled = VT::simdEnabled &&
430 enum :
bool { smpAssignable = VT::smpAssignable };
470 if( index >=
dv_.size() ) {
473 return (*
this)[index];
486 return op_.load(
dv_.load( index ) );
515 inline size_t size() const noexcept {
546 template<
typename T >
547 inline bool canAlias(
const T* alias )
const noexcept {
558 template<
typename T >
559 inline bool isAliased(
const T* alias )
const noexcept {
560 return dv_.isAliased( alias );
570 return dv_.isAligned();
580 return dv_.canSMPAssign();
605 template<
typename VT2 >
614 assign( ~lhs, rhs.
dv_ );
635 template<
typename VT2 >
668 template<
typename VT2 >
669 friend inline EnableIf_< UseAssign<VT2> >
680 const RT tmp(
serial( rhs.dv_ ) );
681 assign( ~lhs,
forEach( tmp, rhs.op_ ) );
700 template<
typename VT2 >
701 friend inline EnableIf_< UseAssign<VT2> >
712 const RT tmp(
serial( rhs.dv_ ) );
713 addAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
736 template<
typename VT2 >
737 friend inline EnableIf_< UseAssign<VT2> >
748 const RT tmp(
serial( rhs.dv_ ) );
749 subAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
772 template<
typename VT2 >
773 friend inline EnableIf_< UseAssign<VT2> >
784 const RT tmp(
serial( rhs.dv_ ) );
785 multAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
808 template<
typename VT2 >
809 friend inline EnableIf_< UseAssign<VT2> >
820 const RT tmp(
serial( rhs.dv_ ) );
821 divAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
845 template<
typename VT2 >
846 friend inline EnableIf_< And< UseSMPAssign<VT2>
847 , IsSame< UnderlyingNumeric<VT>, UnderlyingNumeric<VT2> > > >
875 template<
typename VT2 >
876 friend inline EnableIf_< And< UseSMPAssign<VT2>
877 , Not< IsSame< UnderlyingNumeric<VT>, UnderlyingNumeric<VT2> > > > >
888 const RT tmp( rhs.dv_ );
908 template<
typename VT2 >
909 friend inline EnableIf_< UseSMPAssign<VT2> >
920 const RT tmp( rhs.dv_ );
940 template<
typename VT2 >
941 friend inline EnableIf_< UseSMPAssign<VT2> >
952 const RT tmp( rhs.dv_ );
976 template<
typename VT2 >
977 friend inline EnableIf_< UseSMPAssign<VT2> >
988 const RT tmp( rhs.dv_ );
1012 template<
typename VT2 >
1013 friend inline EnableIf_< UseSMPAssign<VT2> >
1024 const RT tmp( rhs.dv_ );
1048 template<
typename VT2 >
1049 friend inline EnableIf_< UseSMPAssign<VT2> >
1060 const RT tmp( rhs.dv_ );
1106 template<
typename VT
1135 template<
typename VT
1163 template<
typename VT
1191 template<
typename VT
1219 template<
typename VT
1256 template<
typename VT
1284 template<
typename VT
1312 template<
typename VT
1343 template<
typename VT
1374 template<
typename VT
1405 template<
typename VT
1436 template<
typename VT
1466 template<
typename VT
1469 inline const DVecForEachExpr<VT,Clip<DT>,TF>
1474 return DVecForEachExpr<VT,Clip<DT>,TF>( ~dv,
Clip<DT>(
min,
max ) );
1497 template<
typename VT
1528 template<
typename VT
1559 template<
typename VT
1590 template<
typename VT
1618 template<
typename VT
1649 template<
typename VT
1677 template<
typename VT
1705 template<
typename VT
1733 template<
typename VT
1764 template<
typename VT
1792 template<
typename VT
1823 template<
typename VT
1851 template<
typename VT
1879 template<
typename VT
1910 template<
typename VT
1941 template<
typename VT
1969 template<
typename VT
1997 template<
typename VT
2027 template<
typename VT
2029 inline const DVecForEachExpr<VT,Abs,TF>&
abs(
const DVecForEachExpr<VT,Abs,TF>& dv )
2050 template<
typename VT
2052 inline const DVecForEachExpr<VT,Floor,TF>&
floor(
const DVecForEachExpr<VT,Floor,TF>& dv )
2073 template<
typename VT
2075 inline const DVecForEachExpr<VT,Ceil,TF>&
ceil(
const DVecForEachExpr<VT,Ceil,TF>& dv )
2103 template<
typename VT
2105 inline typename DVecForEachExpr<VT,Conj,TF>::Operand
conj(
const DVecForEachExpr<VT,Conj,TF>& dv )
2109 return dv.operand();
2133 template<
typename VT
2135 inline const DVecTransExpr<VT,!TF>
conj(
const DVecTransExpr<DVecForEachExpr<VT,Conj,TF>,!TF>& dv )
2139 return DVecTransExpr<VT,!TF>( dv.operand().operand() );
2156 template<
typename VT
2158 inline const DVecForEachExpr<VT,Real,TF>&
real(
const DVecForEachExpr<VT,Real,TF>& dv )
2178 template<
typename VT,
typename OP,
bool TF >
2195 template<
typename VT,
typename OP,
bool TF >
2213 template<
typename VT,
typename OP,
bool TF >
2231 template<
typename VT >
2236 using Type = If_< And< IsDenseVector<VT>, IsColumnVector<VT> >
2237 , DVecForEachExpr<VT,Abs,false>
2247 template<
typename VT >
2252 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT> >
2253 , DVecForEachExpr<VT,Abs,true>
2263 template<
typename VT >
2268 using Type = If_< And< IsDenseVector<VT>, IsColumnVector<VT> >
2269 , DVecForEachExpr<VT,Floor,false>
2279 template<
typename VT >
2284 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT> >
2285 , DVecForEachExpr<VT,Floor,true>
2295 template<
typename VT >
2300 using Type = If_< And< IsDenseVector<VT>, IsColumnVector<VT> >
2301 , DVecForEachExpr<VT,Ceil,false>
2311 template<
typename VT >
2316 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT> >
2317 , DVecForEachExpr<VT,Ceil,true>
2327 template<
typename VT >
2332 using Type = If_< And< IsDenseVector<VT>, IsColumnVector<VT> >
2333 , Operand_< DVecForEachExpr<VT,Conj,false> >
2343 template<
typename VT >
2348 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT> >
2349 , Operand_< DVecForEachExpr<VT,Conj,true> >
2359 template<
typename VT >
2360 struct DVecForEachExprTrait< DVecTransExpr<
DVecForEachExpr<VT,Conj,true>, false >, Conj >
2364 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT> >
2365 , DVecTransExpr<VT,false>
2375 template<
typename VT >
2376 struct TDVecForEachExprTrait< DVecTransExpr<
DVecForEachExpr<VT,Conj,false>, true >, Conj >
2380 using Type = If_< And< IsDenseVector<VT>, IsColumnVector<VT> >
2381 , DVecTransExpr<VT,true>
2391 template<
typename VT >
2396 using Type = If_< And< IsDenseVector<VT>, IsColumnVector<VT> >
2397 , DVecForEachExpr<VT,Real,false>
2407 template<
typename VT >
2412 using Type = If_< And< IsDenseVector<VT>, IsRowVector<VT> >
2413 , DVecForEachExpr<VT,Real,true>
2423 template<
typename VT,
typename OP,
bool TF,
bool AF >
2428 using Type = ForEachExprTrait_< SubvectorExprTrait_<const VT,AF>, OP >;
Header file for the UnderlyingNumeric type trait.
Pointer difference type of the Blaze library.
const DMatForEachExpr< MT, Conj, SO > conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatForEachExpr.h:1158
Header file for auxiliary alias declarations.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:72
Generic wrapper for the ceil() function.
Definition: Ceil.h:62
DifferenceType difference_type
Difference between two iterators.
Definition: DVecForEachExpr.h:198
BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT(HasSIMDEnabled, simdEnabled)
Definition of the HasSIMDEnabled type trait.
const DMatForEachExpr< MT, Log, SO > log(const DenseMatrix< MT, SO > &dm)
Computes the natural logarithm for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1498
const DMatForEachExpr< MT, Sin, SO > sin(const DenseMatrix< MT, SO > &dm)
Computes the sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1557
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecForEachExpr.h:287
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:62
Header file for basic type definitions.
const DMatForEachExpr< MT, Log10, SO > log10(const DenseMatrix< MT, SO > &dm)
Computes the common logarithm for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1529
Generic wrapper for the sin() function.
Definition: Sin.h:62
Operand dv_
Dense vector of the for-each expression.
Definition: DVecForEachExpr.h:586
Generic wrapper for the conj() function.
Definition: Conj.h:62
Generic wrapper for the invsqrt() function.
Definition: InvSqrt.h:62
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
Header file for the serial shim.
const DMatForEachExpr< MT, Tanh, SO > tanh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1849
DVecForEachExpr(const VT &dv, OP op) noexcept
Constructor for the DVecForEachExpr class.
Definition: DVecForEachExpr.h:444
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecForEachExpr.h:505
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
const CTransExprTrait_< MT > ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatForEachExpr.h:1195
Header file for the IsSame and IsStrictlySame type traits.
Header file for the ForEachExprTrait class template.
const DMatForEachExpr< MT, Cos, SO > cos(const DenseMatrix< MT, SO > &dm)
Computes the cosine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1672
const DMatForEachExpr< MT, Atan, SO > atan(const DenseMatrix< MT, SO > &dm)
Computes the inverse tangent for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1818
Generic wrapper for the acosh() function.
Definition: Acosh.h:62
const DMatForEachExpr< MT, Imag, SO > imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatForEachExpr.h:1251
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: DVecForEachExpr.h:515
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecForEachExpr.h:222
EnableIf_< IsDenseVector< VT1 > > smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:193
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecForEachExpr.h:569
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
Header file for the DenseVector base class.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
const DMatForEachExpr< MT, Sinh, SO > sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1616
Header file for the Computation base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:138
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecForEachExpr.h:191
Header file for the RequiresEvaluation type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1716
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
ElementType * PointerType
Pointer return type.
Definition: DVecForEachExpr.h:189
BLAZE_ALWAYS_INLINE auto load(size_t index) const noexcept
Access to the SIMD elements of the vector.
Definition: DVecForEachExpr.h:483
IteratorCategory iterator_category
The iterator category.
Definition: DVecForEachExpr.h:194
const DMatForEachExpr< MT, Exp, SO > exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1467
Constraint on the data type.
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
Generic wrapper for the abs() function.
Definition: Abs.h:62
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
PointerType pointer
Pointer return type.
Definition: DVecForEachExpr.h:196
typename ForEachTrait< T, OP >::Type ForEachTrait_
Auxiliary alias declaration for the ForEachTrait class template.The ForEachTrait_ alias declaration p...
Definition: ForEachTrait.h:146
const DMatForEachExpr< MT, Acosh, SO > acosh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic cosine for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1762
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:62
Iterator over the elements of the dense vector.
Definition: DVecForEachExpr.h:183
OP op_
The custom unary operation.
Definition: DVecForEachExpr.h:418
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecForEachExpr.h:277
typename CTransExprTrait< T >::Type CTransExprTrait_
Auxiliary alias declaration for the CTransExprTrait class template.The CTransExprTrait_ alias declara...
Definition: CTransExprTrait.h:143
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for nested template disabiguation.
Header file for the If class template.
Generic wrapper for the imag() function.
Definition: Imag.h:59
const DMatForEachExpr< MT, Abs, SO > abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1074
ElementType ValueType
Type of the underlying elements.
Definition: DVecForEachExpr.h:188
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecForEachExpr.h:234
#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
const DMatForEachExpr< MT, OP, SO > forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1046
Generic wrapper for the log10() function.
Definition: Log10.h:62
Header file for the Not class template.
Header file for all functors.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for all SIMD functionality.
Base class for all vector for-each expression templates.The VecForEachExpr class serves as a tag for ...
Definition: VecForEachExpr.h:65
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecForEachExpr.h:398
const DMatForEachExpr< MT, InvCbrt, SO > invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1375
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecForEachExpr.h:256
Header file for the IsAligned type trait.
Generic wrapper for the asin() function.
Definition: Asin.h:62
Constraint on the data type.
const DMatForEachExpr< MT, Floor, SO > floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1102
const DMatForEachExpr< MT, Erf, SO > erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1908
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:60
const DMatForEachExpr< MT, Tan, SO > tan(const DenseMatrix< MT, SO > &dm)
Computes the tangent for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1790
Generic wrapper for the erf() function.
Definition: Erf.h:62
Constraint on the data type.
const DMatForEachExpr< MT, Pow< ET >, SO > pow(const DenseMatrix< MT, SO > &dm, ET exp)
Computes the exponential value for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1437
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecForEachExpr.h:579
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecForEachExpr.h:245
Header file for the exception macros of the math module.
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecForEachExpr.h:352
DVecForEachExpr< VT, OP, TF > This
Type of this DVecForEachExpr instance.
Definition: DVecForEachExpr.h:162
Evaluation of the underlying numeric element type of a given data type.Via this type trait it is poss...
Definition: UnderlyingNumeric.h:81
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecForEachExpr.h:164
Header file for all forward declarations for expression class templates.
Generic wrapper for the floor() function.
Definition: Floor.h:62
const DMatForEachExpr< MT, Cosh, SO > cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1731
const DMatForEachExpr< MT, Sqrt, SO > sqrt(const DenseMatrix< MT, SO > &dm)
Computes the square root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1282
Header file for the EnableIf class template.
const DMatForEachExpr< MT, Real, SO > real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatForEachExpr.h:1223
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecForEachExpr.h:547
Header file for the IsPadded type trait.
const DMatForEachExpr< MT, Atanh, SO > atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1880
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecForEachExpr.h:559
Generic wrapper for the clip() function.
Definition: Clip.h:60
const DMatForEachExpr< MT, Acos, SO > acos(const DenseMatrix< MT, SO > &dm)
Computes the inverse cosine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1703
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecForEachExpr.h:308
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: DVecForEachExpr.h:210
Header file for run time assertion macros.
const DMatForEachExpr< MT, InvSqrt, SO > invsqrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse square root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1313
Generic wrapper for the pow() function.
Definition: Forward.h:72
const DMatForEachExpr< MT, Cbrt, SO > cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1344
Generic wrapper for the atanh() function.
Definition: Atanh.h:62
Generic wrapper for the invcbrt() function.
Definition: InvCbrt.h:62
Generic wrapper for the real() function.
Definition: Real.h:59
Generic wrapper for the asinh() function.
Definition: Asinh.h:62
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecForEachExpr.h:374
const DMatForEachExpr< MT, Asin, SO > asin(const DenseMatrix< MT, SO > &dm)
Computes the inverse sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1588
ReferenceType reference
Reference return type.
Definition: DVecForEachExpr.h:197
Operand operand() const noexcept
Returns the dense vector operand.
Definition: DVecForEachExpr.h:525
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecForEachExpr.h:410
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
EnableIf_< IsDenseVector< VT1 > > smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:222
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
Generic wrapper for the tan() function.
Definition: Tan.h:62
Generic wrapper for the log() function.
Definition: Log.h:62
Compile time type negation.The Not class template negates the given compile time condition. In case the given condition would evaluate to true, the nested member enumeration is set to false and vice versa:
Definition: Not.h:70
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecForEachExpr.h:386
ElementType_< VT > ET
Element type of the dense vector expression.
Definition: DVecForEachExpr.h:107
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecForEachExpr.h:266
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecForEachExpr.h:187
Generic wrapper for the erfc() function.
Definition: Erfc.h:62
Header file for the HasMember type traits.
ValueType value_type
Type of the underlying elements.
Definition: DVecForEachExpr.h:195
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecForEachExpr.h:469
Header file for the VecForEachExpr base class.
Generic wrapper for the cos() function.
Definition: Cos.h:62
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecForEachExpr.h:456
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecForEachExpr.h:341
const DMatForEachExpr< MT, Clip< DT >, SO > clip(const DenseMatrix< MT, SO > &dm, const DT &min, const DT &max)
Restricts each single element of the dense matrix dm to the range .
Definition: DMatForEachExpr.h:1407
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
If_< IsExpression< VT >, const VT, const VT & > Operand
Composite data type of the dense vector expression.
Definition: DVecForEachExpr.h:174
ConstIterator_< VT > IteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecForEachExpr.h:201
const DMatForEachExpr< MT, Erfc, SO > erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1936
ForEachTrait_< VT, OP > ResultType
Result type for expression template evaluations.
Definition: DVecForEachExpr.h:163
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#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
Operation op_
The custom unary operation.
Definition: DVecForEachExpr.h:587
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DVecForEachExpr.h:165
OP Operation
Data type of the custom unary operation.
Definition: DVecForEachExpr.h:177
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
Header file for the IsComputation type trait class.
Generic wrapper for the acos() function.
Definition: Acos.h:62
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
Header file for the for-each trait.
Generic wrapper for the atan() function.
Definition: Atan.h:62
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
const DMatForEachExpr< MT, Asinh, SO > asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1644
Generic wrapper for the sinh() function.
Definition: Sinh.h:62
Header file for the IntegralConstant class template.
Header file for the SubvectorExprTrait class template.
ReturnType_< VT > RN
Return type of the dense vector expression.
Definition: DVecForEachExpr.h:108
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Expression object for the dense vector forEach() function.The DVecForEachExpr class represents the co...
Definition: DVecForEachExpr.h:100
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecForEachExpr.h:330
Header file for the CTransExprTrait class template.
Generic wrapper for the cosh() function.
Definition: Cosh.h:62
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecForEachExpr.h:319
ResultType_< VT > RT
Result type of the dense vector expression.
Definition: DVecForEachExpr.h:106
Generic wrapper for the tanh() function.
Definition: Tanh.h:62
Generic wrapper for the exp() function.
Definition: Exp.h:62
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecForEachExpr.h:363
System settings for the inline keywords.
Header file for the Size type trait.
#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, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
IfTrue_< useAssign, const ResultType, const DVecForEachExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecForEachExpr.h:171
Compile time check whether the given type is an expression template.This type trait class tests wheth...
Definition: IsExpression.h:71
const DMatForEachExpr< MT, Ceil, SO > ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1130
ElementType & ReferenceType
Reference return type.
Definition: DVecForEachExpr.h:190
Operation operation() const
Returns a copy of the custom operation.
Definition: DVecForEachExpr.h:535
Header file for the IsExpression type trait class.
auto load() const noexcept
Access to the SIMD elements of the vector.
Definition: DVecForEachExpr.h:297
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecForEachExpr.h:495
Header file for the FunctionTrace class.
IteratorType it_
Iterator to the current vector element.
Definition: DVecForEachExpr.h:417