1.4.2.73 DSP_VectorFill Function
Fills an input vector with scalar data.
Description
void DSP_VectorFill(int32_t *indata, int32_t data, int N);
Fills the first N values of an input vector indata with the value data. 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
indata pointer to source array of elements (int32_t)
data scalar value to fill the array (int32_t)
N number of samples (int)
Returns
None.
Remarks
None.
Example
int32_t fillValue = 0x3FFFFFFF; 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_ DSP_VectorFill(inBufTestA, fillValue, Num); _// inBufTestA = {0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF,_ _// 0x19999999, 0x40000000, 0x7FFFFFFF, 0xB3333334} // first 4 values filled_
C
void DSP_VectorFill (int32_t * indata , int32_t data , int N );