function lfds711_prng_st_init

From liblfds.org
Jump to navigation Jump to search

Source Files

└───liblfds711
    ├───inc
    │   └───liblfds711
    │           lfds711_prng.h
    └───src
        └───lfds711_stack
                lfds711_prng_init.c

Opaque Structures

struct lfds711_prng_st_state;

Prototype

void lfds711_prng_st_init( struct lfds711_prng_st_state *psts, lfds711_pal_uint_t seed );

Parameters

struct lfds711_prng_st_state *psts

A pointer to a user-allocated struct lfds711_prng_st_state.

lfds711_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 LFDS711_PRNG_SEED is provided for use as a seed value.

Example

None yet.

See Also