1.4.2.67 DSP_VectorCopy Function

Copies the elements of one vector to another.

Description

void DSP_VectorCopy(int32_t *outdata, int32_t *indata, int N);

Fills the first N values of an input vector outdata with the elements from indata. N must be a multiple of four and greater than or equal to four or it will be truncated to the nearest multiple of four. The vector result and the scalar value to fill are both Q31 fractional format.

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 destination array of values (int32_t)

indata pointer to source array of elements (int32_t)

N number of samples (int)

Returns

None.

Remarks

None.

Example

int Num = 4;

int32_t inBufTestA[8]={0x7FFFFFFF, 0x80000000, 0x73333333, 0x66666666,

0x19999999, 0x40000000, 0x7FFFFFFF, 0xB3333334};

_// 1, -1, 0.9, 0.8, 0.2, 0.5, 1, -0.6_

int32_t inBufTestB[8]={0x00000000, 0x7FFFFFFF, 0x40000000, 0x0CCCCCCC,

0x40000000, 0x60000000, 0x80000000, 0x20000000};

_// 0, 1, 0.5, 0.1, 0.75, 0.5, -1, 0.25_

DSP_VectorCopy(inBufTestA, inBufTestB, Num);

_// inBufTestA = {0x00000000, 0x7FFFFFFF, 0x40000000, 0x0CCCCCCC,_

_// 0x19999999, 0x40000000, 0x7FFFFFFF, 0xB3333334} // first 4 values copied_

C

void  DSP_VectorCopy (int32_t * outdata , int32_t * indata , int  N );