Adelsbach/VSIPL
Core Light Programming Reference Guide
DD-00014-015
Core Light

6.3 vsip_dvsubview_p - Create a Subview of a Vector View

vsip_vview_f* vsip_vsubview_f(const vsip_vview_f* v, vsip_index j, vsip_length n); 
vsip_cvview_f* vsip_cvsubview_f(const vsip_cvview_f* v, vsip_index j, vsip_length n);
Description

This function creates a subview of an existing vector view v, starting from the index j and extending for n elements. The subview provides a view into a subset of the original vector view.

Parameters
Return Value
Error Handling

If an error occurs, the function returns NULL.

Example

vsip_vview_f *original_view; 
vsip_index start_index = 5; 
vsip_length subview_length = 10; 
vsip_vview_f *subview; 
 
// Assuming original_view has been properly initialized 
subview = vsip_vsubview_f(original_view, start_index, subview_length); 
 
if (subview == NULL) { 
    // Handle error 
} 
 
// The subview is now a view into a subset of the original vector view