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