libsysve
3.1.0
|
VH call is a feature for VE programs to invoke functions on VH. More...
Functions | |
vhcall_handle | vhcall_install (const char *filename) |
Load a VH library. More... | |
int64_t | vhcall_find (vhcall_handle hdl, const char *symname) |
Find a symbol in VH library. More... | |
vhcall_args * | vhcall_args_alloc (void) |
Allocate VHCall arguments object (vhcall_args) More... | |
vhcall_args * | vhcall_args_alloc_num (int num) |
Allocate VHCall arguments object extended for Fortran API. More... | |
int | vhcall_args_set_i8 (vhcall_args *ca, int argnum, int8_t val) |
Set a 8-bit signed integer argument. More... | |
int | vhcall_args_set_u8 (vhcall_args *ca, int argnum, uint8_t val) |
Set a 8-bit unsigned integer argument. More... | |
int | vhcall_args_set_i16 (vhcall_args *ca, int argnum, int16_t val) |
Set a 16-bit signed integer argument. More... | |
int | vhcall_args_set_u16 (vhcall_args *ca, int argnum, uint16_t val) |
Set a 16-bit unsigned integer argument. More... | |
int | vhcall_args_set_i32 (vhcall_args *ca, int argnum, int32_t val) |
Set a 32-bit signed integer argument. More... | |
int | vhcall_args_set_u32 (vhcall_args *ca, int argnum, uint32_t val) |
Set a 32-bit unsigned integer argument. More... | |
int | vhcall_args_set_i64 (vhcall_args *ca, int argnum, int64_t val) |
Set a 64-bit signed integer argument. More... | |
int | vhcall_args_set_u64 (vhcall_args *ca, int argnum, uint64_t val) |
Set a 64-bit unsigned integer argument. More... | |
int | vhcall_args_set_float (vhcall_args *ca, int argnum, float val) |
Set a single precision floating point number argument. More... | |
int | vhcall_args_set_double (vhcall_args *ca, int argnum, double val) |
Set a double precision floating point number argument. More... | |
int | vhcall_args_set_complex_float (vhcall_args *ca, int argnum, _Complex float val) |
Set a single precision floating point complex object argument. More... | |
int | vhcall_args_set_complex_double (vhcall_args *ca, int argnum, _Complex double val) |
Set a double precision floating point complex object argument. More... | |
int | vhcall_args_set_pointer (vhcall_args *ca, enum vhcall_args_intent inout, int argnum, void *buff, size_t len) |
Set VH function argument of pointer type. More... | |
int | vhcall_args_set_veoshandle (vhcall_args *ca, int argnum) |
Set VH function argument of pointer to VEOS handle. More... | |
void | vhcall_args_clear (vhcall_args *ca) |
Clear arguments set in VHCall arguments object. More... | |
void | vhcall_args_free (vhcall_args *ca) |
Free VHCall arguments object. More... | |
int | vhcall_invoke_with_args (int64_t symid, vhcall_args *args, uint64_t *retval) |
Invoke a function in VH library with passing arguments. More... | |
long | vhcall_invoke (int64_t symid, const void *inptr, size_t insize, void *outptr, size_t outsize) |
Invoke a function in VH library. More... | |
int | vhcall_uninstall (vhcall_handle hdl) |
Unload a VH library. More... | |
VH call is a feature for VE programs to invoke functions on VH.
Please include "libvhcall.h".
vhcall_handle vhcall_install | ( | const char * | filename | ) |
Load a VH library.
[in] | filename | the file name to load on VH |
-1 | upon failure and the following errno is set:
|
int64_t vhcall_find | ( | vhcall_handle | hdl, |
const char * | symname | ||
) |
Find a symbol in VH library.
hdl | VH call handle of VH library | |
[in] | symname | the name of a function |
-1 | upon failure and the following errno is set:
|
vhcall_args* vhcall_args_alloc | ( | void | ) |
Allocate VHCall arguments object (vhcall_args)
NULL | the allocation of vhcall_args failed and following errno is set:
|
vhcall_args* vhcall_args_alloc_num | ( | int | num | ) |
Allocate VHCall arguments object extended for Fortran API.
[in] | num | the number of arguments. |
NULL | the allocation of vhcall_args failed and following errno is set:
|
int vhcall_args_set_i8 | ( | vhcall_args * | ca, |
int | argnum, | ||
int8_t | val | ||
) |
Set a 8-bit signed integer argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_u8 | ( | vhcall_args * | ca, |
int | argnum, | ||
uint8_t | val | ||
) |
Set a 8-bit unsigned integer argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_i16 | ( | vhcall_args * | ca, |
int | argnum, | ||
int16_t | val | ||
) |
Set a 16-bit signed integer argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_u16 | ( | vhcall_args * | ca, |
int | argnum, | ||
uint16_t | val | ||
) |
Set a 16-bit unsigned integer argument.
ca | vhcall_arg |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_i32 | ( | vhcall_args * | ca, |
int | argnum, | ||
int32_t | val | ||
) |
Set a 32-bit signed integer argument.
ca | vhcall_arg |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_u32 | ( | vhcall_args * | ca, |
int | argnum, | ||
uint32_t | val | ||
) |
Set a 32-bit unsigned integer argument.
ca | vhcall_arg |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_i64 | ( | vhcall_args * | ca, |
int | argnum, | ||
int64_t | val | ||
) |
Set a 64-bit signed integer argument.
ca | vhcall_arg |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_u64 | ( | vhcall_args * | ca, |
int | argnum, | ||
uint64_t | val | ||
) |
Set a 64-bit unsigned integer argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_float | ( | vhcall_args * | ca, |
int | argnum, | ||
float | val | ||
) |
Set a single precision floating point number argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_double | ( | vhcall_args * | ca, |
int | argnum, | ||
double | val | ||
) |
Set a double precision floating point number argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_complex_float | ( | vhcall_args * | ca, |
int | argnum, | ||
_Complex float | val | ||
) |
Set a single precision floating point complex object argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_complex_double | ( | vhcall_args * | ca, |
int | argnum, | ||
_Complex double | val | ||
) |
Set a double precision floating point complex object argument.
ca | vhcall_args |
argnum | the argnum-th argument (counting from 0) |
val | value to be set |
int vhcall_args_set_pointer | ( | vhcall_args * | ca, |
enum vhcall_args_intent | inout, | ||
int | argnum, | ||
void * | buff, | ||
size_t | len | ||
) |
Set VH function argument of pointer type.
ca | pointer to vhcall_args object | |
inout | intent of argument. VHCALL_INTENT_IN, VHCALL_INTENT_OUT, VHCALL_INTENT_INOUT are supported | |
argnum | the argnum-th argument (counting from 0) | |
[in,out] | buff | char pointer to be set as argument |
len | length of buffer that is specified as argument |
0 | argnum is successfully set |
-1 | an error occurred and following errno is set
|
Buffer is allocated on VH side and its pointer is given as actual argument of VH function. The VH buffer is copy-in/copy-out from/to buff depending on intent. Use this in following cases:
int vhcall_args_set_veoshandle | ( | vhcall_args * | ca, |
int | argnum | ||
) |
Set VH function argument of pointer to VEOS handle.
ca | pointer to vhcall_args object |
argnum | the argnum-th argument (counting from 0) |
0 | argumen is successfully set. |
-1 | an error occurred and following errno is set.
|
VEOS handle is used to send/receive data to/from VE in VHCall function.
void vhcall_args_clear | ( | vhcall_args * | ca | ) |
Clear arguments set in VHCall arguments object.
ca | vhcall_args object |
void vhcall_args_free | ( | vhcall_args * | ca | ) |
Free VHCall arguments object.
ca | vhcall_args object |
int vhcall_invoke_with_args | ( | int64_t | symid, |
vhcall_args * | args, | ||
uint64_t * | retval | ||
) |
Invoke a function in VH library with passing arguments.
symid | symbol id of VH function to call | |
args | arguments to be passed to the VH function | |
[out] | retval | pointer to buffer storing return value of VH library function |
long vhcall_invoke | ( | int64_t | symid, |
const void * | inptr, | ||
size_t | insize, | ||
void * | outptr, | ||
size_t | outsize | ||
) |
Invoke a function in VH library.
symid | symbol ID to invoke | |
[in] | inptr | input buffer |
insize | size of input buffer | |
[out] | outptr | output buffer |
outsize | size of output buffer |
-1 | and errno is set when the return value is between -4095 and -1. |
int vhcall_uninstall | ( | vhcall_handle | hdl | ) |
Unload a VH library.
hdl | VH call handle to close |
0 | on success. |
non-zero | value on error: the value returned from dlclose() on VH. |