1.4.2.23 DSP_MatrixInit32 Function
Initializes the first N elements of a Matrix to the value num.
Description
void DSP_MatrixInit32(int32_t *data_buffer, int N, int32_t num);
Copy the value num into the first N Matrix elements of data_buffer.
Preconditions
data_buffer must be predefined to be equal to or greater than N elements.
N must be a factor of four, or it will truncate to the nearest factor of four.
Parameters
data_buffer pointer to the Matrix to be initialized (int32_t)
N number of elements to be initialized (int32_t)
num value to be initialized into the matrix (int32_t)
Returns
None.
Remarks
None.
Example
#define ROW 3 #define COL 3 int32_t numElements = 4; _// multiple of 4_ int valueElements = -1; int32_t matA[ROW*COL] = {5,2,-3,8,4,2,-6,8,9}; DSP_MatrixInit32(matA, numElements, valueElements); _// matA[i] = {-1,-1,-1,-1,4,2,-6,8,9}_
C
void DSP_MatrixInit32 (int32_t * data_buffer , int N , int32_t num );