ARGOBOTS
1.1
|
This group is for Scheduler config. More...
Data Structures | |
struct | ABT_sched_config_var |
A struct that sets and gets a scheduler configuration. More... | |
Typedefs | |
typedef struct ABT_sched_config_opaque * | ABT_sched_config |
Scheduler configuration handle type. More... | |
Enumerations | |
enum | ABT_sched_config_type { ABT_SCHED_CONFIG_INT = 0, ABT_SCHED_CONFIG_DOUBLE = 1, ABT_SCHED_CONFIG_PTR = 2 } |
A struct that sets and gets a scheduler configuration. More... | |
Functions | |
int | ABT_sched_config_create (ABT_sched_config *config,...) |
Create a new scheduler configuration. More... | |
int | ABT_sched_config_read (ABT_sched_config config, int num_vars,...) |
Retrieve values from a scheduler configuration. More... | |
int | ABT_sched_config_free (ABT_sched_config *config) |
Free a scheduler configuration. More... | |
Variables | |
ABT_sched_config_var | ABT_sched_config_var_end |
Predefined ABT_sched_config_var to mark the last parameter. More... | |
ABT_sched_config_var | ABT_sched_basic_freq |
Predefined ABT_sched_config_var to configure the frequency for checking events of the basic scheduler. More... | |
ABT_sched_config_var | ABT_sched_config_access |
Unused predefined ABT_sched_config_var. More... | |
ABT_sched_config_var | ABT_sched_config_automatic |
Predefined ABT_sched_config_var to configure whether the scheduler is freed automatically or not. More... | |
This group is for Scheduler config.
typedef struct ABT_sched_config_opaque* ABT_sched_config |
int ABT_sched_config_create | ( | ABT_sched_config * | config, |
... | |||
) |
Create a new scheduler configuration.
ABT_sched_config_create()
creates a new scheduler configuration and returns its handle through config
.
The variadic arguments are an array of tuples composed of a variable of type ABT_sched_config_var
and a value for this variable. The array must end with a single value ABT_sched_config_var_end
.
Currently, Argobots supports the following hints:
ABT_sched_basic_freq:
The frequency of event checks of the predefined scheduler. A smaller value indicates more frequent check. If this is not specified, the default value is used for scheduler creation.
ABT_sched_config_automatic:
Whether the scheduler is automatically freed or not. If the value is ABT_TRUE
, the scheduler is automatically freed when a work unit associated with the scheduler is freed. If this is not specified, the default value of each scheduler creation routine is used for scheduler creation.
ABT_sched_config_access:
This is deprecated and ignored.
ABT_sched_create()
and ABT_sched_create_basic()
.config
must be freed by ABT_sched_config_free()
after its use.
If the array contains multiple tuples that have the same idx
of ABT_sched_config_var
, idx
is mapped to a corrupted value.
ABT_SUCCESS
is returned if this routine succeeds.ABT_ERR_INV_ARG
is returned if a variable of type ABT_sched_config_var
in the given list has an invalid type
.ABT_ERR_MEM
is returned if memory allocation fails.ABT_ERR_SYS
is returned if an error related to system calls and standard libraries occurs.ABT_sched_config_var_end
nor a variable of type ABT_sched_config_var
, the results are undefined.type
of the (2n+1)th element of type ABT_sched_config_var
, the results are undefined.config
is NULL
, the results are undefined.[out] | config | scheduler configuration handle |
[in] | ... | array of arguments |
int ABT_sched_config_free | ( | ABT_sched_config * | config | ) |
Free a scheduler configuration.
ABT_sched_config_free()
deallocates the resource used for the scheduler configuration sched_config
and sets sched_config
to ABT_SCHED_CONFIG_NULL
.
ABT_SUCCESS
is returned if this routine succeeds.ABT_ERR_INV_SCHED_CONFIG
is returned if config
points to ABT_SCHED_CONFIG_NULL
.config
is NULL
, the results are undefined.config
is accessed after calling this routine, the results are undefined.[in,out] | config | scheduler configuration handle |
int ABT_sched_config_read | ( | ABT_sched_config | config, |
int | num_vars, | ||
... | |||
) |
Retrieve values from a scheduler configuration.
ABT_sched_config_read()
reads values from the scheduler configuration config
and sets the values to variables given as the variadic arguments that contain at least num_vars
pointers. This routine sets the i th argument where i starts from 0 to a value mapped to a tuple that has ABT_sched_config_var
with its idx
= i. Each argument needs to be a pointer of a type specified by a corresponding type
of ABT_sched_config_var
. If the i th argument is NULL
, a value associated with idx
= i is not copied. If a value associated with idx
= i does not exist, the i th argument is not updated.
idx
= 1. ABT_SUCCESS
is returned if this routine succeeds.ABT_ERR_INV_ARG
is returned if num_vars
is negative.ABT_ERR_INV_SCHED_CONFIG
is returned if config
is ABT_SCHED_CONFIG_NULL
.[in] | config | scheduler configuration handle |
[in] | num_vars | number of variable pointers in ... |
[out] | ... | array of variable pointers |
ABT_sched_basic_freq |
Predefined ABT_sched_config_var to configure the frequency for checking events of the basic scheduler.
Its type is int. The user may not change its variables.
Definition at line 34 of file config.c.
Referenced by sched_init().
ABT_sched_config_access |
Unused predefined ABT_sched_config_var.
Its type is int. Currently, this setting is ignored. The user may not change its variables.
ABT_sched_config_automatic |
Predefined ABT_sched_config_var to configure whether the scheduler is freed automatically or not.
Its type is int. If the value is non-zero, the scheduler is freed automatically after its associated objects are released. If the value is zero, the scheduler is configured to be not freed automatically by the Argobots runtime. The user may not change its variables.
Definition at line 30 of file config.c.
Referenced by sched_create().
ABT_sched_config_var_end |
Predefined ABT_sched_config_var to mark the last parameter.
Check ABT_sched_config_create() for details. The user may not change its variables.
Definition at line 23 of file config.c.
Referenced by ABT_sched_config_create().