Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

RandUniformInit

Initializes a noise generator with uniform distribution.

Syntax

IppStatus ippsRandUniformInit_8u(IppsRandUniState_8u* pRandUniState, Ipp8u low, Ipp8u high, unsigned int seed);

IppStatus ippsRandUniformInit_16s(IppsRandUniState_16s* pRandUniState, Ipp16s low, Ipp16s high, unsigned int seed);

IppStatus ippsRandUniformInit_32f(IppsRandUniState_32f* pRandUniState, Ipp32f low, Ipp32f high, unsigned int seed);

IppStatus ippsRandUniformInit_64f(IppsRandUniState_64f* pRandUniState, Ipp64f low, Ipp64f high, unsigned int seed);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pRandUniState

Pointer to the structure containing parameters for the generator of noise.

low

Lower bound of the uniform distribution range.

high

Upper bound of the uniform distribution range.

seed

Seed value used by the pseudo-random number generation algorithm.

Description

This function initializes the pseudo-random generator state structure pRandUniState in the external buffer. The uniform distribution range is specified by the lower and upper bounds low and high, respectively. Before using this function, you need to compute the size of the external buffer by using the ippsRandUniformGetSize function.

The example of using this function is similar to the example provided with the Histogram function description.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pRandUniState pointer is NULL.

ippStsMemAllocErr

Indicates an error when there is not enough memory for the operation.

See Also