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 Complex< T > log(Complex< T > const &x)
Natural logarithm.
constexpr Complex< T > acosh(Complex< T > const &x)
Arc hyperbolic cosine.
constexpr Complex< T > sqrt(Complex< T > const &x)
Square root.
constexpr Complex< T > tan(Complex< T > const &x)
Tangent.
constexpr Complex< T > sinh(Complex< T > const &x)
Hyperbolic sine.
constexpr Complex< T > tanh(Complex< T > const &x)
Hyperbolic tangent.
constexpr T abs(Complex< T > const &x)
Host-only math functions matching std::complex<T>.
constexpr Complex< T > atanh(Complex< T > const &x)
Arc hyperbolic tangent.
constexpr Complex< T > sin(Complex< T > const &x)
Sine.
constexpr Complex< T > atan(Complex< T > const &x)
Arc tangent.
constexpr Complex< T > cos(Complex< T > const &x)
Cosine.
constexpr Complex< T > asinh(Complex< T > const &x)
Arc hyperbolic sine.
constexpr Complex< T > acos(Complex< T > const &x)
Arc cosine.
constexpr Complex< T > exp(Complex< T > const &x)
Exponential.
constexpr Complex< T > asin(Complex< T > const &x)
Arc sine.
constexpr Complex< T > log10(Complex< T > const &x)
Base 10 logarithm.
constexpr Complex< T > cosh(Complex< T > const &x)
Hyperbolic cosine.
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.