DSP_urand32_init
[Math]

Collaboration diagram for DSP_urand32_init:


Detailed Description


Modules

 DSP_urand32
void DSP_urand32_init (unsigned int seed, void *restrict polynomial, void *restrict state)


Function Documentation

void DSP_urand32_init ( unsigned int  seed,
void *restrict  polynomial,
void *restrict  state 
)

This function is used to seed the uniformly distributed random number generator (RNG). It must be called prior to using any of the 32-bit RNG's provided in DSPLIB

Parameters:
seed = An arbitrary unsigned integer chosen by the user.
polynomial = Array of 3 non-arbitrary unsigned integers, previously generated using the included TinyMTDC program and/or from the provided text file; numbers from different sets MUST NOT be mixed and matched. Should the user provide a NULL pointer instead, default values will be used instead. These parameters ensure (mostly) statistically independent random numbers among different generators. Users should place numbers in the polynomial parameter in the order in which they appear in the text file or TinyMTDC program. That is columns 0, 1, and 2 (mat1, mat2, and tmat of TinyMTDC) correspond to positions 0, 1, and 2 of the polynomial.
state = An array of 7 unsigned 32-bit integers which need not be initialized to any values by the user; the user is only required to allocate such space and maintain (but NEVER modify) it.
Algorithm:
The random number generator is based on the Tiny Mersenne Twister (TinyMT). Click here for more information.
Assumptions:
The user has properly initialized the "polynomial" and "state" parameters.
Implementation notes:
Endian Support: The code supports both big and little endian modes.
Interruptibility: The code not interruptible.


Copyright 2014, Texas Instruments Incorporated