Header file for offload.h.
More...
Go to the source code of this file.
|
void | offload_init_offload (offload_package *o, real **pack_array, int **int_array) |
| Initialize offload package.
|
|
void | offload_free_offload (offload_package *o, real **pack_array, int **int_array) |
| Free offload array and set offload_package to clean state.
|
|
void | offload_pack (offload_package *o, real **offload_array, real *pack_array, size_t pack_length, int **int_offload_array, int *int_pack_array, size_t int_pack_length) |
| Pack an offload array to package array.
|
|
void | offload_unpack (offload_package *o, real *pack_array, size_t pack_length, int *int_offload_array, size_t int_pack_length, real **ptr, int **intptr) |
| Unpack offload array from the package.
|
|
Header file for offload.h.
Definition in file offload.h.
◆ offload_init_offload()
void offload_init_offload |
( |
offload_package * | o, |
|
|
real ** | offload_array, |
|
|
int ** | int_offload_array ) |
Initialize offload package.
Sets offload_package.pack_array_length and offload_package.unpack_pos to zero and assigns NULL to offload_array pointer.
- Parameters
-
o | uninitialized offload package |
offload_array | pointer to packarray |
int_offload_array | pointer to int packarray |
Definition at line 31 of file offload.c.
◆ offload_free_offload()
void offload_free_offload |
( |
offload_package * | o, |
|
|
real ** | offload_array, |
|
|
int ** | int_offload_array ) |
Free offload array and set offload_package to clean state.
- Parameters
-
o | offload package |
offload_array | pointer to offload_array |
int_offload_array | pointer to int packarray |
Definition at line 49 of file offload.c.
◆ offload_pack()
void offload_pack |
( |
offload_package * | o, |
|
|
real ** | offload_array, |
|
|
real * | pack_array, |
|
|
size_t | pack_length, |
|
|
int ** | int_offload_array, |
|
|
int * | int_pack_array, |
|
|
size_t | int_pack_length ) |
Pack an offload array to package array.
Reallocates the offload array so that the new data from the package array can be appended. Once the data has been appended, the old offload array is freed. The new length of the offload array is stored to offload_package struct.
- Parameters
-
o | offload package |
offload_array | pointer to offload array where data will be packed |
pack_array | pack array containing the data to be appended |
pack_length | length of the offload_array |
int_offload_array | pointer to offload array where integer data will be packed |
int_pack_array | pack array containing the integer data to be appended |
int_pack_length | length of the int_offload_array |
Definition at line 78 of file offload.c.
◆ offload_unpack()
void offload_unpack |
( |
offload_package * | o, |
|
|
real * | offload_array, |
|
|
size_t | pack_length, |
|
|
int * | int_offload_array, |
|
|
size_t | int_pack_length, |
|
|
real ** | ptr, |
|
|
int ** | intptr ) |
Unpack offload array from the package.
The data is not actually moved anywhere. Unpacking means that pointers to the start of packed offload arrays are returned. Unpacking must be done in the same order as data was packed.
- Parameters
-
o | offload package |
offload_array | offload array |
pack_length | length of the data that is unpacked |
int_offload_array | int offload array |
int_pack_length | |
ptr | pointer where the unpacked data begins |
intptr | pointer where the unpacked int data begins |
Definition at line 137 of file offload.c.