vsip_stride vsip_mgetcolstride_f(const vsip_mview_f *v); vsip_stride vsip_cmgetcolstride_f(const vsip_cmview_f *v);
This function returns the column stride of a matrix view, which represents the number of elements to skip in memory when moving from one column to the next within a row.
const vsip_dmview_p* v: Pointer to the matrix view.
Returns the column stride as a vsip_stride value.
vsip_mview_f *matrix; vsip_stride col_stride; // Create a standard row-major matrix matrix = vsip_mcreate_f(100, 100, VSIP_ROW, VSIP_MEM_NONE); col_stride = vsip_mgetcolstride_f(matrix); printf("Standard matrix column stride: %ld\n", col_stride); // Typically 1
For row-major matrices, the column stride is typically 1 (contiguous elements along rows).
For column-major matrices, the column stride equals the number of rows.
For transposed views, the column stride of the transposed view equals the row stride of the original matrix.