void vsip_mput_f(const vsip_mview_f *v, vsip_index i, vsip_index j, vsip_scalar_f vv); void vsip_cmput_f(const vsip_cmview_f *v, vsip_index i, vsip_index j, vsip_cscalar_f vv);
This function sets the value of a specific element in a matrix view. The element is identified by its row and column indices (0-based).
const vsip_dmview_p* v: Pointer to the matrix view.
vsip_index i: Row index of the element to set (0-based).
vsip_index j: Column index of the element to set (0-based).
vsip_dscalar_p vv: The value to assign to the matrix element.
vsip_mview_f *matrix; vsip_index i, j; // Create a matrix matrix = vsip_mcreate_f(5, 5, VSIP_ROW, VSIP_MEM_NONE); // Set specific elements vsip_mput_f(matrix, 0, 0, 1.0f); // Top-left corner vsip_mput_f(matrix, 2, 2, 5.0f); // Center element vsip_mput_f(matrix, 4, 4, 9.0f); // Bottom-right corner
The indices are 0-based (first row/column is index 0).
The function does not perform bounds checking and may cause a memory access error.
For submatrix views, the indices are relative to the submatrix, not the parent matrix.