17 #include <type_traits>
19 #if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)
265 # if !defined(ALPAKA_HOST_ONLY)
267 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) && !BOOST_LANG_CUDA
268 # error If ALPAKA_ACC_GPU_CUDA_ENABLED is set, the compiler has to support CUDA!
271 # if defined(ALPAKA_ACC_GPU_HIP_ENABLED) && !BOOST_LANG_HIP
272 # error If ALPAKA_ACC_GPU_HIP_ENABLED is set, the compiler has to support HIP!
275 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) && defined(__CUDA_ARCH__)
276 # include <cuda_runtime.h>
279 # if defined(ALPAKA_ACC_GPU_HIP_ENABLED) && defined(__HIP_DEVICE_COMPILE__)
280 # include <hip/math_functions.h>
286 template<
typename TArg>
291 if constexpr(is_decayed_v<TArg, float>)
293 else if constexpr(is_decayed_v<TArg, double>)
295 else if constexpr(is_decayed_v<TArg, int>)
297 else if constexpr(is_decayed_v<TArg, long int>)
299 else if constexpr(is_decayed_v<TArg, long long int>)
302 static_assert(!
sizeof(TArg),
"Unsupported data type");
313 template<
typename TCtx>
321 template<
typename TArg>
326 if constexpr(is_decayed_v<TArg, float>)
328 else if constexpr(is_decayed_v<TArg, double>)
331 static_assert(!
sizeof(TArg),
"Unsupported data type");
342 template<
typename TCtx>
351 template<
typename TArg>
356 if constexpr(is_decayed_v<TArg, float>)
357 return ::acoshf(
arg);
358 else if constexpr(is_decayed_v<TArg, double>)
361 static_assert(!
sizeof(TArg),
"Unsupported data type");
372 template<
typename TCtx>
376 return log(ctx,
arg +
sqrt(ctx,
arg -
static_cast<T
>(1.0)) *
sqrt(ctx,
arg +
static_cast<T
>(1.0)));
381 template<
typename TArgument>
385 template<
typename TCtx>
386 __host__ __device__
auto operator()(TCtx
const& ctx, TArgument
const& argument)
389 return atan2(ctx, TArgument{0.0}, argument);
398 template<
typename TCtx>
406 template<
typename TArg>
411 if constexpr(is_decayed_v<TArg, float>)
413 else if constexpr(is_decayed_v<TArg, double>)
416 static_assert(!
sizeof(TArg),
"Unsupported data type");
427 template<
typename TCtx>
436 template<
typename TArg>
441 if constexpr(is_decayed_v<TArg, float>)
442 return ::asinhf(
arg);
443 else if constexpr(is_decayed_v<TArg, double>)
446 static_assert(!
sizeof(TArg),
"Unsupported data type");
457 template<
typename TCtx>
466 template<
typename TArg>
471 if constexpr(is_decayed_v<TArg, float>)
473 else if constexpr(is_decayed_v<TArg, double>)
476 static_assert(!
sizeof(TArg),
"Unsupported data type");
487 template<
typename TCtx>
496 template<
typename TArg>
501 if constexpr(is_decayed_v<TArg, float>)
502 return ::atanhf(
arg);
503 else if constexpr(is_decayed_v<TArg, double>)
506 static_assert(!
sizeof(TArg),
"Unsupported data type");
517 template<
typename TCtx>
521 return static_cast<T
>(0.5)
522 * (
log(ctx,
static_cast<T
>(1.0) +
arg) -
log(ctx,
static_cast<T
>(1.0) -
arg));
527 template<
typename Ty,
typename Tx>
532 std::enable_if_t<std::is_floating_point_v<Ty> && std::is_floating_point_v<Tx>>>
539 if constexpr(is_decayed_v<Ty, float> && is_decayed_v<Tx, float>)
540 return ::atan2f(y, x);
541 else if constexpr(is_decayed_v<Ty, double> || is_decayed_v<Tx, double>)
544 static_assert(!
sizeof(Ty),
"Unsupported data type");
551 template<
typename TArg>
556 if constexpr(is_decayed_v<TArg, float>)
558 else if constexpr(is_decayed_v<TArg, double> || std::is_integral_v<TArg>)
561 static_assert(!
sizeof(TArg),
"Unsupported data type");
568 template<
typename TArg>
573 if constexpr(is_decayed_v<TArg, float>)
575 else if constexpr(is_decayed_v<TArg, double>)
578 static_assert(!
sizeof(TArg),
"Unsupported data type");
585 template<
typename TArg>
605 template<
typename TMag,
typename TSgn>
610 std::enable_if_t<std::is_floating_point_v<TMag> && std::is_floating_point_v<TSgn>>>
617 if constexpr(is_decayed_v<TMag, float> && is_decayed_v<TSgn, float>)
618 return ::copysignf(mag, sgn);
619 else if constexpr(is_decayed_v<TMag, double> || is_decayed_v<TSgn, double>)
622 static_assert(!
sizeof(TMag),
"Unsupported data type");
629 template<
typename TArg>
634 if constexpr(is_decayed_v<TArg, float>)
636 else if constexpr(is_decayed_v<TArg, double>)
639 static_assert(!
sizeof(TArg),
"Unsupported data type");
650 template<
typename TCtx>
659 template<
typename TArg>
664 if constexpr(is_decayed_v<TArg, float>)
666 else if constexpr(is_decayed_v<TArg, double>)
669 static_assert(!
sizeof(TArg),
"Unsupported data type");
680 template<
typename TCtx>
684 return T(0.5) * (
exp(ctx,
arg) +
exp(ctx,
static_cast<T
>(-1.0) *
arg));
689 template<
typename TArg>
694 if constexpr(is_decayed_v<TArg, float>)
696 else if constexpr(is_decayed_v<TArg, double>)
699 static_assert(!
sizeof(TArg),
"Unsupported data type");
706 template<
typename TArg>
711 if constexpr(is_decayed_v<TArg, float>)
713 else if constexpr(is_decayed_v<TArg, double>)
716 static_assert(!
sizeof(TArg),
"Unsupported data type");
727 template<
typename TCtx>
731 auto re = T{}, im = T{};
738 template<
typename TArg>
743 if constexpr(is_decayed_v<TArg, float>)
744 return ::floorf(
arg);
745 else if constexpr(is_decayed_v<TArg, double>)
748 static_assert(!
sizeof(TArg),
"Unsupported data type");
755 template<
typename Tx,
typename Ty,
typename Tz>
762 std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty> && std::is_floating_point_v<Tz>>>
770 if constexpr(is_decayed_v<Tx, float> && is_decayed_v<Ty, float> && is_decayed_v<Tz, float>)
771 return ::fmaf(x, y, z);
772 else if constexpr(is_decayed_v<Tx, double> || is_decayed_v<Ty, double> || is_decayed_v<Tz, double>)
775 static_assert(!
sizeof(Tx),
"Unsupported data type");
777 using Ret [[maybe_unused]] = std::conditional_t<
778 is_decayed_v<Tx, float> && is_decayed_v<Ty, float> && is_decayed_v<Tz, float>,
786 template<
typename Tx,
typename Ty>
791 std::enable_if_t<std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty>>>
798 if constexpr(is_decayed_v<Tx, float> && is_decayed_v<Ty, float>)
799 return ::fmodf(x, y);
800 else if constexpr(is_decayed_v<Tx, double> || is_decayed_v<Ty, double>)
803 static_assert(!
sizeof(Tx),
"Unsupported data type");
805 using Ret [[maybe_unused]]
806 = std::conditional_t<is_decayed_v<Tx, float> && is_decayed_v<Ty, float>, float,
double>;
812 template<
typename TArg>
822 template<
typename TArg>
832 template<
typename TArg>
842 template<
typename TArg>
847 if constexpr(is_decayed_v<TArg, float>)
849 else if constexpr(is_decayed_v<TArg, double>)
852 static_assert(!
sizeof(TArg),
"Unsupported data type");
863 template<
typename TCtx>
873 template<
typename TArg>
878 if constexpr(is_decayed_v<TArg, float>)
880 else if constexpr(is_decayed_v<TArg, double>)
883 static_assert(!
sizeof(TArg),
"Unsupported data type");
890 template<
typename TArg>
895 if constexpr(is_decayed_v<TArg, float>)
896 return ::log10f(
arg);
897 else if constexpr(is_decayed_v<TArg, double>)
900 static_assert(!
sizeof(TArg),
"Unsupported data type");
911 template<
typename TCtx>
914 return log(ctx, argument) /
log(ctx,
static_cast<T
>(10));
919 template<
typename Tx,
typename Ty>
924 std::enable_if_t<std::is_arithmetic_v<Tx> && std::is_arithmetic_v<Ty>>>
931 if constexpr(std::is_integral_v<Tx> && std::is_integral_v<Ty>)
933 else if constexpr(is_decayed_v<Tx, float> && is_decayed_v<Ty, float>)
934 return ::fmaxf(x, y);
936 is_decayed_v<Tx, double> || is_decayed_v<Ty, double>
937 || (is_decayed_v<Tx, float> && std::is_integral_v<Ty>)
938 || (std::is_integral_v<Tx> && is_decayed_v<Ty, float>) )
941 static_assert(!
sizeof(Tx),
"Unsupported data type");
943 using Ret [[maybe_unused]] = std::conditional_t<
944 std::is_integral_v<Tx> && std::is_integral_v<Ty>,
945 decltype(::
max(x, y)),
946 std::conditional_t<is_decayed_v<Tx, float> && is_decayed_v<Ty, float>, float,
double>>;
952 template<
typename Tx,
typename Ty>
957 std::enable_if_t<std::is_arithmetic_v<Tx> && std::is_arithmetic_v<Ty>>>
964 if constexpr(std::is_integral_v<Tx> && std::is_integral_v<Ty>)
966 else if constexpr(is_decayed_v<Tx, float> && is_decayed_v<Ty, float>)
967 return ::fminf(x, y);
969 is_decayed_v<Tx, double> || is_decayed_v<Ty, double>
970 || (is_decayed_v<Tx, float> && std::is_integral_v<Ty>)
971 || (std::is_integral_v<Tx> && is_decayed_v<Ty, float>) )
974 static_assert(!
sizeof(Tx),
"Unsupported data type");
976 using Ret [[maybe_unused]] = std::conditional_t<
977 std::is_integral_v<Tx> && std::is_integral_v<Ty>,
978 decltype(::
min(x, y)),
979 std::conditional_t<is_decayed_v<Tx, float> && is_decayed_v<Ty, float>, float,
double>>;
985 template<
typename TBase,
typename TExp>
990 std::enable_if_t<std::is_floating_point_v<TBase> && std::is_floating_point_v<TExp>>>
997 if constexpr(is_decayed_v<TBase, float> && is_decayed_v<TExp, float>)
998 return ::powf(base,
exp);
999 else if constexpr(is_decayed_v<TBase, double> || is_decayed_v<TExp, double>)
1002 static_assert(!
sizeof(TBase),
"Unsupported data type");
1004 using Ret [[maybe_unused]]
1005 = std::conditional_t<is_decayed_v<TBase, float> && is_decayed_v<TExp, float>, float,
double>;
1011 template<
typename T,
typename U>
1015 template<
typename TCtx>
1023 return exp(ctx, Promoted{exponent} *
log(ctx, Promoted{base}));
1028 template<
typename T,
typename U>
1032 template<
typename TCtx>
1040 template<
typename T,
typename U>
1044 template<
typename TCtx>
1052 template<
typename Tx,
typename Ty>
1057 std::enable_if_t<std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty>>>
1064 if constexpr(is_decayed_v<Tx, float> && is_decayed_v<Ty, float>)
1065 return ::remainderf(x, y);
1066 else if constexpr(is_decayed_v<Tx, double> || is_decayed_v<Ty, double>)
1069 static_assert(!
sizeof(Tx),
"Unsupported data type");
1071 using Ret [[maybe_unused]]
1072 = std::conditional_t<is_decayed_v<Tx, float> && is_decayed_v<Ty, float>, float,
double>;
1078 template<
typename TArg>
1083 if constexpr(is_decayed_v<TArg, float>)
1084 return ::roundf(
arg);
1085 else if constexpr(is_decayed_v<TArg, double>)
1088 static_assert(!
sizeof(TArg),
"Unsupported data type");
1095 template<
typename TArg>
1100 if constexpr(is_decayed_v<TArg, float>)
1101 return ::lroundf(
arg);
1102 else if constexpr(is_decayed_v<TArg, double>)
1105 static_assert(!
sizeof(TArg),
"Unsupported data type");
1112 template<
typename TArg>
1117 if constexpr(is_decayed_v<TArg, float>)
1118 return ::llroundf(
arg);
1119 else if constexpr(is_decayed_v<TArg, double>)
1122 static_assert(!
sizeof(TArg),
"Unsupported data type");
1125 using Ret [[maybe_unused]] =
long long;
1131 template<
typename TArg>
1136 if constexpr(is_decayed_v<TArg, float>)
1137 return ::rsqrtf(
arg);
1138 else if constexpr(is_decayed_v<TArg, double> || std::is_integral_v<TArg>)
1141 static_assert(!
sizeof(TArg),
"Unsupported data type");
1148 template<
typename T>
1152 template<
typename TCtx>
1155 return T{1.0} /
sqrt(ctx,
arg);
1160 template<
typename TArg>
1165 if constexpr(is_decayed_v<TArg, float>)
1167 else if constexpr(is_decayed_v<TArg, double>)
1170 static_assert(!
sizeof(TArg),
"Unsupported data type");
1177 template<
typename T>
1181 template<
typename TCtx>
1191 template<
typename TArg>
1196 if constexpr(is_decayed_v<TArg, float>)
1197 return ::sinhf(
arg);
1198 else if constexpr(is_decayed_v<TArg, double>)
1201 static_assert(!
sizeof(TArg),
"Unsupported data type");
1208 template<
typename T>
1212 template<
typename TCtx>
1216 return (
exp(ctx,
arg) -
exp(ctx,
static_cast<T
>(-1.0) *
arg)) /
static_cast<T
>(2.0);
1221 template<
typename TArg>
1228 TArg& result_cos) ->
void
1230 if constexpr(is_decayed_v<TArg, float>)
1231 ::sincosf(
arg, &result_sin, &result_cos);
1232 else if constexpr(is_decayed_v<TArg, double>)
1233 ::
sincos(
arg, &result_sin, &result_cos);
1235 static_assert(!
sizeof(TArg),
"Unsupported data type");
1240 template<
typename T>
1244 template<
typename TCtx>
1251 result_sin =
sin(ctx,
arg);
1252 result_cos =
cos(ctx,
arg);
1257 template<
typename TArg>
1262 if constexpr(is_decayed_v<TArg, float>)
1263 return ::sqrtf(
arg);
1264 else if constexpr(is_decayed_v<TArg, double> || std::is_integral_v<TArg>)
1267 static_assert(!
sizeof(TArg),
"Unsupported data type");
1274 template<
typename T>
1278 template<
typename TCtx>
1283 auto const halfArg = T(0.5) *
arg(ctx, argument);
1284 auto re = T{}, im = T{};
1285 sincos(ctx, halfArg, im, re);
1291 template<
typename TArg>
1296 if constexpr(is_decayed_v<TArg, float>)
1298 else if constexpr(is_decayed_v<TArg, double>)
1301 static_assert(!
sizeof(TArg),
"Unsupported data type");
1308 template<
typename T>
1312 template<
typename TCtx>
1318 return Complex<T>{0.0, 1.0} * (T{1.0} - expValue) / (T{1.0} + expValue);
1323 template<
typename TArg>
1328 if constexpr(is_decayed_v<TArg, float>)
1329 return ::tanhf(
arg);
1330 else if constexpr(is_decayed_v<TArg, double>)
1333 static_assert(!
sizeof(TArg),
"Unsupported data type");
1340 template<
typename T>
1344 template<
typename TCtx>
1348 return (
exp(ctx,
arg) -
exp(ctx,
static_cast<T
>(-1.0) *
arg))
1349 / (
exp(ctx,
arg) +
exp(ctx,
static_cast<T
>(-1.0) *
arg));
1354 template<
typename TArg>
1359 if constexpr(is_decayed_v<TArg, float>)
1360 return ::truncf(
arg);
1361 else if constexpr(is_decayed_v<TArg, double>)
1364 static_assert(!
sizeof(TArg),
"Unsupported data type");
#define ALPAKA_UNREACHABLE(...)
Before CUDA 11.5 nvcc is unable to correctly identify return statements in 'if constexpr' branches....
Implementation of a complex number useable on host and device.
constexpr ALPAKA_FN_HOST_ACC T imag() const
Get the imaginary part.
constexpr ALPAKA_FN_HOST_ACC T real() const
Get the real part.
The CUDA built in remainder.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > tan(Complex< T > const &x)
Tangent.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > acosh(Complex< T > const &x)
Arc hyperbolic cosine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > atanh(Complex< T > const &x)
Arc hyperbolic tangent.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > cosh(Complex< T > const &x)
Hyperbolic cosine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > atan(Complex< T > const &x)
Arc tangent.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T abs(Complex< T > const &x)
Host-only math functions matching std::complex<T>.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > log(Complex< T > const &x)
Natural logarithm.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > sinh(Complex< T > const &x)
Hyperbolic sine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > tanh(Complex< T > const &x)
Hyperbolic tangent.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > log10(Complex< T > const &x)
Base 10 logarithm.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > asinh(Complex< T > const &x)
Arc hyperbolic sine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > cos(Complex< T > const &x)
Cosine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > asin(Complex< T > const &x)
Arc sine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > exp(Complex< T > const &x)
Exponential.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto pow(Complex< T > const &x, Complex< U > const &y)
Complex power of a complex number.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > sqrt(Complex< T > const &x)
Square root.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > acos(Complex< T > const &x)
Arc cosine.
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > sin(Complex< T > const &x)
Sine.
ALPAKA_FN_HOST_ACC auto rsqrt(TArg const &arg)
Fallback implementation when no better ADL match was found.
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.
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 va...
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto sqrt(T const &sqrt_ctx, TArg const &arg)
Computes the square root of arg.
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.
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.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto isfinite(T const &ctx, TArg const &arg)
Checks if given value is finite.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto cos(T const &cos_ctx, TArg const &arg)
Computes the cosine (measured in radians).
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,...
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.
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.
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.
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.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto isinf(T const &ctx, TArg const &arg)
Checks if given value is inf.
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.
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,...
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).
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.
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.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto isnan(T const &ctx, TArg const &arg)
Checks if given value is NaN.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto cbrt(T const &cbrt_ctx, TArg const &arg)
Computes the cbrt.
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 v...
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.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto sin(T const &sin_ctx, TArg const &arg)
Computes the sine (measured in radians).
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto abs(T const &abs_ctx, TArg const &arg)
Computes the absolute value.
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.
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 fro...
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.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto erf(T const &erf_ctx, TArg const &arg)
Computes the error function of arg.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
__host__ __device__ auto operator()(RemainderUniformCudaHipBuiltIn const &, Tx const &x, Ty const &y)