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.21 vsip_dmputcolstride_p - Set Column Stride of a Matrix View

vsip_mview_f* vsip_mputcolstride_f(const vsip_mview_f *v, vsip_stride stride); 
vsip_cmview_f* vsip_cmputcolstride_f(const vsip_cmview_f *v, vsip_stride stride);
Description

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

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_mgetcolstride_f(matrix); 
printf("Original column stride: %ld\n", original_stride);  // Typically 1 
 
// Change to stride of 2 (every other element in rows) 
if (vsip_mputcolstride_f(matrix, 2) == NULL) { 
    // Handle error 
} 
printf("New column stride: %ld\n", vsip_mgetcolstride_f(matrix));  // Output: 2
Notes