![]() |
Octopus
|
Go to the source code of this file.
Typedefs | |
| typedef signed char | int8_t |
| typedef short int | int16_t |
| typedef int | int32_t |
| typedef long int | int64_t |
| typedef unsigned char | uint8_t |
| typedef short unsigned int | uint16_t |
| typedef unsigned int | uint32_t |
| typedef long unsigned int | uint64_t |
| typedef signed char | int_least8_t |
| typedef short int | int_least16_t |
| typedef int | int_least32_t |
| typedef long int | int_least64_t |
| typedef unsigned char | uint_least8_t |
| typedef short unsigned int | uint_least16_t |
| typedef unsigned int | uint_least32_t |
| typedef long unsigned int | uint_least64_t |
| typedef signed char | int_fast8_t |
| typedef long int | int_fast16_t |
| typedef long int | int_fast32_t |
| typedef long int | int_fast64_t |
| typedef unsigned char | uint_fast8_t |
| typedef long unsigned int | uint_fast16_t |
| typedef long unsigned int | uint_fast32_t |
| typedef long unsigned int | uint_fast64_t |
| typedef long int | intptr_t |
| typedef long unsigned int | uintptr_t |
| typedef long int | intmax_t |
| typedef long unsigned int | uintmax_t |
Functions | |
| void | __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __attribute__((__nothrow__ |
| void __leaf__ | __attribute__ ((__noreturn__)) |
| void | __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __attribute__((__nothrow__ |
| void | __assert (const char *__assertion, const char *__file, int __line) __attribute__((__nothrow__ |
| double | u64_to_open01 (const uint64_t x) |
| Convert a 64-bit unsigned integer to a double in the open interval (0, 1). More... | |
| double | i64_to_open01 (const int64_t x) |
| Convert a 64-bit signed integer to a double in (0, 1). More... | |
| uint64_t | splitmix64_mixer (const uint64_t x) |
| Mix a 64-bit integer using the SplitMix64 mixer. More... | |
| uint64_t | splitmix64_mixer_2pow63 (const uint64_t x) |
| Mix a 64-bit integer using the SplitMix64 mixer. More... | |
| uint64_t | hash_combine_ids (const uint64_t *ids, const uint32_t n) |
| Mix an array of 64-bit integer IDs into a single deterministic 64-bit value. More... | |
Variables | |
| static const uint64_t | GOLDEN_RATIO = 0x9e3779b97f4a7c15ULL |
| static const double | two_powm52 = 0x1.0p-52 |
| static const double | two_powm53 = 0x1.0p-53 |
| typedef signed char int8_t |
Definition at line 43 of file quickrnd.c.
| typedef short int int16_t |
Definition at line 46 of file quickrnd.c.
| typedef int int32_t |
Definition at line 49 of file quickrnd.c.
| typedef long int int64_t |
Definition at line 52 of file quickrnd.c.
| typedef unsigned char uint8_t |
Definition at line 55 of file quickrnd.c.
| typedef short unsigned int uint16_t |
Definition at line 58 of file quickrnd.c.
| typedef unsigned int uint32_t |
Definition at line 61 of file quickrnd.c.
| typedef long unsigned int uint64_t |
Definition at line 64 of file quickrnd.c.
| typedef signed char int_least8_t |
Definition at line 69 of file quickrnd.c.
| typedef short int int_least16_t |
Definition at line 70 of file quickrnd.c.
| typedef int int_least32_t |
Definition at line 71 of file quickrnd.c.
| typedef long int int_least64_t |
Definition at line 72 of file quickrnd.c.
| typedef unsigned char uint_least8_t |
Definition at line 73 of file quickrnd.c.
| typedef short unsigned int uint_least16_t |
Definition at line 74 of file quickrnd.c.
| typedef unsigned int uint_least32_t |
Definition at line 75 of file quickrnd.c.
| typedef long unsigned int uint_least64_t |
Definition at line 76 of file quickrnd.c.
| typedef signed char int_fast8_t |
Definition at line 80 of file quickrnd.c.
| typedef long int int_fast16_t |
Definition at line 81 of file quickrnd.c.
| typedef long int int_fast32_t |
Definition at line 82 of file quickrnd.c.
| typedef long int int_fast64_t |
Definition at line 83 of file quickrnd.c.
| typedef unsigned char uint_fast8_t |
Definition at line 84 of file quickrnd.c.
| typedef long unsigned int uint_fast16_t |
Definition at line 85 of file quickrnd.c.
| typedef long unsigned int uint_fast32_t |
Definition at line 86 of file quickrnd.c.
| typedef long unsigned int uint_fast64_t |
Definition at line 87 of file quickrnd.c.
| typedef long int intptr_t |
Definition at line 92 of file quickrnd.c.
| typedef long unsigned int uintptr_t |
Definition at line 95 of file quickrnd.c.
| typedef long int intmax_t |
Definition at line 100 of file quickrnd.c.
| typedef long unsigned int uintmax_t |
Definition at line 101 of file quickrnd.c.
| void __assert_fail | ( | const char * | __assertion, |
| const char * | __file, | ||
| unsigned int | __line, | ||
| const char * | __function | ||
| ) |
| void __leaf__ __attribute__ | ( | (__noreturn__) | ) |
| void __assert_perror_fail | ( | int | __errnum, |
| const char * | __file, | ||
| unsigned int | __line, | ||
| const char * | __function | ||
| ) |
| void __assert | ( | const char * | __assertion, |
| const char * | __file, | ||
| int | __line | ||
| ) |
| double u64_to_open01 | ( | const uint64_t | x | ) |
Convert a 64-bit unsigned integer to a double in the open interval (0, 1).
This function uses the upper 52 bits of the input value x to construct a uniformly distributed IEEE-754 double-precision value in the interval (2^-53, 1 - 2^-53), which is a strict subset of (0, 1). The distribution of outputs is uniform over the 2^52 possible results, assuming x is uniformly distributed.
| x | 64-bit input value, typically from a uniform RNG. Only the upper 52 bits are used; the lower 12 bits are ignored. |
Definition at line 929 of file quickrnd.c.
| double i64_to_open01 | ( | const int64_t | x | ) |
Convert a 64-bit signed integer to a double in (0, 1).
This function interprets the two's-complement bit pattern of x as an unsigned 64-bit integer and forwards to u64_to_open01().
| x | 64-bit signed input value, typically from a uniform RNG. Only the upper 52 bits are used; the lower 12 bits are ignored. |
Definition at line 945 of file quickrnd.c.
Mix a 64-bit integer using the SplitMix64 mixer.
Adapted from https://xorshift.di.unimi.it/splitmix64.c This is the fixed-increment mixing function from Java 8's SplittableRandom. References:
This mixer is very fast, passes BigCrush, and is useful when you want a high-quality 64-bit input diffusion function.
| x | The 64-bit input value to be mixed. |
Definition at line 966 of file quickrnd.c.
Mix a 64-bit integer using the SplitMix64 mixer.
Adapted from https://xorshift.di.unimi.it/splitmix64.c This is the fixed-increment mixing function from Java 8's SplittableRandom. References:
This mixer is very fast, passes BigCrush, and is useful when you want a high-quality 64-bit input diffusion function.
| x | The 64-bit input value to be mixed. |
Definition at line 989 of file quickrnd.c.
Mix an array of 64-bit integer IDs into a single deterministic 64-bit value.
| ids | Array of 64-bit ids to be mixed. |
| n | Number of elements in ids. |
Definition at line 1002 of file quickrnd.c.
|
static |
Definition at line 908 of file quickrnd.c.
|
static |
Definition at line 911 of file quickrnd.c.
|
static |
Definition at line 914 of file quickrnd.c.