sfmt_rand.h File Reference
An interface to use the SFMT-19937 random number generator.
More...
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Go to the source code of this file.
Defines |
#define | __device__ static inline |
#define | MCX_RNG_NAME "SFMT19937 RNG" |
#define | RAND_BUF_LEN 624 |
#define | RAND_SEED_LEN 2 |
#define | MEXP 19937 |
Typedefs |
typedef unsigned int | RandType |
typedef unsigned int | uint |
Functions |
__device__ void | rng_init (RandType t[RAND_BUF_LEN], RandType tnew[RAND_BUF_LEN], uint *n_seed, int idx) |
__device__ void | rand_need_more (RandType t[RAND_BUF_LEN], RandType tbuf[RAND_BUF_LEN]) |
__device__ float | rand_next_scatlen (RandType t[RAND_BUF_LEN]) |
__device__ float | rand_next_aangle (RandType t[RAND_BUF_LEN]) |
__device__ float | rand_next_zangle (RandType t[RAND_BUF_LEN]) |
__device__ float | rand_next_reflect (RandType t[RAND_BUF_LEN]) |
__device__ float | rand_do_roulette (RandType t[RAND_BUF_LEN]) |
Detailed Description
An interface to use the SFMT-19937 random number generator.
A Pseudo-RNG using the SIMD-oriented Fast Mersenne Twister (SFMT) * *
- Author:
- Qianqian Fang <fangq at nmr.mgh.harvard.edu> * *