35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATMAPEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATMAPEXPR_H_ 104 template<
typename MT
108 :
public MatMapExpr< DenseMatrix< DMatMapExpr<MT,OP,SO>, SO > >
136 template<
typename MT2 >
139 enum :
bool { value = useAssign };
152 template<
typename MT2 >
153 struct UseSMPAssign {
154 enum :
bool { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
161 struct UseSIMDEnabledFlag {
163 enum :
bool { value = OP::BLAZE_TEMPLATE simdEnabled<ET>() };
177 using ReturnType = decltype( std::declval<OP>()( std::declval<RN>() ) );
306 inline auto load() const noexcept {
307 return op_.load( it_.load() );
318 return it_ == rhs.
it_;
329 return it_ != rhs.
it_;
340 return it_ < rhs.
it_;
351 return it_ > rhs.
it_;
362 return it_ <= rhs.
it_;
373 return it_ >= rhs.
it_;
384 return it_ - rhs.
it_;
434 enum :
bool { simdEnabled = MT::simdEnabled &&
438 enum :
bool { smpAssignable = MT::smpAssignable };
481 if( i >=
dm_.rows() ) {
484 if( j >=
dm_.columns() ) {
503 return op_.load(
dm_.load(i,j) );
534 inline size_t rows() const noexcept {
545 return dm_.columns();
575 template<
typename T >
576 inline bool canAlias(
const T* alias )
const noexcept {
587 template<
typename T >
588 inline bool isAliased(
const T* alias )
const noexcept {
589 return dm_.isAliased( alias );
599 return dm_.isAligned();
609 return dm_.canSMPAssign();
634 template<
typename MT2
645 assign( ~lhs, rhs.
dm_ );
646 assign( ~lhs, rhs.
op_( ~lhs ) );
666 template<
typename MT2
668 friend inline EnableIf_< And< UseAssign<MT2>
682 assign( ~lhs,
map( tmp, rhs.
op_ ) );
701 template<
typename MT2
721 assign( ~lhs, rhs.
op_( tmp ) );
740 template<
typename MT2
755 addAssign( ~lhs,
map( tmp, rhs.
op_ ) );
778 template<
typename MT2
793 subAssign( ~lhs,
map( tmp, rhs.
op_ ) );
816 template<
typename MT2
831 schurAssign( ~lhs,
map( tmp, rhs.
op_ ) );
863 template<
typename MT2
895 template<
typename MT2
897 friend inline EnableIf_< And< UseSMPAssign<MT2>
910 const RT tmp( rhs.
dm_ );
930 template<
typename MT2
949 const TmpType tmp( rhs.
dm_ );
969 template<
typename MT2
983 const RT tmp( rhs.
dm_ );
1007 template<
typename MT2
1021 const RT tmp( rhs.
dm_ );
1045 template<
typename MT2
1059 const RT tmp( rhs.
dm_ );
1113 template<
typename MT
1144 template<
typename MT
1174 template<
typename MT
1203 template<
typename MT
1232 template<
typename MT
1261 template<
typename MT
1290 template<
typename MT
1319 template<
typename MT
1357 template<
typename MT
1385 template<
typename MT
1414 template<
typename MT
1446 template<
typename MT
1478 template<
typename MT
1510 template<
typename MT
1542 template<
typename MT
1573 template<
typename MT
1604 template<
typename MT
1636 template<
typename MT
1665 template<
typename MT
1694 template<
typename MT
1726 template<
typename MT
1758 template<
typename MT
1790 template<
typename MT
1819 template<
typename MT
1851 template<
typename MT
1880 template<
typename MT
1909 template<
typename MT
1938 template<
typename MT
1970 template<
typename MT
1999 template<
typename MT
2031 template<
typename MT
2060 template<
typename MT
2089 template<
typename MT
2121 template<
typename MT
2153 template<
typename MT
2182 template<
typename MT
2211 template<
typename MT
2242 template<
typename MT
2265 template<
typename MT
2288 template<
typename MT
2311 template<
typename MT
2334 template<
typename MT
2364 template<
typename MT
2394 template<
typename MT
2418 template<
typename MT
2440 template<
typename MT,
typename OP,
bool SO >
2441 struct Rows< DMatMapExpr<MT,OP,SO> >
2458 template<
typename MT,
typename OP,
bool SO >
2459 struct Columns< DMatMapExpr<MT,OP,SO> >
2476 template<
typename MT,
typename OP,
bool SO >
2477 struct IsAligned< DMatMapExpr<MT,OP,SO> >
2494 template<
typename MT,
typename OP,
bool SO >
2495 struct IsPadded< DMatMapExpr<MT,OP,SO> >
2512 template<
typename MT,
bool SO >
2517 template<
typename MT,
bool SO >
2522 template<
typename MT,
bool SO >
2527 template<
typename MT,
bool SO >
2532 template<
typename MT,
bool SO >
2537 template<
typename MT,
bool SO >
2542 template<
typename MT,
bool SO >
2547 template<
typename MT,
bool SO >
2552 template<
typename MT,
bool SO >
2557 template<
typename MT,
bool SO >
2562 template<
typename MT,
bool SO >
2567 template<
typename MT,
bool SO >
2572 template<
typename MT,
typename ET,
bool SO >
2577 template<
typename MT,
bool SO >
2582 template<
typename MT,
bool SO >
2587 template<
typename MT,
bool SO >
2592 template<
typename MT,
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 >
2672 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 >
2727 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
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,
typename ET,
bool SO >
2755 template<
typename MT,
bool SO >
2760 template<
typename MT,
bool SO >
2765 template<
typename MT,
bool SO >
2770 template<
typename MT,
bool SO >
2775 template<
typename MT,
bool SO >
2780 template<
typename MT,
bool SO >
2785 template<
typename MT,
bool SO >
2790 template<
typename MT,
bool SO >
2795 template<
typename MT,
bool SO >
2800 template<
typename MT,
bool SO >
2805 template<
typename MT,
bool SO >
2810 template<
typename MT,
bool SO >
2815 template<
typename MT,
bool SO >
2820 template<
typename MT,
bool SO >
2825 template<
typename MT,
bool SO >
2830 template<
typename MT,
bool SO >
2835 template<
typename MT,
bool SO >
2840 template<
typename MT,
bool SO >
2845 template<
typename MT,
bool SO >
2850 template<
typename MT,
bool SO >
2868 template<
typename MT,
bool SO >
2869 struct IsLower< DMatMapExpr<MT,Abs,SO> >
2873 template<
typename MT,
bool SO >
2874 struct IsLower< DMatMapExpr<MT,Floor,SO> >
2878 template<
typename MT,
bool SO >
2879 struct IsLower< DMatMapExpr<MT,Ceil,SO> >
2883 template<
typename MT,
bool SO >
2884 struct IsLower< DMatMapExpr<MT,Trunc,SO> >
2888 template<
typename MT,
bool SO >
2889 struct IsLower< DMatMapExpr<MT,Round,SO> >
2893 template<
typename MT,
bool SO >
2894 struct IsLower< DMatMapExpr<MT,Conj,SO> >
2898 template<
typename MT,
bool SO >
2899 struct IsLower< DMatMapExpr<MT,Real,SO> >
2903 template<
typename MT,
bool SO >
2904 struct IsLower< DMatMapExpr<MT,Imag,SO> >
2908 template<
typename MT,
bool SO >
2909 struct IsLower< DMatMapExpr<MT,Sqrt,SO> >
2913 template<
typename MT,
bool SO >
2914 struct IsLower< DMatMapExpr<MT,Cbrt,SO> >
2918 template<
typename MT,
bool SO >
2919 struct IsLower< DMatMapExpr<MT,Sin,SO> >
2923 template<
typename MT,
bool SO >
2924 struct IsLower< DMatMapExpr<MT,Asin,SO> >
2928 template<
typename MT,
bool SO >
2929 struct IsLower< DMatMapExpr<MT,Sinh,SO> >
2933 template<
typename MT,
bool SO >
2934 struct IsLower< DMatMapExpr<MT,Asinh,SO> >
2938 template<
typename MT,
bool SO >
2939 struct IsLower< DMatMapExpr<MT,Tan,SO> >
2943 template<
typename MT,
bool SO >
2944 struct IsLower< DMatMapExpr<MT,Atan,SO> >
2948 template<
typename MT,
bool SO >
2949 struct IsLower< DMatMapExpr<MT,Tanh,SO> >
2953 template<
typename MT,
bool SO >
2954 struct IsLower< DMatMapExpr<MT,Atanh,SO> >
2958 template<
typename MT,
bool SO >
2959 struct IsLower< DMatMapExpr<MT,Erf,SO> >
2976 template<
typename MT,
bool SO >
2981 template<
typename MT,
bool SO >
2982 struct IsUniLower< DMatMapExpr<MT,Floor,SO> >
2986 template<
typename MT,
bool SO >
2991 template<
typename MT,
bool SO >
2992 struct IsUniLower< DMatMapExpr<MT,Trunc,SO> >
2996 template<
typename MT,
bool SO >
2997 struct IsUniLower< DMatMapExpr<MT,Round,SO> >
3001 template<
typename MT,
bool SO >
3006 template<
typename MT,
bool SO >
3011 template<
typename MT,
bool SO >
3016 template<
typename MT,
bool SO >
3021 template<
typename MT,
typename ET,
bool SO >
3022 struct IsUniLower< DMatMapExpr<MT,Pow<ET>,SO> >
3039 template<
typename MT,
bool SO >
3044 template<
typename MT,
bool SO >
3049 template<
typename MT,
bool SO >
3054 template<
typename MT,
bool SO >
3059 template<
typename MT,
bool SO >
3064 template<
typename MT,
bool SO >
3069 template<
typename MT,
bool SO >
3074 template<
typename MT,
bool SO >
3079 template<
typename MT,
bool SO >
3084 template<
typename MT,
bool SO >
3089 template<
typename MT,
bool SO >
3094 template<
typename MT,
bool SO >
3099 template<
typename MT,
bool SO >
3104 template<
typename MT,
bool SO >
3109 template<
typename MT,
bool SO >
3114 template<
typename MT,
bool SO >
3119 template<
typename MT,
bool SO >
3137 template<
typename MT,
bool SO >
3138 struct IsUpper< DMatMapExpr<MT,Abs,SO> >
3142 template<
typename MT,
bool SO >
3143 struct IsUpper< DMatMapExpr<MT,Floor,SO> >
3147 template<
typename MT,
bool SO >
3148 struct IsUpper< DMatMapExpr<MT,Ceil,SO> >
3152 template<
typename MT,
bool SO >
3153 struct IsUpper< DMatMapExpr<MT,Trunc,SO> >
3157 template<
typename MT,
bool SO >
3158 struct IsUpper< DMatMapExpr<MT,Round,SO> >
3162 template<
typename MT,
bool SO >
3163 struct IsUpper< DMatMapExpr<MT,Conj,SO> >
3167 template<
typename MT,
bool SO >
3168 struct IsUpper< DMatMapExpr<MT,Real,SO> >
3172 template<
typename MT,
bool SO >
3173 struct IsUpper< DMatMapExpr<MT,Imag,SO> >
3177 template<
typename MT,
bool SO >
3178 struct IsUpper< DMatMapExpr<MT,Sqrt,SO> >
3182 template<
typename MT,
bool SO >
3183 struct IsUpper< DMatMapExpr<MT,Cbrt,SO> >
3187 template<
typename MT,
bool SO >
3188 struct IsUpper< DMatMapExpr<MT,Sin,SO> >
3192 template<
typename MT,
bool SO >
3193 struct IsUpper< DMatMapExpr<MT,Asin,SO> >
3197 template<
typename MT,
bool SO >
3198 struct IsUpper< DMatMapExpr<MT,Sinh,SO> >
3202 template<
typename MT,
bool SO >
3203 struct IsUpper< DMatMapExpr<MT,Asinh,SO> >
3207 template<
typename MT,
bool SO >
3208 struct IsUpper< DMatMapExpr<MT,Tan,SO> >
3212 template<
typename MT,
bool SO >
3213 struct IsUpper< DMatMapExpr<MT,Atan,SO> >
3217 template<
typename MT,
bool SO >
3218 struct IsUpper< DMatMapExpr<MT,Tanh,SO> >
3222 template<
typename MT,
bool SO >
3223 struct IsUpper< DMatMapExpr<MT,Atanh,SO> >
3227 template<
typename MT,
bool SO >
3228 struct IsUpper< DMatMapExpr<MT,Erf,SO> >
3245 template<
typename MT,
bool SO >
3250 template<
typename MT,
bool SO >
3251 struct IsUniUpper< DMatMapExpr<MT,Floor,SO> >
3255 template<
typename MT,
bool SO >
3260 template<
typename MT,
bool SO >
3261 struct IsUniUpper< DMatMapExpr<MT,Trunc,SO> >
3265 template<
typename MT,
bool SO >
3266 struct IsUniUpper< DMatMapExpr<MT,Round,SO> >
3270 template<
typename MT,
bool SO >
3275 template<
typename MT,
bool SO >
3280 template<
typename MT,
bool SO >
3285 template<
typename MT,
bool SO >
3290 template<
typename MT,
typename ET,
bool SO >
3291 struct IsUniUpper< DMatMapExpr<MT,Pow<ET>,SO> >
3308 template<
typename MT,
bool SO >
3313 template<
typename MT,
bool SO >
3318 template<
typename MT,
bool SO >
3323 template<
typename MT,
bool SO >
3328 template<
typename MT,
bool SO >
3333 template<
typename MT,
bool SO >
3338 template<
typename MT,
bool SO >
3343 template<
typename MT,
bool SO >
3348 template<
typename MT,
bool SO >
3353 template<
typename MT,
bool SO >
3358 template<
typename MT,
bool SO >
3363 template<
typename MT,
bool SO >
3368 template<
typename MT,
bool SO >
3373 template<
typename MT,
bool SO >
3378 template<
typename MT,
bool SO >
3383 template<
typename MT,
bool SO >
3388 template<
typename MT,
bool SO >
3393 template<
typename MT,
bool SO >
3398 template<
typename MT,
bool SO >
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatMapExpr.h:576
Header file for the UnderlyingNumeric type trait.
Generic wrapper for the trunc() function.
Definition: Trunc.h:62
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:339
Pointer difference type of the Blaze library.
decltype(auto) acosh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic cosine for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2033
Header file for auxiliary alias declarations.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:317
Constraint on the data type.
Generic wrapper for the ceil() function.
Definition: Ceil.h:62
decltype(auto) exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1696
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:62
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
EnableIf_< IsDenseMatrix< MT1 > > smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:196
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatMapExpr.h:231
Header file for basic type definitions.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatMapExpr.h:608
Operand dm_
Dense matrix of the map expression.
Definition: DMatMapExpr.h:615
Generic wrapper for the sin() function.
Definition: Sin.h:62
OP Operation
Data type of the custom unary operation.
Definition: DMatMapExpr.h:186
Generic wrapper for the conj() function.
Definition: Conj.h:62
Generic wrapper for the invsqrt() function.
Definition: InvSqrt.h:62
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatMapExpr.h:598
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:164
Header file for the serial shim.
Expression object for dense matrix transpositions.The DMatTransExpr class represents the compile time...
Definition: DMatTransExpr.h:100
decltype(auto) real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatMapExpr.h:1387
#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
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
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:361
Header file for the IsSame and IsStrictlySame type traits.
decltype(auto) ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1234
Generic wrapper for the clamp() function.
Definition: Clamp.h:60
Generic wrapper for the acosh() function.
Definition: Acosh.h:62
decltype(auto) clamp(const DenseMatrix< MT, SO > &dm, const DT &min, const DT &max)
Restricts each single element of the dense matrix dm to the range .
Definition: DMatMapExpr.h:1576
IfTrue_< useAssign, const ResultType, const DMatMapExpr &> CompositeType
Data type for composite expression templates.
Definition: DMatMapExpr.h:180
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:1762
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatMapExpr.h:286
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:350
ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatMapExpr.h:275
ValueType value_type
Type of the underlying elements.
Definition: DMatMapExpr.h:204
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:140
ElementType & ReferenceType
Reference return type.
Definition: DMatMapExpr.h:199
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.
ConstIterator_< MT > IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatMapExpr.h:210
ReferenceType reference
Reference return type.
Definition: DMatMapExpr.h:206
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:343
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1809
decltype(auto) acos(const DenseMatrix< MT, SO > &dm)
Computes the inverse cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1972
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:133
ReturnType_< MT > RN
Return type of the dense matrix expression.
Definition: DMatMapExpr.h:116
BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT(HasSIMDEnabled, simdEnabled)
Definition of the HasSIMDEnabled type trait.
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatMapExpr.h:254
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:78
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
Iterator over the elements of the dense matrix map expression.
Definition: DMatMapExpr.h:192
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatMapExpr.h:306
decltype(auto) erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2184
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:363
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatMapExpr.h:419
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
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatMapExpr.h:480
Header file for the MatMapExpr base class.
Operation operation() const
Returns a copy of the custom operation.
Definition: DMatMapExpr.h:564
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatMapExpr.h:407
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:62
ElementType ValueType
Type of the underlying elements.
Definition: DMatMapExpr.h:197
Header file for the IsStrictlyUpper type trait.
Header file for the unary map trait.
Header file for the IsSymmetric type trait.
decltype(auto) cos(const DenseMatrix< MT, SO > &dm)
Computes the cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1940
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatMapExpr.h:588
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
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1359
Header file for nested template disabiguation.
UnaryMapTrait_< RT, OP > ResultType
Result type for expression template evaluations.
Definition: DMatMapExpr.h:171
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
decltype(auto) exp2(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1667
decltype(auto) sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1882
If_< IsExpression< MT >, const MT, const MT &> Operand
Composite data type of the dense matrix expression.
Definition: DMatMapExpr.h:183
decltype(auto) asin(const DenseMatrix< MT, SO > &dm)
Computes the inverse sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1853
decltype(auto) cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2001
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:102
ElementType_< ResultType > ElementType
Resulting element type.
Definition: DMatMapExpr.h:174
decltype(auto) cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1512
#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.
Generic wrapper for the log10() function.
Definition: Log10.h:62
decltype(auto) trunc(const DenseMatrix< MT, SO > &dm)
Applies the trunc() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1263
Header file for the Not class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
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.
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatMapExpr.h:554
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatMapExpr.h:498
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
Generic wrapper for the exp2() function.
Definition: Exp2.h:62
Base class for all unary matrix map expression templates.The MatMapExpr class serves as a tag for all...
Definition: MatMapExpr.h:66
Generic wrapper for the asin() function.
Definition: Asin.h:62
Operation op_
The custom unary operation.
Definition: DMatMapExpr.h:616
decltype(auto) atan(const DenseMatrix< MT, SO > &dm)
Computes the inverse tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2091
decltype(auto) asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1911
Generic wrapper for the erf() function.
Definition: Erf.h:62
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatMapExpr.h:383
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatMapExpr.h:196
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
Header file for the exception macros of the math module.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
ReturnType operator()(size_t i, size_t j) const noexcept
2D-access to the matrix elements.
Definition: DMatMapExpr.h:465
ResultType_< MT > RT
Result type of the dense matrix expression.
Definition: DMatMapExpr.h:113
Constraint on the data type.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:328
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 all forward declarations for expression class templates.
Generic wrapper for the floor() function.
Definition: Floor.h:62
decltype(auto) exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1638
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the IsPadded type trait.
decltype(auto) abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1176
decltype(auto) log(const DenseMatrix< MT, SO > &dm)
Computes the natural logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1728
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
IteratorCategory iterator_category
The iterator category.
Definition: DMatMapExpr.h:203
ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: DMatMapExpr.h:219
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:372
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatMapExpr.h:544
decltype(auto) floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1205
decltype(auto) pow(const DenseMatrix< MT, SO > &dm, ET exp)
Computes the exponential value for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1607
ElementType * PointerType
Pointer return type.
Definition: DMatMapExpr.h:198
decltype(auto) round(const DenseMatrix< MT, SO > &dm)
Applies the round() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1292
decltype(auto) tanh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2123
decltype(auto) forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1147
Header file for run time assertion macros.
Generic wrapper for the pow() function.
Definition: Forward.h:84
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
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatMapExpr.h:243
Generic wrapper for the asinh() function.
Definition: Asinh.h:62
decltype(auto) invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1544
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:154
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatMapExpr.h:513
#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
decltype(auto) atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2155
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:94
Compile time type negation.The Not alias declaration negates the given compile time condition...
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
IteratorType it_
Iterator to the current matrix element.
Definition: DMatMapExpr.h:426
OP op_
The custom unary operation.
Definition: DMatMapExpr.h:427
Generic wrapper for the erfc() function.
Definition: Erfc.h:62
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
Header file for the HasMember type traits.
Generic wrapper for the cos() function.
Definition: Cos.h:62
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:263
#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
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatMapExpr.h:172
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
ElementType_< MT > ET
Element type of the dense matrix expression.
Definition: DMatMapExpr.h:115
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:790
decltype(auto) sin(const DenseMatrix< MT, SO > &dm)
Computes the sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1821
decltype(auto) erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2213
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatMapExpr.h:534
OppositeType_< MT > OT
Opposite type of the dense matrix expression.
Definition: DMatMapExpr.h:114
typename UnaryMapTrait< T, OP >::Type UnaryMapTrait_
Auxiliary alias declaration for the UnaryMapTrait class template.The UnaryMapTrait_ alias declaration...
Definition: UnaryMapTrait.h:156
decltype(auto) sqrt(const DenseMatrix< MT, SO > &dm)
Computes the square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1448
PointerType pointer
Pointer return type.
Definition: DMatMapExpr.h:205
Header file for the IsBuiltin type trait.
Expression object for the dense matrix map() function.The DMatMapExpr class represents the compile ti...
Definition: DMatMapExpr.h:107
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatMapExpr.h:395
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:66
decltype(auto) tan(const DenseMatrix< MT, SO > &dm)
Computes the tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2062
Generic wrapper for the atan() function.
Definition: Atan.h:62
Generic wrapper for the round() function.
Definition: Round.h:62
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatMapExpr.h:173
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:75
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
decltype(auto) log10(const DenseMatrix< MT, SO > &dm)
Computes the common logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1792
Generic wrapper for the log2() function.
Definition: Log2.h:62
const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatMapExpr.h:265
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
decltype(auto) imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatMapExpr.h:1416
Header file for the IsUpper type trait.
decltype(std::declval< OP >()(std::declval< RN >())) ReturnType
Return type for expression template evaluations.
Definition: DMatMapExpr.h:177
Generic wrapper for the cosh() function.
Definition: Cosh.h:62
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1321
decltype(auto) log2(const DenseMatrix< MT, SO > &dm)
Computes the binary logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1760
decltype(auto) invsqrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1480
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DMatMapExpr.h:296
Generic wrapper for the tanh() function.
Definition: Tanh.h:62
Header file for the IsHermitian type trait.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatMapExpr.h:524
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:95
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
DMatMapExpr(const MT &dm, OP op) noexcept
Constructor for the DMatMapExpr class.
Definition: DMatMapExpr.h:452
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs...
Definition: DMatDMatMapExpr.h:1133