Add

Adds elements of two vectors.

Syntax

Intel IPP style:

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

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

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

DSP style:

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

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

void ippsq_add_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 the destination vector.

len

Number of elements in the vector.

Description

This function adds the elements of the pSrc1 vector to the elements of the pSrc2 vector and stores the result in pDst. Function flavors with the _s suffix perform saturation of the result if the output value exceeds the data range.

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.