![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
Go to the source code of this file.
Data Structures | |
struct | arax_task_msg |
Typedefs | |
typedef struct arax_task_msg | arax_task_msg_s |
Functions | |
arax_task_msg_s * | arax_task_alloc (arax_pipe_s *vpipe, arax_accel *accel, arax_proc *proc, size_t host_size, int ins, arax_data **dev_in, int outs, arax_data **dev_out) |
void * | arax_task_host_data (arax_task_msg_s *task, size_t size) |
void | arax_task_submit (arax_task_msg_s *task) |
void | arax_task_wait_done (arax_task_msg_s *msg) |
void | arax_task_mark_done (arax_task_msg_s *msg, arax_task_state_e state) |
typedef struct arax_task_msg arax_task_msg_s |
Arax Task message.
arax_task_msg_s * arax_task_alloc | ( | arax_pipe_s * | vpipe, |
arax_accel * | accel, | ||
arax_proc * | proc, | ||
size_t | host_size, | ||
int | ins, | ||
arax_data ** | dev_in, | ||
int | outs, | ||
arax_data ** | dev_out ) |
Allocates a arax_task_msg_s
object.
vpipe | A valid arax_pipe_s instance. |
accel | arax_accel instance |
pric | arax_proc instance |
host_size | bytes to reserve for the tasks host_data. |
ins | number of inputs |
dev_in | array of arax_data pointers with input data. |
outs | number of outputs |
dev_out | array of arax_data pointers with output data. |
Definition at line 7 of file arax_task.c.
References arax_task_msg::accel, arax_assert, arax_data_annotate, arax_data_input_init(), arax_data_output_init(), arax_object_register(), ARAX_TYPE_TASK, async_completion_init(), arax_task_msg::done, arax_task_msg::host_size, arax_task_msg::in_count, arax_task_msg::io, arax_task_msg::out_count, arax_task_msg::pipe, arax_task_msg::proc, and vpipe.
Referenced by arax_task_issue().
void * arax_task_host_data | ( | arax_task_msg_s * | task, |
size_t | size ) |
Returns start of host data of task
.
task | A valid arax_task_msg_s |
size | Size of the host_data, this has to match the host_size given to arax_task_alloc()/ Pointer to host data if host_size > 0, null otherwise. |
Definition at line 51 of file arax_task.c.
References arax_assert, arax_assert_obj, ARAX_TYPE_TASK, arax_task_msg::host_size, arax_task_msg::in_count, and arax_task_msg::out_count.
Referenced by arax_data_get(), and arax_task_issue().
void arax_task_mark_done | ( | arax_task_msg_s * | msg, |
arax_task_state_e | state ) |
Definition at line 83 of file arax_task.c.
References async_completion_complete(), arax_task_msg::done, and arax_task_msg::state.
void arax_task_submit | ( | arax_task_msg_s * | task | ) |
Definition at line 64 of file arax_task.c.
References arax_task_msg::accel, arax_assert_obj, arax_object_ref_inc(), ARAX_TYPE_VIRT_ACCEL, arax_vaccel_add_task(), arax_task_msg::state, arax_task_msg::stats, arax_task_stats::task_duration, task_issued, and utils_timer_set.
Referenced by arax_task_issue().
void arax_task_wait_done | ( | arax_task_msg_s * | msg | ) |
Definition at line 77 of file arax_task.c.
References arax_assert, async_completion_wait(), arax_task_msg::done, arax_task_msg::state, task_completed, and task_issued.
Referenced by arax_task_wait().