RandGauss_Direct

DEPRECATED. Generates pseudo-random samples with a Gaussian distribution in the direct mode.

Syntax

IppStatus ippsRandGauss_Direct_16s(Ipp16s* pDst, int len, Ipp16s mean, Ipp16s stdev, unsigned int* pSeed);

IppStatus ippsRandGauss_Direct_32f(Ipp32f* pDst, int len, Ipp32f mean, Ipp32f stdev, unsigned int* pSeed);

IppStatus ippsRandGauss_Direct_64f(Ipp64f* pDst, int len, Ipp64f mean, Ipp64f stdev, unsigned int* pSeed);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pDst

Pointer to the array which stores the samples.

pSeed

Pointer to the seed value used by the pseudo-random number generation algorithm.

len

Number of samples to be computed.

mean

Mean of the Gaussian distribution.

stdev

Standard deviation of the Gaussian distribution.

Description

The function ippsRandGauss_Direct is deprecated. This function is obsolete and will be removed in a future release. For information about the functions that you should use instead, see the table below.

Deprecated Function Use Instead

ippsRandGauss_Direct_16s

ippsRandGauss_16s

ippsRandGauss_Direct_32f

ippsRandGauss_32f

ippsRandGauss_Direct_64f

ippsRandGauss_64f

For more information about the deprecation process use the following link: http://software.intel.com/sites/products/ipp-deprecated-features-feedback/.

This function generates len pseudo-random samples with a Gaussian distribution, and stores them in the array pDst.This function does not require to initialize the generator state structure in advance. All parameters of the pseudo-random number generator are set directly in the function.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pSeed pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

Example

The code example below demonstrates how to use the function ippsRandGauss_Direct.

void func_gauss_direct() 
{
    Ipp16s* pDst;
    int len = 512;
    Ipp16s mean = 0;
    Ipp16s stdev = 2047;
    unsigned int Seed = 0;
    IppStatus status;

    status = ippsRandGauss_Direct_16s(pDst, len, mean, stdev, &Seed);
    if(ippStsNoErr != status)
      printf("IPP Error: %s",ippGetStatusString(status)); 
}

Result:



Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.