Abs

Computes absolute values of vector elements.

Syntax

Intel IPP style:

IppStatus ippsqAbs_32f(const Ipp32f* pSrc, Ipp32f* pDst, Ipp32u len);

IppStatus ippsqAbsQ15_16s(const Ipp16s* pSrc, Ipp16s* pDst, Ipp32u len);

IppStatus ippsqAbsQ31_32s(const Ipp32s* pSrc, Ipp32s* pDst, Ipp32u len);

DSP style:

void ippsq_abs_f32(const float32_t* pSrc, float32_t* pDst, uint32_t len);

void ippsq_abs_q15(const q15_t* pSrc, q15_t* pDst, uint32_t len);

void ippsq_abs_q31(const q31_t* pSrc, q31_t* pDst, uint32_t len);

Include Files

ippsq.h

dsp.h

Parameters

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vector.

Description

This function computes the absolute value of each element of the pSrc vector and stores the result in pDst.

Q31 and Q15 function flavors perform saturation if the resulting value exceeds the data range.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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