1.4.2.62 DSP_VectorAddc32 Function

Calculate the sum of a vector and a constant.

Description

void DSP_VectorAddc32(int32_t *outdata, int32_t *indata, int32_t c, int N);

Computes the sum value of each element of (indata + c) and stores it to outdata. The number of samples to process is given by the parameter N. Data is in a Q31 fractional format.

outdata filled with N elements of indata1 + c

Preconditions

The pointers outdata and indata must be aligned on 4-byte boundaries. N must be greater than or equal to four and a multiple of four.

Parameters

outdata pointer to output array of 16-bit elements (int32_t)

indata pointer to input array of 16-bit elements (int32_t)

c constant value added to all indata1 elements (int32_t)

N number of samples (int)

Returns

None.

Remarks

This must be assembled with .set microMIPS.

Example

int16_t *pOutdata;

int32_t outVal[8];

int32_t inBufTest[16] = {-5,2,-3,4,-1,0,-2,-8,-21,21,10,100, 200, 127,-127,-2};

int32_t constValue = 3;

int Num = 8;

pOutdata = &outVal;

DSP_VectorAddc32(pOutdata, inBufTest, constValue, Num);

_// outVal[i] = inBufTest[i] + constValue = {-2,5,0,7,2,3,1,-5}_

C

void  DSP_VectorAddc32 (int32_t * outdata , int32_t * indata , int32_t c , int  N );