24namespace alpaka::math::internal
36#define ALPAKA_SIMD_MATH_UNARY_OP(className, funcName) \
37 template<typename T_MathImpl, alpaka::concepts::Simd T_Arg> \
38 struct className::Op<T_MathImpl, T_Arg> \
40 constexpr auto operator()(T_MathImpl mathImpl, T_Arg const& arg) const -> T_Arg \
42 using std::funcName; \
43 if constexpr(requires { funcName(arg.asNativeType()); }) \
45 return T_Arg{funcName(arg.asNativeType())}; \
50 for(uint32_t i = 0u; i < T_Arg::width(); i++) \
51 ret[i] = className::Op<T_MathImpl, ALPAKA_TYPEOF(arg[i])>{}(mathImpl, arg[i]); \
87#undef ALPAKA_SIMD_MATH_UNARY_OP
constexpr auto floor(auto const &arg)
constexpr auto ceil(auto const &arg)
constexpr auto isnan(auto const &arg)
constexpr auto lround(auto const &arg)
Computes the nearest integer value to arg (in in integer format), rounding halfway cases away from ze...
constexpr auto cbrt(auto const &arg)
constexpr auto isinf(auto const &arg)
constexpr auto log2(auto const &arg)
Computes the natural (base 2) logarithm of arg.
constexpr auto trunc(auto const &arg)
constexpr auto round(auto const &arg)
Computes the nearest integer value to arg (in floating-point format), rounding halfway cases away fro...
constexpr auto erf(auto const &arg)
constexpr auto isfinite(auto const &arg)
constexpr auto llround(auto const &arg)
Computes the nearest integer value to arg (in in integer format), rounding halfway cases away from ze...
#define ALPAKA_SIMD_MATH_UNARY_OP(className, funcName)
Specialize unary math function for SIMD types.