Developer Guide and Reference

Contents

svrng_new_mt19937_engine/svrng_new_mt19937_ex

Routines for allocating memory for an mt19937 engine and initializing with one or multiple seeds

Syntax

svrng_engine_t svrng_new_mt19937_engine( uint32_t
seed
)
svrng_engine_t svrng_new_mt19937_engine_ex( int
num
, uint32_t *
pseed
)
Input Parameters
seed
Initial condition for the engine.
num
Number of initialization values for the extended routine.
num
>=0. See VSL Notes for further details on extended initialization of the mt19937 engine.
pseed
Pointer to an array with initialization values for the extended routine.
Description
The
svrng_new_mt19937_engine
function allocates memory for the mt19937 engine (from C++ 11 standard) and initializes it using one
seed
value. The extended version of the function,
svrng_new_mt19937_engine_ex
, accepts several values for complex initialization cases. Because the mt19937 engine has 19937 bits of state in memory, its initialization differs from the other engines. See the
Notes for Intel® MKL Vector Statistics
document for detailed information on this engine.
Status flags set
Name
Description
SVRNG_STATUS_ERROR_MEMORY_ALLOC
Memory allocation failure
SVRNG_STATUS_ERROR_BAD_PARAM1
Bad parameter:
num
SVRNG_STATUS_ERROR_BAD_PARAM2
Bad parameter:
pseed
Return Values
A pointer to an initialized engine or NULL on error.
Application Notes
The mt19937 is a Mersenne Twister pseudo-random generator of 32-bit numbers with a state size of 19937 bits that is a modification of twisted generalized feedback shift register generator. Range: [0,MAX), where MAX = 2
32
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804