Adelsbach/VSIPL
Core Light Double Precision Programming Reference Guide
DD-00014-015
Core Light +DP

6.2 vsip_dvbind_p - Bind a Vector View to a Data Block

vsip_vview_f* vsip_vbind_f(const vsip_block_f* b, vsip_offset o, vsip_stride s, vsip_length n); 
vsip_vview_d* vsip_vbind_d(const vsip_block_d* 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_cvview_f* vsip_cvbind_f(const vsip_cblock_f* b, vsip_offset o, vsip_stride s, vsip_length n); 
vsip_cvview_d* vsip_cvbind_d(const vsip_cblock_d* b, vsip_offset o, vsip_stride s, vsip_length n);
Description

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.

Parameters
Return Value
Error Handling

If an error occurs, the function returns NULL.

Example

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