vsip_mview_f* vsip_mputcollength_f(const vsip_mview_f *v, vsip_length len); vsip_cmview_f* vsip_cmputcollength_f(const vsip_cmview_f *v, vsip_length len);
This function modifies the number of columns in an existing matrix view. It allows you to change the width of the matrix view while keeping all other attributes (row count, block, offset, and strides) the same.
const vsip_dmview_p* v: Pointer to the matrix view to be modified.
vsip_length len: The new number of columns for the matrix view.
Returns a pointer to the modified matrix view.
The new column length must be compatible with the matrix’s block and strides:
The product of (new column length - 1) and column stride must not exceed the block size minus the offset
Changing the column length affects how many elements are accessible in each row of the matrix view.
For row-major matrices, this operation is generally safe as long as the new length doesn’t exceed the block boundaries.
For column-major matrices or matrices with non-unit column strides, be cautious as changing the column length might make the view invalid if it extends beyond the block boundaries.