![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
Functions | |
arax_task * | arax_task_issue (arax_accel *accel, arax_proc *proc, const void *host_init, size_t host_size, size_t in_count, arax_data **dev_in, size_t out_count, arax_data **dev_out) |
arax_task_state_e | arax_task_issue_sync (arax_accel *accel, arax_proc *proc, void *host_init, size_t host_size, size_t in_count, arax_data **dev_in, size_t out_count, arax_data **dev_out) |
arax_task_state_e | arax_task_stat (arax_task *task, arax_task_stats_s *stats) |
arax_task_state_e | arax_task_wait (arax_task *task) |
void | arax_task_free (arax_task *task) |
Functions usable from applications for manipulating Tasks.
void arax_task_free | ( | arax_task * | task | ) |
Decrease ref counter of task
task | The task to wait for. |
Definition at line 524 of file impl.c.
References arax_object_ref_dec(), and arax_task_msg::obj.
Referenced by arax_data_allocate_remote(), arax_data_get(), and arax_task_issue_sync().
arax_task * arax_task_issue | ( | arax_accel * | accel, |
arax_proc * | proc, | ||
const void * | host_init, | ||
size_t | host_size, | ||
size_t | in_count, | ||
arax_data ** | dev_in, | ||
size_t | out_count, | ||
arax_data ** | dev_out ) |
Issue a new arax_task.
This call must be followed by calls to arax_task_wait() and arax_task_free().
After arax_task_wait()
and before arax_task_free()
, arax_task_host_data()
can be called to read updated host values.
accel | The accelerator responsible for executing the task. |
proc | arax_proc to be dispatched on accelerator. |
host_init | Host accesible data initial values. May be null. Will not be modified. |
host_size | Size of host_init data. |
in_count | size of input array (elements). |
dev_in | array of arax_data pointers with input data. |
out_count | size of output array (elements). |
dev_out | array of arax_data pointers with output data. |
Definition at line 467 of file impl.c.
References arax_assert, arax_pipe_get, arax_task_alloc(), arax_task_host_data(), arax_task_submit(), check_semantics(), and vpipe.
Referenced by arax_data_allocate_remote(), arax_data_get(), arax_data_set(), ARAX_OBJ_DTOR_DECL(), and arax_task_issue_sync().
arax_task_state_e arax_task_issue_sync | ( | arax_accel * | accel, |
arax_proc * | proc, | ||
void * | host_init, | ||
size_t | host_size, | ||
size_t | in_count, | ||
arax_data ** | dev_in, | ||
size_t | out_count, | ||
arax_data ** | dev_out ) |
Helper function for issueing,waiting and freeing a task.
accel | The accelerator responsible for executing the task. |
proc | arax_proc to be dispatched on accelerator. |
host_init | Host accesible data initial values. May be null. Will not be modified. |
host_size | Size of host_init data. |
in_count | size of input array (elements). |
dev_in | array of arax_data pointers with input data. |
out_count | size of output array (elements). |
dev_out | array of arax_data pointers with output data. |
Definition at line 490 of file impl.c.
References arax_task_free(), arax_task_issue(), and arax_task_wait().
arax_task_state_e arax_task_stat | ( | arax_task * | task, |
arax_task_stats_s * | stats ) |
Get arax_task status and statistics. If stats is not NULL, copy task statistics to stats.
task | The arax_task of interest. |
stats | Pointer to an allocated arax_task_stats struct to be filled with statistics. |
Definition at line 502 of file impl.c.
References arax_task_msg::state, and arax_task_msg::stats.
arax_task_state_e arax_task_wait | ( | arax_task * | task | ) |
Wait for an issued task to complete or fail.
When provided task is successfully completed, user buffers are synchronized with up to date data from araxs internal buffers.
task | The task to wait for. |
Definition at line 515 of file impl.c.
References arax_task_wait_done(), and arax_task_msg::state.
Referenced by arax_data_allocate_remote(), arax_data_get(), and arax_task_issue_sync().