|
ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
A struct that defines a scheduler. More...
#include <abt.h>

Data Fields | |
| ABT_sched_type | type |
| Unused value. More... | |
| ABT_sched_init_fn | init |
| Function that initializes a scheduler. More... | |
| ABT_sched_run_fn | run |
| Function that defines a kernel of a scheduler. More... | |
| ABT_sched_free_fn | free |
| Function that frees a scheduler. More... | |
| ABT_sched_get_migr_pool_fn | get_migr_pool |
| Function that returns a pool for migration. More... | |
| int(* ABT_sched_def::free)(ABT_sched sched) |
Function that frees a scheduler.
free() finalizes the scheduler sched with the scheduler. The return value of free() is ignored.
free() is optional, so the user may set free to NULL.
free() is called only on freeing a scheduler. free() is not called when its associated work unit is terminated.
The caller of free() is undefined, so a program that relies on the caller of free() is non-conforming.
Definition at line 1492 of file abt.h.
Referenced by sched_create().
Function that returns a pool for migration.
get_migr_pool() returns a pool from pools associated with the scheduler sched as a work unit migration target. If get_migr_pool() returns either ABT_POOL_NULL or a pool that is not associated with sched, the results are undefined.
get_migr_pool() is optional, so the user may set get_migr_pool to NULL. If get_migr_pool is NULL, the Argobots runtime chooses a proper pool that is associated with sched.
The caller of get_migr_pool() is undefined, so a program that relies on the caller of get_migr_pool() is non-conforming.
Definition at line 1509 of file abt.h.
Referenced by sched_create().
| int(* ABT_sched_def::init)(ABT_sched sched, ABT_sched_config config) |
Function that initializes a scheduler.
init() initializes the scheduler sched with the scheduler configuration config. If init() does not return ABT_SUCCESS, the scheduler creation fails.
init() is optional, so the user may set init to NULL.
init() is undefined, so a program that relies on the caller of init() is non-conforming.init() is called only on creating a scheduler. init() is not called when its associated work unit is revived.
Definition at line 1436 of file abt.h.
Referenced by sched_create().
| void(* ABT_sched_def::run)(ABT_sched sched) |
Function that defines a kernel of a scheduler.
run() runs the scheduler sched. The user can freely design this function, Argobots assumes the following properties:
Scheduling loop:
run() pops units from pools associated with sched and run it.
sched can access pools that are not associated with sched. However, the Argobots runtime assumes that a scheduler that does not have units in its associated pools is idle and should yield to the parent.
Periodic event check:
run() calls ABT_xstream_check_events() with sched periodically.
The frequency is user-defined, but some Argobots routines such as request handling rely on ABT_xstream_check_events().
Finish run() if necessary:
run() calls ABT_sched_has_to_stop() with sched periodically and if it returns ABT_TRUE as stop, run() should return immediately.
The frequency is user-defined, but some Argobots routines such as request handling rely on the mechanism of ABT_sched_has_to_stop().
The caller of run() is a work unit associated with sched. If sched is the main scheduler, the underlying execution stream is unchanged in run().
run() is not optional, so the user must implement this function.
Definition at line 1476 of file abt.h.
Referenced by ABT_sched_create(), and sched_create().
| ABT_sched_type ABT_sched_def::type |
Unused value.
This value is ignored. A created scheduler always uses a ULT as an underlying work unit.
Definition at line 1418 of file abt.h.
Referenced by sched_create().
1.8.17