![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
Go to the source code of this file.
Macros | |
#define | PRINT_THR(OBJ, DELTA, FUNC) |
Functions | |
void | arax_throttle_init (async_meta_s *meta, arax_throttle_s *thr, size_t a_sz, size_t t_sz) |
void ARAX_THROTTLE_DEBUG_FUNC | arax_throttle_size_inc (arax_throttle_s *thr, size_t sz ARAX_THROTTLE_DEBUG_PARAMS) |
void ARAX_THROTTLE_DEBUG_FUNC | arax_throttle_size_dec (arax_throttle_s *thr, size_t sz ARAX_THROTTLE_DEBUG_PARAMS) |
size_t | arax_throttle_get_available_size (arax_throttle_s *thr) |
size_t | arax_throttle_get_total_size (arax_throttle_s *thr) |
#define PRINT_THR | ( | OBJ, | |
DELTA, | |||
FUNC ) |
Definition at line 25 of file arax_throttle.c.
Referenced by arax_throttle_size_dec(), and arax_throttle_size_inc().
size_t arax_throttle_get_available_size | ( | arax_throttle_s * | thr | ) |
Gets available size
thr | arax_throttle_s instance |
Definition at line 108 of file arax_throttle.c.
References arax_assert, and arax_throttle_s::available.
Referenced by arax_accel_get_available_size(), and arax_pipe_get_available_size().
size_t arax_throttle_get_total_size | ( | arax_throttle_s * | thr | ) |
Gets available size
thr | arax_throttle_s instance |
Definition at line 115 of file arax_throttle.c.
References arax_assert, and arax_throttle_s::capacity.
Referenced by arax_accel_get_total_size(), and arax_pipe_get_total_size().
void arax_throttle_init | ( | async_meta_s * | meta, |
arax_throttle_s * | thr, | ||
size_t | a_sz, | ||
size_t | t_sz ) |
Increments available size by sz
meta | async meta for cond wait |
thr | arax_throttle_s instance to inc |
Definition at line 28 of file arax_throttle.c.
References arax_assert, async_condition_init(), arax_throttle_s::available, arax_throttle_s::capacity, arax_throttle_s::ready, and utils_spinlock_init.
Referenced by arax_accel_init(), and arax_pipe_init().
void ARAX_THROTTLE_DEBUG_FUNC arax_throttle_size_dec | ( | arax_throttle_s * | thr, |
size_t sz | ARAX_THROTTLE_DEBUG_PARAMS ) |
Decrements available size by sz
thr | arax_throttle_s instance to dec |
sz | size of removed data |
Definition at line 77 of file arax_throttle.c.
References arax_assert, ARAX_THROTTLE_DEBUG_PARAMS, arax_throttle_size_dec(), async_condition_lock(), async_condition_unlock(), async_condition_wait(), and PRINT_THR.
Referenced by arax_accel_size_dec(), arax_pipe_size_dec(), and arax_throttle_size_dec().
void ARAX_THROTTLE_DEBUG_FUNC arax_throttle_size_inc | ( | arax_throttle_s * | thr, |
size_t sz | ARAX_THROTTLE_DEBUG_PARAMS ) |
Increments available size by sz
thr | arax_throttle_s instance to inc |
sz | Size of added data |
Definition at line 49 of file arax_throttle.c.
References arax_assert, ARAX_THROTTLE_DEBUG_PARAMS, arax_throttle_size_inc(), async_condition_lock(), async_condition_notify(), async_condition_unlock(), and PRINT_THR.
Referenced by arax_accel_size_inc(), arax_pipe_size_inc(), and arax_throttle_size_inc().