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
727 assign( ~lhs, rhs.
op_( tmp ) );
746 template<
typename MT2
784 template<
typename MT2
831 template<
typename MT2
863 template<
typename MT2
865 friend inline EnableIf_< And< UseSMPAssign<MT2>
878 const RT tmp( rhs.
dm_ );
898 template<
typename MT2
917 const TmpType tmp( rhs.
dm_ );
937 template<
typename MT2
951 const RT tmp( rhs.
dm_ );
975 template<
typename 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
1184 template<
typename MT
1212 template<
typename MT
1249 template<
typename MT
1277 template<
typename MT
1305 template<
typename MT
1336 template<
typename MT
1367 template<
typename MT
1398 template<
typename MT
1429 template<
typename MT
1459 template<
typename MT
1467 return DMatForEachExpr<MT,Clamp<DT>,SO>( ~dm,
Clamp<DT>(
min,
max ) );
1490 template<
typename MT
1521 template<
typename MT
1549 template<
typename MT
1577 template<
typename MT
1608 template<
typename MT
1639 template<
typename MT
1670 template<
typename MT
1698 template<
typename MT
1729 template<
typename MT
1757 template<
typename MT
1785 template<
typename MT
1813 template<
typename MT
1844 template<
typename MT
1872 template<
typename MT
1903 template<
typename MT
1931 template<
typename MT
1959 template<
typename MT
1990 template<
typename MT
2021 template<
typename MT
2049 template<
typename MT
2077 template<
typename MT
2107 template<
typename MT
2130 template<
typename MT
2153 template<
typename MT
2176 template<
typename MT
2199 template<
typename MT
2229 template<
typename MT
2259 template<
typename MT
2282 template<
typename MT
2304 template<
typename MT,
typename OP,
bool SO >
2305 struct Rows< DMatForEachExpr<MT,OP,SO> > :
public Rows<MT>
2321 template<
typename MT,
typename OP,
bool SO >
2338 template<
typename MT,
typename OP,
bool SO >
2339 struct IsAligned< DMatForEachExpr<MT,OP,SO> >
2356 template<
typename MT,
typename OP,
bool SO >
2357 struct IsPadded< DMatForEachExpr<MT,OP,SO> >
2374 template<
typename MT,
bool SO >
2379 template<
typename MT,
bool SO >
2380 struct IsSymmetric< DMatForEachExpr<MT,Floor,SO> >
2384 template<
typename MT,
bool SO >
2389 template<
typename MT,
bool SO >
2390 struct IsSymmetric< DMatForEachExpr<MT,Trunc,SO> >
2394 template<
typename MT,
bool SO >
2395 struct IsSymmetric< DMatForEachExpr<MT,Round,SO> >
2399 template<
typename MT,
bool SO >
2404 template<
typename MT,
bool SO >
2409 template<
typename MT,
bool SO >
2414 template<
typename MT,
bool SO >
2419 template<
typename MT,
bool SO >
2420 struct IsSymmetric< DMatForEachExpr<MT,InvSqrt,SO> >
2424 template<
typename MT,
bool SO >
2429 template<
typename MT,
bool SO >
2430 struct IsSymmetric< DMatForEachExpr<MT,InvCbrt,SO> >
2434 template<
typename MT,
typename ET,
bool SO >
2435 struct IsSymmetric< DMatForEachExpr<MT,Pow<ET>,SO> >
2439 template<
typename MT,
bool SO >
2444 template<
typename MT,
bool SO >
2449 template<
typename MT,
bool SO >
2450 struct IsSymmetric< DMatForEachExpr<MT,Exp10,SO> >
2454 template<
typename MT,
bool SO >
2459 template<
typename MT,
bool SO >
2464 template<
typename MT,
bool SO >
2465 struct IsSymmetric< DMatForEachExpr<MT,Log10,SO> >
2469 template<
typename MT,
bool SO >
2474 template<
typename MT,
bool SO >
2479 template<
typename MT,
bool SO >
2484 template<
typename MT,
bool SO >
2485 struct IsSymmetric< DMatForEachExpr<MT,Asinh,SO> >
2489 template<
typename MT,
bool SO >
2494 template<
typename MT,
bool SO >
2499 template<
typename MT,
bool SO >
2504 template<
typename MT,
bool SO >
2505 struct IsSymmetric< DMatForEachExpr<MT,Acosh,SO> >
2509 template<
typename MT,
bool SO >
2514 template<
typename MT,
bool SO >
2519 template<
typename MT,
bool SO >
2524 template<
typename MT,
bool SO >
2525 struct IsSymmetric< DMatForEachExpr<MT,Atanh,SO> >
2529 template<
typename MT,
bool SO >
2534 template<
typename MT,
bool SO >
2552 template<
typename MT,
bool SO >
2557 template<
typename MT,
bool SO >
2558 struct IsHermitian< DMatForEachExpr<MT,Floor,SO> >
2562 template<
typename MT,
bool SO >
2567 template<
typename MT,
bool SO >
2568 struct IsHermitian< DMatForEachExpr<MT,Trunc,SO> >
2572 template<
typename MT,
bool SO >
2573 struct IsHermitian< DMatForEachExpr<MT,Round,SO> >
2577 template<
typename MT,
bool SO >
2582 template<
typename MT,
bool SO >
2587 template<
typename MT,
bool SO >
2589 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
2592 template<
typename MT,
bool SO >
2597 template<
typename MT,
bool SO >
2598 struct IsHermitian< DMatForEachExpr<MT,InvSqrt,SO> >
2602 template<
typename MT,
bool SO >
2607 template<
typename MT,
bool SO >
2608 struct IsHermitian< DMatForEachExpr<MT,InvCbrt,SO> >
2612 template<
typename MT,
typename ET,
bool SO >
2613 struct IsHermitian< DMatForEachExpr<MT,Pow<ET>,SO> >
2617 template<
typename MT,
bool SO >
2622 template<
typename MT,
bool SO >
2627 template<
typename MT,
bool SO >
2628 struct IsHermitian< DMatForEachExpr<MT,Exp10,SO> >
2632 template<
typename MT,
bool SO >
2637 template<
typename MT,
bool SO >
2642 template<
typename MT,
bool SO >
2643 struct IsHermitian< DMatForEachExpr<MT,Log10,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 >
2663 struct IsHermitian< DMatForEachExpr<MT,Asinh,SO> >
2667 template<
typename MT,
bool SO >
2672 template<
typename MT,
bool SO >
2677 template<
typename MT,
bool SO >
2682 template<
typename MT,
bool SO >
2683 struct IsHermitian< DMatForEachExpr<MT,Acosh,SO> >
2687 template<
typename MT,
bool SO >
2692 template<
typename MT,
bool SO >
2697 template<
typename MT,
bool SO >
2702 template<
typename MT,
bool SO >
2703 struct IsHermitian< DMatForEachExpr<MT,Atanh,SO> >
2707 template<
typename MT,
bool SO >
2712 template<
typename MT,
bool SO >
2730 template<
typename MT,
bool SO >
2731 struct IsLower< DMatForEachExpr<MT,Abs,SO> >
2735 template<
typename MT,
bool SO >
2736 struct IsLower< DMatForEachExpr<MT,Floor,SO> >
2740 template<
typename MT,
bool SO >
2741 struct IsLower< DMatForEachExpr<MT,Ceil,SO> >
2745 template<
typename MT,
bool SO >
2746 struct IsLower< DMatForEachExpr<MT,Trunc,SO> >
2750 template<
typename MT,
bool SO >
2751 struct IsLower< DMatForEachExpr<MT,Round,SO> >
2755 template<
typename MT,
bool SO >
2756 struct IsLower< DMatForEachExpr<MT,Conj,SO> >
2760 template<
typename MT,
bool SO >
2761 struct IsLower< DMatForEachExpr<MT,Real,SO> >
2765 template<
typename MT,
bool SO >
2766 struct IsLower< DMatForEachExpr<MT,Imag,SO> >
2770 template<
typename MT,
bool SO >
2771 struct IsLower< DMatForEachExpr<MT,Sin,SO> >
2775 template<
typename MT,
bool SO >
2776 struct IsLower< DMatForEachExpr<MT,Asin,SO> >
2780 template<
typename MT,
bool SO >
2781 struct IsLower< DMatForEachExpr<MT,Sinh,SO> >
2785 template<
typename MT,
bool SO >
2786 struct IsLower< DMatForEachExpr<MT,Asinh,SO> >
2790 template<
typename MT,
bool SO >
2791 struct IsLower< DMatForEachExpr<MT,Tan,SO> >
2795 template<
typename MT,
bool SO >
2796 struct IsLower< DMatForEachExpr<MT,Atan,SO> >
2800 template<
typename MT,
bool SO >
2801 struct IsLower< DMatForEachExpr<MT,Tanh,SO> >
2805 template<
typename MT,
bool SO >
2806 struct IsLower< DMatForEachExpr<MT,Atanh,SO> >
2810 template<
typename MT,
bool SO >
2811 struct IsLower< DMatForEachExpr<MT,Erf,SO> >
2828 template<
typename MT,
bool SO >
2829 struct IsUniLower< DMatForEachExpr<MT,Abs,SO> >
2833 template<
typename MT,
bool SO >
2834 struct IsUniLower< DMatForEachExpr<MT,Floor,SO> >
2838 template<
typename MT,
bool SO >
2839 struct IsUniLower< DMatForEachExpr<MT,Ceil,SO> >
2843 template<
typename MT,
bool SO >
2844 struct IsUniLower< DMatForEachExpr<MT,Trunc,SO> >
2848 template<
typename MT,
bool SO >
2849 struct IsUniLower< DMatForEachExpr<MT,Round,SO> >
2853 template<
typename MT,
typename ET,
bool SO >
2854 struct IsUniLower< DMatForEachExpr<MT,Pow<ET>,SO> >
2871 template<
typename MT,
bool SO >
2876 template<
typename MT,
bool SO >
2881 template<
typename MT,
bool SO >
2886 template<
typename MT,
bool SO >
2891 template<
typename MT,
bool SO >
2896 template<
typename MT,
bool SO >
2901 template<
typename MT,
bool SO >
2906 template<
typename MT,
bool SO >
2911 template<
typename MT,
bool SO >
2916 template<
typename MT,
bool SO >
2921 template<
typename MT,
bool SO >
2926 template<
typename MT,
bool SO >
2931 template<
typename MT,
bool SO >
2936 template<
typename MT,
bool SO >
2941 template<
typename MT,
bool SO >
2946 template<
typename MT,
bool SO >
2951 template<
typename MT,
bool SO >
2969 template<
typename MT,
bool SO >
2970 struct IsUpper< DMatForEachExpr<MT,Abs,SO> >
2974 template<
typename MT,
bool SO >
2975 struct IsUpper< DMatForEachExpr<MT,Floor,SO> >
2979 template<
typename MT,
bool SO >
2980 struct IsUpper< DMatForEachExpr<MT,Ceil,SO> >
2984 template<
typename MT,
bool SO >
2985 struct IsUpper< DMatForEachExpr<MT,Trunc,SO> >
2989 template<
typename MT,
bool SO >
2990 struct IsUpper< DMatForEachExpr<MT,Round,SO> >
2994 template<
typename MT,
bool SO >
2995 struct IsUpper< DMatForEachExpr<MT,Conj,SO> >
2999 template<
typename MT,
bool SO >
3000 struct IsUpper< DMatForEachExpr<MT,Real,SO> >
3004 template<
typename MT,
bool SO >
3005 struct IsUpper< DMatForEachExpr<MT,Imag,SO> >
3009 template<
typename MT,
bool SO >
3010 struct IsUpper< DMatForEachExpr<MT,Sin,SO> >
3014 template<
typename MT,
bool SO >
3015 struct IsUpper< DMatForEachExpr<MT,Asin,SO> >
3019 template<
typename MT,
bool SO >
3020 struct IsUpper< DMatForEachExpr<MT,Sinh,SO> >
3024 template<
typename MT,
bool SO >
3025 struct IsUpper< DMatForEachExpr<MT,Asinh,SO> >
3029 template<
typename MT,
bool SO >
3030 struct IsUpper< DMatForEachExpr<MT,Tan,SO> >
3034 template<
typename MT,
bool SO >
3035 struct IsUpper< DMatForEachExpr<MT,Atan,SO> >
3039 template<
typename MT,
bool SO >
3040 struct IsUpper< DMatForEachExpr<MT,Tanh,SO> >
3044 template<
typename MT,
bool SO >
3045 struct IsUpper< DMatForEachExpr<MT,Atanh,SO> >
3049 template<
typename MT,
bool SO >
3050 struct IsUpper< DMatForEachExpr<MT,Erf,SO> >
3067 template<
typename MT,
bool SO >
3068 struct IsUniUpper< DMatForEachExpr<MT,Abs,SO> >
3072 template<
typename MT,
bool SO >
3073 struct IsUniUpper< DMatForEachExpr<MT,Floor,SO> >
3077 template<
typename MT,
bool SO >
3078 struct IsUniUpper< DMatForEachExpr<MT,Ceil,SO> >
3082 template<
typename MT,
bool SO >
3083 struct IsUniUpper< DMatForEachExpr<MT,Trunc,SO> >
3087 template<
typename MT,
bool SO >
3088 struct IsUniUpper< DMatForEachExpr<MT,Round,SO> >
3092 template<
typename MT,
typename ET,
bool SO >
3093 struct IsUniUpper< DMatForEachExpr<MT,Pow<ET>,SO> >
3110 template<
typename MT,
bool SO >
3115 template<
typename MT,
bool SO >
3120 template<
typename MT,
bool SO >
3125 template<
typename MT,
bool SO >
3130 template<
typename MT,
bool SO >
3135 template<
typename MT,
bool SO >
3140 template<
typename MT,
bool SO >
3145 template<
typename MT,
bool SO >
3150 template<
typename MT,
bool SO >
3155 template<
typename MT,
bool SO >
3160 template<
typename MT,
bool SO >
3165 template<
typename MT,
bool SO >
3170 template<
typename MT,
bool SO >
3175 template<
typename MT,
bool SO >
3180 template<
typename MT,
bool SO >
3185 template<
typename MT,
bool SO >
3190 template<
typename MT,
bool SO >
3208 template<
typename MT >
3224 template<
typename MT >
3240 template<
typename MT >
3256 template<
typename MT >
3272 template<
typename MT >
3288 template<
typename MT >
3304 template<
typename MT >
3320 template<
typename MT >
3336 template<
typename MT >
3352 template<
typename MT >
3368 template<
typename MT >
3384 template<
typename MT >
3400 template<
typename MT >
3416 template<
typename MT >
3432 template<
typename MT >
3448 template<
typename MT >
3464 template<
typename MT,
typename OP,
bool SO,
bool AF >
3478 template<
typename MT,
typename OP,
bool SO >
3492 template<
typename MT,
typename OP,
bool SO >
Header file for the UnderlyingNumeric type trait.
Generic wrapper for the trunc() function.
Definition: Trunc.h:62
Pointer difference type of the Blaze library.
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatForEachExpr.h:281
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:356
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:1214
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
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:1610
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:1700
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:62
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
ReturnType operator()(size_t i, size_t j) const noexcept
2D-access to the matrix elements.
Definition: DMatForEachExpr.h:471
BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT(HasSIMDEnabled, simdEnabled)
Definition of the HasSIMDEnabled type trait.
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:1672
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.
Expression object for dense matrix transpositions.The DMatTransExpr class represents the compile time...
Definition: DMatTransExpr.h:112
#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:1992
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:1251
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#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:1815
Generic wrapper for the clamp() function.
Definition: Clamp.h:60
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:1961
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:1307
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:1755
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatForEachExpr.h:425
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
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:1759
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
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Header file for the RequiresEvaluation type trait.
Header file for the MatForEachExpr base class.
const DMatForEachExpr< MT, Exp10, SO > exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1579
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:1802
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
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatForEachExpr.h:389
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
const DMatForEachExpr< MT, Exp, SO > exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1523
Constraint on the data type.
const DMatForEachExpr< MT, Trunc, SO > trunc(const DenseMatrix< MT, SO > &dm)
Applies the trunc() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1158
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:378
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
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatForEachExpr.h:582
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
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
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
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:1905
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:62
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatForEachExpr.h:519
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
Generic wrapper for the exp10() function.
Definition: Exp10.h:62
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
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
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
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatForEachExpr.h:604
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
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
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
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:1431
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatForEachExpr.h:614
Iterator over the elements of the dense matrix.
Definition: DMatForEachExpr.h:198
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatForEachExpr.h:560
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:80
Header file for the IsLower type trait.
Evaluation of the expression type of a dense matrix custom operation.Via this type trait it is possib...
Definition: TDMatForEachExprTrait.h:75
Header file for the IsAligned type trait.
Generic wrapper for the exp2() function.
Definition: Exp2.h:62
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
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:345
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:2051
#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:1933
Generic wrapper for the erf() function.
Definition: Erf.h:62
PointerType pointer
Pointer return type.
Definition: DMatForEachExpr.h:211
const DMatForEachExpr< MT, Round, SO > round(const DenseMatrix< MT, SO > &dm)
Applies the round() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1186
Constraints on the storage order of matrix types.
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
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:1493
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatForEachExpr.h:302
Header file for the exception macros of the math module.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatForEachExpr.h:540
Expression object for the dense matrix forEach() function.The DMatForEachExpr class represents the co...
Definition: DMatForEachExpr.h:113
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Evaluation of the expression type type of a row operation.Via this type trait it is possible to evalu...
Definition: RowExprTrait.h:79
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatForEachExpr.h:312
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
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:1874
const DMatForEachExpr< MT, Exp2, SO > exp2(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1551
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:1338
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatForEachExpr.h:594
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:1279
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:2023
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
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:1846
IteratorCategory iterator_category
The iterator category.
Definition: DMatForEachExpr.h:209
OP Operation
Data type of the custom unary operation.
Definition: DMatForEachExpr.h:192
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:367
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2934
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:323
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatForEachExpr.h:249
Header file for run time assertion macros.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:83
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:1369
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:80
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:1400
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
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatForEachExpr.h:486
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:1731
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
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatForEachExpr.h:530
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
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
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
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Operation operation() const
Returns a copy of the custom operation.
Definition: DMatForEachExpr.h:570
IfTrue_< useAssign, const ResultType, const DMatForEachExpr &> CompositeType
Data type for composite expression templates.
Definition: DMatForEachExpr.h:186
const DMatForEachExpr< MT, Clamp< DT >, SO > 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: DMatForEachExpr.h:1463
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
OppositeType_< MT > OT
Opposite type of the dense matrix expression.
Definition: DMatForEachExpr.h:120
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:2079
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
const DMatForEachExpr< MT, Log2, SO > log2(const DenseMatrix< MT, SO > &dm)
Computes the binary logarithm for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1641
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatForEachExpr.h:550
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:733
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
Generic wrapper for the round() function.
Definition: Round.h:62
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:1787
Generic wrapper for the sinh() function.
Definition: Sinh.h:62
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
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
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
Generic wrapper for the log2() function.
Definition: Log2.h:62
Evaluation of the expression type of a dense matrix custom operation.Via this type trait it is possib...
Definition: DMatForEachExprTrait.h:75
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
typename ForEachExprTrait< T, OP >::Type ForEachExprTrait_
Auxiliary alias declaration for the ForEachExprTrait class template.The ForEachExprTrait_ alias decla...
Definition: ForEachExprTrait.h:144
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.
Evaluation of the expression type type of a column operation.Via this type trait it is possible to ev...
Definition: ColumnExprTrait.h:78
#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
typename T::Operand Operand_
Alias declaration for nested Operand type definitions.The Operand_ alias declaration provides a conve...
Definition: Aliases.h:223
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 function trace functionality.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatForEachExpr.h:334
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
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