Sub

Subtracts elements of two vectors.

Syntax

Intel IPP style:

IppStatus ippsqSub_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, Ipp32u len);

IppStatus ippsqSubQ15_16s_s(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, Ipp32u len);

IppStatus ippsqSubQ31_32s_s(const Ipp32s* pSrc1, const Ipp32s* pSrc2, Ipp32s* pDst, Ipp32u len);

DSP style:

void ippsq_sub_f32(const float32_t* pSrc1, const float32_t* pSrc2, float32_t* pDst, uint32_t len);

void ippsq_sub_q15(const q15_t* pSrc1, const q15_t* pSrc2, q15_t* pDst, uint32_t len);

void ippsq_sub_q31(const q31_t* pSrc1, const q31_t* pSrc2, q31_t* pDst, uint32_t len);

Include Files

ippsq.h

dsp.h

Parameters

pSrc1, pSrc2

Pointers to the source vectors.

pDst

Pointer to destination vector.

len

Number of elements in the vector.

Description

Intel IPP style: This function subtracts the elements of the pSrc1 vector from the elements of the pSrc2 vector and stores the result in pDst.

DSP style: This function subtracts the elements of the pSrc2 vector from the elements of the pSrc1 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.