SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator using C structure. More...
Go to the source code of this file.
Classes | |
| union | W128_T |
| struct | SFMT_T |
Macros | |
| #define | SFMTST_H |
| #define | PRIu64 "llu" |
| #define | PRIx64 "llx" |
Typedefs | |
| typedef union W128_T | w128_t |
| typedef struct SFMT_T | sfmt_t |
Functions | |
| void | sfmt_fill_array32 (sfmt_t *sfmt, uint32_t *array, int size) |
| void | sfmt_fill_array64 (sfmt_t *sfmt, uint64_t *array, int size) |
| void | sfmt_init_gen_rand (sfmt_t *sfmt, uint32_t seed) |
| void | sfmt_init_by_array (sfmt_t *sfmt, uint32_t *init_key, int key_length) |
| const char * | sfmt_get_idstring (sfmt_t *sfmt) |
| int | sfmt_get_min_array_size32 (sfmt_t *sfmt) |
| int | sfmt_get_min_array_size64 (sfmt_t *sfmt) |
| void | sfmt_gen_rand_all (sfmt_t *sfmt) |
| static uint32_t | sfmt_genrand_uint32 (sfmt_t *sfmt) |
| static uint64_t | sfmt_genrand_uint64 (sfmt_t *sfmt) |
| static double | sfmt_to_real1 (uint32_t v) |
| static double | sfmt_genrand_real1 (sfmt_t *sfmt) |
| static double | sfmt_to_real2 (uint32_t v) |
| static double | sfmt_genrand_real2 (sfmt_t *sfmt) |
| static double | sfmt_to_real3 (uint32_t v) |
| static double | sfmt_genrand_real3 (sfmt_t *sfmt) |
| static double | sfmt_to_res53 (uint64_t v) |
| static double | sfmt_genrand_res53 (sfmt_t *sfmt) |
| static double | sfmt_to_res53_mix (uint32_t x, uint32_t y) |
| static double | sfmt_genrand_res53_mix (sfmt_t *sfmt) |
SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom number generator using C structure.
Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. Copyright (C) 2012 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
typedef unsigned int uint32_t typedef unsigned long long uint64_t #define PRIu64 "llu" #define PRIx64 "llx"uint32_t must be exactly 32-bit unsigned integer type (no more, no less), and uint64_t must be exactly 64-bit unsigned integer type. PRIu64 and PRIx64 are used for printf function to print 64-bit unsigned int and 64-bit unsigned int in hexadecimal format.
| #define PRIu64 "llu" |
| #define PRIx64 "llx" |
| #define SFMTST_H |
| void sfmt_fill_array32 | ( | sfmt_t * | sfmt, |
| uint32_t * | array, | ||
| int | size ) |
| void sfmt_fill_array64 | ( | sfmt_t * | sfmt, |
| uint64_t * | array, | ||
| int | size ) |
| void sfmt_gen_rand_all | ( | sfmt_t * | sfmt | ) |
|
inlinestatic |
generates a random number on [0,1]-real-interval
| sfmt | SFMT internal state |
|
inlinestatic |
generates a random number on [0,1)-real-interval
| sfmt | SFMT internal state |
|
inlinestatic |
generates a random number on (0,1)-real-interval
| sfmt | SFMT internal state |
|
inlinestatic |
generates a random number on [0,1) with 53-bit resolution
| sfmt | SFMT internal state |
|
inlinestatic |
generates a random number on [0,1) with 53-bit resolution using two 32bit integers.
| sfmt | SFMT internal state |
|
inlinestatic |
This function generates and returns 32-bit pseudorandom number. init_gen_rand or init_by_array must be called before this function.
| sfmt | SFMT internal state |
|
inlinestatic |
This function generates and returns 64-bit pseudorandom number. init_gen_rand or init_by_array must be called before this function. The function gen_rand64 should not be called after gen_rand32, unless an initialization is again executed.
| sfmt | SFMT internal state |
| const char * sfmt_get_idstring | ( | sfmt_t * | sfmt | ) |
| int sfmt_get_min_array_size32 | ( | sfmt_t * | sfmt | ) |
| int sfmt_get_min_array_size64 | ( | sfmt_t * | sfmt | ) |
| void sfmt_init_by_array | ( | sfmt_t * | sfmt, |
| uint32_t * | init_key, | ||
| int | key_length ) |
| void sfmt_init_gen_rand | ( | sfmt_t * | sfmt, |
| uint32_t | seed ) |
|
inlinestatic |
converts an unsigned 32-bit number to a double on [0,1]-real-interval.
| v | 32-bit unsigned integer |
|
inlinestatic |
converts an unsigned 32-bit integer to a double on [0,1)-real-interval.
| v | 32-bit unsigned integer |
|
inlinestatic |
converts an unsigned 32-bit integer to a double on (0,1)-real-interval.
| v | 32-bit unsigned integer |
|
inlinestatic |
converts an unsigned 32-bit integer to double on [0,1) with 53-bit resolution.
| v | 32-bit unsigned integer |
|
inlinestatic |
generates a random number on [0,1) with 53-bit resolution from two 32 bit integers