math_floating_point.h File Reference
#include "SYCL/cpp_to_cl_cast.h"
#include "SYCL/gen_type_traits.h"
#include "SYCL/meta.h"
#include "SYCL/multi_pointer.h"
#include "SYCL/type_traits.h"
#include "computecpp/gsl/gsl"
#include "SYCL/builtins/math_symbols.h"
Go to the source code of this file.
Namespaces | |
cl | |
deduce_type_t takes an arbitrary type and attempts to map it to a cl::sycl::cl_type . | |
cl::sycl | |
Macros | |
#define | COMPUTECPP_DETAIL_NAMESPACE abacus |
Functions | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::acos (F x) noexcept |
Inverse cosine function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::acosh (F x) noexcept |
Inverse hyperbolic cosine. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::acospi (F x) noexcept |
Compute acos(x)/π More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::asin (F x) noexcept |
Inverse sine function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::asinh (F x) noexcept |
Inverse hyperbolic sine. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::asinpi (F x) noexcept |
Compute asin(x)/π More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::atan (F y_over_x) noexcept |
Inverse tangent function. More... | |
template<typename F , COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
F | cl::sycl::atan2 (F y, F x) noexcept |
Compute atan(y/x) . More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::atanh (F x) noexcept |
Inverse hyperbolic tangent. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::atanpi (F x) noexcept |
Compute atan(x)/π More... | |
template<typename F , COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
F | cl::sycl::atan2pi (F y, F x) noexcept |
Compute atan(y/x)/π . More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::cbrt (F x) noexcept |
Compute cube-root. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::ceil (F x) noexcept |
Round to integral value using the round to positive infinity rounding mode. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::copysign (F1 x, F2 y) noexcept |
Returns x with its sign changed to match the sign of y. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::cos (F x) noexcept |
Compute cosine. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::cosh (F x) noexcept |
Compute hyperbolic cosine. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::cospi (F x) noexcept |
Compute cos(πx) More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::erfc (F x) noexcept |
Complementary error function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::erf (F x) noexcept |
Error function encountered in integrating the normal distribution. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::exp (F x) noexcept |
Compute the base-e exponential of x. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::exp2 (F x) noexcept |
Exponential base 2 function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::exp10 (F x) noexcept |
Exponential base 10 function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::expm1 (F x) noexcept |
Compute exp(x) - 1.0 . More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::fabs (F x) noexcept |
Compute absolute value of a floating-point number. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::fdim (F1 x, F2 y) noexcept |
x - y if x > y , +0 if x is less than or equal to y. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::floor (F x) noexcept |
Round to integral value using the round to negative infinity rounding mode. More... | |
template<typename F1 , typename F2 , typename F3 , typename F = detail::common_return_t<F1, F2, F3>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value && detail::builtin::is_genfloat< F3 >::value)) > | |
F | cl::sycl::fma (F1 a, F2 b, F3 c) noexcept |
Returns the correctly rounded floating-point representation of the sum of c with the infinitely precise product of a and b. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES( detail::builtin::is_genfloat< F1 >::value &&(detail::builtin::is_genfloat< F2 >::value|| detail::builtin::is_sgenfloat< F2, detail::scalar_t< F >>::value)) > | |
F | cl::sycl::fmax (F1 x, F2 y) noexcept |
Returns y if x < y , otherwise it returns x. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES( detail::builtin::is_genfloat< F1 >::value &&(detail::builtin::is_genfloat< F2 >::value|| detail::builtin::is_sgenfloat< F2, detail::scalar_t< F >>::value)) > | |
F | cl::sycl::fmin (F1 x, F2 y) noexcept |
Returns y if y < x, otherwise it returns x. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::fmod (F1 x, F2 y) noexcept |
Modulus. More... | |
template<typename F , access::address_space AddressSpace, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
F | cl::sycl::fract (F x, detail::builtin_ptr< F, AddressSpace > iptr) noexcept |
Returns fmin(x - floor (x), 0x1.fffffep-1f) . More... | |
template<typename F , typename Integral , access::address_space AddressSpace, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F >::value && detail::builtin::is_genint< Integral >::value)) > | |
F | cl::sycl::frexp (F x, detail::builtin_ptr< Integral, AddressSpace > exp) noexcept |
Extract mantissa and exponent from x. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::hypot (F1 x, F2 y) noexcept |
Compute the value of the square root of x2 + y2 without undue overflow or underflow. More... | |
template<typename F , COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
detail::correct_int_t< F > | cl::sycl::ilogb (F x) noexcept |
Return the exponent as an integer value. More... | |
template<typename F , typename Integral , COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F >::value && detail::builtin::is_genint< Integral >::value)) > | |
F | cl::sycl::ldexp (F x, Integral k) noexcept |
Multiply x by 2 to the power k. More... | |
template<typename F , COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
F | cl::sycl::ldexp (F x, const int k) noexcept |
Multiply x by 2 to the power k. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::lgamma (F x) noexcept |
Log gamma function. More... | |
template<typename F , typename Integral , access::address_space AddressSpace, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F >::value && detail::builtin::is_genint< Integral >::value)) > | |
F | cl::sycl::lgamma_r (F x, detail::builtin_ptr< Integral, AddressSpace > signp) noexcept |
Log gamma function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::log (F x) noexcept |
Compute natural logarithm. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::log2 (F x) noexcept |
Compute a base 2 logarithm. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::log10 (F x) noexcept |
Compute a base 10 logarithm. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::log1p (F x) noexcept |
Compute loge(1.0 + x) . More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::logb (F x) noexcept |
Compute the exponent of x, which is the integral part of logr (|x|). More... | |
template<typename F1 , typename F2 , typename F3 , typename F = detail::common_return_t<F1, F2, F3>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value && detail::builtin::is_genfloat< F3 >::value)) > | |
F | cl::sycl::mad (F1 a, F2 b, F3 c) noexcept |
mad approximates a * b + c . More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::maxmag (F1 x, F2 y) noexcept |
Returns x if |x| > |y|, y if |y| > |x|, otherwise fmax(x, y) . More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::minmag (F1 x, F2 y) noexcept |
Returns x if |x| < |y|, y if |y| < |x|, otherwise fmin(x, y) . More... | |
template<typename F , access::address_space AddressSpace, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
F | cl::sycl::modf (F x, detail::builtin_ptr< F, AddressSpace > iptr) noexcept |
Decompose a floating-point number. More... | |
template<typename Integral , COMPUTECPP_REQUIRES( computecpp::gsl::or_< detail::builtin::is_ugenint< Integral >::value, detail::builtin::is_ugenlonginteger< Integral >::value >::value) > | |
auto | cl::sycl::nan (Integral nancode) noexcept -> detail::matching_float_t< Integral > |
Returns x if |x| < |y|, y if |y| < |x|, otherwise fmin(x, y) . More... | |
template<typename Integral , COMPUTECPP_REQUIRES(detail::builtin::is_ushortn< Integral >::value) > | |
detail::matching_float_t< Integral > | cl::sycl::nan (Integral nancode) noexcept |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::nextafter (F1 x, F2 y) noexcept |
Computes the next representable single-precision floating-point value following x in the direction of y. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::pow (F1 x, F2 y) noexcept |
Compute x to the power y. More... | |
template<typename F , typename Integral , COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F >::value && detail::builtin::is_genint< Integral >::value)) > | |
F | cl::sycl::pown (F x, Integral y) noexcept |
Compute x to the power y, where y is an integer. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::powr (F1 x, F2 y) noexcept |
Compute x to the power y, where x >= 0. More... | |
template<typename F1 , typename F2 , typename F = detail::common_return_t<F1, F2>, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F1 >::value && detail::builtin::is_genfloat< F2 >::value)) > | |
F | cl::sycl::remainder (F1 x, F2 y) noexcept |
Compute the value r such that r = x - n * y , where n is the integer nearest the exact value of x / y. More... | |
template<typename F , typename Integral , access::address_space AddressSpace, COMPUTECPP_REQUIRES((detail::builtin::is_genfloat< F >::value && detail::builtin::is_genint< Integral >::value)) > | |
F | cl::sycl::remquo (F x, F y, detail::builtin_ptr< Integral, AddressSpace > quo) noexcept |
The remquo function computes the value r such that r = x - k * y , where k is the integer nearest the exact value of x/y. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::rint (F x) noexcept |
Round to integral value (using round to nearest even rounding mode) in floating-point format. More... | |
template<typename F , typename Integral , COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value, detail::builtin::is_genint< Integral >::value) > | |
F | cl::sycl::rootn (F x, Integral y) noexcept |
Compute x to the power 1/y. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::round (F x) noexcept |
Return the integral value nearest to x rounding halfway cases away from zero, regardless of the current rounding direction. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::rsqrt (F x) noexcept |
Compute inverse square root. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::sin (F x) noexcept |
Compute sine. More... | |
template<typename F , access::address_space AddressSpace, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
F | cl::sycl::sincos (F x, detail::builtin_ptr< F, AddressSpace > cosval) noexcept |
Compute sine and cosine of x. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::sinh (F x) noexcept |
Compute hyperbolic sine. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::sinpi (F x) noexcept |
Compute sin(π * x) . More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::sqrt (F x) noexcept |
Compute square root. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::tan (F x) noexcept |
Compute tangent. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::tanh (F x) noexcept |
Compute hyperbolic tangent. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::tanpi (F x) noexcept |
Compute tan(π * x) . More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::tgamma (F x) noexcept |
Compute the gamma function. More... | |
template<typename F , typename return_t = detail::collapse_swizzled_vec_t<F>, COMPUTECPP_REQUIRES(detail::builtin::is_genfloat< F >::value) > | |
return_t | cl::sycl::trunc (F x) noexcept |
Round to integral value using the round to zero rounding mode. More... | |
Macro Definition Documentation
◆ COMPUTECPP_DETAIL_NAMESPACE
#define COMPUTECPP_DETAIL_NAMESPACE abacus |
Definition at line 30 of file math_floating_point.h.