|
static constexpr HERMES_DEVICE_CALLABLE f64 | lowest_f64 () |
| Gets lowest representable 64 bit floating point. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE f32 | lowest_f32 () |
| Gets lowest representable 64 bit floating point. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | lowest () |
| Gets lowest representable floating point. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE f64 | greatest_f32 () |
| Gets greatest representable 32 bit floating point. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE f64 | greatest_f64 () |
| Gets greatest representable 64 bit floating point. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | greatest () |
| Gets greatest representable floating point. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | min (const T &a, const T &b) |
| Computes minimum between two numbers. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | max (const T &a, const T &b) |
| Computes maximum between two numbers. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | min (std::initializer_list< T > l) |
| Computes minimum value from input. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | max (std::initializer_list< T > l) |
| Computes maximum value from input. More...
|
|
template<typename T > |
static HERMES_DEVICE_CALLABLE u8 | countHexDigits (T n) |
| Counts hexadecimal digits. More...
|
|
template<typename T > |
static HERMES_DEVICE_CALLABLE T | clamp (const T &n, const T &l, const T &u) |
| Clamps value to closed interval. More...
|
|
template<typename T > |
static HERMES_DEVICE_CALLABLE void | swap (T &a, T &b) |
| Swaps values. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | sqr (T a) |
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | cube (T a) |
| Computes square. More...
|
|
template<typename T > |
static HERMES_DEVICE_CALLABLE int | sign (T a) |
| Computes sign. More...
|
|
template<typename T > |
static constexpr HERMES_DEVICE_CALLABLE T | sqrt (T a) |
| Computes square root. More...
|
|
template<typename T > |
static HERMES_DEVICE_CALLABLE T | FMA (T a, T b, T c) |
| Computes a * b + c. More...
|
|
template<typename Ta , typename Tb , typename Tc , typename Td > |
static HERMES_DEVICE_CALLABLE auto | differenceOfProducts (Ta a, Tb b, Tc c, Td d) |
| Computes difference of products. More...
|
|
template<typename T , typename C > |
static constexpr HERMES_DEVICE_CALLABLE T | evaluatePolynomial (T t, C c) |
| Solves polynomial. More...
|
|
template<typename T , typename C , typename... Args> |
static constexpr HERMES_DEVICE_CALLABLE T | evaluatePolynomial (T t, C c, Args... cs) |
| Solves polynomial. More...
|
|
template<typename Predicate > |
static HERMES_DEVICE_CALLABLE size_t | findInterval (size_t sz, const Predicate &pred) |
| Bisect range based on predicate. More...
|
|
static HERMES_DEVICE_CALLABLE u32 | separateBitsBy1 (u32 n) |
| Separate bits by 1 bit-space. More...
|
|
static HERMES_DEVICE_CALLABLE u32 | separateBitsBy2 (u32 n) |
| Separate bits by 2 bit-spaces. More...
|
|
static HERMES_DEVICE_CALLABLE u32 | interleaveBits (u32 x, u32 y, u32 z) |
| Interleaves bits of three integers. More...
|
|
static HERMES_DEVICE_CALLABLE u32 | interleaveBits (u32 x, u32 y) |
| Interleaves bits of two integers. More...
|
|
static HERMES_DEVICE_CALLABLE int | floatExponent (f32 v) |
| Extracts exponent from floating-point number. More...
|
|
static HERMES_DEVICE_CALLABLE int | floatSignificand (f32 v) |
| Extracts significand bits. More...
|
|
static HERMES_DEVICE_CALLABLE uint32_t | floatSignBit (f32 v) |
| Extracts sign bit. More...
|
|
static HERMES_DEVICE_CALLABLE uint32_t | floatToBits (f32 f) |
| Interprets a floating-point value into a integer type. More...
|
|
static HERMES_DEVICE_CALLABLE f32 | bitsToFloat (uint32_t ui) |
| Fills a f32 variable data. More...
|
|
static HERMES_DEVICE_CALLABLE uint64_t | floatToBits (f64 d) |
| Interprets a f64-point value into a integer type. More...
|
|
static HERMES_DEVICE_CALLABLE f64 | bitsToDouble (uint64_t ui) |
| Fills a f64 variable data. More...
|
|
static HERMES_DEVICE_CALLABLE f32 | nextFloatUp (f32 v) |
| Computes the next greater representable floating-point value. More...
|
|
static HERMES_DEVICE_CALLABLE f32 | nextFloatDown (f32 v) |
| Computes the next smaller representable floating-point value. More...
|
|
static HERMES_DEVICE_CALLABLE f64 | nextDoubleUp (f64 v) |
| Computes the next greater representable floating-point value. More...
|
|
static HERMES_DEVICE_CALLABLE f64 | nextDoubleDown (f64 v) |
| Computes the next smaller representable floating-point value. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE int | lowest_int () |
| Gets minimum representable 32 bit signed integer. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE int | greatest_int () |
| Gets maximum representable 32 bit signed integer. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE bool | isPowerOf2 (int v) |
| Checks if integer is power of 2. More...
|
|
static HERMES_DEVICE_CALLABLE int | mod (int a, int b) |
| Computes modulus. More...
|
|
static HERMES_DEVICE_CALLABLE int | ceil2Int (float f) |
| rounds up More...
|
|
static HERMES_DEVICE_CALLABLE int | floor2Int (float f) |
| rounds down More...
|
|
static HERMES_DEVICE_CALLABLE int | round2Int (float f) |
| rounds to closest integer More...
|
|
static HERMES_DEVICE_CALLABLE u8 | countDigits (u64 t, u8 base=10) |
| Computes number of digits. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | fract (real_t x) |
| Extract decimal fraction from x. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | mulRoundDown (real_t a, real_t b) |
| Multiplies and rounds down to the next smaller float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | mulRoundUp (real_t a, real_t b) |
| Multiplies and rounds up to the next float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | divRoundDown (real_t a, real_t b) |
| Divides and rounds down to the next smaller float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | divRoundUp (real_t a, real_t b) |
| Divides and rounds up to the next float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | addRoundDown (real_t a, real_t b) |
| Adds and rounds down to the next smaller float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | addRoundUp (real_t a, real_t b) |
| Adds and rounds up to the next float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | subRoundDown (real_t a, real_t b) |
| Subtracts and rounds down to the next smaller float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | subRoundUp (real_t a, real_t b) |
| Subtracts and rounds up to the next float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | sqrtRoundDown (real_t a) |
| Computes square root rounded down to the next smaller float value. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | sqrtRoundUp (real_t a) |
| Computes square root rounded up to the next float value. More...
|
|
static HERMES_DEVICE_CALLABLE f32 | log2 (f32 x) |
| Computes base 2 log. More...
|
|
static HERMES_DEVICE_CALLABLE f32 | safe_sqrt (f32 x) |
| Computes square root with clamped input. More...
|
|
template<int n> |
static constexpr HERMES_DEVICE_CALLABLE real_t | pow (real_t b) |
| Computes b to the power of n. More...
|
|
static HERMES_DEVICE_CALLABLE real_t | fastExp (real_t x) |
| Computes fast exponential. More...
|
|
static constexpr HERMES_DEVICE_CALLABLE real_t | gamma (i32 n) |
| Computes conservative bounds in error. More...
|
|
template<> |
constexpr HERMES_DEVICE_CALLABLE float | pow (float v) |
| Computes v to the power of 1. More...
|
|
template<> |
constexpr HERMES_DEVICE_CALLABLE float | pow (float v) |
| Computes v to the power of 0. More...
|
|