alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Namespaces | |
constants | |
trait | |
The math traits. | |
Classes | |
class | AbsStdLib |
The standard library abs, implementation covered by the general template. More... | |
class | AbsUniformCudaHipBuiltIn |
The CUDA built in abs. More... | |
class | AcoshStdLib |
The standard library acos, implementation covered by the general template. More... | |
class | AcoshUniformCudaHipBuiltIn |
The CUDA built in acosh. More... | |
class | AcosStdLib |
The standard library acos, implementation covered by the general template. More... | |
class | AcosUniformCudaHipBuiltIn |
The CUDA built in acos. More... | |
class | ArgStdLib |
The standard library arg, implementation covered by the general template. More... | |
class | ArgUniformCudaHipBuiltIn |
The CUDA built in arg. More... | |
class | AsinhStdLib |
The standard library asinh, implementation covered by the general template. More... | |
class | AsinhUniformCudaHipBuiltIn |
The CUDA built in asinh. More... | |
class | AsinStdLib |
The standard library asin, implementation covered by the general template. More... | |
class | AsinUniformCudaHipBuiltIn |
The CUDA built in asin. More... | |
class | Atan2StdLib |
The standard library atan2, implementation covered by the general template. More... | |
class | Atan2UniformCudaHipBuiltIn |
The CUDA built in atan2. More... | |
class | AtanhStdLib |
The standard library atanh, implementation covered by the general template. More... | |
class | AtanhUniformCudaHipBuiltIn |
The CUDA built in atanh. More... | |
class | AtanStdLib |
The standard library atan, implementation covered by the general template. More... | |
class | AtanUniformCudaHipBuiltIn |
The CUDA built in atan. More... | |
class | CbrtStdLib |
The standard library cbrt, implementation covered by the general template. More... | |
class | CbrtUniformCudaHipBuiltIn |
The CUDA built in cbrt. More... | |
class | CeilStdLib |
The standard library ceil, implementation covered by the general template. More... | |
class | CeilUniformCudaHipBuiltIn |
The CUDA built in ceil. More... | |
struct | ConceptMathAbs |
struct | ConceptMathAcos |
struct | ConceptMathAcosh |
struct | ConceptMathArg |
struct | ConceptMathAsin |
struct | ConceptMathAsinh |
struct | ConceptMathAtan |
struct | ConceptMathAtan2 |
struct | ConceptMathAtanh |
struct | ConceptMathCbrt |
struct | ConceptMathCeil |
struct | ConceptMathConj |
struct | ConceptMathCopysign |
struct | ConceptMathCos |
struct | ConceptMathCosh |
struct | ConceptMathErf |
struct | ConceptMathExp |
struct | ConceptMathFloor |
struct | ConceptMathFma |
struct | ConceptMathFmod |
struct | ConceptMathIsfinite |
struct | ConceptMathIsinf |
struct | ConceptMathIsnan |
struct | ConceptMathLog |
struct | ConceptMathLog10 |
struct | ConceptMathLog2 |
struct | ConceptMathMax |
struct | ConceptMathMin |
struct | ConceptMathPow |
struct | ConceptMathRemainder |
struct | ConceptMathRound |
struct | ConceptMathRsqrt |
struct | ConceptMathSin |
struct | ConceptMathSinCos |
struct | ConceptMathSinh |
struct | ConceptMathSqrt |
struct | ConceptMathTan |
struct | ConceptMathTanh |
struct | ConceptMathTrunc |
class | ConjStdLib |
The standard library conj, implementation covered by the general template. More... | |
class | ConjUniformCudaHipBuiltIn |
The CUDA built in conj. More... | |
class | CopysignStdLib |
The standard library copysign, implementation covered by the general template. More... | |
class | CopysignUniformCudaHipBuiltIn |
The CUDA built in copysign. More... | |
class | CoshStdLib |
The standard library cosh, implementation covered by the general template. More... | |
class | CoshUniformCudaHipBuiltIn |
The CUDA built in cosh. More... | |
class | CosStdLib |
The standard library cos, implementation covered by the general template. More... | |
class | CosUniformCudaHipBuiltIn |
The CUDA built in cos. More... | |
class | ErfStdLib |
The standard library erf, implementation covered by the general template. More... | |
class | ErfUniformCudaHipBuiltIn |
The CUDA built in erf. More... | |
class | ExpStdLib |
The standard library exp, implementation covered by the general template. More... | |
class | ExpUniformCudaHipBuiltIn |
The CUDA built in exp. More... | |
class | FloorStdLib |
The standard library floor, implementation covered by the general template. More... | |
class | FloorUniformCudaHipBuiltIn |
The CUDA built in floor. More... | |
class | FmaStdLib |
The standard library fma, implementation covered by the general template. More... | |
class | FmaUniformCudaHipBuiltIn |
The CUDA built in fma. More... | |
class | FmodStdLib |
The standard library fmod, implementation covered by the general template. More... | |
class | FmodUniformCudaHipBuiltIn |
The CUDA built in fmod. More... | |
class | IsfiniteStdLib |
The standard library isfinite, implementation covered by the general template. More... | |
class | IsfiniteUniformCudaHipBuiltIn |
The CUDA built in isfinite. More... | |
class | IsinfStdLib |
The standard library isinf, implementation covered by the general template. More... | |
class | IsinfUniformCudaHipBuiltIn |
The CUDA built in isinf. More... | |
class | IsnanStdLib |
The standard library isnan, implementation covered by the general template. More... | |
class | IsnanUniformCudaHipBuiltIn |
The CUDA built in isnan. More... | |
class | Log10StdLib |
The standard library log10, implementation covered by the general template. More... | |
class | Log10UniformCudaHipBuiltIn |
class | Log2StdLib |
The standard library log2, implementation covered by the general template. More... | |
class | Log2UniformCudaHipBuiltIn |
class | LogStdLib |
The standard library log, implementation covered by the general template. More... | |
class | LogUniformCudaHipBuiltIn |
class | MathStdLib |
The standard library math trait specializations. More... | |
class | MathUniformCudaHipBuiltIn |
The standard library math trait specializations. More... | |
class | MaxStdLib |
The standard library max. More... | |
class | MaxUniformCudaHipBuiltIn |
The CUDA built in max. More... | |
class | MinStdLib |
The standard library min. More... | |
class | MinUniformCudaHipBuiltIn |
The CUDA built in min. More... | |
class | PowStdLib |
The standard library pow, implementation covered by the general template. More... | |
class | PowUniformCudaHipBuiltIn |
The CUDA built in pow. More... | |
class | RemainderStdLib |
The standard library remainder, implementation covered by the general template. More... | |
class | RemainderUniformCudaHipBuiltIn |
The CUDA built in remainder. More... | |
class | RoundStdLib |
The standard library round, implementation covered by the general template. More... | |
class | RoundUniformCudaHipBuiltIn |
The CUDA round. More... | |
class | RsqrtStdLib |
The standard library rsqrt, implementation covered by the general template. More... | |
class | RsqrtUniformCudaHipBuiltIn |
The CUDA rsqrt. More... | |
class | SinCosStdLib |
The standard library sincos, implementation covered by the general template. More... | |
class | SinCosUniformCudaHipBuiltIn |
The CUDA sincos. More... | |
class | SinhStdLib |
The standard library sinh, implementation covered by the general template. More... | |
class | SinhUniformCudaHipBuiltIn |
The CUDA sinh. More... | |
class | SinStdLib |
The standard library sin, implementation covered by the general template. More... | |
class | SinUniformCudaHipBuiltIn |
The CUDA sin. More... | |
class | SqrtStdLib |
The standard library sqrt, implementation covered by the general template. More... | |
class | SqrtUniformCudaHipBuiltIn |
The CUDA sqrt. More... | |
class | TanhStdLib |
The standard library tanh, implementation covered by the general template. More... | |
class | TanhUniformCudaHipBuiltIn |
The CUDA tanh. More... | |
class | TanStdLib |
The standard library tan, implementation covered by the general template. More... | |
class | TanUniformCudaHipBuiltIn |
The CUDA tan. More... | |
class | TruncStdLib |
The standard library trunc, implementation covered by the general template. More... | |
class | TruncUniformCudaHipBuiltIn |
The CUDA trunc. More... | |
Functions | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | abs (T const &abs_ctx, TArg const &arg) |
Computes the absolute value. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | acos (T const &acos_ctx, TArg const &arg) |
Computes the principal value of the arc cosine. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | acosh (T const &acosh_ctx, TArg const &arg) |
Computes the principal value of the hyperbolic arc cosine. More... | |
template<typename T , typename TArgument > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | arg (T const &arg_ctx, TArgument const &argument) |
Computes the complex argument of the value. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | asin (T const &asin_ctx, TArg const &arg) |
Computes the principal value of the arc sine. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | asinh (T const &asinh_ctx, TArg const &arg) |
Computes the principal value of the hyperbolic arc sine. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | atan (T const &atan_ctx, TArg const &arg) |
Computes the principal value of the arc tangent. More... | |
template<typename T , typename Ty , typename Tx > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | atan2 (T const &atan2_ctx, Ty const &y, Tx const &x) |
Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | atanh (T const &atanh_ctx, TArg const &arg) |
Computes the principal value of the hyperbolic arc tangent. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | cbrt (T const &cbrt_ctx, TArg const &arg) |
Computes the cbrt. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | ceil (T const &ceil_ctx, TArg const &arg) |
Computes the smallest integer value not less than arg. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | conj (T const &conj_ctx, TArg const &arg) |
Computes the complex conjugate of arg. More... | |
template<typename T , typename TMag , typename TSgn > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | copysign (T const ©sign_ctx, TMag const &mag, TSgn const &sgn) |
Creates a value with the magnitude of mag and the sign of sgn. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | cos (T const &cos_ctx, TArg const &arg) |
Computes the cosine (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | cosh (T const &cosh_ctx, TArg const &arg) |
Computes the hyperbolic cosine (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | erf (T const &erf_ctx, TArg const &arg) |
Computes the error function of arg. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | exp (T const &exp_ctx, TArg const &arg) |
Computes the e (Euler's number, 2.7182818) raised to the given power arg. More... | |
template<typename T > | |
ALPAKA_FN_INLINE ALPAKA_FN_HOST_ACC auto | floatEqualExactNoWarning (T a, T b) -> bool |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | floor (T const &floor_ctx, TArg const &arg) |
Computes the largest integer value not greater than arg. More... | |
template<typename T , typename Tx , typename Ty , typename Tz > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | fma (T const &fma_ctx, Tx const &x, Ty const &y, Tz const &z) |
Computes x * y + z as if to infinite precision and rounded only once to fit the result type. More... | |
template<typename T , typename Tx , typename Ty > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | fmod (T const &fmod_ctx, Tx const &x, Ty const &y) |
Computes the floating-point remainder of the division operation x/y. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | isfinite (T const &ctx, TArg const &arg) |
Checks if given value is finite. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | isinf (T const &ctx, TArg const &arg) |
Checks if given value is inf. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | isnan (T const &ctx, TArg const &arg) |
Checks if given value is NaN. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | llround (T const &llround_ctx, TArg const &arg) -> long long int |
Computes the nearest integer value to arg (in integer format), rounding halfway cases away from zero, regardless of the current rounding mode. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | log (T const &log_ctx, TArg const &arg) |
Computes the the natural (base e) logarithm of arg. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | log10 (T const &log10_ctx, TArg const &arg) |
Computes the the natural (base 10) logarithm of arg. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | log2 (T const &log2_ctx, TArg const &arg) |
Computes the the natural (base 2) logarithm of arg. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | lround (T const &lround_ctx, TArg const &arg) -> long int |
Computes the nearest integer value to arg (in integer format), rounding halfway cases away from zero, regardless of the current rounding mode. More... | |
template<typename T , typename Tx , typename Ty > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | max (T const &max_ctx, Tx const &x, Ty const &y) |
Returns the larger of two arguments. NaNs are treated as missing data (between a NaN and a numeric value, the numeric value is chosen). More... | |
template<typename T , typename Tx , typename Ty > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | min (T const &min_ctx, Tx const &x, Ty const &y) |
Returns the smaller of two arguments. NaNs are treated as missing data (between a NaN and a numeric value, the numeric value is chosen). More... | |
template<typename T , typename TBase , typename TExp > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | pow (T const &pow_ctx, TBase const &base, TExp const &exp) |
Computes the value of base raised to the power exp. More... | |
template<typename T , typename Tx , typename Ty > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | remainder (T const &remainder_ctx, Tx const &x, Ty const &y) |
Computes the IEEE remainder of the floating point division operation x/y. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | round (T const &round_ctx, TArg const &arg) |
Computes the nearest integer value to arg (in floating-point format), rounding halfway cases away from zero, regardless of the current rounding mode. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | rsqrt (T const &rsqrt_ctx, TArg const &arg) |
Computes the rsqrt. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | sin (T const &sin_ctx, TArg const &arg) |
Computes the sine (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | sincos (T const &sincos_ctx, TArg const &arg, TArg &result_sin, TArg &result_cos) -> void |
Computes the sine and cosine (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | sinh (T const &sinh_ctx, TArg const &arg) |
Computes the hyperbolic sine (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | sqrt (T const &sqrt_ctx, TArg const &arg) |
Computes the square root of arg. More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | tan (T const &tan_ctx, TArg const &arg) |
Computes the tangent (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | tanh (T const &tanh_ctx, TArg const &arg) |
Computes the hyperbolic tangent (measured in radians). More... | |
template<typename T , typename TArg > | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto | trunc (T const &trunc_ctx, TArg const &arg) |
Computes the nearest integer not greater in magnitude than arg. More... | |
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::abs | ( | T const & | abs_ctx, |
TArg const & | arg | ||
) |
Computes the absolute value.
T | The type of the object specializing Abs. |
TArg | The arg type. |
abs_ctx | The object specializing Abs. |
arg | The arg. |
Definition at line 864 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::acos | ( | T const & | acos_ctx, |
TArg const & | arg | ||
) |
Computes the principal value of the arc cosine.
The valid real argument range is [-1.0, 1.0]. For other values the result may depend on the backend and compilation options, will likely be NaN.
TArg | The arg type. |
acos_ctx | The object specializing Acos. |
arg | The arg. |
Definition at line 881 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::acosh | ( | T const & | acosh_ctx, |
TArg const & | arg | ||
) |
Computes the principal value of the hyperbolic arc cosine.
The valid real argument range is [1.0, Inf]. For other values the result may depend on the backend and compilation options, will likely be NaN.
TArg | The arg type. |
acosh_ctx | The object specializing Acos. |
arg | The arg. |
Definition at line 898 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::arg | ( | T const & | arg_ctx, |
TArgument const & | argument | ||
) |
Computes the complex argument of the value.
T | The type of the object specializing Arg. |
TArgument | The argument type. |
arg_ctx | The object specializing Arg. |
argument | The argument. |
Definition at line 912 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::asin | ( | T const & | asin_ctx, |
TArg const & | arg | ||
) |
Computes the principal value of the arc sine.
The valid real argument range is [-1.0, 1.0]. For other values the result may depend on the backend and compilation options, will likely be NaN.
TArg | The arg type. |
asin_ctx | The object specializing Asin. |
arg | The arg. |
Definition at line 929 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::asinh | ( | T const & | asinh_ctx, |
TArg const & | arg | ||
) |
Computes the principal value of the hyperbolic arc sine.
TArg | The arg type. |
asinh_ctx | The object specializing Asin. |
arg | The arg. |
Definition at line 942 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::atan | ( | T const & | atan_ctx, |
TArg const & | arg | ||
) |
Computes the principal value of the arc tangent.
TArg | The arg type. |
atan_ctx | The object specializing Atan. |
arg | The arg. |
Definition at line 955 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::atan2 | ( | T const & | atan2_ctx, |
Ty const & | y, | ||
Tx const & | x | ||
) |
Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.
T | The type of the object specializing Atan2. |
Ty | The y arg type. |
Tx | The x arg type. |
atan2_ctx | The object specializing Atan2. |
y | The y arg. |
x | The x arg. |
Definition at line 988 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::atanh | ( | T const & | atanh_ctx, |
TArg const & | arg | ||
) |
Computes the principal value of the hyperbolic arc tangent.
The valid real argument range is [-1.0, 1.0]. For other values the result may depend on the backend and compilation options, will likely be NaN.
TArg | The arg type. |
atanh_ctx | The object specializing Atanh. |
arg | The arg. |
Definition at line 972 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::cbrt | ( | T const & | cbrt_ctx, |
TArg const & | arg | ||
) |
Computes the cbrt.
T | The type of the object specializing Cbrt. |
TArg | The arg type. |
cbrt_ctx | The object specializing Cbrt. |
arg | The arg. |
Definition at line 1002 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::ceil | ( | T const & | ceil_ctx, |
TArg const & | arg | ||
) |
Computes the smallest integer value not less than arg.
T | The type of the object specializing Ceil. |
TArg | The arg type. |
ceil_ctx | The object specializing Ceil. |
arg | The arg. |
Definition at line 1016 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::conj | ( | T const & | conj_ctx, |
TArg const & | arg | ||
) |
Computes the complex conjugate of arg.
T | The type of the object specializing Conj. |
TArg | The arg type. |
conj_ctx | The object specializing Conj. |
arg | The arg. |
Definition at line 1030 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::copysign | ( | T const & | copysign_ctx, |
TMag const & | mag, | ||
TSgn const & | sgn | ||
) |
Creates a value with the magnitude of mag and the sign of sgn.
T | The type of the object specializing Copysign. |
TMag | The mag type. |
TSgn | The sgn type. |
copysign_ctx | The object specializing Copysign. |
mag | The mag. |
sgn | The sgn. |
Definition at line 1046 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::cos | ( | T const & | cos_ctx, |
TArg const & | arg | ||
) |
Computes the cosine (measured in radians).
T | The type of the object specializing Cos. |
TArg | The arg type. |
cos_ctx | The object specializing Cos. |
arg | The arg. |
Definition at line 1060 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::cosh | ( | T const & | cosh_ctx, |
TArg const & | arg | ||
) |
Computes the hyperbolic cosine (measured in radians).
T | The type of the object specializing Cos. |
TArg | The arg type. |
cosh_ctx | The object specializing Cos. |
arg | The arg. |
Definition at line 1074 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::erf | ( | T const & | erf_ctx, |
TArg const & | arg | ||
) |
Computes the error function of arg.
T | The type of the object specializing Erf. |
TArg | The arg type. |
erf_ctx | The object specializing Erf. |
arg | The arg. |
Definition at line 1088 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::exp | ( | T const & | exp_ctx, |
TArg const & | arg | ||
) |
Computes the e (Euler's number, 2.7182818) raised to the given power arg.
T | The type of the object specializing Exp. |
TArg | The arg type. |
exp_ctx | The object specializing Exp. |
arg | The arg. |
Definition at line 1102 of file Traits.hpp.
ALPAKA_FN_INLINE ALPAKA_FN_HOST_ACC auto alpaka::math::floatEqualExactNoWarning | ( | T | a, |
T | b | ||
) | -> bool |
Compare two floating point numbers for exact equivalence. Use only when necessary, and be aware of the implications. Most codes should not use this function and instead implement a correct epsilon-based comparison. If you are unfamiliar with the topic, check out https://www.geeksforgeeks.org/problem-in-comparing-floating-point-numbers-and-how-to-compare-them-correctly/ or Goldberg 1991: "What every computer scientist should know about floating-point arithmetic", https://dl.acm.org/doi/10.1145/103162.103163
This function calls the == operator for floating point types, but disables the warning issued by the compiler when compiling with the float equality warning checks enabled. This warning is valid an valuable in most codes and should be generally enabled, but there are specific instances where a piece of code might need to do an exact comparison (e.g. CudaVectorArrayWrapperTest.cpp). The verbose name for the function is intentional as it should raise a red flag if used while not absolutely needed. Users are advised to add a justification whenever they use this function.
T | both operands have to be the same type and conform to std::is_floating_point |
a | first operand |
b | second operand |
Definition at line 35 of file FloatEqualExact.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::floor | ( | T const & | floor_ctx, |
TArg const & | arg | ||
) |
Computes the largest integer value not greater than arg.
T | The type of the object specializing Floor. |
TArg | The arg type. |
floor_ctx | The object specializing Floor. |
arg | The arg. |
Definition at line 1116 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::fma | ( | T const & | fma_ctx, |
Tx const & | x, | ||
Ty const & | y, | ||
Tz const & | z | ||
) |
Computes x * y + z as if to infinite precision and rounded only once to fit the result type.
T | The type of the object specializing Fma. |
Tx | The type of the first argument. |
Ty | The type of the second argument. |
Tz | The type of the third argument. |
fma_ctx | The object specializing . |
x | The first argument. |
y | The second argument. |
z | The third argument. |
Definition at line 1134 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::fmod | ( | T const & | fmod_ctx, |
Tx const & | x, | ||
Ty const & | y | ||
) |
Computes the floating-point remainder of the division operation x/y.
T | The type of the object specializing Fmod. |
Tx | The type of the first argument. |
Ty | The type of the second argument. |
fmod_ctx | The object specializing Fmod. |
x | The first argument. |
y | The second argument. |
Definition at line 1150 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::isfinite | ( | T const & | ctx, |
TArg const & | arg | ||
) |
Checks if given value is finite.
T | The type of the object specializing Isfinite. |
TArg | The arg type. |
ctx | The object specializing Isfinite. |
arg | The arg. |
Definition at line 1164 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::isinf | ( | T const & | ctx, |
TArg const & | arg | ||
) |
Checks if given value is inf.
T | The type of the object specializing Isinf. |
TArg | The arg type. |
ctx | The object specializing Isinf. |
arg | The arg. |
Definition at line 1178 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::isnan | ( | T const & | ctx, |
TArg const & | arg | ||
) |
Checks if given value is NaN.
T | The type of the object specializing Isnan. |
TArg | The arg type. |
ctx | The object specializing Isnan. |
arg | The arg. |
Definition at line 1192 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::llround | ( | T const & | llround_ctx, |
TArg const & | arg | ||
) | -> long long int |
Computes the nearest integer value to arg (in integer format), rounding halfway cases away from zero, regardless of the current rounding mode.
T | The type of the object specializing Round. |
TArg | The arg type. |
llround_ctx | The object specializing Round. |
arg | The arg. |
Definition at line 1361 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::log | ( | T const & | log_ctx, |
TArg const & | arg | ||
) |
Computes the the natural (base e) logarithm of arg.
Valid real arguments are non-negative. For other values the result may depend on the backend and compilation options, will likely be NaN.
T | The type of the object specializing Log. |
TArg | The arg type. |
log_ctx | The object specializing Log. |
arg | The arg. |
Definition at line 1210 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::log10 | ( | T const & | log10_ctx, |
TArg const & | arg | ||
) |
Computes the the natural (base 10) logarithm of arg.
Valid real arguments are non-negative. For other values the result may depend on the backend and compilation options, will likely be NaN.
T | The type of the object specializing Log10. |
TArg | The arg type. |
log10_ctx | The object specializing Log10. |
arg | The arg. |
Definition at line 1246 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::log2 | ( | T const & | log2_ctx, |
TArg const & | arg | ||
) |
Computes the the natural (base 2) logarithm of arg.
Valid real arguments are non-negative. For other values the result may depend on the backend and compilation options, will likely be NaN.
T | The type of the object specializing Log2. |
TArg | The arg type. |
log2_ctx | The object specializing Log2. |
arg | The arg. |
Definition at line 1228 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::lround | ( | T const & | lround_ctx, |
TArg const & | arg | ||
) | -> long int |
Computes the nearest integer value to arg (in integer format), rounding halfway cases away from zero, regardless of the current rounding mode.
T | The type of the object specializing Round. |
TArg | The arg type. |
lround_ctx | The object specializing Round. |
arg | The arg. |
Definition at line 1346 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::max | ( | T const & | max_ctx, |
Tx const & | x, | ||
Ty const & | y | ||
) |
Returns the larger of two arguments. NaNs are treated as missing data (between a NaN and a numeric value, the numeric value is chosen).
T | The type of the object specializing Max. |
Tx | The type of the first argument. |
Ty | The type of the second argument. |
max_ctx | The object specializing Max. |
x | The first argument. |
y | The second argument. |
Definition at line 1263 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::min | ( | T const & | min_ctx, |
Tx const & | x, | ||
Ty const & | y | ||
) |
Returns the smaller of two arguments. NaNs are treated as missing data (between a NaN and a numeric value, the numeric value is chosen).
T | The type of the object specializing Min. |
Tx | The type of the first argument. |
Ty | The type of the second argument. |
min_ctx | The object specializing Min. |
x | The first argument. |
y | The second argument. |
Definition at line 1280 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::pow | ( | T const & | pow_ctx, |
TBase const & | base, | ||
TExp const & | exp | ||
) |
Computes the value of base raised to the power exp.
Valid real arguments for base are non-negative. For other values the result may depend on the backend and compilation options, will likely be NaN.
T | The type of the object specializing Pow. |
TBase | The base type. |
TExp | The exponent type. |
pow_ctx | The object specializing Pow. |
base | The base. |
exp | The exponent. |
Definition at line 1300 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::remainder | ( | T const & | remainder_ctx, |
Tx const & | x, | ||
Ty const & | y | ||
) |
Computes the IEEE remainder of the floating point division operation x/y.
T | The type of the object specializing Remainder. |
Tx | The type of the first argument. |
Ty | The type of the second argument. |
remainder_ctx | The object specializing Max. |
x | The first argument. |
y | The second argument. |
Definition at line 1316 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::round | ( | T const & | round_ctx, |
TArg const & | arg | ||
) |
Computes the nearest integer value to arg (in floating-point format), rounding halfway cases away from zero, regardless of the current rounding mode.
T | The type of the object specializing Round. |
TArg | The arg type. |
round_ctx | The object specializing Round. |
arg | The arg. |
Definition at line 1331 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::rsqrt | ( | T const & | rsqrt_ctx, |
TArg const & | arg | ||
) |
Computes the rsqrt.
Valid real arguments are positive. For other values the result may depend on the backend and compilation options, will likely be NaN.
T | The type of the object specializing Rsqrt. |
TArg | The arg type. |
rsqrt_ctx | The object specializing Rsqrt. |
arg | The arg. |
Definition at line 1379 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::sin | ( | T const & | sin_ctx, |
TArg const & | arg | ||
) |
Computes the sine (measured in radians).
T | The type of the object specializing Sin. |
TArg | The arg type. |
sin_ctx | The object specializing Sin. |
arg | The arg. |
Definition at line 1393 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::sincos | ( | T const & | sincos_ctx, |
TArg const & | arg, | ||
TArg & | result_sin, | ||
TArg & | result_cos | ||
) | -> void |
Computes the sine and cosine (measured in radians).
T | The type of the object specializing SinCos. |
TArg | The arg type. |
sincos_ctx | The object specializing SinCos. |
arg | The arg. |
result_sin | result of sine |
result_cos | result of cosine |
Definition at line 1423 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::sinh | ( | T const & | sinh_ctx, |
TArg const & | arg | ||
) |
Computes the hyperbolic sine (measured in radians).
T | The type of the object specializing Sin. |
TArg | The arg type. |
sinh_ctx | The object specializing Sin. |
arg | The arg. |
Definition at line 1407 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::sqrt | ( | T const & | sqrt_ctx, |
TArg const & | arg | ||
) |
Computes the square root of arg.
Valid real arguments are non-negative. For other values the result may depend on the backend and compilation options, will likely be NaN.
T | The type of the object specializing Sqrt. |
TArg | The arg type. |
sqrt_ctx | The object specializing Sqrt. |
arg | The arg. |
Definition at line 1441 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::tan | ( | T const & | tan_ctx, |
TArg const & | arg | ||
) |
Computes the tangent (measured in radians).
T | The type of the object specializing Tan. |
TArg | The arg type. |
tan_ctx | The object specializing Tan. |
arg | The arg. |
Definition at line 1455 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::tanh | ( | T const & | tanh_ctx, |
TArg const & | arg | ||
) |
Computes the hyperbolic tangent (measured in radians).
T | The type of the object specializing Tanh. |
TArg | The arg type. |
tanh_ctx | The object specializing Tanh. |
arg | The arg. |
Definition at line 1469 of file Traits.hpp.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::math::trunc | ( | T const & | trunc_ctx, |
TArg const & | arg | ||
) |
Computes the nearest integer not greater in magnitude than arg.
T | The type of the object specializing Trunc. |
TArg | The arg type. |
trunc_ctx | The object specializing Trunc. |
arg | The arg. |
Definition at line 1483 of file Traits.hpp.