ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
12 #define SCHED_CONFIG_HTABLE_SIZE 8
121 ABTI_UB_ASSERT(ABTI_initialized());
124 ABTI_sched_config *p_config;
126 abt_errno =
ABTU_calloc(1,
sizeof(ABTI_sched_config), (
void **)&p_config);
127 ABTI_CHECK_ERROR(abt_errno);
134 ABTI_HANDLE_ERROR(abt_errno);
138 va_start(varg_list, config);
155 va_arg(varg_list,
double));
160 va_arg(varg_list,
void *));
173 ABTI_HANDLE_ERROR(abt_errno);
178 *config = ABTI_sched_config_get_handle(p_config);
223 ABTI_UB_ASSERT(ABTI_initialized());
226 ABTI_sched_config *p_config = ABTI_sched_config_get_ptr(config);
227 ABTI_CHECK_NULL_SCHED_CONFIG_PTR(p_config);
230 va_start(varg_list, num_vars);
231 for (idx = 0; idx < num_vars; idx++) {
232 void *ptr = va_arg(varg_list,
void *);
271 ABTI_UB_ASSERT(ABTI_initialized());
273 ABTI_sched_config *p_config = ABTI_sched_config_get_ptr(*config);
274 ABTI_CHECK_NULL_SCHED_CONFIG_PTR(p_config);
331 ABTI_UB_ASSERT(ABTI_initialized());
333 ABTI_sched_config *p_config = ABTI_sched_config_get_ptr(config);
334 ABTI_CHECK_NULL_SCHED_CONFIG_PTR(p_config);
340 ABTI_CHECK_ERROR(abt_errno);
342 ABTI_CHECK_ERROR(abt_errno);
391 ABTI_UB_ASSERT(ABTI_initialized());
393 ABTI_sched_config *p_config = ABTI_sched_config_get_ptr(config);
394 ABTI_CHECK_NULL_SCHED_CONFIG_PTR(p_config);
415 ABTU_ret_err int ABTI_sched_config_read(
const ABTI_sched_config *p_config,
416 int idx,
void *p_val)
485 switch (p_elem->
type) {
495 *((
void **)ptr) = p_elem->
val.
v_ptr;
A struct that sets and gets a scheduler configuration.
ABTU_ret_err int ABTU_hashtable_create(size_t num_entries, size_t data_size, ABTU_hashtable **pp_hashtable)
int ABT_sched_config_set(ABT_sched_config config, int idx, ABT_sched_config_type type, const void *val)
Register a value to a scheduler configuration.
static void sched_config_create_element_int(sched_config_element *p_elem, int val)
static void sched_config_create_element_double(sched_config_element *p_elem, double val)
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
static void sched_config_read_element(const sched_config_element *p_elem, void *ptr)
void ABTU_hashtable_get(const ABTU_hashtable *p_hashtable, int key, void *data, int *found)
ABT_sched_config_var ABT_sched_config_automatic
Predefined ABT_sched_config_var to configure whether the scheduler is freed automatically or not.
int ABT_sched_config_read(ABT_sched_config config, int num_vars,...)
Retrieve values from a scheduler configuration.
void ABTU_hashtable_delete(ABTU_hashtable *p_hashtable, int key, int *deleted)
ABT_sched_config_var ABT_sched_config_access
Unused predefined ABT_sched_config_var.
ABT_sched_config_type type
ABT_sched_config_type type
int ABT_sched_config_free(ABT_sched_config *config)
Free a scheduler configuration.
@ ABT_SCHED_CONFIG_DOUBLE
static ABTU_ret_err int ABTU_calloc(size_t num, size_t size, void **p_ptr)
#define ABT_SUCCESS
Error code: the routine returns successfully.
#define ABT_SCHED_CONFIG_NULL
union sched_config_element::@2 val
#define ABT_ERR_INV_ARG
Error code: invalid user argument.
static void ABTU_free(void *ptr)
static void sched_config_create_element_ptr(sched_config_element *p_elem, void *ptr)
static ABTU_ret_err int sched_config_create_element_typed(sched_config_element *p_elem, ABT_sched_config_type type, const void *p_val)
void ABTU_hashtable_free(ABTU_hashtable *p_hashtable)
ABT_sched_config_var ABT_sched_config_var_end
Predefined ABT_sched_config_var to mark the last parameter.
ABTU_ret_err int ABTU_hashtable_set(ABTU_hashtable *p_hashtable, int key, const void *data, int *overwritten)
ABT_sched_config_var ABT_sched_basic_freq
Predefined ABT_sched_config_var to configure the frequency for checking events of the basic scheduler...
int ABT_sched_config_get(ABT_sched_config config, int idx, ABT_sched_config_type *type, void *val)
Retrieve a value from a scheduler configuration.
#define SCHED_CONFIG_HTABLE_SIZE
int ABT_sched_config_create(ABT_sched_config *config,...)
Create a new scheduler configuration.
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.