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.1 vsip_dvcreate_p - Create a Vector View

typedef enum _vsip_memory_hint { 
  VSIP_MEM_NONE          = 0, 
  VSIP_MEM_RDONLY        = 1, 
  VSIP_MEM_CONST         = 2, 
  VSIP_MEM_SHARED        = 3, 
  VSIP_MEM_SHARED_RDONLY = 4, 
  VSIP_MEM_SHARED_CONST  = 5 
} vsip_memory_hint; 
 
vsip_vview_f*  vsip_vcreate_f(vsip_length n, vsip_memory_hint h); 
vsip_vview_bl*  vsip_vcreate_bl(vsip_length n, vsip_memory_hint h); 
vsip_vview_vi*  vsip_vcreate_vi(vsip_length n, vsip_memory_hint h); 
vsip_vview_mi*  vsip_vcreate_mi(vsip_length n, vsip_memory_hint h); 
vsip_cvview_f* vsip_cvcreate_f(vsip_length n, vsip_memory_hint h);
Description

This function creates a vector view of the specified length n with a given memory hint h. The memory hint describes how the data is intended to be used, such as read-only, constant, or shared memory.

Parameters
Return Value
Error Handling

If an error occurs, the function returns NULL.

Example

vsip_length length = 10; 
vsip_memory_hint hint = VSIP_MEM_NONE; 
vsip_vview_f *vector_view; 
 
// Create a vector view 
vector_view = vsip_vcreate_f(length, hint); 
 
if (vector_view == NULL) { 
    // Handle error 
}