35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATMAPEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATMAPEXPR_H_ 101 template<
typename MT
105 :
public MatMapExpr< DenseMatrix< DMatMapExpr<MT,OP,SO>, SO > >
124 static constexpr
bool useAssign = ( IsComputation_v<MT> && RequiresEvaluation_v<MT> );
127 template<
typename MT2 >
129 static constexpr
bool UseAssign_v =
useAssign;
141 template<
typename MT2 >
142 static constexpr
bool UseSMPAssign_v =
143 ( ( !MT2::smpAssignable || !MT::smpAssignable ) &&
useAssign );
157 using ReturnType = decltype( std::declval<OP>()( std::declval<RN>() ) );
286 inline auto load() const noexcept {
287 return op_.load(
it_.load() );
462 if( i >=
dm_.rows() ) {
465 if( j >=
dm_.columns() ) {
484 return op_.load(
dm_.load(i,j) );
515 inline size_t rows() const noexcept {
526 return dm_.columns();
556 template<
typename T >
557 inline bool canAlias(
const T* alias )
const noexcept {
558 return IsExpression_v<MT> &&
dm_.canAlias( alias );
568 template<
typename T >
569 inline bool isAliased(
const T* alias )
const noexcept {
570 return dm_.isAliased( alias );
580 return dm_.isAligned();
590 return dm_.canSMPAssign();
615 template<
typename MT2
626 assign( ~lhs, rhs.dm_ );
627 assign( ~lhs,
map( ~lhs, rhs.op_ ) );
647 template<
typename MT2
663 assign( ~lhs,
map( tmp, rhs.op_ ) );
682 template<
typename MT2
684 friend inline auto assign( SparseMatrix<MT2,SO2>& lhs,
const DMatMapExpr& rhs )
685 -> EnableIf_t< UseAssign_v<MT2> >
689 using TmpType = If_t< SO == SO2, RT, OT >;
701 const TmpType tmp(
serial( rhs.dm_ ) );
702 assign( ~lhs,
map( tmp, rhs.op_ ) );
721 template<
typename MT2
723 friend inline auto addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatMapExpr& rhs )
724 -> EnableIf_t< UseAssign_v<MT2> >
736 addAssign( ~lhs,
map( tmp, rhs.op_ ) );
759 template<
typename MT2
761 friend inline auto subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatMapExpr& rhs )
762 -> EnableIf_t< UseAssign_v<MT2> >
774 subAssign( ~lhs,
map( tmp, rhs.op_ ) );
797 template<
typename MT2
799 friend inline auto schurAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatMapExpr& rhs )
800 -> EnableIf_t< UseAssign_v<MT2> >
812 schurAssign( ~lhs,
map( tmp, rhs.op_ ) );
844 template<
typename MT2
847 -> EnableIf_t< UseSMPAssign_v<MT2> &&
848 IsSame_v< UnderlyingNumeric_t<MT>, UnderlyingNumeric_t<MT2> > >
876 template<
typename MT2
879 -> EnableIf_t< UseSMPAssign_v<MT2> &&
880 !IsSame_v< UnderlyingNumeric_t<MT>, UnderlyingNumeric_t<MT2> > >
891 const RT tmp( rhs.dm_ );
911 template<
typename MT2
914 -> EnableIf_t< UseSMPAssign_v<MT2> >
918 using TmpType = If_t< SO == SO2, RT, OT >;
930 const TmpType tmp( rhs.dm_ );
950 template<
typename MT2
953 -> EnableIf_t< UseSMPAssign_v<MT2> >
964 const RT tmp( rhs.dm_ );
988 template<
typename MT2
991 -> EnableIf_t< UseSMPAssign_v<MT2> >
1002 const RT tmp( rhs.dm_ );
1026 template<
typename MT2
1029 -> EnableIf_t< UseSMPAssign_v<MT2> >
1040 const RT tmp( rhs.dm_ );
1094 template<
typename MT
1102 return ReturnType( ~dm, op );
1125 template<
typename MT
1132 return map( ~dm, op );
1154 template<
typename MT
1160 return map( ~dm,
Abs() );
1182 template<
typename MT
1210 template<
typename MT
1238 template<
typename MT
1266 template<
typename MT
1294 template<
typename MT
1322 template<
typename MT
1359 template<
typename MT
1387 template<
typename MT
1415 template<
typename MT
1446 template<
typename MT
1477 template<
typename MT
1508 template<
typename MT
1539 template<
typename MT
1569 template<
typename MT
1599 template<
typename MT
1602 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
1630 template<
typename MT
1636 return map( ~dm,
Exp() );
1658 template<
typename MT
1686 template<
typename MT
1717 template<
typename MT
1723 return map( ~dm,
Log() );
1748 template<
typename MT
1779 template<
typename MT
1807 template<
typename MT
1813 return map( ~dm,
Sin() );
1838 template<
typename MT
1866 template<
typename MT
1894 template<
typename MT
1922 template<
typename MT
1928 return map( ~dm,
Cos() );
1953 template<
typename MT
1981 template<
typename MT
2012 template<
typename MT
2040 template<
typename MT
2046 return map( ~dm,
Tan() );
2068 template<
typename MT
2099 template<
typename MT
2130 template<
typename MT
2158 template<
typename MT
2164 return map( ~dm,
Erf() );
2186 template<
typename MT
2216 template<
typename MT
2218 inline decltype(
auto)
abs( const DMatMapExpr<MT,Abs,SO>& dm )
2239 template<
typename MT
2241 inline decltype(
auto)
sign( const DMatMapExpr<MT,Sign,SO>& dm )
2262 template<
typename MT
2264 inline decltype(
auto)
floor( const DMatMapExpr<MT,Floor,SO>& dm )
2285 template<
typename MT
2287 inline decltype(
auto)
ceil( const DMatMapExpr<MT,Ceil,SO>& dm )
2308 template<
typename MT
2310 inline decltype(
auto)
trunc( const DMatMapExpr<MT,Trunc,SO>& dm )
2331 template<
typename MT
2333 inline decltype(
auto)
round( const DMatMapExpr<MT,Round,SO>& dm )
2361 template<
typename MT
2363 inline decltype(
auto)
conj( const DMatMapExpr<MT,Conj,SO>& dm )
2367 return dm.operand();
2391 template<
typename MT
2393 inline decltype(
auto)
conj( const DMatTransExpr<DMatMapExpr<MT,Conj,SO>,!SO>& dm )
2397 return trans( dm.operand().operand() );
2414 template<
typename MT
2416 inline decltype(
auto)
real( const DMatMapExpr<MT,Real,SO>& dm )
2455 template<
typename MT
2458 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2459 inline decltype(
auto) operator+( const
DenseMatrix<MT,SO>& mat, ST scalar )
2490 template<
typename ST
2493 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2494 inline decltype(
auto) operator+( ST scalar, const
DenseMatrix<MT,SO>& mat )
2526 template<
typename MT
2529 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2530 inline decltype(
auto) operator-( const
DenseMatrix<MT,SO>& mat, ST scalar )
2562 template<
typename ST
2565 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2566 inline decltype(
auto) operator-( ST scalar, const
DenseMatrix<MT,SO>& mat )
2597 template<
typename ST
2600 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2601 inline decltype(
auto) operator/( ST scalar, const
DenseMatrix<MT,SO>& mat )
2627 template<
typename MT
2629 inline decltype(
auto) operator<<( const
DenseMatrix<MT,SO>& mat,
int count )
2654 template<
typename MT
2656 inline decltype(
auto) operator>>( const
DenseMatrix<MT,SO>& mat,
int count )
2681 template<
typename MT
2684 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2685 inline decltype(
auto) operator&( const
DenseMatrix<MT,SO>& mat, ST scalar )
2710 template<
typename MT
2713 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2714 inline decltype(
auto) operator|( const
DenseMatrix<MT,SO>& mat, ST scalar )
2739 template<
typename MT
2742 , EnableIf_t< IsNumeric_v<ST> >* =
nullptr >
2743 inline decltype(
auto) operator^( const
DenseMatrix<MT,SO>& mat, ST scalar )
2775 template<
typename MT
2781 return map( ~mat,
Not{} );
2796 template<
typename MT,
typename OP,
bool SO >
2797 struct IsAligned< DMatMapExpr<MT,OP,SO> >
2798 :
public IsAligned<MT>
2814 template<
typename MT,
typename OP,
bool SO >
2815 struct IsPadded< DMatMapExpr<MT,OP,SO> >
2816 :
public BoolConstant< IsPadded_v<MT> && IsPaddingEnabled_v<OP> >
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatMapExpr.h:557
Header file for the UnderlyingNumeric type trait.
Generic wrapper for the trunc() function.
Definition: Trunc.h:81
Header file for the IsPaddingEnabled type trait.
Pointer difference type of the Blaze library.
decltype(auto) acosh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2014
Header file for auxiliary alias declarations.
ElementType_t< MT > ET
Element type of the dense matrix expression.
Definition: DMatMapExpr.h:112
Generic wrapper for the ceil() function.
Definition: Ceil.h:81
decltype(auto) exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1688
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.The SubTrait_t alias declaration provides...
Definition: SubTrait.h:238
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DMatMapExpr.h:387
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:81
Header file for the subtraction trait.
Header file for the HasLoad type trait.
BLAZE_DEVICE_CALLABLE ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: DMatMapExpr.h:199
Header file for basic type definitions.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DMatMapExpr.h:589
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
Generic wrapper for the uniform left-shift operation.
Definition: ShiftLI.h:76
Operand dm_
Dense matrix of the map expression.
Definition: DMatMapExpr.h:596
Generic wrapper for the sin() function.
Definition: Sin.h:79
OP Operation
Data type of the custom unary operation.
Definition: DMatMapExpr.h:166
Generic wrapper for the conj() function.
Definition: Conj.h:83
Generic wrapper for the invsqrt() function.
Definition: InvSqrt.h:69
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DMatMapExpr.h:579
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
decltype(auto) real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatMapExpr.h:1389
#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 the bitwise OR ('|') operator.
Definition: Bitor.h:80
Generic wrapper for the division operator.
Definition: Div.h:79
BLAZE_DEVICE_CALLABLE bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:308
typename DivTrait< T1, T2 >::Type DivTrait_t
Auxiliary alias declaration for the DivTrait class template.The DivTrait_t alias declaration provides...
Definition: DivTrait.h:239
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.The MapTrait_t alias declaration provides...
Definition: MapTrait.h:160
#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
Header file for the IsSame and IsStrictlySame type traits.
decltype(auto) ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1240
Generic wrapper for the clamp() function.
Definition: Clamp.h:61
decltype(auto) pow(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise exponential value for the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1271
Generic wrapper for the acosh() function.
Definition: Acosh.h:69
decltype(auto) clamp(const DenseMatrix< MT, SO > &dm, const DT &min, const DT &max)
Restricts each single element of the dense matrix dm to the range .
Definition: DMatMapExpr.h:1572
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DMatMapExpr.h:223
ResultType_t< MT > RT
Result type of the dense matrix expression.
Definition: DMatMapExpr.h:110
Generic wrapper for the addition operator.
Definition: Add.h:83
decltype(auto) sign(const DenseMatrix< MT, SO > &dm)
Applies the sign() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1184
ValueType value_type
Type of the underlying elements.
Definition: DMatMapExpr.h:184
Generic wrapper for the subtraction operator.
Definition: Sub.h:83
Header file for the Computation base class.
ElementType & ReferenceType
Reference return type.
Definition: DMatMapExpr.h:179
Header file for the RequiresEvaluation type trait.
BLAZE_DEVICE_CALLABLE bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:352
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DMatMapExpr.h:399
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
ReferenceType reference
Reference return type.
Definition: DMatMapExpr.h:186
decltype(auto) acos(const DenseMatrix< MT, SO > &dm)
Computes the inverse cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1955
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DMatMapExpr.h:154
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatMapExpr.h:414
Iterator over the elements of the dense matrix map expression.
Definition: DMatMapExpr.h:172
auto load() const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatMapExpr.h:286
decltype(auto) erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2160
Constraint on the data type.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Generic wrapper for the abs() function.
Definition: Abs.h:83
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatMapExpr.h:461
Header file for the MatMapExpr base class.
Operation operation() const
Returns a copy of the custom operation.
Definition: DMatMapExpr.h:545
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the map expression.
Definition: DMatMapExpr.h:124
BLAZE_DEVICE_CALLABLE bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:330
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:83
ElementType ValueType
Type of the underlying elements.
Definition: DMatMapExpr.h:177
ReturnType_t< MT > RN
Return type of the dense matrix expression.
Definition: DMatMapExpr.h:113
BLAZE_DEVICE_CALLABLE bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:319
Header file for the multiplication trait.
typename UnderlyingNumeric< T >::Type UnderlyingNumeric_t
Auxiliary alias declaration for the UnderlyingNumeric type trait.The UnderlyingNumeric_t alias declar...
Definition: UnderlyingNumeric.h:117
decltype(auto) cos(const DenseMatrix< MT, SO > &dm)
Computes the cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1924
OppositeType_t< MT > OT
Opposite type of the dense matrix expression.
Definition: DMatMapExpr.h:111
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatMapExpr.h:569
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1361
Header file for the If class template.
Generic wrapper for the imag() function.
Definition: Imag.h:74
Generic wrapper for the exp10() function.
Definition: Exp10.h:67
decltype(auto) exp2(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1660
BLAZE_DEVICE_CALLABLE DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DMatMapExpr.h:363
decltype(auto) sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1868
MapTrait_t< RT, OP > ResultType
Result type for expression template evaluations.
Definition: DMatMapExpr.h:151
Header file for the UnderlyingBuiltin type trait.
decltype(auto) asin(const DenseMatrix< MT, SO > &dm)
Computes the inverse sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1840
decltype(auto) cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1983
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatMapExpr.h:153
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1162
decltype(auto) cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1510
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Generic wrapper for the log10() function.
Definition: Log10.h:69
decltype(auto) trunc(const DenseMatrix< MT, SO > &dm)
Applies the trunc() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1268
Header file for all functors.
Header file for all SIMD functionality.
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatMapExpr.h:535
constexpr Bind2nd< OP, A2 > bind2nd(const OP &op, const A2 &a2)
Binds the given object/value to the 2nd parameter of the given binary operation.
Definition: Bind2nd.h:154
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DMatMapExpr.h:479
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatMapExpr.h:419
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.The AddTrait_t alias declaration provides...
Definition: AddTrait.h:238
Header file for the IsAligned type trait.
Generic wrapper for the exp2() function.
Definition: Exp2.h:67
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:79
Operation op_
The custom unary operation.
Definition: DMatMapExpr.h:597
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatMapExpr.h:180
decltype(auto) atan(const DenseMatrix< MT, SO > &dm)
Computes the inverse tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2070
decltype(auto) asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1896
BLAZE_DEVICE_CALLABLE bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:341
Generic wrapper for the erf() function.
Definition: Erf.h:77
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DMatMapExpr.h:176
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DMatMapExpr.h:255
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1198
ReturnType operator()(size_t i, size_t j) const noexcept
2D-access to the matrix elements.
Definition: DMatMapExpr.h:446
Constraint on the data type.
Generic wrapper for the floor() function.
Definition: Floor.h:81
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DMatMapExpr.h:211
decltype(auto) exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1632
Header file for the EnableIf class template.
Header file for the IsPadded type trait.
decltype(auto) abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1156
Generic wrapper for the bitwise XOR ('^') operator.
Definition: Bitxor.h:66
decltype(auto) log(const DenseMatrix< MT, SO > &dm)
Computes the natural logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1719
IteratorCategory iterator_category
The iterator category.
Definition: DMatMapExpr.h:183
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.The MultTrait_t alias declaration provid...
Definition: MultTrait.h:240
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
Header file for the IsNumeric type trait.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatMapExpr.h:525
decltype(auto) floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1212
BLAZE_DEVICE_CALLABLE ReturnType operator *() const
Direct access to the element at the current iterator position.
Definition: DMatMapExpr.h:276
ElementType * PointerType
Pointer return type.
Definition: DMatMapExpr.h:178
decltype(auto) round(const DenseMatrix< MT, SO > &dm)
Applies the round() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1296
Header file for the IsSIMDEnabled type trait.
decltype(auto) tanh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2101
decltype(auto) forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1128
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DMatMapExpr.h:266
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
Generic wrapper for the pow() function.
Definition: Pow.h:63
Generic wrapper for the atanh() function.
Definition: Atanh.h:79
Generic wrapper for the invcbrt() function.
Definition: InvCbrt.h:67
Generic wrapper for the real() function.
Definition: Real.h:80
Header file for the addition trait.
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DMatMapExpr.h:375
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
Header file for the division trait.
Generic wrapper for the bitwise AND ('&') operator.
Definition: Bitand.h:80
Generic wrapper for the asinh() function.
Definition: Asinh.h:79
decltype(auto) invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1541
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatMapExpr.h:494
Generic wrapper for the tan() function.
Definition: Tan.h:79
Generic wrapper for the log() function.
Definition: Log.h:69
decltype(auto) atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2132
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Header file for all forward declarations for expression class templates.
Generic wrapper for the logical NOT operator.
Definition: Not.h:58
IteratorType it_
Iterator to the current matrix element.
Definition: DMatMapExpr.h:406
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
OP op_
The custom unary operation.
Definition: DMatMapExpr.h:407
Generic wrapper for the erfc() function.
Definition: Erfc.h:67
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Header file for the HasMember type traits.
Generic wrapper for the cos() function.
Definition: Cos.h:69
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
#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_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatMapExpr.h:152
Generic wrapper for the sign() function.
Definition: Sign.h:81
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DMatMapExpr.h:424
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
decltype(auto) sin(const DenseMatrix< MT, SO > &dm)
Computes the sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1809
decltype(auto) erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2188
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatMapExpr.h:515
Macro for CUDA compatibility.
BLAZE_DEVICE_CALLABLE bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatMapExpr.h:297
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
If_t< IsExpression_v< MT >, const MT, const MT & > Operand
Composite data type of the dense matrix expression.
Definition: DMatMapExpr.h:163
Header file for the IsComputation type trait class.
PointerType pointer
Pointer return type.
Definition: DMatMapExpr.h:185
Header file for the IsBuiltin type trait.
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
Expression object for the dense matrix map() function.The DMatMapExpr class represents the compile ti...
Definition: DMatMapExpr.h:104
Generic wrapper for the acos() function.
Definition: Acos.h:69
If_t< useAssign, const ResultType, const DMatMapExpr & > CompositeType
Data type for composite expression templates.
Definition: DMatMapExpr.h:160
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
decltype(auto) tan(const DenseMatrix< MT, SO > &dm)
Computes the tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2042
ConstIterator_t< MT > IteratorType
ConstIterator type of the dense matrix expression.
Definition: DMatMapExpr.h:190
Generic wrapper for the atan() function.
Definition: Atan.h:79
Generic wrapper for the round() function.
Definition: Round.h:81
Generic wrapper for the sinh() function.
Definition: Sinh.h:79
Header file for the IntegralConstant class template.
Header file for the map trait.
decltype(auto) log10(const DenseMatrix< MT, SO > &dm)
Computes the common logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1781
Generic wrapper for the log2() function.
Definition: Log2.h:67
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
decltype(auto) imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatMapExpr.h:1417
decltype(std::declval< OP >()(std::declval< RN >())) ReturnType
Return type for expression template evaluations.
Definition: DMatMapExpr.h:157
Generic wrapper for the cosh() function.
Definition: Cosh.h:69
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1324
decltype(auto) log2(const DenseMatrix< MT, SO > &dm)
Computes the binary logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1750
decltype(auto) invsqrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1479
Generic wrapper for the tanh() function.
Definition: Tanh.h:79
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatMapExpr.h:505
Generic wrapper for the exp() function.
Definition: Exp.h:69
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,...
Definition: Assert.h:101
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DMatMapExpr.h:245
constexpr Bind1st< OP, A1 > bind1st(const OP &op, const A1 &a1)
Binds the given object/value to the 1st parameter of the given binary operation.
Definition: Bind1st.h:154
Generic wrapper for the uniform right-shift operation.
Definition: ShiftRI.h:75
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:433
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DMatMapExpr.h:234
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1121