DSPF_sp_urand
[Math]

Collaboration diagram for DSPF_sp_urand:


Detailed Description

void DSPF_sp_urand (unsigned int size, float *vector, void *state)


Function Documentation

void DSPF_sp_urand ( unsigned int  size,
float *  vector,
void *  state 
)

This function is used to fill an array with uniformly distributed random floats on the interval [0, 1).

Parameters:
size = The size of the array to be filled.
vector = The array of type float which the user wants to fill with random values.
state = The array which was initialized with the "DSP_urand32_init" function and maintained (but NEVER modified) by the user between subsequent calls to this function.
Algorithm:
The random number generator is based on "DSP_urand32." Random integers are generated in the same manner and then multiplied by 1/(2^32) (rounded to to 2.3283064e-010 for single-precision arithmetic) and then cast to float to ensure a proper range of [0,1).
Assumptions:
The user has previously called the "DSP_urand32_init" function at least once, has maintained the state array, and allocated an array of float types of the desired width.
Implementation notes:
Endian Support: The code supports both big and little endian modes.
Interruptibility: The code is not interruptible.


Copyright 2014, Texas Instruments Incorporated