#include "bu.h"
#include "bn.h"
Go to the source code of this file.
Data Structures | |
struct | _internal_state_s |
Defines | |
#define | N 624 |
#define | M 397 |
#define | MATRIX_A 0x9908b0df |
#define | UPPER_MASK 0x80000000 |
#define | LOWER_MASK 0x7fffffff |
#define | TEMPERING_MASK_B 0x9d2c5680 |
#define | TEMPERING_MASK_C 0xefc60000 |
#define | TEMPERING_SHIFT_U(y) (y >> 11) |
#define | TEMPERING_SHIFT_S(y) (y << 7) |
#define | TEMPERING_SHIFT_T(y) (y << 15) |
#define | TEMPERING_SHIFT_L(y) (y >> 18) |
#define | MERSENNE_MAGIC 0x4D54524E |
Functions | |
void * | bn_randmt_state_create () |
void | bn_randmt_state_seed (struct _internal_state_s *is, uint32_t seed) |
double | bn_randmt_state (struct _internal_state_s *is) |
void | bn_randmt_state_serialize (struct _internal_state_s *UNUSED(is), struct bu_vls *UNUSED(s)) |
void | bn_randmt_state_deserialize (struct _internal_state_s *UNUSED(is), struct bu_vls *UNUSED(s)) |
void | bn_rand_mt_state_set_global (struct _internal_state_s *is) |
void | bn_randmt_seed (unsigned long seed) |
double | bn_randmt () |
#define N 624 |
Definition at line 38 of file randmt.c.
Referenced by bn_does_ray_isect_tri(), bn_mat_fromto(), bn_randmt_state(), bn_randmt_state_create(), and bn_randmt_state_seed().
#define MATRIX_A 0x9908b0df |
Definition at line 40 of file randmt.c.
Referenced by bn_randmt_state().
#define UPPER_MASK 0x80000000 |
Definition at line 41 of file randmt.c.
Referenced by bn_randmt_state().
#define LOWER_MASK 0x7fffffff |
Definition at line 42 of file randmt.c.
Referenced by bn_randmt_state().
#define TEMPERING_MASK_B 0x9d2c5680 |
Definition at line 46 of file randmt.c.
Referenced by bn_randmt_state().
#define TEMPERING_MASK_C 0xefc60000 |
Definition at line 47 of file randmt.c.
Referenced by bn_randmt_state().
Definition at line 48 of file randmt.c.
Referenced by bn_randmt_state().
Definition at line 49 of file randmt.c.
Referenced by bn_randmt_state().
Definition at line 50 of file randmt.c.
Referenced by bn_randmt_state().
Definition at line 51 of file randmt.c.
Referenced by bn_randmt_state().
#define MERSENNE_MAGIC 0x4D54524E |
Definition at line 53 of file randmt.c.
Referenced by bn_randmt_state_create().
void* bn_randmt_state_create | ( | ) |
Definition at line 64 of file randmt.c.
References MERSENNE_MAGIC, and N.
void bn_randmt_state_seed | ( | struct _internal_state_s * | is, | |
uint32_t | seed | |||
) |
double bn_randmt_state | ( | struct _internal_state_s * | is | ) |
Definition at line 92 of file randmt.c.
References bn_randmt_seed(), LOWER_MASK, M, MATRIX_A, N, TEMPERING_MASK_B, TEMPERING_MASK_C, TEMPERING_SHIFT_L, TEMPERING_SHIFT_S, TEMPERING_SHIFT_T, TEMPERING_SHIFT_U, UPPER_MASK, and y.
Referenced by bn_randmt().
void bn_randmt_state_serialize | ( | struct _internal_state_s * | UNUSEDis, | |
struct bu_vls * | UNUSEDs | |||
) |
void bn_randmt_state_deserialize | ( | struct _internal_state_s * | UNUSEDis, | |
struct bu_vls * | UNUSEDs | |||
) |