Developer Guide and Reference

Contents

Data Types and Calling Conventions

Data types specific to the Short Vector Random Number Generator (SVRNG) Library

There are two types of SVRNG functions: the initialization and service routines and generation functions. The initialization and service routines introduce two new data types:
svrng_engine_t
A pointer to the engine-specific data structure created by the engine initialization routine. The structure contains pre-computed constants necessary for fast and precise random number vector generation by the engine. The structure size is engine-dependent.
svrng_distribution_t
A pointer to the distribution-specific data structure created by the distribution initialization routine. The structure contains pre-computed loop invariant constants to perform distribution transformations efficiently. The structure size is distribution-dependent.
While scalar SVRNG generation functions return native "C" data types (
float, double, 32-bit and 64-bit integers
), the SIMD-vector versions produce 1
1
, 2, 4, 8, 16, or 32 packed results in one or several SIMD-vector registers. A set of SVRNG-specific vector types have been introduced to return these packed results. These types are CPU-specific and mapped to different numbers of SIMD-registers depending on the architecture where the program runs:
Type name
Number of packed values
SSE2 (default)
AVX2
1
Unsigned 32-bit integer
svrng_uint1_t
1
__m128i
__m128i