![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
#include "arax_pipe.h"
Go to the source code of this file.
Functions | |
arax_vaccel_s * | arax_vaccel_init (arax_pipe_s *pipe, const char *name, arax_accel_type_e type, arax_accel_s *accel) |
void | arax_vaccel_add_task (arax_vaccel_s *accel, arax_task *task) |
void | arax_vaccel_set_ordering (arax_accel_s *accel, arax_accel_ordering_e ordering) |
arax_accel_ordering_e | arax_vaccel_get_ordering (arax_accel_s *accel) |
uint64_t | arax_vaccel_set_cid (arax_vaccel_s *vaccel, uint64_t cid) |
uint64_t | arax_vaccel_get_cid (arax_vaccel_s *vaccel) |
uint64_t | arax_vaccel_set_job_priority (arax_vaccel_s *vaccel, uint64_t priority) |
uint64_t | arax_vaccel_get_job_priority (arax_vaccel_s *vaccel) |
void | arax_vaccel_set_meta (arax_vaccel_s *vaccel, void *meta) |
void * | arax_vaccel_get_meta (arax_vaccel_s *vaccel) |
utils_queue_s * | arax_vaccel_queue (arax_vaccel_s *vaccel) |
unsigned int | arax_vaccel_queue_size (arax_vaccel_s *vaccel) |
arax_accel_state_e | arax_vaccel_get_stat (arax_vaccel_s *accel, arax_accel_stats_s *stat) |
ARAX_OBJ_DTOR_DECL (arax_vaccel_s) | |
ARAX_OBJ_DTOR_DECL | ( | arax_vaccel_s | ) |
Definition at line 113 of file arax_vaccel.c.
References arax_accel_del_vaccel(), arax_assert_obj, arax_pipe_remove_orphan_vaccel(), ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::phys.
void arax_vaccel_add_task | ( | arax_vaccel_s * | accel, |
arax_task * | task ) |
Definition at line 32 of file arax_vaccel.c.
References arax_accel_add_task(), arax_vaccel_s::lock, arax_vaccel_s::phys, arax_vaccel_s::queue, utils_queue_push(), utils_spinlock_lock, and utils_spinlock_unlock.
Referenced by arax_task_submit().
uint64_t arax_vaccel_get_cid | ( | arax_vaccel_s * | vaccel | ) |
Get the client id for this virtual accelerator.
Definition at line 64 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::cid.
uint64_t arax_vaccel_get_job_priority | ( | arax_vaccel_s * | vaccel | ) |
Get the priority (latency or throughput critical) for this virtual accelerator.
Definition at line 77 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::priority.
void * arax_vaccel_get_meta | ( | arax_vaccel_s * | vaccel | ) |
Set the meta for this virtual accelerator.
Definition at line 89 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::meta.
arax_accel_ordering_e arax_vaccel_get_ordering | ( | arax_accel_s * | accel | ) |
Get arax_accel_ordering_e mode of provided accel
.
vaccel | A virtual accelerator |
Definition at line 49 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::ordering.
arax_accel_state_e arax_vaccel_get_stat | ( | arax_vaccel_s * | accel, |
arax_accel_stats_s * | stat ) |
Definition at line 107 of file arax_vaccel.c.
References arax_accel_get_stat(), arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::phys.
Referenced by arax_accel_stat().
arax_vaccel_s * arax_vaccel_init | ( | arax_pipe_s * | pipe, |
const char * | name, | ||
arax_accel_type_e | type, | ||
arax_accel_s * | accel ) |
Initialize a arax_vaccel_s in mem
.
pipe | Valid arax_pipe_s instance. |
name | Name of the virtual accelerator |
type | Type of the virtual accelerator |
accel | A physical accelerator |
Definition at line 3 of file arax_vaccel.c.
References arax_accel_add_vaccel(), arax_object_register(), arax_pipe_add_orphan_vaccel(), ARAX_TYPE_VIRT_ACCEL, arax_vaccel_s::cid, arax_vaccel_s::lock, arax_vaccel_s::meta, arax_pipe::objs, arax_vaccel_s::ordering, arax_vaccel_s::phys, arax_vaccel_s::priority, arax_vaccel_s::queue, SEQUENTIAL, arax_vaccel_s::type, utils_list_node_init(), utils_queue_init(), utils_spinlock_init, and arax_vaccel_s::vaccels.
Referenced by arax_accel_acquire_phys(), arax_accel_acquire_type(), and arax_accel_init().
utils_queue_s * arax_vaccel_queue | ( | arax_vaccel_s * | vaccel | ) |
Get the queue of vaccel
.
vaccel | A virtual accelerator |
vaccel
,NULL on failure Definition at line 95 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::queue.
Referenced by arax_vaccel_queue_size().
unsigned int arax_vaccel_queue_size | ( | arax_vaccel_s * | vaccel | ) |
Requrn size of vaccel
.
vaccel | A virtual accelerator |
vaccel
. Definition at line 101 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, arax_vaccel_queue(), and utils_queue_used_slots().
Referenced by arax_accel_add_vaccel(), and arax_accel_del_vaccel().
uint64_t arax_vaccel_set_cid | ( | arax_vaccel_s * | vaccel, |
uint64_t | cid ) |
Set the client id for this virtual accelerator.
Definition at line 57 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::cid.
uint64_t arax_vaccel_set_job_priority | ( | arax_vaccel_s * | vaccel, |
uint64_t | priority ) |
Set the priority (latency or throughput critical) for this virtual accelerator.
Definition at line 70 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::priority.
void arax_vaccel_set_meta | ( | arax_vaccel_s * | vaccel, |
void * | meta ) |
Get the meta for this virtual accelerator.
Definition at line 83 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::meta.
void arax_vaccel_set_ordering | ( | arax_accel_s * | accel, |
arax_accel_ordering_e | ordering ) |
Set arax_accel_ordering_e mode to ordering
of provided accel
.
vaccel | A virtual accelerator |
Definition at line 41 of file arax_vaccel.c.
References arax_assert_obj, ARAX_TYPE_VIRT_ACCEL, and arax_vaccel_s::ordering.