ARGOBOTS
c74c160e507a09d5a75aae06b1b52704643c33ca
|
Go to the documentation of this file.
122 va_start(varg_list, config);
133 int int_val = va_arg(varg_list,
int);
139 double double_val = va_arg(varg_list,
double);
146 void *ptr_val = va_arg(varg_list,
void *);
214 va_start(varg_list, num_vars);
215 for (idx = 0; idx < num_vars; idx++) {
216 void *ptr = va_arg(varg_list,
void *);
375 int idx,
void *p_val)
397 if (p_element->
idx == idx) {
399 memcpy(p_val, p_element->
val,
403 *p_type = p_element->
type;
407 p_element = p_element->
p_next;
433 if (p_element->
idx == idx) {
436 p_element->
type = type;
441 *pp_element = p_element->
p_next;
446 memcpy(p_element, p_next,
455 }
else if (!p_element->
p_next) {
461 (
void **)&p_new_element);
463 p_new_element->idx = idx;
464 p_new_element->type = type;
465 memcpy(p_new_element->val, p_val,
467 p_element->
p_next = p_new_element;
471 pp_element = &p_element->
p_next;
472 p_element = *pp_element;
500 return sizeof(double);
502 return sizeof(
void *);
A struct that sets and gets a scheduler configuration.
#define ABTI_SCHED_CONFIG_HTABLE_SIZE
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.
char val[sizeof(double) > sizeof(void *) ? sizeof(double) :sizeof(void *)]
ABTI_sched_config_element elements[ABTI_SCHED_CONFIG_HTABLE_SIZE]
#define ABTI_CHECK_ERROR(abt_errno)
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
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.
#define ABTU_unreachable()
static ABT_sched_config ABTI_sched_config_get_handle(ABTI_sched_config *p_config)
static ABTU_ret_err int sched_config_set(ABTI_sched_config *p_config, int idx, ABT_sched_config_type type, const void *p_val)
ABT_sched_config_var ABT_sched_config_access
Unused predefined ABT_sched_config_var.
#define ABTI_HANDLE_ERROR(n)
static size_t sched_config_type_size(ABT_sched_config_type type)
ABT_sched_config_type type
ABT_sched_config_type type
#define ABTI_ASSERT(cond)
ABT_bool ABTI_initialized(void)
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
ABTI_sched_config_element * p_next
static void sched_config_free(ABTI_sched_config *p_config)
ABTU_ret_err int ABTI_sched_config_read(const ABTI_sched_config *p_config, int idx, void *p_val)
#define ABTI_SCHED_CONFIG_UNUSED_INDEX
#define ABTI_UB_ASSERT(cond)
#define ABT_ERR_INV_ARG
Error code: invalid user argument.
static void ABTU_free(void *ptr)
ABT_sched_config_var ABT_sched_config_var_end
Predefined ABT_sched_config_var to mark the last parameter.
static ABTU_ret_err int sched_config_get(const ABTI_sched_config *p_config, int idx, ABT_sched_config_type *p_type, void *p_val)
static ABTI_sched_config * ABTI_sched_config_get_ptr(ABT_sched_config config)
#define ABTI_CHECK_NULL_SCHED_CONFIG_PTR(p)
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.
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.