11 #if defined(ABT_C_HAVE_VISIBILITY) 12 #define ABT_API_PUBLIC __attribute__((visibility ("default"))) 14 #define ABT_API_PUBLIC 18 #if defined(__cplusplus) 50 #define ABT_VERSION "1.0" 51 #define ABT_NUMVERSION 10000300 53 #define ABT_RELEASE_TYPE_ALPHA 0 54 #define ABT_RELEASE_TYPE_BETA 1 55 #define ABT_RELEASE_TYPE_RC 2 56 #define ABT_RELEASE_TYPE_PATCH 3 58 #define ABT_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \ 59 (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH)) 61 #define ABT_DEPRECATED __attribute__((deprecated)) 65 #define ABT_ERR_UNINITIALIZED 1 67 #define ABT_ERR_OTHER 3 68 #define ABT_ERR_INV_XSTREAM 4 69 #define ABT_ERR_INV_XSTREAM_RANK 5 70 #define ABT_ERR_INV_XSTREAM_BARRIER 6 71 #define ABT_ERR_INV_SCHED 7 72 #define ABT_ERR_INV_SCHED_KIND 8 73 #define ABT_ERR_INV_SCHED_PREDEF 9 74 #define ABT_ERR_INV_SCHED_TYPE 10 75 #define ABT_ERR_INV_SCHED_CONFIG 11 76 #define ABT_ERR_INV_POOL 12 77 #define ABT_ERR_INV_POOL_KIND 13 78 #define ABT_ERR_INV_POOL_ACCESS 14 79 #define ABT_ERR_INV_UNIT 15 80 #define ABT_ERR_INV_THREAD 16 81 #define ABT_ERR_INV_THREAD_ATTR 17 82 #define ABT_ERR_INV_TASK 18 83 #define ABT_ERR_INV_KEY 19 84 #define ABT_ERR_INV_MUTEX 20 85 #define ABT_ERR_INV_MUTEX_ATTR 21 86 #define ABT_ERR_INV_COND 22 87 #define ABT_ERR_INV_RWLOCK 23 88 #define ABT_ERR_INV_EVENTUAL 24 89 #define ABT_ERR_INV_FUTURE 25 90 #define ABT_ERR_INV_BARRIER 26 91 #define ABT_ERR_INV_TIMER 27 92 #define ABT_ERR_INV_QUERY_KIND 28 93 #define ABT_ERR_XSTREAM 29 94 #define ABT_ERR_XSTREAM_STATE 30 95 #define ABT_ERR_XSTREAM_BARRIER 31 96 #define ABT_ERR_SCHED 32 97 #define ABT_ERR_SCHED_CONFIG 33 98 #define ABT_ERR_POOL 34 99 #define ABT_ERR_UNIT 35 100 #define ABT_ERR_THREAD 36 101 #define ABT_ERR_TASK 37 102 #define ABT_ERR_KEY 38 103 #define ABT_ERR_MUTEX 39 104 #define ABT_ERR_MUTEX_LOCKED 40 105 #define ABT_ERR_COND 41 106 #define ABT_ERR_COND_TIMEDOUT 42 107 #define ABT_ERR_RWLOCK 43 108 #define ABT_ERR_EVENTUAL 44 109 #define ABT_ERR_FUTURE 45 110 #define ABT_ERR_BARRIER 46 111 #define ABT_ERR_TIMER 47 112 #define ABT_ERR_MIGRATION_TARGET 48 113 #define ABT_ERR_MIGRATION_NA 49 114 #define ABT_ERR_MISSING_JOIN 50 115 #define ABT_ERR_FEATURE_NA 51 227 #define ABT_XSTREAM_ANY_RANK -1 230 struct ABT_xstream_opaque;
231 struct ABT_xstream_barrier_opaque;
232 struct ABT_sched_opaque;
233 struct ABT_sched_config_opaque;
234 struct ABT_pool_opaque;
235 struct ABT_pool_config_opaque;
236 struct ABT_unit_opaque;
237 struct ABT_thread_opaque;
238 struct ABT_thread_attr_opaque;
239 struct ABT_task_opaque;
240 struct ABT_key_opaque;
241 struct ABT_mutex_opaque;
242 struct ABT_mutex_attr_opaque;
243 struct ABT_cond_opaque;
244 struct ABT_rwlock_opaque;
245 struct ABT_eventual_opaque;
246 struct ABT_future_opaque;
247 struct ABT_barrier_opaque;
248 struct ABT_timer_opaque;
317 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL) 318 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL) 319 #define ABT_SCHED_NULL ((ABT_sched) NULL) 320 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL) 321 #define ABT_POOL_NULL ((ABT_pool) NULL) 322 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL) 323 #define ABT_UNIT_NULL ((ABT_unit) NULL) 324 #define ABT_THREAD_NULL ((ABT_thread) NULL) 325 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL) 326 #define ABT_TASK_NULL ((ABT_task) NULL) 327 #define ABT_KEY_NULL ((ABT_key) NULL) 328 #define ABT_MUTEX_NULL ((ABT_mutex) NULL) 329 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL) 330 #define ABT_COND_NULL ((ABT_cond) NULL) 331 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL) 332 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL) 333 #define ABT_FUTURE_NULL ((ABT_future) NULL) 334 #define ABT_BARRIER_NULL ((ABT_barrier) NULL) 335 #define ABT_TIMER_NULL ((ABT_timer) NULL) 337 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01)) 338 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02)) 339 #define ABT_SCHED_NULL ((ABT_sched) (0x03)) 340 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04)) 341 #define ABT_POOL_NULL ((ABT_pool) (0x05)) 342 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06)) 343 #define ABT_UNIT_NULL ((ABT_unit) (0x07)) 344 #define ABT_THREAD_NULL ((ABT_thread) (0x08)) 345 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09)) 346 #define ABT_TASK_NULL ((ABT_task) (0x0a)) 347 #define ABT_KEY_NULL ((ABT_key) (0x0b)) 348 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c)) 349 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d)) 350 #define ABT_COND_NULL ((ABT_cond) (0x0e)) 351 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f)) 352 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10)) 353 #define ABT_FUTURE_NULL ((ABT_future) (0x11)) 354 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12)) 355 #define ABT_TIMER_NULL ((ABT_timer) (0x13)) 446 ABT_pool *pools, ABT_sched_config config,
447 ABT_xstream *newxstream) ABT_API_PUBLIC;
449 ABT_xstream *newxstream) ABT_API_PUBLIC;
461 ABT_sched_predef predef,
462 int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
465 ABT_pool *pools) ABT_API_PUBLIC;
468 ABT_bool *result) ABT_API_PUBLIC;
478 int *num_cpus) ABT_API_PUBLIC;
488 ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
490 ABT_pool *pools, ABT_sched_config config,
491 ABT_sched *newsched) ABT_API_PUBLIC;
497 ABT_pool *pools) ABT_API_PUBLIC;
511 ABT_pool *newpool) ABT_API_PUBLIC;
513 ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
518 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
521 int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC;
523 void (*print_fn)(
void *arg, ABT_unit)) ABT_API_PUBLIC;
534 ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
536 void (*thread_func)(
void *),
void *arg,
537 ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
539 void (**thread_func_list)(
void *),
void **arg_list,
540 ABT_thread_attr attr, ABT_thread *newthread_list)
543 ABT_thread *thread) ABT_API_PUBLIC;
564 void(*cb_func)(ABT_thread thread,
void *cb_arg),
void *cb_arg) ABT_API_PUBLIC;
568 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
571 int ABT_thread_get_id(ABT_thread thread, ABT_thread_id *thread_id) ABT_API_PUBLIC;
580 size_t stacksize) ABT_API_PUBLIC;
582 size_t *stacksize) ABT_API_PUBLIC;
586 void(*cb_func)(ABT_thread thread,
void *cb_arg),
void *cb_arg) ABT_API_PUBLIC;
590 int ABT_task_create(ABT_pool pool,
void (*task_func)(
void *),
void *arg,
591 ABT_task *newtask) ABT_API_PUBLIC;
593 void *arg, ABT_task *newtask) ABT_API_PUBLIC;
594 int ABT_task_revive(ABT_pool pool,
void (*task_func)(
void *),
void *arg,
595 ABT_task *task) ABT_API_PUBLIC;
607 int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC;
621 int ABT_key_create(
void (*destructor)(
void *value), ABT_key *newkey) ABT_API_PUBLIC;
623 int ABT_key_set(ABT_key key,
void *value) ABT_API_PUBLIC;
624 int ABT_key_get(ABT_key key,
void **value) ABT_API_PUBLIC;
638 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
648 int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC;
650 const struct timespec *abstime) ABT_API_PUBLIC;
665 int ABT_eventual_test(ABT_eventual eventual,
void **value,
int *is_ready) ABT_API_PUBLIC;
666 int ABT_eventual_set(ABT_eventual eventual,
void *value,
int nbytes) ABT_API_PUBLIC;
671 ABT_future *newfuture) ABT_API_PUBLIC;
675 int ABT_future_set(ABT_future future,
void *value) ABT_API_PUBLIC;
692 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
703 void *val) ABT_API_PUBLIC;
715 void (*cb_func)(ABT_bool,
void *),
716 void *arg) ABT_API_PUBLIC;
718 #if defined(__cplusplus) int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal the future.
int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC
Stop the timer.
int ABT_mutex_unlock_se(ABT_mutex mutex) ABT_API_PUBLIC
Hand over the mutex within the ES.
int ABT_future_test(ABT_future future, ABT_bool *flag) ABT_API_PUBLIC
Test whether the future is ready.
int ABT_init(int argc, char **argv) ABT_API_PUBLIC
Initialize the Argobots execution environment.
struct ABT_thread_attr_opaque * ABT_thread_attr
int ABT_thread_exit(void) ABT_API_PUBLIC
The calling ULT terminates its execution.
int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC
Get the sum of the sizes of the pool of sched.
int ABT_thread_get_last_pool_id(ABT_thread thread, int *id) ABT_API_PUBLIC
Get the last pool's ID of the ULT.
struct ABT_unit_opaque * ABT_unit
int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC
Pop a unit from the target pool.
int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier) ABT_API_PUBLIC
Create a new ES barrier.
struct ABT_mutex_attr_opaque * ABT_mutex_attr
int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC
Return the ES handle associated with the caller work unit.
struct ABT_barrier_opaque * ABT_barrier
ABT_unit_get_task_fn u_get_task
int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC
Return the state of thread.
int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC
Write the information of the target scheduler to the output stream.
int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC
Create a new condition variable.
struct ABT_xstream_opaque * ABT_xstream
struct ABT_sched_opaque * ABT_sched
int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC
Ask a scheduler to finish.
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset the readiness of the target eventual.
int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Dump stack information of all the threads in the target pool.
int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC
Wait for a number of ULTs to terminate.
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Write the configuration information to the output stream.
int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC
Free the barrier.
int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the size of a pool.
int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_API_PUBLIC
int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC
Stop the timer and add the elapsed time of the timer.
int ABT_thread_attr_set_stacksize(ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC
Set the stack size in the attribute object.
int ABT_self_set_arg(void *arg) ABT_API_PUBLIC
Set the argument for the work unit function.
int ABT_info_print_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Write the information of the target pool to the output stream.
int ABT_rwlock_create(ABT_rwlock *newrwlock) ABT_API_PUBLIC
Create a new rwlock ABT_rwlock_create creates a new rwlock object and returns its handle through newr...
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Request the cancellation of the target thread.
ABT_sched_config_var ABT_sched_config_automatic
int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr, size_t stacksize) ABT_API_PUBLIC
Set stack attributes.
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free the condition variable.
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC
Return the number of current existing ESs.
int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC
Request the cancellation of the target task.
int ABT_thread_attr_set_migratable(ABT_thread_attr attr, ABT_bool flag) ABT_API_PUBLIC
Set the ULT's migratability in the attribute object.
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Release the thread object associated with thread handle.
int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC
Free the mutex object.
int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC
Get attributes of the target ULT.
int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new ES and return its handle through newxstream.
int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex with low priority.
int ABT_mutex_create_with_attr(ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex with attributes.
int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC
Get the stack size from the attribute object.
int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC
Create a new barrier.
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
struct ABT_task_opaque * ABT_task
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume the target ULT.
ABT_sched_config_var ABT_sched_config_access
int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC
Return the rank of ES associated with the caller work unit.
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 callback function and its argument in the attribute object.
size_t(* ABT_pool_get_size_fn)(ABT_pool)
int ABT_task_create(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC
Create a new task and return its handle through newtask.
int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC
Duplicate the timer.
int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC
Return the rank of ES.
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC
Write the information of the target ES to the output stream.
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 user-defined scheduler and return its handle through newsched.
int ABT_task_join(ABT_task task) ABT_API_PUBLIC
Wait for the tasklet to terminate.
ABT_unit_get_thread_fn u_get_thread
int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC
Get the value associated with the key.
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock the rwlock.
int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC
Request migration of the thread to an any available ES.
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Request the cancellation of the target ES.
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
int ABT_xstream_get_main_sched(ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC
Get the main scheduler of the target ES.
int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex, const struct timespec *abstime) ABT_API_PUBLIC
Wait on the condition.
int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *flag) ABT_API_PUBLIC
Check if the target ES is the primary ES.
int ABT_thread_migrate_to_xstream(ABT_thread thread, ABT_xstream xstream) ABT_API_PUBLIC
Migrate a thread to a specific ES.
int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC
Return the type of calling work unit.
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Return the handle of the calling tasklet.
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on the condition.
struct ABT_pool_opaque * ABT_pool
ABT_unit_is_in_pool_fn u_is_in_pool
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Ask a scheduler to stop as soon as possible.
struct ABT_mutex_opaque * ABT_mutex
int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Read the elapsed time of the timer.
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free an WU-specific data key.
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 thread and return its handle through newthread.
int ABT_thread_set_callback(ABT_thread thread, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC
Set the callback function.
int ABT_sched_config_read(ABT_sched_config config, int num_vars,...) ABT_API_PUBLIC
Copy the set values from config into the variables passed in the dynamic list of arguments.
struct ABT_rwlock_opaque * ABT_rwlock
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
int ABT_xstream_create_with_rank(ABT_sched sched, int rank, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new ES with a specific rank.
struct ABT_key_opaque * ABT_key
int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC
Retrieve the specific data of the target user-defined pool.
int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg) ABT_API_PUBLIC
Dump stacks of threads in pools existing in Argobots.
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 the target ES (xstream).
int ABT_mutex_unlock_de(ABT_mutex mutex) ABT_API_PUBLIC
int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier) ABT_API_PUBLIC
Wait on the barrier.
int ABT_mutex_create(ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex.
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr) ABT_API_PUBLIC
Write the information of the target ULT attribute to the output stream.
int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC
Obtain the overhead time of using ABT_timer.
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the processor from the current running ULT back to the scheduler.
int ABT_thread_attr_create(ABT_thread_attr *newattr) ABT_API_PUBLIC
Create a new ULT attribute object.
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 for xstream with a predefined scheduler.
int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC
Return the last pool of ULT.
struct ABT_thread_opaque * ABT_thread
ABT_sched_config_type type
int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC
Get the number of pools associated with scheduler.
int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC
Get the sum of the sizes of the pool of sched.
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free the future object.
int ABT_thread_self_id(ABT_thread_id *id) ABT_API_PUBLIC
Return the calling ULT's ID.
int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC
Get the ID of the target pool.
int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools, ABT_pool *pools) ABT_API_PUBLIC
Get the pools of the main scheduler of the target ES.
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free the rwlock object.
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC
Write the information of all created ESs to the output stream.
int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC
Compare two tasklet handles for equality.
int ABT_thread_free_many(int num, ABT_thread *thread_list) ABT_API_PUBLIC
Release a set of ULT objects.
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on the future.
int(* ABT_sched_free_fn)(ABT_sched)
int ABT_future_create(uint32_t compartments, void(*cb_func)(void **arg), ABT_future *newfuture) ABT_API_PUBLIC
Create a future.
int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock the rwlock as a writer.
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 ES with a predefined scheduler and return its handle through newxstream.
int ABT_info_print_task(FILE *fp, ABT_task task) ABT_API_PUBLIC
Write the information of the target tasklet to the output stream.
int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC
Reinitialize the barrier.
int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC
Get the ULT's stack size.
int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC
Set the specific data of the target user-defined pool.
int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC
Get the tasklet's id.
int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC
Create a new timer.
int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC
Get the string of error code and its length.
int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC
Get the ULT's migratability.
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for xstream to terminate.
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val) ABT_API_PUBLIC
Get the configuration information associated with query_kind.
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Check the events and process them.
int ABT_xstream_set_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset) ABT_API_PUBLIC
Set the CPU affinity of the target ES.
int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC
Free the timer object.
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free the given pool, and modify its value to ABT_POOL_NULL.
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
int ABT_pool_print_all(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC
int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC
Bind the target ES to a target CPU.
int ABT_finalize(void) ABT_API_PUBLIC
Terminate the Argobots execution environment.
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC
Get the CPU binding for the target ES.
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Release the scheduler object associated with sched handle.
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
int ABT_xstream_get_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset, int *num_cpus) ABT_API_PUBLIC
Get the CPU affinity for the target ES.
int ABT_task_get_last_pool(ABT_task task, ABT_pool *pool) ABT_API_PUBLIC
Return the last pool of task.
int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC
Free the eventual object.
int ABT_task_set_migratable(ABT_task task, ABT_bool flag) ABT_API_PUBLIC
Set the tasklet's migratability.
int ABT_thread_is_primary(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC
Check if the target ULT is the primary ULT.
int ABT_xstream_exit(void) ABT_API_PUBLIC
Terminate the ES associated with the calling ULT.
int ABT_thread_create_many(int num, 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 ULTs.
int ABT_thread_set_migratable(ABT_thread thread, ABT_bool flag) ABT_API_PUBLIC
Set the ULT's migratability.
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the current ULT.
int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Remove a specified unit from the target pool.
int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr, size_t *stacksize) ABT_API_PUBLIC
Get stack attributes.
int ABT_mutex_attr_set_recursive(ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC
Set the recursive property in the attribute object.
int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Push a unit to the target pool.
int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC
Wait on the barrier.
struct ABT_future_opaque * ABT_future
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for thread to terminate.
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex.
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Release the ES object associated with ES handle.
int ABT_thread_migrate_to_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Migrate a thread to a specific pool.
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Dump the stack of the target thread to the output stream.
int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters) ABT_API_PUBLIC
Get the number of waiters for the barrier.
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free the ULT attribute object.
void(* ABT_unit_free_fn)(ABT_unit *)
int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC
Retrieve the argument for the tasklet function.
struct ABT_eventual_opaque * ABT_eventual
int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC
Push a scheduler to a pool.
int ABT_info_print_thread(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Write the information of the target ULT to the output stream.
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free the configuration.
int ABT_key_create(void(*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC
Create an WU-specific data key.
int ABT_thread_set_associated_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Set the associated pool for the target ULT.
int ABT_thread_get_id(ABT_thread thread, ABT_thread_id *thread_id) ABT_API_PUBLIC
Get the ULT's id.
ABT_unit_create_from_task_fn u_create_from_task
int ABT_self_get_arg(void **arg) ABT_API_PUBLIC
Retrieve the argument for the work unit function.
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Stop the timer and read the elapsed time of the timer.
int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC
Compare two mutex handles for equality.
int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC
Get the access type of target pool.
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 and return its handle through newpool.
ABT_sched_config_var ABT_sched_basic_freq
int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC
Retrieve the specific data of the target user-defined scheduler.
int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC
Wait on the eventual.
void(* ABT_sched_run_fn)(ABT_sched)
int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC
Set the argument for the ULT function.
int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx, ABT_pool *pools) ABT_API_PUBLIC
Get the pools of the scheduler sched.
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
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 predefined scheduler.
int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC
Free the mutex attribute object.
int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC
Start the timer.
int ABT_task_get_state(ABT_task task, ABT_task_state *state) ABT_API_PUBLIC
Return the state of task.
int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC
Get the last pool's ID of calling work unit.
int ABT_pool_create(ABT_pool_def *def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool and return its handle through newpool.
int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC
Retrieve the argument for the ULT function.
int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC
Return the state of xstream.
int ABT_mutex_attr_create(ABT_mutex_attr *newattr) ABT_API_PUBLIC
Create a new mutex attribute object.
ABT_unit_create_from_thread_fn u_create_from_thread
struct ABT_sched_config_opaque * ABT_sched_config
int ABT_task_get_last_pool_id(ABT_task task, int *id) ABT_API_PUBLIC
Get the last pool's ID of the tasklet.
int ABT_self_is_primary(ABT_bool *flag) ABT_API_PUBLIC
Check if the caller is the primary ULT.
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC
Return the ID of the calling tasklet.
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock the mutex.
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Restart an ES that has been joined by ABT_xstream_join().
ABT_sched_get_migr_pool_fn get_migr_pool
int ABT_xstream_set_main_sched(ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC
Set the main scheduler of the target ES.
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex without blocking.
int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier) ABT_API_PUBLIC
Free the ES barrier.
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 the target ES (xstream).
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex without context switch.
int ABT_task_free(ABT_task *task) ABT_API_PUBLIC
Release the task object associated with task handle.
int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the processor from the current running thread to the specific thread.
double ABT_get_wtime(void) ABT_API_PUBLIC
Get elapsed wall clock time.
int ABT_sched_config_create(ABT_sched_config *config,...) ABT_API_PUBLIC
Create a scheduler configuration.
int ABT_xstream_set_rank(ABT_xstream xstream, const int rank) ABT_API_PUBLIC
Set the rank for target ES.
int ABT_eventual_test(ABT_eventual eventual, void **value, int *is_ready) ABT_API_PUBLIC
Test the readiness of an eventual.
struct ABT_pool_config_opaque * ABT_pool_config
ABT_unit_get_type_fn u_get_type
ABT_pool_get_size_fn p_get_size
int(* ABT_pool_free_fn)(ABT_pool)
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
ABT_sched_config_var ABT_sched_config_var_end
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset the readiness of the target future.
int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC
Revive the ULT.
int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the total size of a pool.
int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result) ABT_API_PUBLIC
Compare two ULT handles for equality.
int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock the rwlock as a reader.
int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Set the associated pool for the target work unit.
int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC
Set the specific data of the target user-defined scheduler.
ABT_pool_remove_fn p_remove
int ABT_sched_has_to_stop(ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC
Check if the scheduler needs to stop.
int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC
Create an eventual.
int ABT_xstream_run_unit(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Execute a unit on the local ES.
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Return the handle of the calling ULT.
int ABT_task_is_migratable(ABT_task task, ABT_bool *flag) ABT_API_PUBLIC
Get the tasklet's migratability.
ABT_pool_print_all_fn p_print_all
int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2, ABT_bool *result) ABT_API_PUBLIC
Compare two ES handles for equality.
ABT_pool_pop_timedwait_fn p_pop_timedwait
int ABT_task_get_xstream(ABT_task task, ABT_xstream *xstream) ABT_API_PUBLIC
Get the ES associated with the target tasklet.
int ABT_thread_migrate_to_sched(ABT_thread thread, ABT_sched sched) ABT_API_PUBLIC
Migrate a thread to a specific scheduler.
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC
Signal the eventual.
int ABT_task_revive(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *task) ABT_API_PUBLIC
Revive the tasklet.
int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with the key.
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition.
int ABT_initialized(void) ABT_API_PUBLIC
Check whether ABT_init() has been called.
int ABT_self_on_primary_xstream(ABT_bool *flag) ABT_API_PUBLIC
Check if the caller's ES is the primary ES.
struct ABT_cond_opaque * ABT_cond
struct ABT_timer_opaque * ABT_timer