function lfds710_prng_st_init

From liblfds.org
Jump to navigation Jump to search

Source Files

└───liblfds710
    ├───inc
    │   └───liblfds710
    │           lfds710_prng.h
    └───src
        └───lfds710_stack
                lfds710_prng_init.c

Opaque Structures

struct lfds710_prng_st_state;

Prototype

void lfds710_prng_st_init( struct lfds710_prng_st_state *psts, lfds710_pal_uint_t seed );

Parameters

struct lfds710_prng_st_state *psts

A pointer to a user-allocated struct lfds710_prng_st_state.

lfds710_pal_uint_t seed

A value used to generate the starting index into the sequence of numbers generated by the PRNG. This is not a literal index, but rather is a first input into the PRNG function. It can be any value in its range (i.e. including zero, a value not permitted by some classes of PRNGs).

Notes

This is the single-threaded variant of the PRNG. There are no alignment requirements, and the state can only be used on the logical core where it was initialized (with the exception that if the operating system moves the thread from its original logical core to another, as the operating system will perform the necessary magic then to ensure it all continues to work).

The convenience define LFDS710_PRNG_SEED is provided for use as a seed value.

Example

None yet.

See Also