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

6.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_d*  vsip_vcreate_d(vsip_length n, vsip_memory_hint h); 
vsip_cvview_f* vsip_cvcreate_f(vsip_length n, vsip_memory_hint h); 
vsip_cvview_d* vsip_cvcreate_d(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 
}