ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
11 #if defined(ABT_C_HAVE_VISIBILITY)
12 #define ABT_API_PUBLIC __attribute__((visibility ("default")))
14 #define ABT_API_PUBLIC
18 #if defined(__cplusplus)
46 #define ABT_VERSION "1.1"
68 #define ABT_NUMVERSION 10100300
70 #define ABT_RELEASE_TYPE_ALPHA 0
71 #define ABT_RELEASE_TYPE_BETA 1
72 #define ABT_RELEASE_TYPE_RC 2
73 #define ABT_RELEASE_TYPE_PATCH 3
75 #define ABT_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \
76 (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH))
78 #define ABT_DEPRECATED __attribute__((deprecated))
80 #define ABT_ENABLE_VER_20_API_VAL 0
81 #undef ABT_ENABLE_VER_20_API
82 #if ABT_ENABLE_VER_20_API_VAL
83 #define ABT_ENABLE_VER_20_API 1
97 #define ABT_ERR_UNINITIALIZED 1
104 #define ABT_ERR_MEM 2
109 #define ABT_ERR_OTHER 3
114 #define ABT_ERR_INV_XSTREAM 4
119 #define ABT_ERR_INV_XSTREAM_RANK 5
124 #define ABT_ERR_INV_XSTREAM_BARRIER 6
129 #define ABT_ERR_INV_SCHED 7
134 #define ABT_ERR_INV_SCHED_KIND 8
139 #define ABT_ERR_INV_SCHED_PREDEF 9
146 #define ABT_ERR_INV_SCHED_TYPE 10
151 #define ABT_ERR_INV_SCHED_CONFIG 11
156 #define ABT_ERR_INV_POOL 12
161 #define ABT_ERR_INV_POOL_KIND 13
166 #define ABT_ERR_INV_POOL_ACCESS 14
171 #define ABT_ERR_INV_POOL_CONFIG 56
176 #define ABT_ERR_INV_POOL_USER_DEF 57
181 #define ABT_ERR_INV_UNIT 15
186 #define ABT_ERR_INV_THREAD 16
191 #define ABT_ERR_INV_THREAD_ATTR 17
200 #define ABT_ERR_INV_TASK 18
205 #define ABT_ERR_INV_KEY 19
210 #define ABT_ERR_INV_MUTEX 20
215 #define ABT_ERR_INV_MUTEX_ATTR 21
220 #define ABT_ERR_INV_COND 22
225 #define ABT_ERR_INV_RWLOCK 23
230 #define ABT_ERR_INV_EVENTUAL 24
235 #define ABT_ERR_INV_FUTURE 25
240 #define ABT_ERR_INV_BARRIER 26
245 #define ABT_ERR_INV_TIMER 27
250 #define ABT_ERR_INV_QUERY_KIND 28
255 #define ABT_ERR_INV_TOOL_CONTEXT 52
260 #define ABT_ERR_INV_ARG 53
265 #define ABT_ERR_XSTREAM 29
272 #define ABT_ERR_XSTREAM_STATE 30
277 #define ABT_ERR_XSTREAM_BARRIER 31
282 #define ABT_ERR_SCHED 32
287 #define ABT_ERR_SCHED_CONFIG 33
292 #define ABT_ERR_POOL 34
297 #define ABT_ERR_UNIT 35
302 #define ABT_ERR_THREAD 36
311 #define ABT_ERR_TASK 37
316 #define ABT_ERR_KEY 38
321 #define ABT_ERR_MUTEX 39
328 #define ABT_ERR_MUTEX_LOCKED 40
333 #define ABT_ERR_COND 41
340 #define ABT_ERR_COND_TIMEDOUT 42
345 #define ABT_ERR_RWLOCK 43
350 #define ABT_ERR_EVENTUAL 44
355 #define ABT_ERR_FUTURE 45
360 #define ABT_ERR_BARRIER 46
365 #define ABT_ERR_TIMER 47
370 #define ABT_ERR_MIGRATION_TARGET 48
379 #define ABT_ERR_MIGRATION_NA 49
386 #define ABT_ERR_MISSING_JOIN 50
391 #define ABT_ERR_FEATURE_NA 51
403 #define ABT_ERR_SYS 54
408 #define ABT_ERR_CPUID 55
725 #define ABT_TOOL_EVENT_THREAD_NONE (0)
730 #define ABT_TOOL_EVENT_THREAD_CREATE (1 << 0)
735 #define ABT_TOOL_EVENT_THREAD_JOIN (1 << 1)
740 #define ABT_TOOL_EVENT_THREAD_FREE (1 << 2)
745 #define ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3)
750 #define ABT_TOOL_EVENT_THREAD_RUN (1 << 4)
755 #define ABT_TOOL_EVENT_THREAD_FINISH (1 << 5)
760 #define ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6)
765 #define ABT_TOOL_EVENT_THREAD_YIELD (1 << 7)
770 #define ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8)
775 #define ABT_TOOL_EVENT_THREAD_RESUME (1 << 9)
780 #define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1))
795 #define ABT_XSTREAM_ANY_RANK -1
798 struct ABT_xstream_opaque;
799 struct ABT_xstream_barrier_opaque;
800 struct ABT_sched_opaque;
801 struct ABT_sched_config_opaque;
802 struct ABT_pool_opaque;
803 struct ABT_pool_config_opaque;
805 struct ABT_unit_opaque;
806 struct ABT_thread_opaque;
807 struct ABT_thread_attr_opaque;
808 struct ABT_task_opaque;
809 struct ABT_key_opaque;
810 struct ABT_mutex_opaque;
811 struct ABT_mutex_attr_opaque;
812 struct ABT_cond_opaque;
813 struct ABT_rwlock_opaque;
814 struct ABT_eventual_opaque;
815 struct ABT_future_opaque;
816 struct ABT_barrier_opaque;
817 struct ABT_timer_opaque;
818 struct ABT_tool_context_opaque;
1076 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
1077 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
1078 #define ABT_SCHED_NULL ((ABT_sched) NULL)
1079 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
1080 #define ABT_POOL_NULL ((ABT_pool) NULL)
1081 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
1082 #define ABT_UNIT_NULL ((ABT_unit) NULL)
1083 #define ABT_THREAD_NULL ((ABT_thread) NULL)
1084 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
1085 #define ABT_TASK_NULL ((ABT_task) NULL)
1086 #define ABT_KEY_NULL ((ABT_key) NULL)
1087 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
1088 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
1089 #define ABT_COND_NULL ((ABT_cond) NULL)
1090 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
1091 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
1092 #define ABT_FUTURE_NULL ((ABT_future) NULL)
1093 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
1094 #define ABT_TIMER_NULL ((ABT_timer) NULL)
1095 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) NULL)
1096 #define ABT_POOL_USER_DEF_NULL ((ABT_pool_user_def) NULL)
1098 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
1099 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
1100 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
1101 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
1102 #define ABT_POOL_NULL ((ABT_pool) (0x05))
1103 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
1104 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
1105 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
1106 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
1107 #define ABT_TASK_NULL ((ABT_task) (0x0a))
1108 #define ABT_KEY_NULL ((ABT_key) (0x0b))
1109 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
1110 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
1111 #define ABT_COND_NULL ((ABT_cond) (0x0e))
1112 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
1113 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
1114 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
1115 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
1116 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
1117 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14))
1118 #define ABT_POOL_USER_DEF_NULL ((ABT_pool_user_def) (0x15))
1158 #define ABT_MUTEX_INITIALIZER \
1159 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1185 #define ABT_RECURSIVE_MUTEX_INITIALIZER \
1186 { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1201 #define ABT_MUTEX_MEMORY_GET_HANDLE(p_mutex_memory) \
1202 ((ABT_mutex)p_mutex_memory)
1247 #define ABT_COND_INITIALIZER \
1248 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1264 #define ABT_COND_MEMORY_GET_HANDLE(p_cond_memory) \
1265 ((ABT_cond)p_cond_memory)
1311 #define ABT_EVENTUAL_INITIALIZER \
1312 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1329 #define ABT_EVENTUAL_MEMORY_GET_HANDLE(p_eventual_memory) \
1330 ((ABT_eventual)p_eventual_memory)
1577 #define ABT_POOL_CONTEXT_PRIO_DEFAULT_PRIO ((ABT_pool_context)0x0)
1591 #define ABT_POOL_CONTEXT_PRIO_HIGH_PRIO ((ABT_pool_context)0x1)
1605 #define ABT_POOL_CONTEXT_PRIO_LOW_PRIO ((ABT_pool_context)0x2)
1616 #define ABT_POOL_CONTEXT_OWNER_DEFAULT ((ABT_pool_context)0x0)
1632 #define ABT_POOL_CONTEXT_OWNER_PRIMARY ((ABT_pool_context)0x100)
1649 #define ABT_POOL_CONTEXT_OWNER_SECONDARY ((ABT_pool_context)0x200)
1660 #define ABT_POOL_CONTEXT_OP_POOL_OTHER ((ABT_pool_context)0x0)
1673 #define ABT_POOL_CONTEXT_OP_THREAD_CREATE ((ABT_pool_context)0x1000)
1686 #define ABT_POOL_CONTEXT_OP_THREAD_CREATE_TO ((ABT_pool_context)0x2000)
1698 #define ABT_POOL_CONTEXT_OP_THREAD_REVIVE ((ABT_pool_context)0x4000)
1711 #define ABT_POOL_CONTEXT_OP_THREAD_REVIVE_TO ((ABT_pool_context)0x8000)
1722 #define ABT_POOL_CONTEXT_OP_THREAD_YIELD ((ABT_pool_context)0x10000)
1733 #define ABT_POOL_CONTEXT_OP_THREAD_YIELD_TO ((ABT_pool_context)0x20000)
1745 #define ABT_POOL_CONTEXT_OP_THREAD_RESUME_YIELD_TO ((ABT_pool_context)0x40000)
1757 #define ABT_POOL_CONTEXT_OP_THREAD_YIELD_LOOP ((ABT_pool_context)0x80000)
1768 #define ABT_POOL_CONTEXT_OP_THREAD_RESUME ((ABT_pool_context)0x100000)
1779 #define ABT_POOL_CONTEXT_OP_THREAD_MIGRATE ((ABT_pool_context)0x200000)
2214 #ifdef ABT_ENABLE_VER_20_API
2474 void (*thread_func)(
void *),
void *arg,
2477 void (**thread_func_list)(
void *),
void **arg_list,
2556 #define ABT_task_is_unnamed ABT_thread_is_unnamed
2557 #define ABT_task_set_specific ABT_thread_set_specific
2558 #define ABT_task_get_specific ABT_thread_get_specific
2567 #define ABT_self_get_task ABT_self_get_thread
2568 #define ABT_self_get_task_id ABT_self_get_thread_id
2693 uint64_t event_mask,
2698 #if defined(__cplusplus)
int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex with low priority.
int ABT_pool_pop_thread(ABT_pool pool, ABT_thread *thread) ABT_API_PUBLIC
Pop a work unit from a pool.
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
ABT_task_state
State of a tasklet.
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_OVERFLOW_CHECK
int ABT_xstream_set_affinity(ABT_xstream xstream, int num_cpuids, int *cpuids) ABT_API_PUBLIC
Bind an execution stream to target CPUs.
@ ABT_THREAD_STATE_TERMINATED
int ABT_thread_migrate_to_xstream(ABT_thread thread, ABT_xstream xstream) ABT_API_PUBLIC
Request a migration of a work unit to a specific execution stream.
A struct that sets and gets a scheduler configuration.
struct ABT_key_opaque * ABT_key
Work-unit-specific data key handle type.
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC
Print the information of an execution stream.
int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier) ABT_API_PUBLIC
Free an execution-stream barrier.
int ABT_pool_user_def_set_print_all(ABT_pool_user_def def, ABT_pool_user_print_all_fn p_print_all) ABT_API_PUBLIC
Register a print-all function to a pool definition.
ABT_sched_predef
Predefined scheduler type.
ABT_unit_get_task_fn u_get_task
Unused function.
int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC
Retrieve an argument for a work-unit function of a work unit.
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume a ULT.
int ABT_self_resume_suspend_to(ABT_thread thread) ABT_API_PUBLIC
Suspend the calling ULT and jump to another suspended ULT.
int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC
Retrieve user data from a pool.
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset a readiness of an eventual.
int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC
Pop a unit from a pool with wait.
double ABT_get_wtime(void) ABT_API_PUBLIC
Get elapsed wall clock time.
int ABT_self_schedule(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Execute a work unit on the calling ULT.
int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC
Create a new scheduler with a predefined scheduler type.
int ABT_sched_config_set(ABT_sched_config config, int idx, ABT_sched_config_type type, const void *val) ABT_API_PUBLIC
Register a value to a scheduler configuration.
int ABT_thread_is_primary(ABT_thread thread, ABT_bool *is_primary) ABT_API_PUBLIC
Check if a work unit is the primary ULT.
int ABT_bool
Boolean type.
int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Get the size of a pool.
int ABT_pool_print_all_threads(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_thread)) ABT_API_PUBLIC
Apply a print function to every work unit in a pool.
int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC
Send a termination request to a work unit.
int ABT_pool_user_def_free(ABT_pool_user_def *def) ABT_API_PUBLIC
Free a pool definition.
int ABT_pool_user_def_set_get_size(ABT_pool_user_def def, ABT_pool_user_get_size_fn p_get_size) ABT_API_PUBLIC
Register a size inquiry function to a pool definition.
int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC
Create a new timer.
uint64_t ABT_pool_context
A pool context value.
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr) ABT_API_PUBLIC
Print the information of a ULT attribute.
int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC
Free a timer.
int ABT_self_get_arg(void **arg) ABT_API_PUBLIC
Retrieve an argument for a work-unit function of the calling work unit.
int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC
Get ID of the calling work unit.
void(* ABT_sched_run_fn)(ABT_sched)
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free a condition variable.
ABT_sched_type type
Unused value.
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Get the calling work unit.
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
struct ABT_thread_opaque * ABT_task
Work unit handle type.
int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC
Create a new work unit associated with a scheduler and push it to a pool.
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex, const struct timespec *abstime) ABT_API_PUBLIC
Wait on a condition variable with a timeout limit.
@ ABT_INFO_QUERY_KIND_ENABLED_LAZY_STACK_ALLOC
int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC
Wait for a set of work units to terminate.
int ABT_task_get_last_pool_id(ABT_task task, int *id) ABT_API_PUBLIC
Get the last pool's ID of a work unit.
int ABT_thread_create_many(int num_threads, ABT_pool *pool_list, void(**thread_func_list)(void *), void **arg_list, ABT_thread_attr attr, ABT_thread *newthread_list) ABT_API_PUBLIC
Create a set of new ULTs.
int ABT_pool_is_empty(ABT_pool pool, ABT_bool *is_empty) ABT_API_PUBLIC
Check if a pool is empty.
ABT_pool_config_type
A struct that sets and gets a pool configuration.
int ABT_self_get_thread_func(void(**thread_func)(void *)) ABT_API_PUBLIC
Retrieve a work-unit function of the calling work unit.
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC
Print the information of all execution streams.
int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream that is running the calling work unit.
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free a future.
int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC
Get a stack size of a work unit.
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
@ ABT_TASK_STATE_TERMINATED
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on a future.
int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC
Set a rank for an execution stream.
void(* ABT_pool_user_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_thread))
Function that applies a user-given function to all work units in a pool.
int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC
Get the number of current existing execution streams.
int ABT_xstream_get_affinity(ABT_xstream xstream, int max_cpuids, int *cpuids, int *num_cpuids) ABT_API_PUBLIC
Get CPU IDs of CPUs to which an execution stream is bound.
int ABT_thread_set_migratable(ABT_thread thread, ABT_bool migratable) ABT_API_PUBLIC
Set the migratability in a work unit.
int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
No operation.
ABT_unit(* ABT_pool_user_create_unit_fn)(ABT_pool, ABT_thread)
Function that creates an ABT_unit handle that is associated with an ABT_thread handle.
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Request a scheduler to finish.
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
int ABT_self_suspend_to(ABT_thread thread) ABT_API_PUBLIC
Suspend the calling ULT and jump to another ULT.
int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC
Get a value associated with a work-unit-specific data key in the calling work unit.
int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC
Get ID of a work unit.
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free a readers-writer lock.
ABT_unit_free_fn u_free
Function that frees a work unit.
ABT_sched_run_fn run
Function that defines a kernel of a scheduler.
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
struct ABT_mutex_opaque * ABT_mutex
Mutex handle type.
int ABT_mutex_unlock_de(ABT_mutex mutex) ABT_API_PUBLIC
Unlock a mutex and try to hand it over a waiter associated with an execution stream that is different...
int ABT_thread_attr_create(ABT_thread_attr *newattr) ABT_API_PUBLIC
Create a new ULT attribute.
int ABT_pool_push_threads(ABT_pool pool, const ABT_thread *threads, size_t num) ABT_API_PUBLIC
Push work units to a pool.
int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier) ABT_API_PUBLIC
Wait on an execution-stream barrier.
int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a reader.
A struct that can be converted to ABT_cond.
int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC
Obtain an overhead time of using ABT_timer.
ABT_pool_remove_fn p_remove
Function that removes a work unit from a pool.
int ABT_pool_config_get(ABT_pool_config config, int key, ABT_pool_config_type *p_type, void *val) ABT_API_PUBLIC
Retrieve a value from a pool configuration.
int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg) ABT_API_PUBLIC
Print stacks of work units in pools associated with all the main schedulers.
int ABT_self_get_thread(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
A struct that can be converted to ABT_eventual.
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free a work-unit-specific data key.
@ ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Print stacks of all work units in a pool.
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex.
ABT_unit_get_type_fn u_get_type
Unused function.
int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr, size_t stacksize) ABT_API_PUBLIC
Set stack attributes in a ULT attribute.
ABT_unit_get_thread_fn u_get_thread
Unused function.
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Send a cancellation request to an execution stream.
ABT_unit_is_in_pool_fn u_is_in_pool
Function that returns whether a work unit is in its associated pool or not.
int ABT_self_get_last_pool(ABT_pool *pool) ABT_API_PUBLIC
Get the last pool of the calling work unit.
int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC
Duplicate a timer.
int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new execution stream.
ABT_sched_type
Scheduler's work unit type.
int ABT_self_set_specific(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with a work-unit-specific data key in the calling work unit.
int ABT_future_create(uint32_t num_compartments, void(*cb_func)(void **arg), ABT_future *newfuture) ABT_API_PUBLIC
Create a new future.
int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC
Get a state of a work unit.
int ABT_finalize(void) ABT_API_PUBLIC
Finalize the Argobots execution environment.
int ABT_xstream_get_main_sched(ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC
Retrieve the main scheduler of an execution stream.
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
int ABT_pool_config_create(ABT_pool_config *config) ABT_API_PUBLIC
Create a new pool configuration.
ABT_pool_config_type type
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free a ULT attribute.
void(* ABT_pool_user_push_many_fn)(ABT_pool, const ABT_unit *, size_t, ABT_pool_context)
Function that pushes work units to a pool.
struct ABT_pool_opaque * ABT_pool
Pool handle type.
int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC
Retrieve a rank of an execution stream.
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_xstream_self_rank(int *rank) ABT_API_PUBLIC
Return a rank of an execution stream associated with a caller.
struct ABT_pool_def * ABT_pool_user_def
Pool definition.
ABT_thread_state
State of a work unit.
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Free a work unit.
int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC
Compare two mutex handles for equality.
int ABT_sched_config_read(ABT_sched_config config, int num_vars,...) ABT_API_PUBLIC
Retrieve values from a scheduler configuration.
size_t(* ABT_pool_user_get_size_fn)(ABT_pool)
Function that returns the number of work units in a pool.
int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC
Request a scheduler to finish after its pools get empty.
int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *is_primary) ABT_API_PUBLIC
Check if the target execution stream is primary.
int ABT_pool_user_def_create(ABT_pool_user_create_unit_fn p_create_unit, ABT_pool_user_free_unit_fn p_free_unit, ABT_pool_user_is_empty_fn p_is_empty, ABT_pool_user_pop_fn p_pop, ABT_pool_user_push_fn p_push, ABT_pool_user_def *newdef) ABT_API_PUBLIC
Create a new pool definition.
void(* ABT_pool_user_push_fn)(ABT_pool, ABT_unit, ABT_pool_context)
Function that pushes a work unit to a pool.
struct ABT_sched_opaque * ABT_sched
Scheduler handle type.
int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC
Retrieve an argument for a work-unit function of a work unit.
@ ABT_INFO_QUERY_KIND_FCONTEXT
int ABT_pool_pop_threads_ex(ABT_pool pool, ABT_thread *threads, size_t len, size_t *num, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Pop work units from a pool.
int ABT_init(int argc, char **argv) ABT_API_PUBLIC
Initialize the Argobots execution environment.
int ABT_pool_user_def_set_pop_wait(ABT_pool_user_def def, ABT_pool_user_pop_wait_fn p_pop_wait) ABT_API_PUBLIC
Register a pop-wait function to a pool definition.
void(* ABT_unit_free_fn)(ABT_unit *)
int ABT_task_create_on_xstream(ABT_xstream xstream, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC
Create a new tasklet associated with an execution stream.
int ABT_thread_migrate_to_sched(ABT_thread thread, ABT_sched sched) ABT_API_PUBLIC
Request a migration of a work unit to a specific scheduler.
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex.
int ABT_thread_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
void(* ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC
Start a timer.
@ ABT_THREAD_STATE_BLOCKED
@ ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
@ ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val) ABT_API_PUBLIC
Retrieve the configuration information.
int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC
Set a value with a work-unit-specific data key in a work unit.
int ABT_pool_user_def_set_init(ABT_pool_user_def def, ABT_pool_user_init_fn p_init) ABT_API_PUBLIC
Register a pool initialization function to a pool definition.
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Mutex attribute handle type.
int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC
Retrieve a string of an error code and its length.
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER
int ABT_self_on_primary_xstream(ABT_bool *on_primary) ABT_API_PUBLIC
Check if the caller is running on the primary execution stream.
uint64_t ABT_unit_id
Work unit ID type.
A struct that defines a pool.
int ABT_mutex_create(ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex.
struct ABT_xstream_opaque * ABT_xstream
Execution stream handle type.
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Print stack of a work unit.
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
@ ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
struct ABT_barrier_opaque * ABT_barrier
Barrier handle type.
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the calling ULT.
ABT_unit_type
Type of a work unit for scheduling.
ABT_sched_config_var ABT_sched_config_access
Unused predefined ABT_sched_config_var.
int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Remove a specified work unit from a pool.
int ABT_self_set_associated_pool(ABT_pool pool) ABT_API_PUBLIC
Set an associated pool for the calling work unit.
int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC
Get the last pool of a work unit.
int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new execution stream with a predefined scheduler.
struct ABT_pool_config_opaque * ABT_pool_config
Pool configuration handle type.
int ABT_xstream_create_with_rank(ABT_sched sched, int rank, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new execution stream with a specific rank.
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex with high priority.
int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC
Get ID of the last pool of the calling work unit.
ABT_pool_pop_timedwait_fn p_pop_timedwait
Function that pops a work unit from a pool with wait.
ABT_info_query_kind
Query kind for ABT_info_query_config().
ABT_pool_pop_fn p_pop
Function that pops a work unit from a pool.
ABT_pool_free_fn p_free
Function that frees a pool.
struct ABT_future_opaque * ABT_future
Future handle type.
@ ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
int ABT_thread_create_to(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC
Create a new ULT and yield to it.
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Process events associated with a scheduler.
int ABT_thread_set_associated_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Set an associated pool for the target work unit.
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for a work unit to terminate.
int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC
Free a mutex attribute.
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
ABT_pool_print_all_fn p_print_all
Function that applies a user-given function to all work units in a pool.
int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC
Free a barrier.
int ABT_xstream_set_main_sched_basic(ABT_xstream xstream, ABT_sched_predef predef, int num_pools, ABT_pool *pools) ABT_API_PUBLIC
Set the main scheduler of an execution stream to a predefined scheduler.
int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools, ABT_pool *pools) ABT_API_PUBLIC
Get pools associated with the main scheduler of an execution stream.
ABT_pool_access access
Access type.
int ABT_thread_attr_set_migratable(ABT_thread_attr attr, ABT_bool is_migratable) ABT_API_PUBLIC
Set the ULT's migratability in a ULT attribute.
ABT_sched_state
Unused enum.
int ABT_mutex_attr_set_recursive(ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC
Set a recursive property in a mutex attribute.
int ABT_task_revive(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *task) ABT_API_PUBLIC
Revive a terminated work unit.
int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC
Bind an execution stream to a target CPU.
int ABT_self_is_primary(ABT_bool *is_primary) ABT_API_PUBLIC
Check if the caller is the primary ULT.
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
void(* ABT_pool_user_pop_many_fn)(ABT_pool, ABT_thread *, size_t, size_t *, ABT_pool_context)
Function that pops work units from a pool.
@ ABT_INFO_QUERY_KIND_ENABLED_DEBUG
int ABT_key_create(void(*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC
Create a new work-unit-specific data key.
int ABT_pool_user_def_set_free(ABT_pool_user_def def, ABT_pool_user_free_fn p_free) ABT_API_PUBLIC
Register a pool finalization function to a pool definition.
const ABT_pool_config_var ABT_pool_config_automatic
Predefined ABT_pool_config_var to configure whether the pool is freed automatically or not.
int ABT_task_free(ABT_task *task) ABT_API_PUBLIC
Free a work unit.
int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC
Obtain the sum of the total sizes of pools associated with a scheduler.
ABT_sched_config_type type
int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *is_unnamed) ABT_API_PUBLIC
Check if a work unit is unnamed.
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free a scheduler configuration.
@ ABT_SCHED_CONFIG_DOUBLE
int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC
Free an eventual.
int ABT_xstream_exit(void) ABT_API_PUBLIC
Terminate an execution stream that is running the calling ULT.
struct ABT_eventual_opaque * ABT_eventual
Eventual handle type.
int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC
Pop a work unit from a pool.
int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC
Create a new condition variable.
int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC
Stop a timer.
ABT_pool_get_size_fn p_get_size
Function that returns a work unit.
int ABT_self_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to another ULT.
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for an execution stream to terminate.
ABT_pool_push_fn p_push
Function that pushes a work unit to a pool.
@ ABT_INFO_QUERY_KIND_ENABLED_TOOL
int ABT_thread_create_on_xstream(ABT_xstream xstream, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC
Create a new ULT associated with an execution stream.
int ABT_self_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
int ABT_thread_attr_set_callback(ABT_thread_attr attr, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC
Set a callback function and its argument in a ULT attribute.
int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC
Set an argument for a work-unit function of a work unit.
ABT_unit_id ABT_thread_id
Work unit ID type.
ABT_thread(* ABT_pool_user_pop_wait_fn)(ABT_pool, double, ABT_pool_context)
Function that pops a work unit from a pool with wait.
int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Push a unit to a pool.
ABT_sched_get_migr_pool_fn get_migr_pool
Function that returns a pool for migration.
int ABT_pool_config_set(ABT_pool_config config, int key, ABT_pool_config_type type, const void *val) ABT_API_PUBLIC
Register a value to a pool configuration.
int ABT_mutex_attr_get_recursive(ABT_mutex_attr attr, ABT_bool *recursive) ABT_API_PUBLIC
Get a recursive property in a mutex attribute.
int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC
Get the stack size from a ULT attribute.
@ ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
int ABT_self_exit_to(ABT_thread thread) ABT_API_PUBLIC
Terminate the calling ULT and jump to another ULT.
int ABT_thread_get_last_xstream(ABT_thread thread, ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream associated with a work unit.
void(* ABT_pool_user_free_fn)(ABT_pool)
Function that frees a pool.
struct ABT_timer_opaque * ABT_timer
Timer handle type.
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC
Get CPU ID of a CPU to which an execution stream is bound.
int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC
Obtain the number of pools associated with a scheduler.
int ABT_pool_config_free(ABT_pool_config *config) ABT_API_PUBLIC
Free a pool configuration.
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Get the total size of a pool.
int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC
Request a migration of a work unit to any available execution stream.
int ABT_thread_self_id(ABT_unit_id *id) ABT_API_PUBLIC
Get ID of the calling work unit.
int ABT_info_print_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Print the information of a pool.
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Execution-stream barrier handle type.
ABT_unit_create_from_task_fn u_create_from_task
Unused function.
int ABT_self_get_specific(ABT_key key, void **value) ABT_API_PUBLIC
Get a value associated with a work-unit-specific data key in the calling work unit.
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
int ABT_thread_free_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC
Free a set of work units.
@ ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
int ABT_self_set_arg(void *arg) ABT_API_PUBLIC
Set an argument for a work-unit function of the calling work unit.
int ABT_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool from a predefined type.
int ABT_pool_push_thread(ABT_pool pool, ABT_thread thread) ABT_API_PUBLIC
Push a work unit to a pool.
int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC
Wait on an eventual.
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER
@ ABT_XSTREAM_STATE_RUNNING
@ ABT_SCHED_STATE_RUNNING
int ABT_pool_print_all(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC
int ABT_thread_set_callback(ABT_thread thread, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC
Register a callback function in a work unit.
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC
Get ID of a work unit.
void(* ABT_pool_user_free_unit_fn)(ABT_pool, ABT_unit)
Function that frees an ABT_unit handle.
int ABT_thread_get_thread_func(ABT_thread thread, void(**thread_func)(void *)) ABT_API_PUBLIC
Retrieve a work-unit function of a work unit.
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on a condition variable.
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Free an execution stream.
ABT_sched_free_fn free
Function that frees a scheduler.
int ABT_initialized(void) ABT_API_PUBLIC
Check if the Argobots execution environment has been initialized.
int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal a future.
int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *is_migratable) ABT_API_PUBLIC
Get the migratability of a work unit.
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex in a busy-wait form.
int ABT_task_get_last_pool(ABT_task task, ABT_pool *pool) ABT_API_PUBLIC
Get the last pool of a work unit.
int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC
Associate a user value with a scheduler.
ABT_bool(* ABT_pool_user_is_empty_fn)(ABT_pool)
Function that returns if a pool is empty.
int ABT_info_print_thread(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Print the information of a work unit.
int ABT_self_resume_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to another suspended ULT.
int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC
Get a state of an execution stream.
int ABT_thread_create(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC
Create a new ULT.
int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a writer.
int ABT_thread_get_unit(ABT_thread thread, ABT_unit *unit) ABT_API_PUBLIC
Get a unit handle of the target work unit.
A struct that defines a scheduler.
int ABT_pool_pop_thread_ex(ABT_pool pool, ABT_thread *thread, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Pop a work unit from a pool.
ABT_thread(* ABT_pool_user_pop_fn)(ABT_pool, ABT_pool_context)
Function that pops a work unit from a pool.
int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC
Set user data in a pool.
int ABT_pool_pop_wait_thread_ex(ABT_pool pool, ABT_thread *thread, double time_secs, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Pop a work unit from a pool.
int ABT_self_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
int ABT_task_create(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC
Create a new tasklet.
int ABT_xstream_set_main_sched(ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC
Set the main scheduler of an execution stream.
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock a readers-writer lock.
ABT_unit_create_from_thread_fn u_create_from_thread
Function that creates an ABT_unit handle that is associated with an ABT_thread handle.
int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC
Stop a timer and add an elapsed time of a timer.
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
@ ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
int ABT_thread_revive_to(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC
Revive a terminated ULT and yield to it.
size_t(* ABT_pool_get_size_fn)(ABT_pool)
int ABT_pool_user_def_set_push_many(ABT_pool_user_def def, ABT_pool_user_push_many_fn p_push_many) ABT_API_PUBLIC
Register a push-many function to a pool definition.
int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC
Compare two work-unit handles for equality.
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset readiness of a future.
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
int ABT_mutex_unlock_se(ABT_mutex mutex) ABT_API_PUBLIC
Unlock a mutex and try to hand it over a waiter associated with the same execution stream.
int ABT_self_get_xstream_rank(int *rank) ABT_API_PUBLIC
Return a rank of an execution stream that is running the calling work unit.
A struct that can be converted to ABT_mutex.
int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_DEPRECATED ABT_API_PUBLIC
Pop a unit from a pool with timed wait.
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free a pool.
struct ABT_cond_opaque * ABT_cond
Condition variable handle type.
int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready) ABT_API_PUBLIC
Check if an eventual is ready.
int ABT_task_get_state(ABT_task task, ABT_task_state *state) ABT_API_PUBLIC
Get a state of a tasklet.
@ ABT_SCHED_STATE_TERMINATED
int ABT_info_print_task(FILE *fp, ABT_task task) ABT_API_PUBLIC
Print the information of a work unit.
int(* ABT_pool_free_fn)(ABT_pool)
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Print the runtime information of Argobots.
@ ABT_SCHED_STATE_STOPPED
int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr, size_t *stacksize) ABT_API_PUBLIC
Get stack attributes from a ULT attribute.
int ABT_task_set_migratable(ABT_task task, ABT_bool flag) ABT_API_PUBLIC
Set the migratability in a work unit.
int ABT_pool_create(ABT_pool_user_def def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool.
ABT_sched_config_var ABT_sched_config_var_end
Predefined ABT_sched_config_var to mark the last parameter.
int ABT_mutex_create_with_attr(ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex with mutex attributes.
int ABT_task_get_xstream(ABT_task task, ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream associated with a work unit.
int ABT_self_get_unit(ABT_unit *unit) ABT_API_PUBLIC
Get a unit handle of the calling work unit.
int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to another ULT.
int ABT_thread_get_last_pool_id(ABT_thread thread, int *id) ABT_API_PUBLIC
Get the last pool's ID of a work unit.
int(* ABT_pool_user_init_fn)(ABT_pool, ABT_pool_config)
Function that creates a pool.
int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC
Revive a terminated work unit.
int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC
Obtain a type of the caller.
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock a mutex.
int ABT_sched_has_to_stop(ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC
Check if a scheduler needs to stop.
int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC
Reinitialize a barrier with a new number of waiters.
int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result) ABT_API_PUBLIC
Compare two work unit handles for equality.
int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Read the elapsed time of the timer.
int ABT_self_is_unnamed(ABT_bool *is_unnamed) ABT_API_PUBLIC
Check if the calling work unit is unnamed.
ABT_pool_init_fn p_init
Function that frees a work unit.
ABT_sched_init_fn init
Function that initializes a scheduler.
@ ABT_THREAD_STATE_RUNNING
int ABT_thread_attr_set_stacksize(ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC
Set stack size in a ULT attribute.
A struct that sets and gets a pool configuration.
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Revive a terminated execution stream.
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Free a scheduler.
@ ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
int ABT_xstream_run_unit(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Execute a work unit.
int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier) ABT_API_PUBLIC
Create a new execution-stream barrier.
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ
void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC
Get a value associated with a work-unit-specific data key in a work unit.
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_rwlock_create(ABT_rwlock *newrwlock) ABT_API_PUBLIC
Create a new readers-writer lock.
int ABT_thread_migrate_to_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Request a migration of a work unit to a specific pool.
int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx, ABT_pool *pools) ABT_API_PUBLIC
Retrieve pools associated with a scheduler.
int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2, ABT_bool *result) ABT_API_PUBLIC
Compare two execution stream handles for equality.
struct ABT_rwlock_opaque * ABT_rwlock
Readers-writer lock handle type.
int ABT_task_is_migratable(ABT_task task, ABT_bool *flag) ABT_API_PUBLIC
Get the migratability of a work unit.
int ABT_pool_pop_wait_thread(ABT_pool pool, ABT_thread *thread, double time_secs) ABT_API_PUBLIC
Pop a work unit from a pool.
@ ABT_INFO_QUERY_KIND_WAIT_POLICY
int(* ABT_sched_free_fn)(ABT_sched)
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC
Signal an eventual.
ABT_pool_kind
Predefined pool type.
int ABT_mutex_get_attr(ABT_mutex mutex, ABT_mutex_attr *attr) ABT_API_PUBLIC
Get attributes of a mutex.
int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC
Retrieve a user value associated with a scheduler.
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Send a cancellation request to a work unit.
int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with a work-unit-specific data key in the calling work unit.
int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC
Print the information of a scheduler.
int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC
Get an access type of a pool.
int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC
Create a new scheduler with a scheduler definition.
@ ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC
Obtain the sum of sizes of pools associated with a scheduler.
@ ABT_XSTREAM_STATE_TERMINATED
int ABT_mutex_attr_create(ABT_mutex_attr *newattr) ABT_API_PUBLIC
Create a new mutex attribute.
int ABT_self_get_xstream(ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream that is running the calling work unit.
int ABT_self_get_thread_id(ABT_unit_id *id) ABT_API_PUBLIC
Get ID of the calling work unit.
int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC
Create a new eventual.
int ABT_sched_config_get(ABT_sched_config config, int idx, ABT_sched_config_type *p_type, void *val) ABT_API_PUBLIC
Retrieve a value from a scheduler configuration.
int ABT_task_join(ABT_task task) ABT_API_PUBLIC
Wait for a work unit to terminate.
@ ABT_INFO_QUERY_KIND_ENABLED_LOG
int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC
Create a new barrier.
int ABT_future_test(ABT_future future, ABT_bool *is_ready) ABT_API_PUBLIC
Check if a future is ready.
int ABT_pool_user_def_set_pop_many(ABT_pool_user_def def, ABT_pool_user_pop_many_fn p_pop_many) ABT_API_PUBLIC
Register a pop-many function to a pool definition.
int ABT_unit_get_thread(ABT_unit unit, ABT_thread *thread) ABT_API_PUBLIC
Get a thread handle of the target work unit.
int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC
Wait on a barrier.
int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC
Free a mutex.
int ABT_pool_push_thread_ex(ABT_pool pool, ABT_thread thread, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Push a work unit to a pool.
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition.
int ABT_pool_push_threads_ex(ABT_pool pool, const ABT_thread *threads, size_t num, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Push work units to a pool.
@ ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC
Get ID of a pool.
int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Stop a timer and read an elapsed time of a timer.
int ABT_pool_pop_threads(ABT_pool pool, ABT_thread *threads, size_t len, size_t *num) ABT_API_PUBLIC
Pop work units from a pool.
int ABT_sched_config_create(ABT_sched_config *config,...) ABT_API_PUBLIC
Create a new scheduler configuration.
int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters) ABT_API_PUBLIC
Get the number of waiters of a barrier.
@ ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.
ABT_pool_access
Pool access type.
ABT_xstream_state
State of an execution stream.
int ABT_self_resume_exit_to(ABT_thread thread) ABT_API_PUBLIC
Terminate the calling ULT and jump to another suspended ULT.
int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC
Get attributes of a work unit.