Developer Guide and Reference

Contents

svrng_new_rand_engine/svrng_new_rand_ex

Routines for allocating memory for a rand engine and initializing with one or multiple seeds

Syntax

svrng_engine_t svrng_new_rand_engine( uint32_t
seed
)
svrng_engine_t svrng_new_rand_engine_ex( int
num
, uint32_t *
pseed
)
Input Parameters
seed
Initial condition for the engine.
num
Number of initialization values for the extended routine. May be 0 (
seed
set to 1 ), 1 (
seed
set to
pseed[0]
), or
SIMD_WIDTH
.
pseed
Pointer to an array with initialization values for the extended routine.
Description
The
svrng_new_rand_engine
function allocates memory for the rand engine (originated from C++ 11 standard) and initializes it using one
seed
value. The extended version of the function,
svrng_new_rand_engine_ex
, accepts several values for complex initialization cases where the user needs to fill the whole vector state with their own constants.
Status flags set
<
Name
Description
SVRNG_STATUS_ERROR_MEMORY_ALLOC
Memory allocation failure