1.4.2.98 DSP_VectorZeroPad Function
Fills an input vector with zeros.
Description
void DSP_VectorZeroPad(int32_t *indata, int N);
Fills the first N values of an input vector indata with the value zero. 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 is in 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
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]={0x3FFFFFFF, 0x80000000, 0x73333333, 0x66666666, 0x19999999, 0x40000000, 0x7FFFFFFF, 0xB3333334}; _// 0.5, -1, 0.9, 0.8, 0.2, 0.5, 1, -0.6_ DSP_VectorZeroPad(inBufTestA, Num); _// inBufTestA = {0x00000000, 0x00000000, 0x00000000, 0x00000000,_ _// 0x19999999, 0x40000000, 0x7FFFFFFF, 0xB3333334};_ _// 0, 0, 0, 0, 0.2, 0.5, 1, -0.6_
C
void DSP_VectorZeroPad (int32_t * indata , int N );