![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
Functions | |
int | arax_accel_list (arax_accel_type_e type, int physical, arax_accel ***accels) |
void | arax_accel_set_physical (arax_accel *vaccel, arax_accel *phys) |
void | arax_accel_list_free (arax_accel **accels) |
arax_accel_type_e | arax_accel_type (arax_accel *accel) |
arax_accel_state_e | arax_accel_stat (arax_accel *accel, arax_accel_stats_s *stat) |
int | arax_accel_acquire_phys (arax_accel **accel) |
arax_accel * | arax_accel_acquire_type (arax_accel_type_e type) |
void | arax_accel_release (arax_accel **accel) |
Functions usable from applications for manipulating Accelerators.
int arax_accel_acquire_phys | ( | arax_accel ** | accel | ) |
Acquire specific physical accelerator specified by accel for exclusive use.
accel | Accelerator to be acquired for exclusive use. |
Definition at line 335 of file impl.c.
References arax_pipe_get, ARAX_TYPE_PHYS_ACCEL, arax_vaccel_init(), arax_accel_s::obj, arax_accel_s::type, arax_object_s::type, and vpipe.
arax_accel * arax_accel_acquire_type | ( | arax_accel_type_e | type | ) |
Acquire a virtual accelerator of the given type
.
type | Accelerator type to be acquired. |
Definition at line 354 of file impl.c.
References arax_pipe_get, arax_vaccel_init(), and vpipe.
int arax_accel_list | ( | arax_accel_type_e | type, |
int | physical, | ||
arax_accel *** | accels ) |
Return number of accelerators of provided type If zero is returned no matching devices were found. If accels is not null an array with all matching accelerator descriptors is allocated and passed to the user. If *accels is not null, it will be freed by arax_accel_list_free
.
type | Count only accelerators of specified arax_accel_type_e |
physical | Boolean value (0,1), if true return physical accelerators, if false return virtual accelerators. |
accels | pointer to array with available matching accelerator descriptors. |
Definition at line 221 of file impl.c.
References arax_accel_list_free_pre_locked(), arax_object_list_lock(), arax_object_list_unlock(), arax_object_ref_inc(), arax_pipe_get, ARAX_TYPE_PHYS_ACCEL, ARAX_TYPE_VIRT_ACCEL, utils_list_s::length, arax_accel_s::obj, arax_vaccel_s::obj, utils_list_node::owner, arax_accel_s::type, arax_vaccel_s::type, utils_list_for_each, and vpipe.
void arax_accel_list_free | ( | arax_accel ** | accels | ) |
Free memory of accelerator array returned by arax_accel_list
accels | pointer acquired through a arax_accel_list call. |
Definition at line 283 of file impl.c.
References arax_object_ref_dec().
void arax_accel_release | ( | arax_accel ** | accel | ) |
Release previously acquired accelerator.
accel | A previously acquired accelerator to be released. |
Definition at line 366 of file impl.c.
References arax_assert, arax_object_ref_dec(), ARAX_TYPE_PHYS_ACCEL, ARAX_TYPE_VIRT_ACCEL, arax_vaccel_s::obj, and arax_object_s::type.
Referenced by ARAX_OBJ_DTOR_DECL().
void arax_accel_set_physical | ( | arax_accel * | vaccel, |
arax_accel * | phys ) |
Set physical accelator to arax_accel_s
vaccel | Virtual accelator to set physical accelerator |
phys | Physical accelerator to set on arax_accel_s |
Definition at line 209 of file impl.c.
References arax_accel_add_vaccel(), and arax_assert.
arax_accel_state_e arax_accel_stat | ( | arax_accel * | accel, |
arax_accel_stats_s * | stat ) |
Return statistics of accelerator specified by accel.
accel | A valid arax_accel descriptor returned by arax_accel_list(). |
stat | A pointer to a arax_accel_stats_s struct, to be filled with the accel statistics. |
Definition at line 314 of file impl.c.
References accel_failed, arax_accel_get_stat(), ARAX_TYPE_PHYS_ACCEL, ARAX_TYPE_VIRT_ACCEL, arax_vaccel_get_stat(), arax_accel_s::obj, and arax_object_s::type.
arax_accel_type_e arax_accel_type | ( | arax_accel * | accel | ) |
Return the type of accelerator specified by accel.
accel | A valid arax_accel descriptor returned by arax_accel_list(). |
Definition at line 305 of file impl.c.
References arax_accel_s::type.