Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

1.3.6 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_vview_bl* vsip_vsubview_bl(const vsip_vview_bl* v, vsip_index j, vsip_length n); 
vsip_vview_vi* vsip_vsubview_vi(const vsip_vview_vi* v, vsip_index j, vsip_length n); 
vsip_vview_mi* vsip_vsubview_mi(const vsip_vview_mi* 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