Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

1.4.5 vsip_dmput_p - Set Matrix Element

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);
Description

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).

Parameters
Example

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
Notes