Alternative VE Offloading
3.0.2
|
VE Offloading API functions. More...
Functions | |
int | veo_api_version () |
return the API version of the VE Offload implementation More... | |
const char * | veo_version_string () |
VEO version. More... | |
veo_proc_handle * | veo_proc_create_static (int venode, char *tmp_veobin) |
create a VE process with non-default veorun binary More... | |
veo_proc_handle * | veo_proc_create (int venode) |
create a VE process More... | |
int | veo_proc_destroy (veo_proc_handle *proc) |
destroy a VE process More... | |
int | veo_proc_identifier (veo_proc_handle *proc) |
find a veo_proc_handle's identifier More... | |
uint64_t | veo_load_library (veo_proc_handle *proc, const char *libname) |
load a VE library More... | |
int | veo_unload_library (veo_proc_handle *proc, const uint64_t libhandle) |
unload a VE library More... | |
uint64_t | veo_get_sym (veo_proc_handle *proc, uint64_t libhdl, const char *symname) |
find a symbol in VE program More... | |
int | veo_alloc_mem (veo_proc_handle *h, uint64_t *addr, const size_t size) |
Allocate a VE memory buffer. More... | |
int | veo_alloc_hmem (veo_proc_handle *h, void **addr, const size_t size) |
Allocate a VE memory buffer or a VH memory buffer which users can use them as heterogeneous memory. More... | |
int | veo_free_mem (veo_proc_handle *h, uint64_t addr) |
Free a VE memory buffer. More... | |
int | veo_free_hmem (void *addr) |
Free a VE memory buffer. More... | |
int | veo_read_mem (veo_proc_handle *h, void *dst, uint64_t src, size_t size) |
Read VE memory. More... | |
int | veo_write_mem (veo_proc_handle *h, uint64_t dst, const void *src, size_t size) |
Write VE memory. More... | |
int | veo_hmemcpy (void *dst, const void *src, size_t size) |
Copy VE/VH memory. More... | |
int | veo_num_contexts (veo_proc_handle *h) |
Return number of open contexts in a proc. More... | |
veo_thr_ctxt * | veo_get_context (veo_proc_handle *proc, int idx) |
Return a pointer of VEO thread context in a proc. More... | |
veo_thr_ctxt * | veo_context_open (veo_proc_handle *proc) |
open a VEO context More... | |
veo_thr_ctxt * | veo_context_open_with_attr (veo_proc_handle *proc, veo_thr_ctxt_attr *tca) |
open a VEO context with attributes. More... | |
int | veo_context_close (veo_thr_ctxt *ctx) |
close a VEO context More... | |
void | veo_context_sync (veo_thr_ctxt *ctx) |
synchronize a VEO context More... | |
int | veo_get_context_state (veo_thr_ctxt *ctx) |
get VEO context state More... | |
veo_args * | veo_args_alloc (void) |
allocate VEO arguments object (veo_args) More... | |
int | veo_args_set_i64 (veo_args *ca, int argnum, int64_t val) |
set a 64-bit integer argument More... | |
int | veo_args_set_u64 (veo_args *ca, int argnum, uint64_t val) |
set a 64-bit uunsigned integer argument More... | |
int | veo_args_set_i32 (veo_args *ca, int argnum, int32_t val) |
set a 32-bit integer argument More... | |
int | veo_args_set_u32 (veo_args *ca, int argnum, uint32_t val) |
set a 32-bit unsigned integer argument More... | |
int | veo_args_set_i16 (veo_args *ca, int argnum, int16_t val) |
set a 16-bit integer argument More... | |
int | veo_args_set_u16 (veo_args *ca, int argnum, uint16_t val) |
set a 16-bit unsigned integer argument More... | |
int | veo_args_set_i8 (veo_args *ca, int argnum, int8_t val) |
set a 8-bit integer argument More... | |
int | veo_args_set_u8 (veo_args *ca, int argnum, uint8_t val) |
set a 8-bit unsigned integer argument More... | |
int | veo_args_set_double (veo_args *ca, int argnum, double val) |
set a double precision floating point number argument More... | |
int | veo_args_set_float (veo_args *ca, int argnum, float val) |
set a single precision floating point number argument More... | |
int | veo_args_set_stack (veo_args *ca, enum veo_args_intent inout, int argnum, char *buff, size_t len) |
set VEO function calling argument pointing to buffer on stack More... | |
int | veo_args_set_hmem (struct veo_args *ca, int argnum, void *val) |
set a heteroginious memory argument More... | |
void | veo_args_clear (veo_args *ca) |
clear arguments set in VEO arguments object More... | |
void | veo_args_free (veo_args *ca) |
free VEO arguments object More... | |
int | veo_call_sync (veo_proc_handle *h, uint64_t addr, veo_args *ca, uint64_t *result) |
Call VE function synchronously on a proc. More... | |
uint64_t | veo_call_async (veo_thr_ctxt *ctx, uint64_t addr, veo_args *args) |
request a VE thread to call a function More... | |
int | veo_call_peek_result (veo_thr_ctxt *ctx, uint64_t reqid, uint64_t *retp) |
pick up a resutl from VE function if it has finished More... | |
int | veo_call_wait_result (veo_thr_ctxt *ctx, uint64_t reqid, uint64_t *retp) |
pick up a resutl from VE function More... | |
uint64_t | veo_alloc_mem_async (veo_thr_ctxt *ctx, const size_t size) |
Allocate a VE memory buffer asynchronously. More... | |
uint64_t | veo_free_mem_async (veo_thr_ctxt *ctx, uint64_t addr) |
Free a VE memory buffer asynchronously. More... | |
uint64_t | veo_async_read_mem (veo_thr_ctxt *ctx, void *dst, uint64_t src, size_t size) |
Asynchronously read VE memory. More... | |
uint64_t | veo_async_write_mem (veo_thr_ctxt *ctx, uint64_t dst, const void *src, size_t size) |
Asynchronously write VE memory. More... | |
uint64_t | veo_call_async_by_name (veo_thr_ctxt *ctx, uint64_t libhdl, const char *symname, veo_args *args) |
request a VE thread to call a function More... | |
uint64_t | veo_call_async_vh (veo_thr_ctxt *ctx, uint64_t(*func)(void *), void *arg) |
call a VH function asynchronously More... | |
veo_thr_ctxt_attr * | veo_alloc_thr_ctxt_attr (void) |
allocate and initialize VEO thread context attributes object (veo_thr_ctxt_attr). More... | |
int | veo_free_thr_ctxt_attr (veo_thr_ctxt_attr *tca) |
free VEO thread context attributes object. More... | |
int | veo_set_thr_ctxt_stacksize (veo_thr_ctxt_attr *tca, size_t stack_sz) |
set stack size of VE thread which executes a VE function. More... | |
int | veo_get_thr_ctxt_stacksize (veo_thr_ctxt_attr *tca, size_t *stack_sz) |
get stack size of VE thread which executes a VE function. More... | |
VE Offloading API functions.
To use VEO API functions, include "ve_offload.h" header.
int veo_api_version | ( | ) |
return the API version of the VE Offload implementation
integer | value with API version |
const char* veo_version_string | ( | ) |
VEO version.
veo_proc_handle* veo_proc_create_static | ( | int | venode, |
char * | tmp_veobin | ||
) |
create a VE process with non-default veorun binary
A VE process is created on the VE node specified by venode. If venode is -1, a VE process is created on the VE node specified by environment variable VE_NODE_NUMBER. If venode is -1 and environment variable VE_NODE_NUMBER is not set, a VE process is created on the VE node #0
A user executes the program which invokes this function through the job scheduler, the value specified by venode will be treated as a logical VE node number. It will be translated into physical VE node number assigned by the job scheduler. If venode is -1, the first VE node of the VE nodes assigned by the job scheduler is used.
VE supports normal mode and NUMA mode (Partitioning mode). Under NUMA mode, if a user specifies the same VE node to this function and creates multiple VE processes, the processes will be created alternately on NUMA nodes.
A user can control VE program execution using environment variables such as VE_LD_LIBRARY_PATH ,VE_OMP_NUM_THREADS and VE_NUMA_OPT. These environmet variables are also available when a user calls this function.
[in] | venode | VE node number |
[in] | tmp_veobin | VE alternative veorun binary path |
NULL | VE process creation failed. |
veo_proc_handle* veo_proc_create | ( | int | venode | ) |
create a VE process
A VE process is created on the VE node specified by venode. If venode is -1, a VE process is created on the VE node specified by environment variable VE_NODE_NUMBER. If venode is -1 and environment variable VE_NODE_NUMBER is not set, a VE process is created on the VE node #0
A user executes the program which invokes this function through the job scheduler, the value specified by venode will be treated as a logical VE node number. It will be translated into physical VE node number assigned by the job scheduler. If venode is -1, the first VE node of the VE nodes assigned by the job scheduler is used.
VE supports normal mode and NUMA mode (Partitioning mode). Under NUMA mode, if a user specifies the same VE node to this function and creates multiple VE processes, the processes will be created alternately on NUMA nodes.
A user can control VE program execution using environment variables such as VE_LD_LIBRARY_PATH ,VE_OMP_NUM_THREADS and VE_NUMA_OPT. These environmet variables are also available when a user calls this function.
[in] | venode | VE node number |
NULL | VE process creation failed. |
int veo_proc_destroy | ( | veo_proc_handle * | proc | ) |
destroy a VE process
[in] | proc | pointer to VEO process handle |
0 | VEO process handle is successfully destroyed. |
-1 | VEO process handle destruction failed. |
int veo_proc_identifier | ( | veo_proc_handle * | proc | ) |
find a veo_proc_handle's identifier
[in] | proc | pointer to VEO process handle |
>= | 0 VEO process identifier, i.e. index in the proc list |
-1 | VEO process not found in list |
uint64_t veo_load_library | ( | veo_proc_handle * | proc, |
const char * | libname | ||
) |
load a VE library
[in] | proc | VEO process handle |
[in] | libname | a library file name to load |
0 | library loading request failed. |
int veo_unload_library | ( | veo_proc_handle * | proc, |
const uint64_t | libhandle | ||
) |
unload a VE library
[in] | proc | VEO process handle |
[in] | libhandle | a library handle |
0 | if request succeeded |
uint64_t veo_get_sym | ( | veo_proc_handle * | proc, |
uint64_t | libhdl, | ||
const char * | symname | ||
) |
find a symbol in VE program
[in] | proc | VEO process handle |
[in] | libhdl | a library handle |
[in] | symname | symbol name to find |
0 | failed to find symbol. |
int veo_alloc_mem | ( | veo_proc_handle * | h, |
uint64_t * | addr, | ||
const size_t | size | ||
) |
Allocate a VE memory buffer.
[in] | h | VEO process handle |
[out] | addr | VEMVA address |
[in] | size | size in bytes |
0 | memory allocation succeeded. |
-1 | memory allocation failed. |
-2 | internal error. |
int veo_alloc_hmem | ( | veo_proc_handle * | h, |
void ** | addr, | ||
const size_t | size | ||
) |
Allocate a VE memory buffer or a VH memory buffer which users can use them as heterogeneous memory.
This function allocates a VE memory buffer if h is a valid handle. This function allocates a VH memory buffer if h is NULL. This function returns the address with the process identifier. Since the number of processes that can be identified by the process identifier is 16, this function will fail if the user attempts to identify more than 16 processes. The memory allocated using this function must be transferred to the VE side with veo_args_set_hmem(), and freed with veo_free_hmem(). The data transfer of this memory between VH and VE, same VE, or different VE processes must be done by veo_hmemcpy(). veo_hmemcpy() allows user to transfer data from VH to VE, from VE to VH, from VH to VH, or VE to VE(same node). The transfer direction is determined from the identifier of the virtual address of the argument passed to veo_hmemcpy(). Users can check with veo_is_ve_addr() that the target address is flagged with the VE process identifier or not. Users need to remove the process identifier using veo_get_hmem_addr() before using the allocated memory.
[in] | h | VEO process handle |
[out] | addr | a pointer to VEMVA address with the identifier |
[in] | size | size in bytes |
0 | memory allocation succeeded. |
-1 | memory allocation or proc identifier acquisition failed. |
-2 | internal error. |
int veo_free_mem | ( | veo_proc_handle * | h, |
uint64_t | addr | ||
) |
Free a VE memory buffer.
[in] | h | VEO process handle |
[in] | addr | VEMVA address |
0 | memory is successfully freed. |
-1 | internal error. |
int veo_free_hmem | ( | void * | addr | ) |
Free a VE memory buffer.
This function free the memory allocated by veo_alloc_hmem().
[in] | addr | a pointer to VEMVA address |
0 | memory is successfully freed. |
-1 | internal error. |
int veo_read_mem | ( | veo_proc_handle * | h, |
void * | dst, | ||
uint64_t | src, | ||
size_t | size | ||
) |
Read VE memory.
[in] | h | VEO process handle |
[out] | dst | destination VHVA |
[in] | src | source VEMVA |
[in] | size | size in byte |
int veo_write_mem | ( | veo_proc_handle * | h, |
uint64_t | dst, | ||
const void * | src, | ||
size_t | size | ||
) |
Write VE memory.
[in] | h | VEO process handle |
[out] | dst | destination VEMVA |
[in] | src | source VHVA |
[in] | size | size in byte |
int veo_hmemcpy | ( | void * | dst, |
const void * | src, | ||
size_t | size | ||
) |
Copy VE/VH memory.
This function copies memory. When only the destination is the VE memory allocated by veo_alloc_hmem(), the data is transferred from VH to VE. When only the source is the VE memory allocated by veo_alloc_hmem(), the data is transferred from VE to VH. When both the source and the destination are VH memory, they are copied on VH. When both the source and the destination are VE memory allocated by veo_alloc_hmem(), they are copied on VE. In this case, both the source and the destination need to be VE memory allocated to the same process. When the source is VE memory attached by veo_shared_mem_attach() with VE_REGISTER_VEMVA and the destination is VE memory allocated by veo_alloc_hmem() to the same VE process, the data is transferred from the attached VE memory to the allocated VE memory. When the source is VE memory allocated by veo_alloc_hmem() and the destination is VE memory attached by veo_shared_mem_attach() with VE_REGISTER_VEMVA to the same VE process, the data is transferred from the allocated VE memory to the attached VE memory.
[out] | dst | a pointer to destination |
[in] | src | a pointer to source |
[in] | size | size in byte |
int veo_num_contexts | ( | veo_proc_handle * | h | ) |
Return number of open contexts in a proc.
[in] | h | VEO process handle |
veo_thr_ctxt* veo_get_context | ( | veo_proc_handle * | proc, |
int | idx | ||
) |
Return a pointer of VEO thread context in a proc.
The argument idx takes an integer value zero or more and less than the result of veo_num_contexts(). The context with idx=0 is the main context of the ProcHandle. It will not be destroyed when closed, instead it is destroyed when the proc is killed by veo_proc_destroy(), or when the program ends. veo_get_context() returns NULL if a user specifies idx with a value which is the result of veo_num_contexts() or more.
[in] | proc | VEO process handle |
[in] | idx | a index which takes an integer value zero or more and less than the result of veo_num_contexts() |
veo_thr_ctxt* veo_context_open | ( | veo_proc_handle * | proc | ) |
open a VEO context
Create a new VEO context, a pseudo thread and VE thread for the context. All attributes which veo_context_open_with_attr() can specify have default value.
[in] | proc | VEO process handle |
NULL | failed to create a VEO context. |
veo_thr_ctxt* veo_context_open_with_attr | ( | veo_proc_handle * | proc, |
veo_thr_ctxt_attr * | tca | ||
) |
open a VEO context with attributes.
Create a new VEO context, a pseudo thread and VE thread for the context.
[in] | proc | VEO process handle |
[in] | tca | veo_thr_ctxt_attr object |
NULL | failed to create a VEO context. |
int veo_context_close | ( | veo_thr_ctxt * | ctx | ) |
close a VEO context
[in] | ctx | a VEO context to close |
0 | VEO context is successfully closed. |
non-zero | failed to close VEO context. |
void veo_context_sync | ( | veo_thr_ctxt * | ctx | ) |
synchronize a VEO context
While the submission lock is held, wait until all commands have been processed in this context.
[in] | ctx | the VEO context to synchronize |
int veo_get_context_state | ( | veo_thr_ctxt * | ctx | ) |
get VEO context state
[in] | ctx | VEO context |
VEO_STATE_RUNNING | VEO context is running. |
VEO_STATE_EXIT | VEO context exited. |
veo_args* veo_args_alloc | ( | void | ) |
allocate VEO arguments object (veo_args)
NULL | the allocation of veo_args failed. |
int veo_args_set_i64 | ( | veo_args * | ca, |
int | argnum, | ||
int64_t | val | ||
) |
set a 64-bit integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_u64 | ( | veo_args * | ca, |
int | argnum, | ||
uint64_t | val | ||
) |
set a 64-bit uunsigned integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_i32 | ( | veo_args * | ca, |
int | argnum, | ||
int32_t | val | ||
) |
set a 32-bit integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_u32 | ( | veo_args * | ca, |
int | argnum, | ||
uint32_t | val | ||
) |
set a 32-bit unsigned integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_i16 | ( | veo_args * | ca, |
int | argnum, | ||
int16_t | val | ||
) |
set a 16-bit integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_u16 | ( | veo_args * | ca, |
int | argnum, | ||
uint16_t | val | ||
) |
set a 16-bit unsigned integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_i8 | ( | veo_args * | ca, |
int | argnum, | ||
int8_t | val | ||
) |
set a 8-bit integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_u8 | ( | veo_args * | ca, |
int | argnum, | ||
uint8_t | val | ||
) |
set a 8-bit unsigned integer argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_double | ( | veo_args * | ca, |
int | argnum, | ||
double | val | ||
) |
set a double precision floating point number argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_float | ( | veo_args * | ca, |
int | argnum, | ||
float | val | ||
) |
set a single precision floating point number argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | value to be set |
int veo_args_set_stack | ( | veo_args * | ca, |
enum veo_args_intent | inout, | ||
int | argnum, | ||
char * | buff, | ||
size_t | len | ||
) |
set VEO function calling argument pointing to buffer on stack
[in,out] | ca | pointer to veo_args object |
[in] | inout | intent of argument. VEO_INTENT_IN, VEO_INTENT_OUT, VEO_INTENT_INOUT are supported |
[in] | argnum | argument number that is being set |
[in] | buff | char pointer to buffer that will be copied to the VE stack |
[in] | len | length of buffer that is copied to the VE stack |
0 | argumen is successfully set. |
-1 | an error occurred. |
The buffer is copied to the stack and will look to the VE callee like a local variable of the caller function. Use this to pass structures to the VE "kernel" function. The size of arguments passed on the stack is limited to 63MB, since the size of the initial stack is 64MB. Allocate and use memory buffers on heap when you have huge argument arrays to pass.
int veo_args_set_hmem | ( | struct veo_args * | ca, |
int | argnum, | ||
void * | val | ||
) |
set a heteroginious memory argument
[in,out] | ca | veo_args |
[in] | argnum | the argnum-th argument |
[in] | val | a pointer to value to be set |
void veo_args_clear | ( | veo_args * | ca | ) |
clear arguments set in VEO arguments object
[in,out] | ca | veo_args object |
void veo_args_free | ( | veo_args * | ca | ) |
free VEO arguments object
[in] | ca | veo_args object |
int veo_call_sync | ( | veo_proc_handle * | h, |
uint64_t | addr, | ||
veo_args * | ca, | ||
uint64_t * | result | ||
) |
Call VE function synchronously on a proc.
[in] | h | VEO process handle |
[in] | addr | VEMVA address of VE function |
[in] | ca | call args |
[out] | result | pointer to result variable |
uint64_t veo_call_async | ( | veo_thr_ctxt * | ctx, |
uint64_t | addr, | ||
veo_args * | args | ||
) |
request a VE thread to call a function
[in] | ctx | VEO context to execute the function on VE. |
[in] | addr | VEMVA of the function to call |
[in] | args | arguments to be passed to the function |
VEO_REQUEST_ID_INVALID | request failed. |
int veo_call_peek_result | ( | veo_thr_ctxt * | ctx, |
uint64_t | reqid, | ||
uint64_t * | retp | ||
) |
pick up a resutl from VE function if it has finished
[in] | ctx | VEO context |
[in] | reqid | request ID |
[out] | retp | pointer to buffer to store the return value from the function. |
VEO_COMMAND_OK | function is successfully returned. |
VEO_COMMAND_EXCEPTION | an exception occurred on function. |
VEO_COMMAND_ERROR | an error occurred on function. |
VEO_COMMAND_UNFINISHED | function is not finished. |
-1 | internal error. |
int veo_call_wait_result | ( | veo_thr_ctxt * | ctx, |
uint64_t | reqid, | ||
uint64_t * | retp | ||
) |
pick up a resutl from VE function
[in] | ctx | VEO context |
[in] | reqid | request ID |
[out] | retp | pointer to buffer to store the return value from the function. |
VEO_COMMAND_OK | function is successfully returned. |
VEO_COMMAND_EXCEPTION | an exception occurred on execution. |
VEO_COMMAND_ERROR | an error occurred on execution. |
VEO_COMMAND_UNFINISHED | function is not finished. |
-1 | internal error. |
uint64_t veo_alloc_mem_async | ( | veo_thr_ctxt * | ctx, |
const size_t | size | ||
) |
Allocate a VE memory buffer asynchronously.
The buffer allocation is queued as a urpc alloc request which returns a request ID. This can be queried to retrieve the allocated address as result of the request.
[in] | ctx | VEO thread context |
[in] | size | size in bytes |
VEO_REQUEST_ID_INVALID | request failed. |
uint64_t veo_free_mem_async | ( | veo_thr_ctxt * | ctx, |
uint64_t | addr | ||
) |
Free a VE memory buffer asynchronously.
The buffer de-allocation is queued as a urpc request which returns a request ID. This can be queried to retrieve the allocated address as result of the request.
[in] | ctx | VEO thread context |
[in] | addr | VEMVA address |
VEO_REQUEST_ID_INVALID | request failed. |
uint64_t veo_async_read_mem | ( | veo_thr_ctxt * | ctx, |
void * | dst, | ||
uint64_t | src, | ||
size_t | size | ||
) |
Asynchronously read VE memory.
[in] | ctx | VEO context |
[out] | dst | destination VHVA |
[in] | src | source VEMVA |
[in] | size | size in byte |
VEO_REQUEST_ID_INVALID | request failed. |
uint64_t veo_async_write_mem | ( | veo_thr_ctxt * | ctx, |
uint64_t | dst, | ||
const void * | src, | ||
size_t | size | ||
) |
Asynchronously write VE memory.
[in] | ctx | VEO context |
[out] | dst | destination VEMVA |
[in] | src | source VHVA |
[in] | size | size in byte |
VEO_REQUEST_ID_INVALID | request failed. |
uint64_t veo_call_async_by_name | ( | veo_thr_ctxt * | ctx, |
uint64_t | libhdl, | ||
const char * | symname, | ||
veo_args * | args | ||
) |
request a VE thread to call a function
[in] | ctx | VEO context to execute the function on VE. |
[in] | libhdl | a library handle |
[in] | symname | symbol name to find |
[in] | args | arguments to be passed to the function |
VEO_REQUEST_ID_INVALID | request failed. |
uint64_t veo_call_async_vh | ( | veo_thr_ctxt * | ctx, |
uint64_t(*)(void *) | func, | ||
void * | arg | ||
) |
call a VH function asynchronously
[in] | ctx | VEO context in which to execute the function. |
[in] | func | address of VH function to call |
[in] | arg | pointer to arguments structure for the function |
VEO_REQUEST_ID_INVALID | if request failed. |
veo_thr_ctxt_attr* veo_alloc_thr_ctxt_attr | ( | void | ) |
allocate and initialize VEO thread context attributes object (veo_thr_ctxt_attr).
NULL | the allocation of veo_thr_ctxt_attr failed. |
int veo_free_thr_ctxt_attr | ( | veo_thr_ctxt_attr * | tca | ) |
free VEO thread context attributes object.
[in] | tca | veo_thr_ctxt_attr object |
0 | VEO thread context attributes are successfully freed. |
-1 | VEO thread context attributes de-allocation failed. |
int veo_set_thr_ctxt_stacksize | ( | veo_thr_ctxt_attr * | tca, |
size_t | stack_sz | ||
) |
set stack size of VE thread which executes a VE function.
[in] | tca | veo_thr_ctxt_attr object |
[in] | stack_sz | stack size of VE thread |
int veo_get_thr_ctxt_stacksize | ( | veo_thr_ctxt_attr * | tca, |
size_t * | stack_sz | ||
) |
get stack size of VE thread which executes a VE function.
[in] | tca | veo_thr_ctxt_attr object |
[out] | stack_sz | pointer to store stack size of VE thread. |