Rms

Computes the root mean squares of vector elements.

Syntax

Intel IPP style:

IppStatus ippsqRms_32f(const Ipp32f* pSrc , Ipp32u len , Ipp32f* pRms );

IppStatus ippsqRmsQ15_16s_Rz(const Ipp16s* pSrc , Ipp32u len , Ipp16s* pRms );

IppStatus ippsqRmsQ31_32s_Rz(const Ipp32s* pSrc , Ipp32u len , Ipp32s* pRms );

DSP style:

void ippsq_rms_f32(const float32_t* pSrc , uint32_t len , float32_t* pRms );

void ippsq_rms_q15(const q15_t* pSrc , uint32_t len , q15_t* pRms );

void ippsq_rms_q31(const q31_t* pSrc , uint32_t len , q31_t* pRms );

Include Files

ippsq.h

dsp.h

Parameters

pSrc

Pointer to the source vector.

len

Number of elements in the vector.

pRms

Pointer to the result.

Description

This function computes the root mean squares of the pSrc vector and stores the result in pRms. The root mean squares value is computed by the following formula:



The Q15 and Q31 flavors operate on source and destination data of Q15 and Q31 format, respectively.

Function flavors with the Rz suffix perform rounding to zero.

Return Values

ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when len is equal to zero.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.
For more complete information about compiler optimizations, see our Optimization Notice.