Visible to Intel only — GUID: GUID-CAB302A1-E59D-41BE-A3D3-4B890C9A95D6
Visible to Intel only — GUID: GUID-CAB302A1-E59D-41BE-A3D3-4B890C9A95D6
svrng_new_normal_distribution_[float|double]/svrng_update_normal_distribution_[float|double]
Allocates and initializes constants for the normal distribution with specified parameters
svrng_distribution_t svrng_new_normal_distribution_float( float mean, float stddev )
svrng_distribution_t svrng_new_normal_distribution_double( double mean, double stddev )
svrng_distribution_t svrng_update_normal_distribution_float( svrng_distribution_t distr, float mean, float stddev )
svrng_distribution_t svrng_update_normal_distribution_double( svrng_distribution_t distr, double mean, double stddev )
mean |
Mean value of the normal distribution. |
stddev |
Standard deviation of the normal distribution |
distr |
Pointer to the distribution to be updated |
The svrng_new_normal_distribution_[float|double] functions allocate memory for a normal distribution of either 32- or 64-bit floating pont numbers with the specified mean and positive, real stddev using the ICDF method. The function pre-computes and broadcasts loop-invariant constants required for vector generation. The svrng_update_normal_distribution_[float|double] functions give the same result, but by modifying existing distributions instead of allocating memory for new distributions.
Name |
Description |
---|---|
SVRNG_STATUS_ERROR_MEMORY_ALLOC |
Memory allocation failure |
SVRNG_STATUS_ERROR_BAD_PARAM2 |
Bad parameter: stddev |
SVRNG_STATUS_ERROR_BAD_DISTR |
Bad distribution (NULL pointer) |
A pointer to the distribution created or updated by the function, or NULL on error.