Developer Guide and Reference

Contents

svrng_new_uniform_distribution_[int|float|double]/svrng_update_uniform_distribution_[int|float|double]

Allocates and initializes constants for the uniform distribution with specified parameters

Syntax

svrng_distribution_t svrng_new_uniform_distribution_int( int
a
, int
b
)
svrng_distribution_t svrng_new_uniform_distribution_float( float
a
, float
b
)
svrng_distribution_t svrng_new_uniform_distribution_double( double
a
, double
b
)
svrng_distribution_t svrng_update_uniform_distribution_int( svrng_distribution_t
distr
, int
a
, int
b
)
svrng_distribution_t svrng_update_uniform_distribution_float( svrng_distribution_t
distr
, float
a
, float
b
)
svrng_distribution_t svrng_update_uniform_distribution_double( svrng_distribution_t
distr
, double
a
, double
b
)
Input Parameters
a
Left bound of interval
b
Right bound of interval
distr
Pointer to the distribution to be updated
Description
The
svrng_new_uniform_distribution_[int|float|double]
function allocates memory for a uniform distribution and pre-computes and broadcasts loop-invariant constants required for vector generation of uniformly distributed values over the interval [a, b), where a, b are the real left and right bounds of the interval respectively with a < b. 32-bit
int
,
float
and
double
types are supported. The
svrng_update_uniform_distribution_[int|float|double]
functions give the same result, but by modifying existing distributions instead of allocating memory for new distributions.
Status flags set
Name
Description
SVRNG_STATUS_ERROR_MEMORY_ALLOC
Memory allocation failure
SVRNG_STATUS_ERROR_BAD_PARAMS
a
>=
b
SVRNG_STATUS_ERROR_BAD_DISTR
Bad distribution (NULL pointer)
Return Values
A pointer to the distribution created or updated by the function, or NULL on error.

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