alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Tiny Mersenne Twister only 127 bit internal state. More...
Go to the source code of this file.
Classes | |
struct | TINYMT32_T |
Macros | |
#define | MIN_LOOP 8 |
#define | PRE_LOOP 8 |
#define | TINYMT32_MASK UINT32_C(0x7fffffff) |
#define | TINYMT32_MEXP 127 |
#define | TINYMT32_MUL (1.0f / 16777216.0f) |
#define | TINYMT32_SH0 1 |
#define | TINYMT32_SH1 10 |
#define | TINYMT32_SH8 8 |
#define | UINT32_C(value) uint_least32_t(value) |
#define | UINT32_MAX ((uint32_t)-1u) |
Typedefs | |
typedef struct TINYMT32_T | tinymt32_t |
Functions | |
static uint32_t | ini_func1 (uint32_t x) |
static uint32_t | ini_func2 (uint32_t x) |
static void | period_certification (tinymt32_t *random) |
static double | tinymt32_generate_32double (tinymt32_t *random) |
static float | tinymt32_generate_float (tinymt32_t *random) |
static float | tinymt32_generate_float01 (tinymt32_t *random) |
static float | tinymt32_generate_float12 (tinymt32_t *random) |
static float | tinymt32_generate_floatOC (tinymt32_t *random) |
static float | tinymt32_generate_floatOO (tinymt32_t *random) |
static uint32_t | tinymt32_generate_uint32 (tinymt32_t *random) |
static int | tinymt32_get_mexp (tinymt32_t *random) |
void | tinymt32_init (tinymt32_t *random, uint32_t seed) |
void | tinymt32_init_by_array (tinymt32_t *random, uint32_t init_key[], int key_length) |
static void | tinymt32_next_state (tinymt32_t *random) |
static uint32_t | tinymt32_temper (tinymt32_t *random) |
static float | tinymt32_temper_conv (tinymt32_t *random) |
static float | tinymt32_temper_conv_open (tinymt32_t *random) |
Tiny Mersenne Twister only 127 bit internal state.
Copyright (C) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo. All rights reserved.
The 3-clause BSD License is applied to this software, see LICENSE.txt
Definition in file tinymt32.h.
#define MIN_LOOP 8 |
Definition at line 286 of file tinymt32.h.
#define PRE_LOOP 8 |
Definition at line 287 of file tinymt32.h.
#define TINYMT32_MASK UINT32_C(0x7fffffff) |
Definition at line 55 of file tinymt32.h.
#define TINYMT32_MEXP 127 |
Definition at line 51 of file tinymt32.h.
#define TINYMT32_MUL (1.0f / 16777216.0f) |
Definition at line 56 of file tinymt32.h.
#define TINYMT32_SH0 1 |
Definition at line 52 of file tinymt32.h.
#define TINYMT32_SH1 10 |
Definition at line 53 of file tinymt32.h.
#define TINYMT32_SH8 8 |
Definition at line 54 of file tinymt32.h.
#define UINT32_C | ( | value | ) | uint_least32_t(value) |
Definition at line 33 of file tinymt32.h.
#define UINT32_MAX ((uint32_t)-1u) |
Definition at line 30 of file tinymt32.h.
typedef struct TINYMT32_T tinymt32_t |
Definition at line 1 of file tinymt32.h.
|
static |
This function represents a function used in the initialization by init_by_array
x | 32-bit integer |
Definition at line 295 of file tinymt32.h.
|
static |
This function represents a function used in the initialization by init_by_array
x | 32-bit integer |
Definition at line 305 of file tinymt32.h.
|
static |
This function certificate the period of 2^127-1.
random | tinymt state vector. |
Definition at line 313 of file tinymt32.h.
|
inlinestatic |
This function outputs double precision floating point number from internal state. The returned value has 32-bit precision. In other words, this function makes one double precision floating point number from one 32-bit unsigned integer.
random | tinymt internal status |
Definition at line 277 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. This function is implemented using multiplying by (1 / 2^24). floating point multiplication is faster than using union trick in my Intel CPU.
random | tinymt internal status |
Definition at line 220 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. This function is implemented using union trick.
random | tinymt internal status |
Definition at line 242 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. This function is implemented using union trick.
random | tinymt internal status |
Definition at line 231 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. This function may return 1.0 and never returns 0.0.
random | tinymt internal status |
Definition at line 253 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. This function returns neither 0.0 nor 1.0.
random | tinymt internal status |
Definition at line 264 of file tinymt32.h.
|
inlinestatic |
This function outputs 32-bit unsigned integer from internal state.
random | tinymt internal status |
Definition at line 207 of file tinymt32.h.
|
inlinestatic |
Definition at line 89 of file tinymt32.h.
|
inline |
This function initializes the internal state array with a 32-bit unsigned integer seed.
random | tinymt state vector. |
seed | a 32-bit unsigned integer used as a seed. |
Definition at line 331 of file tinymt32.h.
|
inline |
This function initializes the internal state array, with an array of 32-bit unsigned integers used as seeds
random | tinymt state vector. |
init_key | the array of 32-bit integers, used as a seed. |
key_length | the length of init_key. |
Definition at line 354 of file tinymt32.h.
|
inlinestatic |
This function changes internal state of tinymt32. Users should not call this function directly.
random | tinymt internal status |
Definition at line 99 of file tinymt32.h.
|
inlinestatic |
This function outputs 32-bit unsigned integer from internal state. Users should not call this function directly.
random | tinymt internal status |
Definition at line 125 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. Users should not call this function directly.
random | tinymt internal status |
Definition at line 148 of file tinymt32.h.
|
inlinestatic |
This function outputs floating point number from internal state. Users should not call this function directly.
random | tinymt internal status |
Definition at line 178 of file tinymt32.h.