Neg

Changes sign of vector elements.

Syntax

Intel IPP style:

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

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

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

DSP style:

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

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

void ippsq_negate_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 changes sign of each element of the pSrc vector and stores the result in pDst:

pDst[i]=-pSrc[i]

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.