35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATFOREACHEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATFOREACHEXPR_H_
110 template<
typename MT
142 template<
typename MT2 >
145 enum :
bool { value = useAssign };
158 template<
typename MT2 >
159 struct UseSMPAssign {
160 enum :
bool { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
167 struct UseSIMDEnabledFlag {
169 enum :
bool { value = OP::BLAZE_TEMPLATE simdEnabled<ET>() };
183 typedef decltype( std::declval<OP>()( std::declval<RN>() ) )
ReturnType;
312 inline auto load() const noexcept {
313 return op_.load( it_.load() );
324 return it_ == rhs.
it_;
335 return it_ != rhs.
it_;
345 inline bool operator<(
const ConstIterator& rhs )
const {
346 return it_ < rhs.
it_;
356 inline bool operator>(
const ConstIterator& rhs )
const {
357 return it_ > rhs.
it_;
368 return it_ <= rhs.
it_;
379 return it_ >= rhs.
it_;
389 inline DifferenceType
operator-(
const ConstIterator& rhs )
const {
390 return it_ - rhs.
it_;
401 friend inline const ConstIterator
operator+(
const ConstIterator& it,
size_t inc ) {
413 friend inline const ConstIterator
operator+(
size_t inc,
const ConstIterator& it ) {
425 friend inline const ConstIterator
operator-(
const ConstIterator& it,
size_t dec ) {
440 enum :
bool { simdEnabled = MT::simdEnabled &&
444 enum :
bool { smpAssignable = MT::smpAssignable };
487 if( i >=
dm_.rows() ) {
490 if( j >=
dm_.columns() ) {
509 return op_.load(
dm_.load(i,j) );
540 inline size_t rows() const noexcept {
551 return dm_.columns();
581 template<
typename T >
582 inline bool canAlias(
const T* alias )
const noexcept {
593 template<
typename T >
594 inline bool isAliased(
const T* alias )
const noexcept {
595 return dm_.isAliased( alias );
605 return dm_.isAligned();
615 return dm_.canSMPAssign();
640 template<
typename MT2
651 assign( ~lhs, rhs.
dm_ );
652 assign( ~lhs, rhs.
op_( ~lhs ) );
672 template<
typename MT2
674 friend inline EnableIf_< And< UseAssign<MT2>
707 template<
typename MT2
709 friend inline EnableIf_< UseAssign<MT2> >
714 typedef IfTrue_< SO == SO2, RT, OT > TmpType;
726 const TmpType tmp(
serial( rhs.dm_ ) );
727 assign( ~lhs, rhs.op_( tmp ) );
746 template<
typename MT2
748 friend inline EnableIf_< UseAssign<MT2> >
760 const RT tmp(
serial( rhs.dm_ ) );
761 addAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
784 template<
typename MT2
786 friend inline EnableIf_< UseAssign<MT2> >
798 const RT tmp(
serial( rhs.dm_ ) );
799 subAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
831 template<
typename MT2
833 friend inline EnableIf_< And< UseSMPAssign<MT2>
834 , IsSame< UnderlyingNumeric<MT>, UnderlyingNumeric<MT2> > > >
863 template<
typename MT2
865 friend inline EnableIf_< And< UseSMPAssign<MT2>
866 , Not< IsSame< UnderlyingNumeric<MT>, UnderlyingNumeric<MT2> > > > >
878 const RT tmp( rhs.dm_ );
898 template<
typename MT2
900 friend inline EnableIf_< UseSMPAssign<MT2> >
905 typedef IfTrue_< SO == SO2, RT, OT > TmpType;
917 const TmpType tmp( rhs.dm_ );
937 template<
typename MT2
939 friend inline EnableIf_< UseSMPAssign<MT2> >
951 const RT tmp( rhs.dm_ );
975 template<
typename MT2
977 friend inline EnableIf_< UseSMPAssign<MT2> >
989 const RT tmp( rhs.dm_ );
1043 template<
typename MT
1072 template<
typename MT
1100 template<
typename MT
1128 template<
typename MT
1156 template<
typename MT
1193 template<
typename MT
1221 template<
typename MT
1249 template<
typename MT
1280 template<
typename MT
1311 template<
typename MT
1342 template<
typename MT
1373 template<
typename MT
1403 template<
typename MT
1406 inline const DMatForEachExpr<MT,Clip<DT>,SO>
1411 return DMatForEachExpr<MT,Clip<DT>,SO>( ~dm,
Clip<DT>(
min,
max ) );
1434 template<
typename MT
1465 template<
typename MT
1496 template<
typename MT
1527 template<
typename MT
1555 template<
typename MT
1586 template<
typename MT
1614 template<
typename MT
1642 template<
typename MT
1670 template<
typename MT
1701 template<
typename MT
1729 template<
typename MT
1760 template<
typename MT
1788 template<
typename MT
1816 template<
typename MT
1847 template<
typename MT
1878 template<
typename MT
1906 template<
typename MT
1934 template<
typename MT
1964 template<
typename MT
1966 inline const DMatForEachExpr<MT,Abs,SO>&
abs(
const DMatForEachExpr<MT,Abs,SO>& dm )
1987 template<
typename MT
1989 inline const DMatForEachExpr<MT,Floor,SO>&
floor(
const DMatForEachExpr<MT,Floor,SO>& dm )
2010 template<
typename MT
2012 inline const DMatForEachExpr<MT,Ceil,SO>&
ceil(
const DMatForEachExpr<MT,Ceil,SO>& dm )
2040 template<
typename MT
2042 inline typename DMatForEachExpr<MT,Conj,SO>::Operand
conj(
const DMatForEachExpr<MT,Conj,SO>& dm )
2046 return dm.operand();
2070 template<
typename MT
2072 inline const DMatTransExpr<MT,!SO>
conj(
const DMatTransExpr<DMatForEachExpr<MT,Conj,SO>,!SO>& dm )
2076 return DMatTransExpr<MT,!SO>( dm.operand().operand() );
2093 template<
typename MT
2095 inline const DMatForEachExpr<MT,Real,SO>&
real(
const DMatForEachExpr<MT,Real,SO>& dm )
2115 template<
typename MT,
typename OP,
bool SO >
2132 template<
typename MT,
typename OP,
bool SO >
2149 template<
typename MT,
typename OP,
bool SO >
2167 template<
typename MT,
typename OP,
bool SO >
2185 template<
typename MT,
bool SO >
2190 template<
typename MT,
bool SO >
2195 template<
typename MT,
bool SO >
2200 template<
typename MT,
bool SO >
2205 template<
typename MT,
bool SO >
2210 template<
typename MT,
bool SO >
2215 template<
typename MT,
bool SO >
2220 template<
typename MT,
bool SO >
2225 template<
typename MT,
bool SO >
2230 template<
typename MT,
bool SO >
2235 template<
typename MT,
typename ET,
bool SO >
2240 template<
typename MT,
bool SO >
2245 template<
typename MT,
bool SO >
2250 template<
typename MT,
bool SO >
2255 template<
typename MT,
bool SO >
2260 template<
typename MT,
bool SO >
2265 template<
typename MT,
bool SO >
2270 template<
typename MT,
bool SO >
2275 template<
typename MT,
bool SO >
2280 template<
typename MT,
bool SO >
2285 template<
typename MT,
bool SO >
2290 template<
typename MT,
bool SO >
2295 template<
typename MT,
bool SO >
2300 template<
typename MT,
bool SO >
2305 template<
typename MT,
bool SO >
2310 template<
typename MT,
bool SO >
2315 template<
typename MT,
bool SO >
2320 template<
typename MT,
bool SO >
2338 template<
typename MT,
bool SO >
2343 template<
typename MT,
bool SO >
2348 template<
typename MT,
bool SO >
2353 template<
typename MT,
bool SO >
2358 template<
typename MT,
bool SO >
2363 template<
typename MT,
bool SO >
2365 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
2368 template<
typename MT,
bool SO >
2373 template<
typename MT,
bool SO >
2378 template<
typename MT,
bool SO >
2383 template<
typename MT,
bool SO >
2388 template<
typename MT,
typename ET,
bool SO >
2393 template<
typename MT,
bool SO >
2398 template<
typename MT,
bool SO >
2403 template<
typename MT,
bool SO >
2408 template<
typename MT,
bool SO >
2413 template<
typename MT,
bool SO >
2418 template<
typename MT,
bool SO >
2423 template<
typename MT,
bool SO >
2428 template<
typename MT,
bool SO >
2433 template<
typename MT,
bool SO >
2438 template<
typename MT,
bool SO >
2443 template<
typename MT,
bool SO >
2448 template<
typename MT,
bool SO >
2453 template<
typename MT,
bool SO >
2458 template<
typename MT,
bool SO >
2463 template<
typename MT,
bool SO >
2468 template<
typename MT,
bool SO >
2473 template<
typename MT,
bool SO >
2491 template<
typename MT,
bool SO >
2496 template<
typename MT,
bool SO >
2501 template<
typename MT,
bool SO >
2506 template<
typename MT,
bool SO >
2511 template<
typename MT,
bool SO >
2516 template<
typename MT,
bool SO >
2521 template<
typename MT,
bool SO >
2526 template<
typename MT,
bool SO >
2531 template<
typename MT,
bool SO >
2536 template<
typename MT,
bool SO >
2541 template<
typename MT,
bool SO >
2546 template<
typename MT,
bool SO >
2551 template<
typename MT,
bool SO >
2556 template<
typename MT,
bool SO >
2561 template<
typename MT,
bool SO >
2579 template<
typename MT,
typename ET,
bool SO >
2597 template<
typename MT,
bool SO >
2602 template<
typename MT,
bool SO >
2607 template<
typename MT,
bool SO >
2612 template<
typename MT,
bool SO >
2617 template<
typename MT,
bool SO >
2622 template<
typename MT,
bool SO >
2627 template<
typename MT,
bool SO >
2632 template<
typename MT,
bool SO >
2637 template<
typename MT,
bool SO >
2642 template<
typename MT,
bool SO >
2647 template<
typename MT,
bool SO >
2652 template<
typename MT,
bool SO >
2657 template<
typename MT,
bool SO >
2662 template<
typename MT,
bool SO >
2667 template<
typename MT,
bool SO >
2685 template<
typename MT,
bool SO >
2690 template<
typename MT,
bool SO >
2695 template<
typename MT,
bool SO >
2700 template<
typename MT,
bool SO >
2705 template<
typename MT,
bool SO >
2710 template<
typename MT,
bool SO >
2715 template<
typename MT,
bool SO >
2720 template<
typename MT,
bool SO >
2725 template<
typename MT,
bool SO >
2730 template<
typename MT,
bool SO >
2735 template<
typename MT,
bool SO >
2740 template<
typename MT,
bool SO >
2745 template<
typename MT,
bool SO >
2750 template<
typename MT,
bool SO >
2755 template<
typename MT,
bool SO >
2773 template<
typename MT,
typename ET,
bool SO >
2791 template<
typename MT,
bool SO >
2796 template<
typename MT,
bool SO >
2801 template<
typename MT,
bool SO >
2806 template<
typename MT,
bool SO >
2811 template<
typename MT,
bool SO >
2816 template<
typename MT,
bool SO >
2821 template<
typename MT,
bool SO >
2826 template<
typename MT,
bool SO >
2831 template<
typename MT,
bool SO >
2836 template<
typename MT,
bool SO >
2841 template<
typename MT,
bool SO >
2846 template<
typename MT,
bool SO >
2851 template<
typename MT,
bool SO >
2856 template<
typename MT,
bool SO >
2861 template<
typename MT,
bool SO >
2879 template<
typename MT >
2884 using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
2885 , DMatForEachExpr<MT,Abs,false>
2895 template<
typename MT >
2900 using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
2901 , DMatForEachExpr<MT,Abs,true>
2911 template<
typename MT >
2916 using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
2917 , DMatForEachExpr<MT,Floor,false>
2927 template<
typename MT >
2932 using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
2933 , DMatForEachExpr<MT,Floor,true>
2943 template<
typename MT >
2948 using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
2949 , DMatForEachExpr<MT,Ceil,false>
2959 template<
typename MT >
2964 using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
2965 , DMatForEachExpr<MT,Ceil,true>
2975 template<
typename MT >
2980 using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
2981 , Operand_< DMatForEachExpr<MT,Conj,false> >
2991 template<
typename MT >
2996 using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
2997 , Operand_< DMatForEachExpr<MT,Conj,true> >
3007 template<
typename MT >
3008 struct DMatForEachExprTrait< DMatTransExpr<
DMatForEachExpr<MT,Conj,true>, false >, Conj >
3012 using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
3013 , DMatTransExpr<MT,false>
3023 template<
typename MT >
3024 struct TDMatForEachExprTrait< DMatTransExpr<
DMatForEachExpr<MT,Conj,false>, true >, Conj >
3028 using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
3029 , DMatTransExpr<MT,true>
3039 template<
typename MT >
3044 using Type = If_< And< IsDenseMatrix<MT>, IsRowMajorMatrix<MT> >
3045 , DMatForEachExpr<MT,Real,false>
3055 template<
typename MT >
3060 using Type = If_< And< IsDenseMatrix<MT>, IsColumnMajorMatrix<MT> >
3061 , DMatForEachExpr<MT,Real,true>
3071 template<
typename MT,
typename OP,
bool SO,
bool AF >
3076 using Type = ForEachExprTrait_< SubmatrixExprTrait_<const MT,AF>, OP >;
3085 template<
typename MT,
typename OP,
bool SO >
3090 using Type = ForEachExprTrait_< RowExprTrait_<const MT>, OP >;
3099 template<
typename MT,
typename OP,
bool SO >
3104 using Type = ForEachExprTrait_< ColumnExprTrait_<const MT>, OP >;
Header file for the UnderlyingNumeric type trait.
Pointer difference type of the Blaze library.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatForEachExpr.h:281
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatForEachExpr.h:540
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
Constraint on the data type.
Generic wrapper for the ceil() function.
Definition: Ceil.h:62
Operand dm_
Dense matrix of the for-each expression.
Definition: DMatForEachExpr.h:621
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatForEachExpr.h:302
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatForEachExpr.h:530
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatForEachExpr.h:413
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
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:62
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT(HasSIMDEnabled, simdEnabled)
Definition of the HasSIMDEnabled type trait.
Header file for basic type definitions.
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatForEachExpr.h:312
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
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.
#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
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
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
DifferenceType difference_type
Difference between two iterators.
Definition: DMatForEachExpr.h:213
const CTransExprTrait_< MT > ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatForEachExpr.h:1195
#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
Operation op_
The custom unary operation.
Definition: DMatForEachExpr.h:622
Header file for the ColumnExprTrait class template.
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
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatForEachExpr.h:560
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
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
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatForEachExpr.h:425
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatForEachExpr.h:604
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
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatForEachExpr.h:504
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
Header file for the RequiresEvaluation type trait.
Header file for the MatForEachExpr base class.
Header file for the IsUniLower 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
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatForEachExpr.h:292
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatForEachExpr.h:519
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
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatForEachExpr.h:550
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
Constraint on the data type.
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
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
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatForEachExpr.h:594
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatForEachExpr.h:260
Header file for the IsStrictlyUpper type trait.
ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: DMatForEachExpr.h:225
Header file for the IsSymmetric type trait.
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
IteratorType it_
Iterator to the current matrix element.
Definition: DMatForEachExpr.h:432
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatForEachExpr.h:389
ConstIterator_< MT > IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatForEachExpr.h:216
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatForEachExpr.h:401
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
ReturnType operator()(size_t i, size_t j) const noexcept
2D-access to the matrix elements.
Definition: DMatForEachExpr.h:471
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatForEachExpr.h:178
#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.
Header file for the Columns type trait.
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
Operation operation() const
Returns a copy of the custom operation.
Definition: DMatForEachExpr.h:570
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.
ResultType_< MT > RT
Result type of the dense matrix expression.
Definition: DMatForEachExpr.h:119
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
Iterator over the elements of the dense matrix.
Definition: DMatForEachExpr.h:198
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
ElementType ValueType
Type of the underlying elements.
Definition: DMatForEachExpr.h:203
Generic wrapper for the asin() function.
Definition: Asin.h:62
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
ElementType * PointerType
Pointer return type.
Definition: DMatForEachExpr.h:204
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatForEachExpr.h:237
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatForEachExpr.h:271
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
PointerType pointer
Pointer return type.
Definition: DMatForEachExpr.h:211
Constraints on the storage order of matrix types.
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
Header file for the exception macros of the math module.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:323
Expression object for the dense matrix forEach() function.The DMatForEachExpr class represents the co...
Definition: DMatForEachExpr.h:113
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:345
Evaluation of the underlying numeric element type of a given data type.Via this type trait it is poss...
Definition: UnderlyingNumeric.h:81
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Generic wrapper for the floor() function.
Definition: Floor.h:62
ValueType value_type
Type of the underlying elements.
Definition: DMatForEachExpr.h:210
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatForEachExpr.h:582
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
If_< IsExpression< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatForEachExpr.h:189
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
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
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
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
IteratorCategory iterator_category
The iterator category.
Definition: DMatForEachExpr.h:209
OP Operation
Data type of the custom unary operation.
Definition: DMatForEachExpr.h:192
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatForEachExpr.h:249
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:356
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
Base class for all matrix for-each expression templates.The MatForEachExpr class serves as a tag for ...
Definition: MatForEachExpr.h:65
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
OP op_
The custom unary operation.
Definition: DMatForEachExpr.h:433
Generic wrapper for the asinh() function.
Definition: Asinh.h:62
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
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
ElementType_< MT > ET
Element type of the dense matrix expression.
Definition: DMatForEachExpr.h:121
#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
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:378
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatForEachExpr.h:486
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:334
ReferenceType reference
Reference return type.
Definition: DMatForEachExpr.h:212
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
IfTrue_< useAssign, const ResultType, const DMatForEachExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatForEachExpr.h:186
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:367
Generic wrapper for the erfc() function.
Definition: Erfc.h:62
Header file for the HasMember type traits.
Generic wrapper for the cos() function.
Definition: Cos.h:62
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
OppositeType_< MT > OT
Opposite type of the dense matrix expression.
Definition: DMatForEachExpr.h:120
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
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DMatForEachExpr.h:180
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatForEachExpr.h:179
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
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
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.
DMatForEachExpr< MT, OP, SO > This
Type of this DMatForEachExpr instance.
Definition: DMatForEachExpr.h:176
Header file for the IsBuiltin type trait.
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
ElementType & ReferenceType
Reference return type.
Definition: DMatForEachExpr.h:205
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.
ForEachTrait_< MT, OP > ResultType
Result type for expression template evaluations.
Definition: DMatForEachExpr.h:177
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatForEachExpr.h:202
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatForEachExpr.h:614
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
Header file for the CTransExprTrait class template.
Generic wrapper for the cosh() function.
Definition: Cosh.h:62
ReturnType_< MT > RN
Return type of the dense matrix expression.
Definition: DMatForEachExpr.h:122
Generic wrapper for the tanh() function.
Definition: Tanh.h:62
Header file for the IsHermitian type trait.
Generic wrapper for the exp() function.
Definition: Exp.h:62
System settings for the inline keywords.
#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
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
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatForEachExpr.h:206
DMatForEachExpr(const MT &dm, OP op) noexcept
Constructor for the DMatForEachExpr class.
Definition: DMatForEachExpr.h:458