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.23 vsip_dmputrowstride_p - Set Row Stride of a Matrix View

vsip_mview_f* vsip_mputrowstride_f(const vsip_mview_f *v, vsip_stride stride); 
vsip_cmview_f* vsip_cmputrowstride_f(const vsip_cmview_f *v, vsip_stride stride);
Description

This function modifies the row stride of an existing matrix view. The row stride determines how elements are laid out in memory along the rows of the matrix (how many elements to skip when moving from one row to the next within a column).

Parameters
Return Value
Example

vsip_mview_f *matrix; 
vsip_stride original_stride, new_stride; 
 
// Create a matrix 
matrix = vsip_mcreate_f(100, 100, VSIP_ROW, VSIP_MEM_NONE); 
original_stride = vsip_mgetrowstride_f(matrix); 
printf("Original row stride: %ld\n", original_stride);  // Typically 1 
 
// Change to stride of 2 (every other element in rows) 
if (vsip_mputrowstride_f(matrix, 2) == NULL) { 
    // Handle error 
} 
printf("New row stride: %ld\n", vsip_mgetcolstride_f(matrix));  // Output: 2
Notes