📄 ipps.hpp
字号:
// pRandGaussStateSize pointer to the computed values of the size
// of the structure ippsRandGaussState_16s.
*/
inline IppStatus ippsRandGaussGetSize( int * pRandGaussStateSize) {
return ippsRandGaussGetSize_16s( pRandGaussStateSize );
}
/* //////////////////////////////////////////////////////////////////////////////////
// Name: ippsRandGaussInit_16s
// Purpose: Initializes the Gaussian sequence generator state structure with
// given parameters (mean, variance, seed).
// Parameters:
// pRandGaussState A pointer to the structure containing parameters for the
// generator of noise.
// mean Mean of the normal distribution.
// stdDev Standard deviation of the normal distribution.
// seed Seed value used by the pseudo-random number generator
//
// Returns:
// ippStsNullPtrErr pRandGaussState==NULL
// ippMemAllocErr Can not allocate normal random state
// ippStsNoErr No errors
//
*/
inline IppStatus ippsRandGaussInit( IppsRandGaussState_16s* pRandGaussState, Ipp16s
mean, Ipp16s stdDev, unsigned int seed) {
return ippsRandGaussInit_16s( pRandGaussState, mean, stdDev, seed );
}
/* ////////////////////////////////////////////////////////////////////////////
// Name: ippsRandUniformGetSize_16s
//
// Purpose: Uniform sequence generator state variable size -
// computes the size,in bytes,
// of the state variable structure ippsRandIniState_16s.
//
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr pRandUniformStateSize==NULL
// Arguments:
// pRandGaussStateSize pointer to the computed value of the size
// of the structure ippsRandUniState_16s.
*/
inline IppStatus ippsRandUniformGetSize( int * pRandUniformStateSize) {
return ippsRandUniformGetSize_16s( pRandUniformStateSize );
}
/* //////////////////////////////////////////////////////////////////////////////////
// Name: ippsRandUniformInit_16s
// Purpose: Initializes the uniform sequence generator state structure with
// given parameters (boundaries, seed)
// Parameters:
// pRandUniState Pointer to the structure containing parameters for the
// generator of noise.
// low Lower bound of the uniform distribution's range.
// high Upper bounds of the uniform distribution's range.
// seed Seed value used by the pseudo-random number generation
// algorithm.
//
*/
inline IppStatus ippsRandUniformInit( IppsRandUniState_16s* pRandUniState, Ipp16s low,
Ipp16s high, unsigned int seed) {
return ippsRandUniformInit_16s( pRandUniState, low, high, seed );
}
/* /////////////////////////////////////////////////////////////////////////
// Name: ippsVectorJaehne
// Purpose: creates Jaehne vector
//
// Parameters:
// pDst the pointer to the destination vector
// len length of the vector
// magn magnitude of the signal
//
// Return:
// ippStsNoErr indicates no error
// ippStsNullPtrErr indicates an error when the pDst pointer is NULL
// ippStsBadSizeErr indicates an error when len is less or equal zero
// ippStsJaehneErr indicates an error when magnitude value is negative
//
// Notes: pDst[n] = magn*sin(0.5*pi*n^2/len), n=0,1,2,..len-1.
//
*/
inline IppStatus ippsVectorJaehne( Ipp8u* pDst, int len, Ipp8u magn) {
return ippsVectorJaehne_8u( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp8s* pDst, int len, Ipp8s magn) {
return ippsVectorJaehne_8s( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp16u* pDst, int len, Ipp16u magn) {
return ippsVectorJaehne_16u( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp16s* pDst, int len, Ipp16s magn) {
return ippsVectorJaehne_16s( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp32u* pDst, int len, Ipp32u magn) {
return ippsVectorJaehne_32u( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp32s* pDst, int len, Ipp32s magn) {
return ippsVectorJaehne_32s( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp32f* pDst, int len, Ipp32f magn) {
return ippsVectorJaehne_32f( pDst, len, magn );
}
inline IppStatus ippsVectorJaehne( Ipp64f* pDst, int len, Ipp64f magn) {
return ippsVectorJaehne_64f( pDst, len, magn );
}
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippsTone_Direct
// Purpose: generates a tone
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to input or output data are NULL
// ippStsSizeErr The length of vector is less or equal zero
// ippStsToneMagnErr The magn value is less than or equal to zero
// ippStsToneFreqErr The rFreq value is less than 0 or greater than or equal to 0.5
// for real tone and 1.0 for complex tone
// ippStsTonePhaseErr The phase value is less 0 or greater or equal 2*PI
// Parameters:
// magn Magnitude of the tone; that is, the maximum value
// attained by the wave
// rFreq Frequency of the tone relative to the sampling
// frequency. It must be in range [0.0, 0.5) for real, and
// [0.0, 1.0) for complex tone
// pPhase Phase of the tone relative to a cosinewave. It must
// be in range [0.0, 2*PI).
// pDst Pointer to the destination vector.
// len Length of the vector
// hint Suggests using specific code
// Notes:
// for real: pDst[i] = magn * cos(IPP_2PI * rfreq * i + phase);
// for cplx: pDst[i].re = magn * cos(IPP_2PI * rfreq * i + phase);
// pDst[i].im = magn * sin(IPP_2PI * rfreq * i + phase);
*/
inline IppStatus ippsTone_Direct( Ipp32f* pDst, int len, float magn, float rFreq,
float* pPhase, IppHintAlgorithm hint) {
return ippsTone_Direct_32f( pDst, len, magn, rFreq, pPhase, hint );
}
inline IppStatus ippsTone_Direct( Ipp32fc* pDst, int len, float magn, float rFreq,
float* pPhase, IppHintAlgorithm hint) {
return ippsTone_Direct_32fc( pDst, len, magn, rFreq, pPhase, hint );
}
inline IppStatus ippsTone_Direct( Ipp64f* pDst, int len, double magn, double rFreq,
double* pPhase, IppHintAlgorithm hint) {
return ippsTone_Direct_64f( pDst, len, magn, rFreq, pPhase, hint );
}
inline IppStatus ippsTone_Direct( Ipp64fc* pDst, int len, double magn, double rFreq,
double* pPhase, IppHintAlgorithm hint) {
return ippsTone_Direct_64fc( pDst, len, magn, rFreq, pPhase, hint );
}
inline IppStatus ippsTone_Direct( Ipp16s* pDst, int len, Ipp16s magn, float rFreq,
float* pPhase, IppHintAlgorithm hint) {
return ippsTone_Direct_16s( pDst, len, magn, rFreq, pPhase, hint );
}
inline IppStatus ippsTone_Direct( Ipp16sc* pDst, int len, Ipp16s magn, float rFreq,
float* pPhase, IppHintAlgorithm hint) {
return ippsTone_Direct_16sc( pDst, len, magn, rFreq, pPhase, hint );
}
//-- #if !defined ( _OWN_BLDPCS )
//-- struct ToneState_16s;
//-- typedef struct ToneState_16s IppToneState_16s;
//-- #endif
/*
// Name: ippsToneInitAllocQ15_16s
// Purpose: Allocates memory for the structure IppToneState_16s,
// initializes it with a set of cosinwave parameters (magnitude,
// frequency, phase).
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr Double pointer to pToneState is NULL
// ippStsToneMagnErr The magn value is less than or equal to zero
// ippStsToneFreqErr The freqQ15 value is less than 0 or greater than 16383
// ippStsTonePhaseErr The phaseQ15 value is less than 0 or greater than 205886
// Parameters:
// **pToneState Double pointer to the structure IppToneState_16s.
// magn Magnitude of the tone; that is, the maximum value
// attained by the wave.
// rFreqQ15 Frequency of the tone relative to the sampling
// frequency. It must be between 0 and 16383
// phaseQ15 Phase of the tone relative to a cosinewave. It must
// be between 0 and 205886.
// Notes:
*/
inline IppStatus ippsToneInitAlloc( IppToneState_16s** pToneState, Ipp16s magn, Ipp16s
rFreqQ15, Ipp32s phaseQ15) {
return ippsToneInitAllocQ15_16s( pToneState, magn, rFreqQ15, phaseQ15 );
}
/*
// Name: ippsToneFree_16s
// Purpose: Frees memory, which was allocated
// for the structure IppToneState_16s.
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr Pointer to pToneState is NULL
// Parameters:
// *pToneState Pointer to the structure IppToneState_16s.
// Notes:
*/
//-- IPPAPI(IppStatus, ippsToneFree, (IppToneState_16s* pToneState))
/*
// Name: ippsToneGetStateSizeQ15_16s
// Purpose: Computes the size, in bytes, of the structure IppToneState_16s
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr Pointer to pToneState size is NULL
// Parameters:
// *pToneStateSize Pointer to the computed value of the size
// of the structure IppToneState_16s.
// Notes:
*/
inline IppStatus ippsToneGetStateSize( int* pToneStateSize) {
return ippsToneGetStateSizeQ15_16s( pToneStateSize );
}
/*
// Name: ippsToneInitQ15_16s
// Purpose: initializes the structure IppToneState_16s with
// given set of cosinewave parameters (magnitude,
// frequency, phase)
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr Pointer to pToneState is NULL
// ippStsToneMagnErr The magn value is less than or equal to zero
// ippStsToneFreqErr The rFreqQ15 value is less than 0 or greater 16383
// ippStsTonePhaseErr The phaseQ15 value is less than 0 or greater 205886
// Parameters:
// *pToneState Pointer to the structure IppToneState_16s.
// magn Magnitude of the tone; that is, the maximum value
// attained by the wave.
// rFreqQ15 Frequency of the tone relative to the sampling
// frequency. It must be between 0 and 16383
// phaseQ15 Phase of the tone relative to a cosinewave. It must
// be between 0 and 205886.
// Notes:
*/
inline IppStatus ippsToneInit( IppToneState_16s* pToneState, Ipp16s magn, Ipp16s
rFreqQ15, Ipp32s phaseQ15) {
return ippsToneInitQ15_16s( pToneState, magn, rFreqQ15, phaseQ15 );
}
/*
// Name: ippsToneQ15_16s
// Purpose: generates a tone
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr One of the specified pointers is NULL
// ippStsSizeErr len is less than or equal to 0
// Parameters:
// pDst Pointer to the destination vector.
// len Length of the vector
// *pToneState Pointer to the structure IppToneState_16s.
// Notes:
*/
inline IppStatus ippsTone( Ipp16s* pDst, int len, IppToneState_16s* pToneState) {
return ippsToneQ15_16s( pDst, len, pToneState );
}
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippsTriangle_Direct
// Purpose: generates a Triangle
// Context:
// Returns: IppStatus
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to input or output data are NULL
// ippStsSizeErr The length of vector is less or equal zero
// ippStsTrnglMagnErr The magn value is less or equal to zero
// ippStsTrnglFreqErr The rfreq value is less 0 or greater or equal 0.5
// ippStsTrnglPhaseErr The phase value is less 0 or greater or equal 2*PI
// ippStsTrnglAsymErr The asym value is less -PI or greater or equal PI
// Parameters:
// magn Magnitude of the Triangle; that is, the maximum value
// attained by the wave
// rFreq Frequency of the Triangle relative to the sampling
// frequency. It must be in range [0.0, 0.5)
// pPhase POinter to the phase of the Triangle relative to acosinewave. It must
// be in range [0.0, 2*PI)
// asym Asymmetry of a triangle. It must be in range [-PI,PI).
// pDst Pointer to destination vector.
// len Length of the vector
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -