vsip_vview_f* vsip_vbind_f(const vsip_block_f* b, vsip_offset o, vsip_stride s, vsip_length n); vsip_vview_i* vsip_vbind_i(const vsip_block_i* b, vsip_offset o, vsip_stride s, vsip_length n); vsip_vview_i* vsip_cvbind_f(const vsip_cblock_f* b, vsip_offset o, vsip_stride s, vsip_length n);
This function binds a vector view to an existing data block b with a specified offset o, stride s, and length n. The vector view provides a view into the data block starting from the offset and stepping by the stride for the specified length.
const vsip_dblock_p* b: Pointer to the data block to which the vector view will be bound.
vsip_offset o: Offset within the data block where the vector view starts.
vsip_stride s: Stride between elements in the vector view.
vsip_length n: The number of elements in the vector view.
On success, a pointer to the newly created vector view object is returned.
On error, NULL is returned.
If an error occurs, the function returns NULL.
vsip_block_f *data_block; vsip_offset offset = 0; vsip_stride stride = 1; vsip_length length = 10; vsip_vview_f *vector_view; // Assuming data_block has been properly initialized vector_view = vsip_vbind_f(data_block, offset, stride, length); if (vector_view == NULL) { // Handle error } // The vector view is now bound to the data block