11 #include <type_traits>
13 #ifdef ALPAKA_ACC_SYCL_ENABLED
15 # include <sycl/sycl.hpp>
21 class AbsGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAbs, AbsGenericSycl>
26 class AcosGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAcos, AcosGenericSycl>
31 class AcoshGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAcosh, AcoshGenericSycl>
36 class ArgGenericSycl :
public interface::Implements<alpaka::math::ConceptMathArg, ArgGenericSycl>
41 class AsinGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAsin, AsinGenericSycl>
46 class AsinhGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAsinh, AsinhGenericSycl>
51 class AtanGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAtan, AtanGenericSycl>
56 class AtanhGenericSycl :
public interface::Implements<alpaka::math::ConceptMathAtanh, AtanhGenericSycl>
61 class Atan2GenericSycl :
public interface::Implements<alpaka::math::ConceptMathAtan2, Atan2GenericSycl>
66 class CbrtGenericSycl :
public interface::Implements<alpaka::math::ConceptMathCbrt, CbrtGenericSycl>
71 class CeilGenericSycl :
public interface::Implements<alpaka::math::ConceptMathCeil, CeilGenericSycl>
76 class ConjGenericSycl :
public interface::Implements<alpaka::math::ConceptMathConj, ConjGenericSycl>
81 class CopysignGenericSycl :
public interface::Implements<alpaka::math::ConceptMathCopysign, CopysignGenericSycl>
86 class CosGenericSycl :
public interface::Implements<alpaka::math::ConceptMathCos, CosGenericSycl>
91 class CoshGenericSycl :
public interface::Implements<alpaka::math::ConceptMathCosh, CoshGenericSycl>
96 class ErfGenericSycl :
public interface::Implements<alpaka::math::ConceptMathErf, ErfGenericSycl>
101 class ExpGenericSycl :
public interface::Implements<alpaka::math::ConceptMathExp, ExpGenericSycl>
106 class FloorGenericSycl :
public interface::Implements<alpaka::math::ConceptMathFloor, FloorGenericSycl>
111 class FmaGenericSycl :
public interface::Implements<alpaka::math::ConceptMathFma, FmaGenericSycl>
116 class FmodGenericSycl :
public interface::Implements<alpaka::math::ConceptMathFmod, FmodGenericSycl>
121 class IsfiniteGenericSycl :
public interface::Implements<alpaka::math::ConceptMathIsfinite, IsfiniteGenericSycl>
126 class IsinfGenericSycl :
public interface::Implements<alpaka::math::ConceptMathIsinf, IsinfGenericSycl>
131 class IsnanGenericSycl :
public interface::Implements<alpaka::math::ConceptMathIsnan, IsnanGenericSycl>
136 class LogGenericSycl :
public interface::Implements<alpaka::math::ConceptMathLog, LogGenericSycl>
141 class Log2GenericSycl :
public interface::Implements<alpaka::math::ConceptMathLog2, Log2GenericSycl>
146 class Log10GenericSycl :
public interface::Implements<alpaka::math::ConceptMathLog10, Log10GenericSycl>
151 class MaxGenericSycl :
public interface::Implements<alpaka::math::ConceptMathMax, MaxGenericSycl>
156 class MinGenericSycl :
public interface::Implements<alpaka::math::ConceptMathMin, MinGenericSycl>
161 class PowGenericSycl :
public interface::Implements<alpaka::math::ConceptMathPow, PowGenericSycl>
166 class RemainderGenericSycl :
public interface::Implements<alpaka::math::ConceptMathRemainder, RemainderGenericSycl>
171 class RoundGenericSycl :
public interface::Implements<alpaka::math::ConceptMathRound, RoundGenericSycl>
176 class RsqrtGenericSycl :
public interface::Implements<alpaka::math::ConceptMathRsqrt, RsqrtGenericSycl>
181 class SinGenericSycl :
public interface::Implements<alpaka::math::ConceptMathSin, SinGenericSycl>
186 class SinhGenericSycl :
public interface::Implements<alpaka::math::ConceptMathSinh, SinhGenericSycl>
191 class SinCosGenericSycl :
public interface::Implements<alpaka::math::ConceptMathSinCos, SinCosGenericSycl>
196 class SqrtGenericSycl :
public interface::Implements<alpaka::math::ConceptMathSqrt, SqrtGenericSycl>
201 class TanGenericSycl :
public interface::Implements<alpaka::math::ConceptMathTan, TanGenericSycl>
206 class TanhGenericSycl :
public interface::Implements<alpaka::math::ConceptMathTanh, TanhGenericSycl>
211 class TruncGenericSycl :
public interface::Implements<alpaka::math::ConceptMathTrunc, TruncGenericSycl>
216 class MathGenericSycl
217 :
public AbsGenericSycl
218 ,
public AcosGenericSycl
219 ,
public AcoshGenericSycl
220 ,
public ArgGenericSycl
221 ,
public AsinGenericSycl
222 ,
public AsinhGenericSycl
223 ,
public AtanGenericSycl
224 ,
public AtanhGenericSycl
225 ,
public Atan2GenericSycl
226 ,
public CbrtGenericSycl
227 ,
public CeilGenericSycl
228 ,
public ConjGenericSycl
229 ,
public CopysignGenericSycl
230 ,
public CosGenericSycl
231 ,
public CoshGenericSycl
232 ,
public ErfGenericSycl
233 ,
public ExpGenericSycl
234 ,
public FloorGenericSycl
235 ,
public FmaGenericSycl
236 ,
public FmodGenericSycl
237 ,
public IsfiniteGenericSycl
238 ,
public IsinfGenericSycl
239 ,
public IsnanGenericSycl
240 ,
public LogGenericSycl
241 ,
public Log2GenericSycl
242 ,
public Log10GenericSycl
243 ,
public MaxGenericSycl
244 ,
public MinGenericSycl
245 ,
public PowGenericSycl
246 ,
public RemainderGenericSycl
247 ,
public RoundGenericSycl
248 ,
public RsqrtGenericSycl
249 ,
public SinGenericSycl
250 ,
public SinhGenericSycl
251 ,
public SinCosGenericSycl
252 ,
public SqrtGenericSycl
253 ,
public TanGenericSycl
254 ,
public TanhGenericSycl
255 ,
public TruncGenericSycl
263 template<
typename TArg>
264 struct Abs<math::AbsGenericSycl, TArg, std::enable_if_t<std::is_arithmetic_v<TArg>>>
266 auto operator()(math::AbsGenericSycl
const&, TArg
const&
arg)
268 if constexpr(std::is_integral_v<TArg>)
270 else if constexpr(std::is_floating_point_v<TArg>)
271 return sycl::fabs(
arg);
273 static_assert(!
sizeof(TArg),
"Unsupported data type");
278 template<
typename TArg>
279 struct Acos<math::AcosGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
281 auto operator()(math::AcosGenericSycl
const&, TArg
const&
arg)
288 template<
typename TArg>
289 struct Acosh<math::AcoshGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
291 auto operator()(math::AcoshGenericSycl
const&, TArg
const&
arg)
298 template<
typename TArgument>
299 struct Arg<math::ArgGenericSycl, TArgument, std::enable_if_t<std::is_arithmetic_v<TArgument>>>
301 auto operator()(math::ArgGenericSycl
const&, TArgument
const& argument)
303 if constexpr(std::is_integral_v<TArgument>)
304 return sycl::atan2(0.0,
static_cast<double>(argument));
305 else if constexpr(std::is_floating_point_v<TArgument>)
306 return sycl::atan2(
static_cast<TArgument
>(0.0), argument);
308 static_assert(!
sizeof(TArgument),
"Unsupported data type");
313 template<
typename TArg>
314 struct Asin<math::AsinGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
316 auto operator()(math::AsinGenericSycl
const&, TArg
const&
arg)
323 template<
typename TArg>
324 struct Asinh<math::AsinhGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
326 auto operator()(math::AsinhGenericSycl
const&, TArg
const&
arg)
333 template<
typename TArg>
334 struct Atan<math::AtanGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
336 auto operator()(math::AtanGenericSycl
const&, TArg
const&
arg)
343 template<
typename TArg>
344 struct Atanh<math::AtanhGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
346 auto operator()(math::AtanhGenericSycl
const&, TArg
const&
arg)
353 template<
typename Ty,
typename Tx>
355 math::Atan2GenericSycl,
358 std::enable_if_t<std::is_floating_point_v<Ty> && std::is_floating_point_v<Tx>>>
360 using TCommon = std::common_type_t<Ty, Tx>;
362 auto operator()(math::Atan2GenericSycl
const&, Ty
const& y, Tx
const& x)
364 return sycl::atan2(
static_cast<TCommon
>(y),
static_cast<TCommon
>(x));
369 template<
typename TArg>
370 struct Cbrt<math::CbrtGenericSycl, TArg, std::enable_if_t<std::is_arithmetic_v<TArg>>>
372 auto operator()(math::CbrtGenericSycl
const&, TArg
const&
arg)
374 if constexpr(std::is_integral_v<TArg>)
376 else if constexpr(std::is_floating_point_v<TArg>)
379 static_assert(!
sizeof(TArg),
"Unsupported data type");
384 template<
typename TArg>
385 struct Ceil<math::CeilGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
387 auto operator()(math::CeilGenericSycl
const&, TArg
const&
arg)
394 template<
typename TArg>
395 struct Conj<math::ConjGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
397 auto operator()(math::ConjGenericSycl
const&, TArg
const&
arg)
399 return Complex<TArg>{
arg, TArg{0.0}};
404 template<
typename TMag,
typename TSgn>
406 math::CopysignGenericSycl,
409 std::enable_if_t<std::is_floating_point_v<TMag> && std::is_floating_point_v<TSgn>>>
411 using TCommon = std::common_type_t<TMag, TSgn>;
413 auto operator()(math::CopysignGenericSycl
const&, TMag
const& y, TSgn
const& x)
415 return sycl::copysign(
static_cast<TCommon
>(y),
static_cast<TCommon
>(x));
420 template<
typename TArg>
421 struct Cos<math::CosGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
423 auto operator()(math::CosGenericSycl
const&, TArg
const&
arg)
430 template<
typename TArg>
431 struct Cosh<math::CoshGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
433 auto operator()(math::CoshGenericSycl
const&, TArg
const&
arg)
440 template<
typename TArg>
441 struct Erf<math::ErfGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
443 auto operator()(math::ErfGenericSycl
const&, TArg
const&
arg)
450 template<
typename TArg>
451 struct Exp<math::ExpGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
453 auto operator()(math::ExpGenericSycl
const&, TArg
const&
arg)
460 template<
typename TArg>
461 struct Floor<math::FloorGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
463 auto operator()(math::FloorGenericSycl
const&, TArg
const&
arg)
470 template<
typename Tx,
typename Ty,
typename Tz>
472 math::FmaGenericSycl,
476 std::enable_if_t<std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty> && std::is_floating_point_v<Tz>>>
478 auto operator()(math::FmaGenericSycl
const&, Tx
const& x, Ty
const& y, Tz
const& z)
485 template<
typename Tx,
typename Ty>
487 math::FmodGenericSycl,
490 std::enable_if_t<std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty>>>
492 using TCommon = std::common_type_t<Tx, Ty>;
494 auto operator()(math::FmodGenericSycl
const&, Tx
const& x, Ty
const& y)
496 return sycl::fmod(
static_cast<TCommon
>(x),
static_cast<TCommon
>(y));
501 template<
typename TArg>
502 struct Isfinite<math::IsfiniteGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
504 auto operator()(math::IsfiniteGenericSycl
const&, TArg
const&
arg)
511 template<
typename TArg>
512 struct Isinf<math::IsinfGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
514 auto operator()(math::IsinfGenericSycl
const&, TArg
const&
arg)
521 template<
typename TArg>
522 struct Isnan<math::IsnanGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
524 auto operator()(math::IsnanGenericSycl
const&, TArg
const&
arg)
531 template<
typename TArg>
532 struct Log<math::LogGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
534 auto operator()(math::LogGenericSycl
const&, TArg
const&
arg)
541 template<
typename TArg>
542 struct Log2<math::Log2GenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
544 auto operator()(math::Log2GenericSycl
const&, TArg
const&
arg)
551 template<
typename TArg>
552 struct Log10<math::Log10GenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
554 auto operator()(math::Log10GenericSycl
const&, TArg
const&
arg)
561 template<
typename Tx,
typename Ty>
562 struct Max<math::MaxGenericSycl, Tx, Ty, std::enable_if_t<std::is_arithmetic_v<Tx> && std::is_arithmetic_v<Ty>>>
564 using TCommon = std::common_type_t<Tx, Ty>;
566 auto operator()(math::MaxGenericSycl
const&, Tx
const& x, Ty
const& y)
568 if constexpr(std::is_integral_v<Tx> && std::is_integral_v<Ty>)
569 return sycl::max(
static_cast<TCommon
>(x),
static_cast<TCommon
>(y));
570 else if constexpr(std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty>)
571 return sycl::fmax(
static_cast<TCommon
>(x),
static_cast<TCommon
>(y));
573 (std::is_floating_point_v<Tx> && std::is_integral_v<Ty>)
574 || (std::is_integral_v<Tx> && std::is_floating_point_v<Ty>) )
575 return sycl::fmax(
static_cast<double>(x),
static_cast<double>(y));
577 static_assert(!
sizeof(Tx),
"Unsupported data types");
582 template<
typename Tx,
typename Ty>
583 struct Min<math::MinGenericSycl, Tx, Ty, std::enable_if_t<std::is_arithmetic_v<Tx> && std::is_arithmetic_v<Ty>>>
585 auto operator()(math::MinGenericSycl
const&, Tx
const& x, Ty
const& y)
587 if constexpr(std::is_integral_v<Tx> && std::is_integral_v<Ty>)
589 else if constexpr(std::is_floating_point_v<Tx> || std::is_floating_point_v<Ty>)
590 return sycl::fmin(x, y);
592 (std::is_floating_point_v<Tx> && std::is_integral_v<Ty>)
593 || (std::is_integral_v<Tx> && std::is_floating_point_v<Ty>) )
594 return sycl::fmin(
static_cast<double>(x),
static_cast<double>(y));
596 static_assert(!
sizeof(Tx),
"Unsupported data types");
601 template<
typename TBase,
typename TExp>
603 math::PowGenericSycl,
606 std::enable_if_t<std::is_floating_point_v<TBase> && std::is_floating_point_v<TExp>>>
608 using TCommon = std::common_type_t<TBase, TExp>;
610 auto operator()(math::PowGenericSycl
const&, TBase
const& base, TExp
const&
exp)
612 return sycl::pow(
static_cast<TCommon
>(base),
static_cast<TCommon
>(
exp));
617 template<
typename Tx,
typename Ty>
619 math::RemainderGenericSycl,
622 std::enable_if_t<std::is_floating_point_v<Tx> && std::is_floating_point_v<Ty>>>
624 using TCommon = std::common_type_t<Tx, Ty>;
626 auto operator()(math::RemainderGenericSycl
const&, Tx
const& x, Ty
const& y)
628 return sycl::remainder(
static_cast<TCommon
>(x),
static_cast<TCommon
>(y));
633 template<
typename TArg>
634 struct Round<math::RoundGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
636 auto operator()(math::RoundGenericSycl
const&, TArg
const&
arg)
643 template<
typename TArg>
644 struct Lround<math::RoundGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
646 auto operator()(math::RoundGenericSycl
const&, TArg
const&
arg)
653 template<
typename TArg>
654 struct Llround<math::RoundGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
656 auto operator()(math::RoundGenericSycl
const&, TArg
const&
arg)
663 template<
typename TArg>
664 struct Rsqrt<math::RsqrtGenericSycl, TArg, std::enable_if_t<std::is_arithmetic_v<TArg>>>
666 auto operator()(math::RsqrtGenericSycl
const&, TArg
const&
arg)
668 if constexpr(std::is_floating_point_v<TArg>)
670 else if constexpr(std::is_integral_v<TArg>)
673 static_assert(!
sizeof(TArg),
"Unsupported data type");
678 template<
typename TArg>
679 struct Sin<math::SinGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
681 auto operator()(math::SinGenericSycl
const&, TArg
const&
arg)
688 template<
typename TArg>
689 struct Sinh<math::SinhGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
691 auto operator()(math::SinhGenericSycl
const&, TArg
const&
arg)
698 template<
typename TArg>
699 struct SinCos<math::SinCosGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
701 auto operator()(math::SinCosGenericSycl
const&, TArg
const&
arg, TArg& result_sin, TArg& result_cos) ->
void
708 template<
typename TArg>
709 struct Sqrt<math::SqrtGenericSycl, TArg, std::enable_if_t<std::is_arithmetic_v<TArg>>>
711 auto operator()(math::SqrtGenericSycl
const&, TArg
const&
arg)
713 if constexpr(std::is_floating_point_v<TArg>)
715 else if constexpr(std::is_integral_v<TArg>)
721 template<
typename TArg>
722 struct Tan<math::TanGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
724 auto operator()(math::TanGenericSycl
const&, TArg
const&
arg)
731 template<
typename TArg>
732 struct Tanh<math::TanhGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
734 auto operator()(math::TanhGenericSycl
const&, TArg
const&
arg)
741 template<
typename TArg>
742 struct Trunc<math::TruncGenericSycl, TArg, std::enable_if_t<std::is_floating_point_v<TArg>>>
744 auto operator()(math::TruncGenericSycl
const&, TArg
const&
arg)
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 sincos(TArg const &arg, TArg &result_sin, TArg &result_cos)
Fallback implementation when no better ADL match was found.
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 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 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 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 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 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.
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto operator()(T const &, TArgument const &argument)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, Ty const &y, Tx const &x)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TMag const &mag, TSgn const &sgn)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, Tx const &x, Ty const &y, Tz const &z)
ALPAKA_FN_HOST_ACC auto operator()(T const &, Tx const &x, Ty const &y)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, Tx const &x, Ty const &y)
ALPAKA_FN_HOST_ACC auto operator()(T const &, Tx const &x, Ty const &y)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TBase const &base, TExp const &exp)
ALPAKA_FN_HOST_ACC auto operator()(T const &, Tx const &x, Ty const &y)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg, TArg &result_sin, TArg &result_cos)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)
ALPAKA_FN_HOST_ACC auto operator()(T const &, TArg const &arg)