ARGOBOTS  140a356fc09a44696eb3487150e459266f9b5405
abt.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #ifndef ABT_H_INCLUDED
7 #define ABT_H_INCLUDED
8 
9 /* user include file for ARGOBOTS programs */
10 
11 #if defined(ABT_C_HAVE_VISIBILITY)
12 #define ABT_API_PUBLIC __attribute__((visibility ("default")))
13 #else
14 #define ABT_API_PUBLIC
15 #endif
16 
17 /* Keep C++ compilers from getting confused */
18 #if defined(__cplusplus)
19 extern "C" {
20 #endif
21 
22 #include <stdio.h>
23 #include <stddef.h>
24 #include <stdint.h>
25 #include <sys/time.h>
26 
46 #define ABT_VERSION "1.1a1"
47 
68 #define ABT_NUMVERSION 10100001
69 
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
74 
75 #define ABT_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \
76  (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH))
77 
78 #define ABT_DEPRECATED __attribute__((deprecated))
79 
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
84 #endif
85 
90 #define ABT_SUCCESS 0
91 
95 #define ABT_ERR_UNINITIALIZED 1
96 
103 #define ABT_ERR_MEM 2
104 
108 #define ABT_ERR_OTHER 3
109 
113 #define ABT_ERR_INV_XSTREAM 4
114 
118 #define ABT_ERR_INV_XSTREAM_RANK 5
119 
123 #define ABT_ERR_INV_XSTREAM_BARRIER 6
124 
128 #define ABT_ERR_INV_SCHED 7
129 
133 #define ABT_ERR_INV_SCHED_KIND 8
134 
138 #define ABT_ERR_INV_SCHED_PREDEF 9
139 
145 #define ABT_ERR_INV_SCHED_TYPE 10
146 
150 #define ABT_ERR_INV_SCHED_CONFIG 11
151 
155 #define ABT_ERR_INV_POOL 12
156 
160 #define ABT_ERR_INV_POOL_KIND 13
161 
165 #define ABT_ERR_INV_POOL_ACCESS 14
166 
170 #define ABT_ERR_INV_UNIT 15
171 
175 #define ABT_ERR_INV_THREAD 16
176 
180 #define ABT_ERR_INV_THREAD_ATTR 17
181 
189 #define ABT_ERR_INV_TASK 18
190 
194 #define ABT_ERR_INV_KEY 19
195 
199 #define ABT_ERR_INV_MUTEX 20
200 
204 #define ABT_ERR_INV_MUTEX_ATTR 21
205 
209 #define ABT_ERR_INV_COND 22
210 
214 #define ABT_ERR_INV_RWLOCK 23
215 
219 #define ABT_ERR_INV_EVENTUAL 24
220 
224 #define ABT_ERR_INV_FUTURE 25
225 
229 #define ABT_ERR_INV_BARRIER 26
230 
234 #define ABT_ERR_INV_TIMER 27
235 
239 #define ABT_ERR_INV_QUERY_KIND 28
240 
244 #define ABT_ERR_INV_TOOL_CONTEXT 52
245 
249 #define ABT_ERR_INV_ARG 53
250 
254 #define ABT_ERR_XSTREAM 29
255 
261 #define ABT_ERR_XSTREAM_STATE 30
262 
266 #define ABT_ERR_XSTREAM_BARRIER 31
267 
271 #define ABT_ERR_SCHED 32
272 
276 #define ABT_ERR_SCHED_CONFIG 33
277 
281 #define ABT_ERR_POOL 34
282 
286 #define ABT_ERR_UNIT 35
287 
291 #define ABT_ERR_THREAD 36
292 
300 #define ABT_ERR_TASK 37
301 
305 #define ABT_ERR_KEY 38
306 
310 #define ABT_ERR_MUTEX 39
311 
317 #define ABT_ERR_MUTEX_LOCKED 40
318 
322 #define ABT_ERR_COND 41
323 
329 #define ABT_ERR_COND_TIMEDOUT 42
330 
334 #define ABT_ERR_RWLOCK 43
335 
339 #define ABT_ERR_EVENTUAL 44
340 
344 #define ABT_ERR_FUTURE 45
345 
349 #define ABT_ERR_BARRIER 46
350 
354 #define ABT_ERR_TIMER 47
355 
359 #define ABT_ERR_MIGRATION_TARGET 48
360 
368 #define ABT_ERR_MIGRATION_NA 49
369 
375 #define ABT_ERR_MISSING_JOIN 50
376 
380 #define ABT_ERR_FEATURE_NA 51
381 
385 #define ABT_ERR_SYS 54
386 
390 #define ABT_ERR_CPUID 55
391 
401 };
402 
416 };
417 
433 };
434 
447 };
448 
472 };
473 
487 };
488 
508 };
509 
534 };
535 
553 };
554 
611 };
612 
630 };
631 
641 };
642 
670 };
671 
676 #define ABT_TOOL_EVENT_THREAD_NONE (0)
677 
681 #define ABT_TOOL_EVENT_THREAD_CREATE (1 << 0)
682 
686 #define ABT_TOOL_EVENT_THREAD_JOIN (1 << 1)
687 
691 #define ABT_TOOL_EVENT_THREAD_FREE (1 << 2)
692 
696 #define ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3)
697 
701 #define ABT_TOOL_EVENT_THREAD_RUN (1 << 4)
702 
706 #define ABT_TOOL_EVENT_THREAD_FINISH (1 << 5)
707 
711 #define ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6)
712 
716 #define ABT_TOOL_EVENT_THREAD_YIELD (1 << 7)
717 
721 #define ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8)
722 
726 #define ABT_TOOL_EVENT_THREAD_RESUME (1 << 9)
727 
731 #define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1))
732 
733 
735 #define ABT_TRUE 1
736 
737 #define ABT_FALSE 0
738 
746 #define ABT_XSTREAM_ANY_RANK -1
747 
748 /* Data Types */
749 struct ABT_xstream_opaque;
750 struct ABT_xstream_barrier_opaque;
751 struct ABT_sched_opaque;
752 struct ABT_sched_config_opaque;
753 struct ABT_pool_opaque;
754 struct ABT_pool_config_opaque;
755 struct ABT_unit_opaque;
756 struct ABT_thread_opaque;
757 struct ABT_thread_attr_opaque;
758 struct ABT_task_opaque;
759 struct ABT_key_opaque;
760 struct ABT_mutex_opaque;
761 struct ABT_mutex_attr_opaque;
762 struct ABT_cond_opaque;
763 struct ABT_rwlock_opaque;
764 struct ABT_eventual_opaque;
765 struct ABT_future_opaque;
766 struct ABT_barrier_opaque;
767 struct ABT_timer_opaque;
768 struct ABT_tool_context_opaque;
769 
776 typedef struct ABT_xstream_opaque * ABT_xstream;
788 typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier;
795 typedef struct ABT_sched_opaque * ABT_sched;
802 typedef struct ABT_sched_config_opaque * ABT_sched_config;
828 typedef struct ABT_pool_opaque * ABT_pool;
835 typedef struct ABT_pool_config_opaque * ABT_pool_config;
856 typedef struct ABT_unit_opaque * ABT_unit;
866 typedef uint64_t ABT_unit_id;
877 typedef struct ABT_thread_opaque * ABT_thread;
884 typedef struct ABT_thread_attr_opaque * ABT_thread_attr;
918 typedef struct ABT_thread_opaque * ABT_task;
925 typedef struct ABT_key_opaque * ABT_key;
932 typedef struct ABT_mutex_opaque * ABT_mutex;
939 typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr;
946 typedef struct ABT_cond_opaque * ABT_cond;
953 typedef struct ABT_rwlock_opaque * ABT_rwlock;
960 typedef struct ABT_eventual_opaque * ABT_eventual;
967 typedef struct ABT_future_opaque * ABT_future;
974 typedef struct ABT_barrier_opaque * ABT_barrier;
981 typedef struct ABT_timer_opaque * ABT_timer;
988 typedef int ABT_bool;
1000 typedef struct ABT_tool_context_opaque * ABT_tool_context;
1016 
1017 
1018 /* Null Object Handles */
1019 #define ABT_NULL 0
1020 #if ABT_NULL == 1
1021 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
1022 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
1023 #define ABT_SCHED_NULL ((ABT_sched) NULL)
1024 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
1025 #define ABT_POOL_NULL ((ABT_pool) NULL)
1026 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
1027 #define ABT_UNIT_NULL ((ABT_unit) NULL)
1028 #define ABT_THREAD_NULL ((ABT_thread) NULL)
1029 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
1030 #define ABT_TASK_NULL ((ABT_task) NULL)
1031 #define ABT_KEY_NULL ((ABT_key) NULL)
1032 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
1033 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
1034 #define ABT_COND_NULL ((ABT_cond) NULL)
1035 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
1036 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
1037 #define ABT_FUTURE_NULL ((ABT_future) NULL)
1038 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
1039 #define ABT_TIMER_NULL ((ABT_timer) NULL)
1040 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) NULL)
1041 #else
1042 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
1043 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
1044 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
1045 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
1046 #define ABT_POOL_NULL ((ABT_pool) (0x05))
1047 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
1048 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
1049 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
1050 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
1051 #define ABT_TASK_NULL ((ABT_task) (0x0a))
1052 #define ABT_KEY_NULL ((ABT_key) (0x0b))
1053 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
1054 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
1055 #define ABT_COND_NULL ((ABT_cond) (0x0e))
1056 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
1057 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
1058 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
1059 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
1060 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
1061 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14))
1062 #endif
1063 
1068 typedef enum {
1076 
1081 typedef struct {
1083  int idx;
1087 
1131 
1132 /* Scheduler Functions */
1134 typedef void (*ABT_sched_run_fn)(ABT_sched);
1136 /* To get a pool ready for receiving a migration */
1138 
1143 typedef struct {
1242 } ABT_sched_def;
1243 
1244 /* Pool Functions */
1251 typedef void (*ABT_unit_free_fn)(ABT_unit *);
1253 typedef size_t (*ABT_pool_get_size_fn)(ABT_pool);
1257 typedef ABT_unit (*ABT_pool_pop_timedwait_fn)(ABT_pool, double); /* Deprecated .*/
1259 typedef int (*ABT_pool_free_fn)(ABT_pool);
1260 typedef int (*ABT_pool_print_all_fn)(ABT_pool, void *arg,
1261  void (*)(void*, ABT_unit));
1262 
1267 typedef struct {
1441 #ifdef ABT_ENABLE_VER_20_API
1442 
1461  ABT_pool_pop_wait_fn p_pop_wait;
1462 #endif
1463 
1529 } ABT_pool_def;
1530 
1531 /* Tool callback type. */
1532 typedef void (*ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event,
1533  ABT_tool_context context, void *user_arg);
1534 typedef void (*ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event,
1535  ABT_tool_context context, void *user_arg);
1536 
1537 /* Init & Finalize */
1538 int ABT_init(int argc, char **argv) ABT_API_PUBLIC;
1539 int ABT_finalize(void) ABT_API_PUBLIC;
1541 
1542 /* Execution Stream (ES) */
1543 int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC;
1544 int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools,
1545  ABT_pool *pools, ABT_sched_config config,
1546  ABT_xstream *newxstream) ABT_API_PUBLIC;
1547 int ABT_xstream_create_with_rank(ABT_sched sched, int rank,
1548  ABT_xstream *newxstream) ABT_API_PUBLIC;
1555 int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC;
1556 int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC;
1557 int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC;
1560  ABT_sched_predef predef,
1561  int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
1563 int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools,
1564  ABT_pool *pools) ABT_API_PUBLIC;
1566 int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2,
1567  ABT_bool *result) ABT_API_PUBLIC;
1568 int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC;
1569 int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *is_primary) ABT_API_PUBLIC;
1572 int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC;
1573 int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC;
1574 int ABT_xstream_set_affinity(ABT_xstream xstream, int num_cpuids, int *cpuids)
1576 int ABT_xstream_get_affinity(ABT_xstream xstream, int max_cpuids, int *cpuids,
1577  int *num_cpuids) ABT_API_PUBLIC;
1578 
1579 /* ES Barrier */
1580 int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
1584 
1585 /* Scheduler */
1586 int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools,
1587  ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
1588 int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools,
1589  ABT_pool *pools, ABT_sched_config config,
1590  ABT_sched *newsched) ABT_API_PUBLIC;
1592 int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC;
1593 int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC;
1594 int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC;
1595 int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx,
1596  ABT_pool *pools) ABT_API_PUBLIC;
1597 int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
1598 int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
1602 
1603 /* Scheduler config */
1605 int ABT_sched_config_read(ABT_sched_config config, int num_vars, ...) ABT_API_PUBLIC;
1607 
1608 /* Pool */
1610  ABT_pool *newpool) ABT_API_PUBLIC;
1612  ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
1615 int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
1616 int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
1617 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
1618 int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC;
1619 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs)
1623 int ABT_pool_print_all(ABT_pool pool, void *arg,
1624  void (*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC;
1625 int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC;
1626 int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC;
1628 int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC;
1629 
1630 /* Work Unit */
1632 
1633 /* User-level Thread (ULT) */
1634 int ABT_thread_create(ABT_pool pool, void (*thread_func)(void *), void *arg,
1635  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
1637  void (*thread_func)(void *), void *arg,
1638  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
1639 int ABT_thread_create_many(int num_threads, ABT_pool *pool_list,
1640  void (**thread_func_list)(void *), void **arg_list,
1641  ABT_thread_attr attr, ABT_thread *newthread_list)
1643 int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg,
1644  ABT_thread *thread) ABT_API_PUBLIC;
1646 int ABT_thread_free_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
1648 int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
1666  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
1668 int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *is_migratable) ABT_API_PUBLIC;
1669 int ABT_thread_is_primary(ABT_thread thread, ABT_bool *is_primary) ABT_API_PUBLIC;
1670 int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *is_unnamed) ABT_API_PUBLIC;
1671 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
1673 int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC;
1674 int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC;
1675 int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC;
1676 int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC;
1677 int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC;
1678 int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC;
1680 
1681 /* ULT Attributes */
1684 int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr,
1685  size_t stacksize) ABT_API_PUBLIC;
1686 int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr,
1687  size_t *stacksize) ABT_API_PUBLIC;
1689 int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC;
1691  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
1693 
1694 /* Tasklet */
1695 int ABT_task_create(ABT_pool pool, void (*task_func)(void *), void *arg,
1696  ABT_task *newtask) ABT_API_PUBLIC;
1697 int ABT_task_create_on_xstream(ABT_xstream xstream, void (*task_func)(void *),
1698  void *arg, ABT_task *newtask) ABT_API_PUBLIC;
1699 int ABT_task_revive(ABT_pool pool, void (*task_func)(void *), void *arg,
1700  ABT_task *task) ABT_API_PUBLIC;
1705 int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC;
1712 int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC;
1713 int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC;
1714 int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC;
1715 #define ABT_task_is_unnamed ABT_thread_is_unnamed
1716 #define ABT_task_set_specific ABT_thread_set_specific
1717 #define ABT_task_get_specific ABT_thread_get_specific
1718 
1719 /* Self */
1724 int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC;
1726 int ABT_self_set_arg(void *arg) ABT_API_PUBLIC;
1727 int ABT_self_get_arg(void **arg) ABT_API_PUBLIC;
1728 
1729 /* ULT-specific data */
1730 int ABT_key_create(void (*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC;
1732 int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC;
1733 int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC;
1734 
1735 /* Mutex */
1747 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
1748 
1749 /* Mutex Attributes */
1753 
1754 /* Condition variable */
1758 int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex,
1759  const struct timespec *abstime) ABT_API_PUBLIC;
1762 
1763 /* Readers writer lock */
1769 
1770 /* Eventual */
1771 int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC;
1773 int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC;
1774 int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready) ABT_API_PUBLIC;
1775 int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC;
1777 
1778 /* Futures */
1779 int ABT_future_create(uint32_t num_compartments, void (*cb_func)(void **arg),
1780  ABT_future *newfuture) ABT_API_PUBLIC;
1783 int ABT_future_test(ABT_future future, ABT_bool *is_ready) ABT_API_PUBLIC;
1784 int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC;
1786 
1787 /* Barrier */
1788 int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC;
1789 int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC;
1792 int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
1794 
1795 /* Error */
1796 int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC;
1797 
1798 /* Timer */
1799 double ABT_get_wtime(void) ABT_API_PUBLIC;
1801 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
1805 int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1806 int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1807 int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1808 int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC;
1809 
1810 /* Information */
1812  void *val) ABT_API_PUBLIC;
1815 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC;
1816 int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC;
1817 int ABT_info_print_pool(FILE* fp, ABT_pool pool) ABT_API_PUBLIC;
1818 int ABT_info_print_thread(FILE* fp, ABT_thread thread) ABT_API_PUBLIC;
1820 int ABT_info_print_task(FILE* fp, ABT_task task) ABT_API_PUBLIC;
1823 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
1824  void (*cb_func)(ABT_bool, void *),
1825  void *arg) ABT_API_PUBLIC;
1826 
1827 /* Tool Functions */
1829  uint64_t event_mask,
1830  void *user_arg) ABT_API_PUBLIC;
1831 int ABT_tool_query_thread(ABT_tool_context context, uint64_t event,
1832  ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC;
1833 
1834 #if defined(__cplusplus)
1835 }
1836 #endif
1837 
1838 #endif /* ABT_H_INCLUDED */
ABT_mutex_lock_low
int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex with low priority.
Definition: mutex.c:219
ABT_pool_pop_fn
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:1255
ABT_unit_get_task_fn
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:1247
ABT_task_state
ABT_task_state
State of a tasklet.
Definition: abt.h:426
ABT_xstream_set_affinity
int ABT_xstream_set_affinity(ABT_xstream xstream, int num_cpuids, int *cpuids) ABT_API_PUBLIC
Bind an execution stream to target CPUs.
Definition: stream.c:1362
ABT_THREAD_STATE_TERMINATED
@ ABT_THREAD_STATE_TERMINATED
Definition: abt.h:415
ABT_thread_migrate_to_xstream
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.
Definition: thread.c:1233
ABT_SYNC_EVENT_TYPE_USER
@ ABT_SYNC_EVENT_TYPE_USER
Definition: abt.h:651
ABT_sched_config_var
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1081
ABT_key
struct ABT_key_opaque * ABT_key
Work-unit-specific data key handle type.
Definition: abt.h:925
ABT_info_print_xstream
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC
Print the information of an execution stream.
Definition: info.c:478
ABT_xstream_barrier_free
int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier) ABT_API_PUBLIC
Free an execution-stream barrier.
Definition: stream_barrier.c:101
ABT_sched_predef
ABT_sched_predef
Predefined scheduler type.
Definition: abt.h:457
ABT_pool_def::u_get_task
ABT_unit_get_task_fn u_get_task
Unused function.
Definition: abt.h:1319
ABT_thread_get_arg
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.
Definition: thread.c:1971
ABT_thread_resume
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume a ULT.
Definition: thread.c:1162
ABT_pool_get_data
int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC
Retrieve user data from a pool.
Definition: pool.c:732
ABT_eventual_reset
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset a readiness of an eventual.
Definition: eventual.c:359
ABT_pool_pop_wait
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.
Definition: pool.c:445
ABT_get_wtime
double ABT_get_wtime(void) ABT_API_PUBLIC
Get elapsed wall clock time.
Definition: timer.c:28
ABT_sched_create_basic
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.
Definition: sched.c:179
ABT_thread_is_primary
int ABT_thread_is_primary(ABT_thread thread, ABT_bool *is_primary) ABT_API_PUBLIC
Check if a work unit is the primary ULT.
Definition: thread.c:1742
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:988
ABT_pool_get_size
int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Get the size of a pool.
Definition: pool.c:333
ABT_task_cancel
int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC
Send a termination request to a work unit.
Definition: task.c:204
ABT_timer_create
int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC
Create a new timer.
Definition: timer.c:60
ABT_unit_is_in_pool_fn
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
Definition: abt.h:1248
ABT_THREAD_STATE_READY
@ ABT_THREAD_STATE_READY
Definition: abt.h:409
ABT_tool_query_kind
ABT_tool_query_kind
Tool query kind for ABT_tool_query_thread().
Definition: abt.h:617
ABT_info_print_thread_attr
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr) ABT_API_PUBLIC
Print the information of a ULT attribute.
Definition: info.c:647
ABT_timer_free
int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC
Free a timer.
Definition: timer.c:140
ABT_TOOL_QUERY_KIND_STACK_DEPTH
@ ABT_TOOL_QUERY_KIND_STACK_DEPTH
Definition: abt.h:621
ABT_self_get_arg
int ABT_self_get_arg(void **arg) ABT_API_PUBLIC
Retrieve an argument for a work unit function of the calling work unit.
Definition: self.c:343
ABT_EXEC_ENTITY_TYPE_EXT
@ ABT_EXEC_ENTITY_TYPE_EXT
Definition: abt.h:638
ABT_task_self_id
int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC
Get ID of the calling work unit.
Definition: task.c:288
ABT_sched_run_fn
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:1134
ABT_cond_free
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free a condition variable.
Definition: cond.c:86
ABT_sched_def::type
ABT_sched_type type
Unused value.
Definition: abt.h:1150
ABT_pool_create
int ABT_pool_create(ABT_pool_def *def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool.
Definition: pool.c:72
ABT_task_self
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Get the calling work unit.
Definition: task.c:243
ABT_TOOL_QUERY_KIND_CALLER_HANDLE
@ ABT_TOOL_QUERY_KIND_CALLER_HANDLE
Definition: abt.h:625
ABT_thread_attr
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
Definition: abt.h:884
ABT_task
struct ABT_thread_opaque * ABT_task
Work unit handle type.
Definition: abt.h:918
ABT_pool_add_sched
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.
Definition: pool.c:784
ABT_thread
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
Definition: abt.h:877
ABT_cond_timedwait
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.
Definition: cond.c:226
ABT_thread_join_many
int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC
Wait for a set of work units to terminate.
Definition: thread.c:562
ABT_task_get_last_pool_id
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.
Definition: task.c:389
ABT_thread_create_many
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.
Definition: thread.c:245
ABT_unit_get_type_fn
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:1245
ABT_info_print_all_xstreams
int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC
Print the information of execution streams.
Definition: info.c:418
ABT_xstream_self
int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream that is running the calling work unit.
Definition: stream.c:595
ABT_unit_create_from_task_fn
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
Definition: abt.h:1250
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
Definition: abt.h:627
ABT_future_free
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free a future.
Definition: futures.c:115
ABT_exec_entity_type
ABT_exec_entity_type
Type of execution entity.
Definition: abt.h:636
ABT_thread_get_stacksize
int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC
Get a stack size of a work unit.
Definition: thread.c:1862
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
Definition: abt.h:598
ABT_TASK_STATE_TERMINATED
@ ABT_TASK_STATE_TERMINATED
Definition: abt.h:432
ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
Definition: abt.h:610
ABT_future_wait
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on a future.
Definition: futures.c:164
ABT_xstream_set_rank
int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC
Set a rank for an execution stream.
Definition: stream.c:685
ABT_xstream_get_num
int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC
Get the number of current existing execution streams.
Definition: stream.c:1097
ABT_xstream_get_affinity
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.
Definition: stream.c:1426
ABT_thread_set_migratable
int ABT_thread_set_migratable(ABT_thread thread, ABT_bool migratable) ABT_API_PUBLIC
Set the migratability in a work unit.
Definition: thread.c:1643
ABT_unit_set_associated_pool
int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Set the associated pool for a work unit.
Definition: unit.c:38
ABT_tool_register_thread_callback
int ABT_tool_register_thread_callback(ABT_tool_thread_callback_fn cb_func, uint64_t event_mask, void *user_arg) ABT_API_PUBLIC
Register a callback function for work unit events.
Definition: tool.c:83
ABT_sched_exit
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Request a scheduler to finish.
Definition: sched.c:413
ABT_pool_pop_wait_fn
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
Definition: abt.h:1256
ABT_key_get
int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC
Get a value associated with a key in the calling work unit.
Definition: key.c:204
ABT_thread_get_id
int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC
Get ID of a work unit.
Definition: thread.c:1901
ABT_rwlock_free
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free a readers-writer lock.
Definition: rwlock.c:86
ABT_pool_def::u_free
ABT_unit_free_fn u_free
Function that frees a work unit.
Definition: abt.h:1382
ABT_POOL_ACCESS_MPMC
@ ABT_POOL_ACCESS_MPMC
Definition: abt.h:533
ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN
@ ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN
Definition: abt.h:655
ABT_sched_def::run
ABT_sched_run_fn run
Function that defines a kernel of a scheduler.
Definition: abt.h:1208
ABT_sched_config
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
Definition: abt.h:802
ABT_SCHED_DEFAULT
@ ABT_SCHED_DEFAULT
Definition: abt.h:459
ABT_mutex
struct ABT_mutex_opaque * ABT_mutex
Mutex handle type.
Definition: abt.h:932
ABT_mutex_unlock_de
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...
Definition: mutex.c:461
ABT_thread_attr_create
int ABT_thread_attr_create(ABT_thread_attr *newattr) ABT_API_PUBLIC
Create a new ULT attribute.
Definition: thread_attr.c:49
ABT_xstream_barrier_wait
int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier) ABT_API_PUBLIC
Wait on an execution-stream barrier.
Definition: stream_barrier.c:140
ABT_rwlock_rdlock
int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a reader.
Definition: rwlock.c:137
ABT_timer_get_overhead
int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC
Obtain an overhead time of using ABT_timer.
Definition: timer.c:355
ABT_pool_def::p_remove
ABT_pool_remove_fn p_remove
Function that removes a work unit from a pool.
Definition: abt.h:1498
ABT_SYNC_EVENT_TYPE_MUTEX
@ ABT_SYNC_EVENT_TYPE_MUTEX
Definition: abt.h:659
ABT_info_trigger_print_all_thread_stacks
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.
Definition: info.c:867
ABT_key_free
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free a work-unit-specific data key.
Definition: key.c:108
ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
@ ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
Definition: abt.h:582
ABT_pool_pop_timedwait_fn
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:1257
ABT_info_print_thread_stacks_in_pool
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.
Definition: info.c:796
ABT_mutex_lock
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex.
Definition: mutex.c:182
ABT_SYNC_EVENT_TYPE_FUTURE
@ ABT_SYNC_EVENT_TYPE_FUTURE
Definition: abt.h:667
ABT_pool_def::u_get_type
ABT_unit_get_type_fn u_get_type
Unused function.
Definition: abt.h:1290
ABT_thread_attr_set_stack
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.
Definition: thread_attr.c:150
ABT_xstream_cancel
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Send a cancellation request to an execution stream.
Definition: stream.c:552
ABT_pool_def::u_is_in_pool
ABT_unit_is_in_pool_fn u_is_in_pool
Function that returns whether a work unit is in its associated pool or not.
Definition: abt.h:1337
ABT_timer_dup
int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC
Duplicate a timer.
Definition: timer.c:102
ABT_xstream_create
int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new execution stream.
Definition: stream.c:80
ABT_sched_type
ABT_sched_type
Scheduler's work unit type.
Definition: abt.h:482
ABT_future_create
int ABT_future_create(uint32_t num_compartments, void(*cb_func)(void **arg), ABT_future *newfuture) ABT_API_PUBLIC
Create a new future.
Definition: futures.c:60
ABT_thread_get_state
int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC
Get a state of a work unit.
Definition: thread.c:822
ABT_finalize
int ABT_finalize(void) ABT_API_PUBLIC
Finalize the Argobots execution environment.
Definition: global.c:133
ABT_xstream_get_main_sched
int ABT_xstream_get_main_sched(ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC
Retrieve the main scheduler of an execution stream.
Definition: stream.c:951
ABT_pool_print_all_fn
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:1260
ABT_thread_attr_free
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free a ULT attribute.
Definition: thread_attr.c:88
ABT_pool
struct ABT_pool_opaque * ABT_pool
Pool handle type.
Definition: abt.h:828
ABT_xstream_get_rank
int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC
Retrieve a rank of an execution stream.
Definition: stream.c:726
ABT_sched_config_automatic
ABT_sched_config_var ABT_sched_config_automatic
Predefined ABT_sched_config_var to configure whether the scheduler is freed automatically or not.
Definition: config.c:30
ABT_xstream_self_rank
int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC
Return a rank of an execution stream associated with a caller.
Definition: stream.c:637
ABT_POOL_ACCESS_MPSC
@ ABT_POOL_ACCESS_MPSC
Definition: abt.h:527
ABT_thread_state
ABT_thread_state
State of a work unit.
Definition: abt.h:407
ABT_thread_free
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Free a work unit.
Definition: thread.c:406
ABT_mutex_equal
int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC
Compare two mutex handles for equality.
Definition: mutex.c:497
ABT_sched_config_read
int ABT_sched_config_read(ABT_sched_config config, int num_vars,...) ABT_API_PUBLIC
Retrieve values from a scheduler configuration.
Definition: config.c:197
ABT_sched_finish
int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC
Request a scheduler to finish after its pools get empty.
Definition: sched.c:376
ABT_xstream_is_primary
int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *is_primary) ABT_API_PUBLIC
Check if the target execution stream is primary.
Definition: stream.c:1131
ABT_POOL_ACCESS_PRIV
@ ABT_POOL_ACCESS_PRIV
Definition: abt.h:518
ABT_sched
struct ABT_sched_opaque * ABT_sched
Scheduler handle type.
Definition: abt.h:795
ABT_task_get_arg
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.
Definition: task.c:473
ABT_INFO_QUERY_KIND_FCONTEXT
@ ABT_INFO_QUERY_KIND_FCONTEXT
Definition: abt.h:606
ABT_SCHED_TYPE_ULT
@ ABT_SCHED_TYPE_ULT
Definition: abt.h:484
ABT_init
int ABT_init(int argc, char **argv) ABT_API_PUBLIC
Initialize the Argobots execution environment.
Definition: global.c:74
ABT_TOOL_QUERY_KIND_CALLER_TYPE
@ ABT_TOOL_QUERY_KIND_CALLER_TYPE
Definition: abt.h:623
ABT_unit_free_fn
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:1251
ABT_task_create_on_xstream
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.
Definition: task.c:118
ABT_thread_migrate_to_sched
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.
Definition: thread.c:1316
ABT_mutex_trylock
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex.
Definition: mutex.c:294
ABT_thread_exit
int ABT_thread_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
Definition: thread.c:598
ABT_SYNC_EVENT_TYPE_UNKNOWN
@ ABT_SYNC_EVENT_TYPE_UNKNOWN
Definition: abt.h:649
ABT_tool_task_callback_fn
void(* ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
Definition: abt.h:1534
ABT_timer_start
int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC
Start a timer.
Definition: timer.c:174
ABT_sync_event_type
ABT_sync_event_type
Type of synchronization event.
Definition: abt.h:647
ABT_THREAD_STATE_BLOCKED
@ ABT_THREAD_STATE_BLOCKED
Definition: abt.h:413
ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
@ ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
Definition: abt.h:586
ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
@ ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
Definition: abt.h:592
ABT_info_query_config
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val) ABT_API_PUBLIC
Retrieve the configuration information.
Definition: info.c:194
ABT_tool_context
struct ABT_tool_context_opaque * ABT_tool_context
Tool context handle type.
Definition: abt.h:1000
ABT_thread_set_specific
int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC
Set a value with a work-unit-specific key in a work unit.
Definition: thread.c:2006
ABT_mutex_attr
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Mutex attribute handle type.
Definition: abt.h:939
ABT_error_get_str
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.
Definition: error.c:48
ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER
Definition: abt.h:571
ABT_self_on_primary_xstream
int ABT_self_on_primary_xstream(ABT_bool *on_primary) ABT_API_PUBLIC
Check if the caller is running on the primary execution stream.
Definition: self.c:161
ABT_SYNC_EVENT_TYPE_OTHER
@ ABT_SYNC_EVENT_TYPE_OTHER
Definition: abt.h:653
ABT_unit_id
uint64_t ABT_unit_id
Work unit ID type.
Definition: abt.h:866
ABT_pool_def
A struct that defines a pool.
Definition: abt.h:1267
ABT_mutex_create
int ABT_mutex_create(ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex.
Definition: mutex.c:39
ABT_xstream
struct ABT_xstream_opaque * ABT_xstream
Execution stream handle type.
Definition: abt.h:776
ABT_pool_remove_fn
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1258
ABT_info_print_thread_stack
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Print stack of a work unit.
Definition: info.c:741
ABT_pool_init_fn
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:1252
ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
@ ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
Definition: abt.h:567
ABT_barrier
struct ABT_barrier_opaque * ABT_barrier
Barrier handle type.
Definition: abt.h:974
ABT_thread_yield
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: thread.c:1109
ABT_self_suspend
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the calling ULT.
Definition: self.c:260
ABT_unit_type
ABT_unit_type
Type of a work unit for scheduling.
Definition: abt.h:540
ABT_sched_config_access
ABT_sched_config_var ABT_sched_config_access
Unused predefined ABT_sched_config_var.
Definition: config.c:27
ABT_API_PUBLIC
#define ABT_API_PUBLIC
Definition: abt.h:14
ABT_pool_remove
int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Remove a specified work unit from a pool.
Definition: pool.c:612
ABT_thread_get_last_pool
int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC
Get the last pool of a work unit.
Definition: thread.c:862
ABT_xstream_create_basic
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.
Definition: stream.c:168
ABT_pool_config
struct ABT_pool_config_opaque * ABT_pool_config
Pool configuration handle type.
Definition: abt.h:835
ABT_TASK_STATE_RUNNING
@ ABT_TASK_STATE_RUNNING
Definition: abt.h:430
ABT_xstream_create_with_rank
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.
Definition: stream.c:250
ABT_mutex_lock_high
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex with high priority.
Definition: mutex.c:256
ABT_self_get_last_pool_id
int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC
Get ID of the last pool of the calling work unit.
Definition: self.c:212
ABT_pool_def::p_pop_timedwait
ABT_pool_pop_timedwait_fn p_pop_timedwait
Function that pops a work unit from a pool with wait.
Definition: abt.h:1484
ABT_info_query_kind
ABT_info_query_kind
Query kind for ABT_info_query_config().
Definition: abt.h:559
ABT_pool_def::p_pop
ABT_pool_pop_fn p_pop
Function that pops a work unit from a pool.
Definition: abt.h:1440
ABT_pool_def::p_free
ABT_pool_free_fn p_free
Function that frees a pool.
Definition: abt.h:1511
ABT_future
struct ABT_future_opaque * ABT_future
Future handle type.
Definition: abt.h:967
ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
@ ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
Definition: abt.h:584
ABT_xstream_check_events
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Process events associated with a scheduler.
Definition: stream.c:1217
ABT_thread_set_associated_pool
int ABT_thread_set_associated_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Set an associated pool for the target work unit.
Definition: thread.c:941
ABT_thread_join
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for a work unit to terminate.
Definition: thread.c:515
ABT_POOL_FIFO
@ ABT_POOL_FIFO
Definition: abt.h:498
ABT_mutex_attr_free
int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC
Free a mutex attribute.
Definition: mutex_attr.c:78
ABT_sched_init_fn
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:1133
ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
Definition: abt.h:590
ABT_pool_def::p_print_all
ABT_pool_print_all_fn p_print_all
Function that applies a function to all work units in a pool.
Definition: abt.h:1528
ABT_barrier_free
int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC
Free a barrier.
Definition: barrier.c:139
ABT_SCHED_CONFIG_PTR
@ ABT_SCHED_CONFIG_PTR
Definition: abt.h:1074
ABT_xstream_set_main_sched_basic
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.
Definition: stream.c:910
ABT_xstream_get_main_pools
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.
Definition: stream.c:988
ABT_pool_def::access
ABT_pool_access access
Access type.
Definition: abt.h:1280
ABT_thread_attr_set_migratable
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.
Definition: thread_attr.c:341
ABT_sched_state
ABT_sched_state
Unused enum.
Definition: abt.h:442
ABT_mutex_attr_set_recursive
int ABT_mutex_attr_set_recursive(ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC
Set a recursive property in a mutex attribute.
Definition: mutex_attr.c:116
ABT_task_revive
int ABT_task_revive(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *task) ABT_API_PUBLIC
Revive a terminated work unit.
Definition: task.c:153
ABT_xstream_set_cpubind
int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC
Bind an execution stream to a target CPU.
Definition: stream.c:1263
ABT_POOL_FIFO_WAIT
@ ABT_POOL_FIFO_WAIT
Definition: abt.h:507
ABT_self_is_primary
int ABT_self_is_primary(ABT_bool *is_primary) ABT_API_PUBLIC
Check if the caller is the primary ULT.
Definition: self.c:102
ABT_unit
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
Definition: abt.h:856
ABT_INFO_QUERY_KIND_ENABLED_DEBUG
@ ABT_INFO_QUERY_KIND_ENABLED_DEBUG
Definition: abt.h:561
ABT_key_create
int ABT_key_create(void(*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC
Create a new work-unit-specific data key.
Definition: key.c:66
ABT_task_free
int ABT_task_free(ABT_task *task) ABT_API_PUBLIC
Free a work unit.
Definition: task.c:171
ABT_sched_get_total_size
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.
Definition: sched.c:619
ABT_sched_config_var::type
ABT_sched_config_type type
Definition: abt.h:1085
ABT_thread_is_unnamed
int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *is_unnamed) ABT_API_PUBLIC
Check if a work unit is unnamed.
Definition: thread.c:1779
ABT_sched_config_free
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free a scheduler configuration.
Definition: config.c:240
ABT_SCHED_CONFIG_DOUBLE
@ ABT_SCHED_CONFIG_DOUBLE
Definition: abt.h:1072
ABT_eventual_free
int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC
Free an eventual.
Definition: eventual.c:96
ABT_xstream_exit
int ABT_xstream_exit(void) ABT_API_PUBLIC
Terminate an execution stream that is running the calling ULT.
Definition: stream.c:501
ABT_SYNC_EVENT_TYPE_COND
@ ABT_SYNC_EVENT_TYPE_COND
Definition: abt.h:661
ABT_DEPRECATED
#define ABT_DEPRECATED
Definition: abt.h:78
ABT_eventual
struct ABT_eventual_opaque * ABT_eventual
Eventual handle type.
Definition: abt.h:960
ABT_SCHED_BASIC
@ ABT_SCHED_BASIC
Definition: abt.h:461
ABT_TASK_STATE_READY
@ ABT_TASK_STATE_READY
Definition: abt.h:428
ABT_pool_pop
int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC
Pop a work unit from a pool.
Definition: pool.c:387
ABT_cond_create
int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC
Create a new condition variable.
Definition: cond.c:42
ABT_timer_stop
int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC
Stop a timer.
Definition: timer.c:203
ABT_pool_def::p_get_size
ABT_pool_get_size_fn p_get_size
Function that returns a work unit.
Definition: abt.h:1413
ABT_xstream_join
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for an execution stream to terminate.
Definition: stream.c:457
ABT_pool_def::p_push
ABT_pool_push_fn p_push
Function that pushes a work unit to a pool.
Definition: abt.h:1427
ABT_INFO_QUERY_KIND_ENABLED_TOOL
@ ABT_INFO_QUERY_KIND_ENABLED_TOOL
Definition: abt.h:604
ABT_thread_create_on_xstream
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.
Definition: thread.c:164
ABT_thread_attr_set_callback
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.
Definition: thread_attr.c:296
ABT_thread_set_arg
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.
Definition: thread.c:1936
ABT_thread_id
ABT_unit_id ABT_thread_id
Work unit ID type.
Definition: abt.h:905
ABT_TOOL_QUERY_KIND_POOL
@ ABT_TOOL_QUERY_KIND_POOL
Definition: abt.h:619
ABT_pool_push
int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Push a unit to a pool.
Definition: pool.c:560
ABT_sched_def::get_migr_pool
ABT_sched_get_migr_pool_fn get_migr_pool
Function that returns a pool for migration.
Definition: abt.h:1241
ABT_SYNC_EVENT_TYPE_BARRIER
@ ABT_SYNC_EVENT_TYPE_BARRIER
Definition: abt.h:669
ABT_thread_attr_get_stacksize
int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC
Get the stack size from a ULT attribute.
Definition: thread_attr.c:253
ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
@ ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
Definition: abt.h:608
ABT_DEPRECATED
enum ABT_sched_state ABT_sched_state ABT_DEPRECATED
Scheduler state type.
Definition: abt.h:816
ABT_thread_get_last_xstream
int ABT_thread_get_last_xstream(ABT_thread thread, ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream associated with a work unit.
Definition: thread.c:781
ABT_timer
struct ABT_timer_opaque * ABT_timer
Timer handle type.
Definition: abt.h:981
ABT_cond_broadcast
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition variable.
Definition: cond.c:322
ABT_xstream_get_cpubind
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.
Definition: stream.c:1313
ABT_sched_get_num_pools
int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC
Obtain the number of pools associated with a scheduler.
Definition: sched.c:278
ABT_unit_get_thread_fn
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:1246
ABT_pool_get_total_size
int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Get the total size of a pool.
Definition: pool.c:290
ABT_thread_migrate
int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC
Request a migration of a work unit to any available execution streams.
Definition: thread.c:1471
ABT_thread_self_id
int ABT_thread_self_id(ABT_unit_id *id) ABT_API_PUBLIC
Get ID of the calling work unit.
Definition: thread.c:739
ABT_SCHED_STATE_READY
@ ABT_SCHED_STATE_READY
Definition: abt.h:443
ABT_info_print_pool
int ABT_info_print_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Print the information of a pool.
Definition: info.c:560
ABT_thread_self
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
Definition: thread.c:694
ABT_xstream_barrier
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Execution stream barrier handle type.
Definition: abt.h:788
ABT_pool_def::u_create_from_task
ABT_unit_create_from_task_fn u_create_from_task
Unused function.
Definition: abt.h:1367
ABT_SYNC_EVENT_TYPE_EVENTUAL
@ ABT_SYNC_EVENT_TYPE_EVENTUAL
Definition: abt.h:665
ABT_pool_push_fn
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1254
ABT_thread_free_many
int ABT_thread_free_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC
Free a set of work units.
Definition: thread.c:462
ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
@ ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
Definition: abt.h:596
ABT_self_set_arg
int ABT_self_set_arg(void *arg) ABT_API_PUBLIC
Set an argument for a work-unit function of the calling work unit.
Definition: self.c:301
ABT_pool_create_basic
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.
Definition: pool.c:166
ABT_eventual_wait
int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC
Wait on an eventual.
Definition: eventual.c:163
ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER
Definition: abt.h:573
ABT_POOL_ACCESS_SPMC
@ ABT_POOL_ACCESS_SPMC
Definition: abt.h:531
ABT_XSTREAM_STATE_RUNNING
@ ABT_XSTREAM_STATE_RUNNING
Definition: abt.h:398
ABT_SCHED_STATE_RUNNING
@ ABT_SCHED_STATE_RUNNING
Definition: abt.h:444
ABT_pool_print_all
int ABT_pool_print_all(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC
ABT_thread_set_callback
int ABT_thread_set_callback(ABT_thread thread, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC
Set a callback function in a work unit.
Definition: thread.c:1585
ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
Definition: abt.h:569
ABT_task_get_id
int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC
Get ID of a work unit.
Definition: task.c:457
ABT_SYNC_EVENT_TYPE_RWLOCK
@ ABT_SYNC_EVENT_TYPE_RWLOCK
Definition: abt.h:663
ABT_SYNC_EVENT_TYPE_THREAD_JOIN
@ ABT_SYNC_EVENT_TYPE_THREAD_JOIN
Definition: abt.h:657
ABT_cond_wait
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on a condition variable.
Definition: cond.c:149
ABT_xstream_free
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Free an execution stream.
Definition: stream.c:396
ABT_sched_def::free
ABT_sched_free_fn free
Function that frees a scheduler.
Definition: abt.h:1224
ABT_initialized
int ABT_initialized(void) ABT_API_PUBLIC
Check if the Argobots execution environment has been initialized.
Definition: global.c:163
ABT_future_set
int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal a future.
Definition: futures.c:256
ABT_thread_is_migratable
int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *is_migratable) ABT_API_PUBLIC
Get the migratability of a work unit.
Definition: thread.c:1700
ABT_UNIT_TYPE_THREAD
@ ABT_UNIT_TYPE_THREAD
Definition: abt.h:542
ABT_mutex_spinlock
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex in a busy-wait loop.
Definition: mutex.c:337
ABT_task_get_last_pool
int ABT_task_get_last_pool(ABT_task task, ABT_pool *pool) ABT_API_PUBLIC
Get the last pool of a work unit.
Definition: task.c:373
ABT_sched_set_data
int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC
Associate a user value with a scheduler.
Definition: sched.c:497
ABT_UNIT_TYPE_XSTREAM
@ ABT_UNIT_TYPE_XSTREAM
Definition: abt.h:550
ABT_info_print_thread
int ABT_info_print_thread(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Print the information of a work unit.
Definition: info.c:606
ABT_xstream_get_state
int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC
Get a state of an execution stream.
Definition: stream.c:1024
ABT_thread_create
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.
Definition: thread.c:86
ABT_POOL_ACCESS_SPSC
@ ABT_POOL_ACCESS_SPSC
Definition: abt.h:523
ABT_rwlock_wrlock
int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a writer.
Definition: rwlock.c:198
ABT_sched_def
A struct that defines a scheduler.
Definition: abt.h:1143
ABT_UNIT_TYPE_TASK
@ ABT_UNIT_TYPE_TASK
Definition: abt.h:548
ABT_pool_set_data
int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC
Set user data in a pool.
Definition: pool.c:699
ABT_task_create
int ABT_task_create(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC
Create a new task.
Definition: task.c:55
ABT_xstream_set_main_sched
int ABT_xstream_set_main_sched(ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC
Set the main scheduler of an execution stream.
Definition: stream.c:815
ABT_rwlock_unlock
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock a readers-writer lock.
Definition: rwlock.c:249
ABT_pool_def::u_create_from_thread
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.
Definition: abt.h:1357
ABT_timer_stop_and_add
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.
Definition: timer.c:314
ABT_sched_get_migr_pool_fn
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
Definition: abt.h:1137
ABT_SCHED_BASIC_WAIT
@ ABT_SCHED_BASIC_WAIT
Definition: abt.h:471
ABT_SCHED_RANDWS
@ ABT_SCHED_RANDWS
Definition: abt.h:469
ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
@ ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
Definition: abt.h:576
ABT_pool_get_size_fn
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:1253
ABT_task_equal
int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC
Compare two tasklet handles for equality.
Definition: task.c:444
ABT_tool_query_thread
int ABT_tool_query_thread(ABT_tool_context context, uint64_t event, ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC
Query information associated with a work unit event.
Definition: tool.c:222
ABT_future_reset
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset readiness of a future.
Definition: futures.c:319
ABT_pool_def::u_get_thread
ABT_unit_get_thread_fn u_get_thread
Function that extracts an ABT_thread handle from an ABT_unit handle.
Definition: abt.h:1309
ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
Definition: abt.h:563
ABT_mutex_unlock_se
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.
Definition: mutex.c:416
ABT_pool_pop_timedwait
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.
Definition: pool.c:511
ABT_pool_free
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free a pool.
Definition: pool.c:210
ABT_cond
struct ABT_cond_opaque * ABT_cond
Condition variable handle type.
Definition: abt.h:946
ABT_eventual_test
int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready) ABT_API_PUBLIC
Check if an eventual is ready.
Definition: eventual.c:236
ABT_task_get_state
int ABT_task_get_state(ABT_task task, ABT_task_state *state) ABT_API_PUBLIC
Get a state of a work unit.
Definition: task.c:349
ABT_SCHED_STATE_TERMINATED
@ ABT_SCHED_STATE_TERMINATED
Definition: abt.h:446
ABT_info_print_task
int ABT_info_print_task(FILE *fp, ABT_task task) ABT_API_PUBLIC
Print the information of a work unit.
Definition: info.c:694
ABT_pool_free_fn
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:1259
ABT_info_print_config
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Print the runtime information of Argobots.
Definition: info.c:374
ABT_SCHED_STATE_STOPPED
@ ABT_SCHED_STATE_STOPPED
Definition: abt.h:445
ABT_thread_attr_get_stack
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.
Definition: thread_attr.c:187
ABT_task_set_migratable
int ABT_task_set_migratable(ABT_task task, ABT_bool flag) ABT_API_PUBLIC
Set the migratability in a work unit.
Definition: task.c:405
ABT_sched_config_var_end
ABT_sched_config_var ABT_sched_config_var_end
Predefined ABT_sched_config_var to mark the last parameter.
Definition: config.c:23
ABT_SCHED_CONFIG_INT
@ ABT_SCHED_CONFIG_INT
Definition: abt.h:1070
ABT_mutex_create_with_attr
int ABT_mutex_create_with_attr(ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex with mutex attributes.
Definition: mutex.c:95
ABT_task_get_xstream
int ABT_task_get_xstream(ABT_task task, ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream associated with a work unit.
Definition: task.c:312
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
Definition: abt.h:629
ABT_thread_yield_to
int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to the specific ULT.
Definition: thread.c:997
ABT_thread_get_last_pool_id
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.
Definition: thread.c:902
ABT_thread_revive
int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC
Revive a terminated work unit.
Definition: thread.c:345
ABT_self_get_type
int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC
Obtain a type of the caller.
Definition: self.c:46
ABT_mutex_unlock
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock a mutex.
Definition: mutex.c:371
ABT_sched_has_to_stop
int ABT_sched_has_to_stop(ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC
Check if a scheduler needs to stop.
Definition: sched.c:459
ABT_barrier_reinit
int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC
Reinitialize a barrier with a new number of waiters.
Definition: barrier.c:99
ABT_thread_equal
int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result) ABT_API_PUBLIC
Compare two work unit handles for equality.
Definition: thread.c:1826
ABT_timer_read
int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Read the elapsed time of the timer.
Definition: timer.c:237
ABT_self_is_unnamed
int ABT_self_is_unnamed(ABT_bool *is_unnamed) ABT_API_PUBLIC
Check if the calling work unit is unnamed.
Definition: self.c:380
ABT_pool_def::p_init
ABT_pool_init_fn p_init
Function that frees a work unit.
Definition: abt.h:1396
ABT_sched_def::init
ABT_sched_init_fn init
Function that initializes a scheduler.
Definition: abt.h:1168
ABT_THREAD_STATE_RUNNING
@ ABT_THREAD_STATE_RUNNING
Definition: abt.h:411
ABT_thread_attr_set_stacksize
int ABT_thread_attr_set_stacksize(ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC
Set stack size in a ULT attribute.
Definition: thread_attr.c:222
ABT_xstream_revive
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Revive a terminated execution stream.
Definition: stream.c:323
ABT_sched_free
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Free a scheduler.
Definition: sched.c:239
ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
Definition: abt.h:580
ABT_xstream_run_unit
int ABT_xstream_run_unit(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Execute a work unit.
Definition: stream.c:1169
ABT_xstream_barrier_create
int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier) ABT_API_PUBLIC
Create a new execution-stream barrier.
Definition: stream_barrier.c:44
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ
Definition: abt.h:600
ABT_EXEC_ENTITY_TYPE_THREAD
@ ABT_EXEC_ENTITY_TYPE_THREAD
Definition: abt.h:640
ABT_tool_thread_callback_fn
void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
Definition: abt.h:1532
ABT_thread_get_specific
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 key in a work unit.
Definition: thread.c:2050
ABT_sched_basic_freq
ABT_sched_config_var ABT_sched_basic_freq
Predefined ABT_sched_config_var to configure the frequency for checking events of the basic scheduler...
Definition: config.c:34
ABT_rwlock_create
int ABT_rwlock_create(ABT_rwlock *newrwlock) ABT_API_PUBLIC
Create a new readers-writer lock. ABT_rwlock_create() creates a new readers-writer lock and returns i...
Definition: rwlock.c:39
ABT_thread_migrate_to_pool
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.
Definition: thread.c:1396
ABT_sched_get_pools
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.
Definition: sched.c:323
ABT_xstream_equal
int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2, ABT_bool *result) ABT_API_PUBLIC
Compare two execution stream handles for equality.
Definition: stream.c:1060
ABT_rwlock
struct ABT_rwlock_opaque * ABT_rwlock
Readers-writer lock handle type.
Definition: abt.h:953
ABT_task_is_migratable
int ABT_task_is_migratable(ABT_task task, ABT_bool *flag) ABT_API_PUBLIC
Get the migratability of a work unit.
Definition: task.c:421
ABT_sched_free_fn
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:1135
ABT_eventual_set
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC
Signal an eventual.
Definition: eventual.c:302
ABT_pool_kind
ABT_pool_kind
Predefined pool type.
Definition: abt.h:496
ABT_sched_get_data
int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC
Retrieve a user value associated with a scheduler.
Definition: sched.c:529
ABT_thread_cancel
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Send a termination request to a work unit.
Definition: thread.c:646
ABT_key_set
int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with a work-unit-specific key in the calling work unit.
Definition: key.c:152
ABT_info_print_sched
int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC
Print the information of a scheduler.
Definition: info.c:519
ABT_UNIT_TYPE_EXT
@ ABT_UNIT_TYPE_EXT
Definition: abt.h:552
ABT_pool_get_access
int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC
Get an access type of a pool.
Definition: pool.c:244
ABT_sched_create
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.
Definition: sched.c:96
ABT_sched_config_var::idx
int idx
Definition: abt.h:1083
ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
@ ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
Definition: abt.h:594
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
Definition: abt.h:602
ABT_sched_get_size
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.
Definition: sched.c:571
ABT_XSTREAM_STATE_TERMINATED
@ ABT_XSTREAM_STATE_TERMINATED
Definition: abt.h:400
ABT_mutex_attr_create
int ABT_mutex_attr_create(ABT_mutex_attr *newattr) ABT_API_PUBLIC
Create a new mutex attribute.
Definition: mutex_attr.c:39
ABT_eventual_create
int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC
Create a new eventual.
Definition: eventual.c:42
ABT_task_join
int ABT_task_join(ABT_task task) ABT_API_PUBLIC
Wait for a work unit to terminate.
Definition: task.c:189
ABT_INFO_QUERY_KIND_ENABLED_LOG
@ ABT_INFO_QUERY_KIND_ENABLED_LOG
Definition: abt.h:565
ABT_barrier_create
int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC
Create a new barrier.
Definition: barrier.c:47
ABT_future_test
int ABT_future_test(ABT_future future, ABT_bool *is_ready) ABT_API_PUBLIC
Check if a future is ready.
Definition: futures.c:219
ABT_barrier_wait
int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC
Wait on a barrier.
Definition: barrier.c:189
ABT_mutex_free
int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC
Free a mutex.
Definition: mutex.c:143
ABT_SCHED_TYPE_TASK
@ ABT_SCHED_TYPE_TASK
Definition: abt.h:486
ABT_cond_signal
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition variable.
Definition: cond.c:287
ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
Definition: abt.h:578
ABT_pool_get_id
int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC
Get ID of a pool.
Definition: pool.c:830
ABT_timer_stop_and_read
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.
Definition: timer.c:275
ABT_sched_config_create
int ABT_sched_config_create(ABT_sched_config *config,...) ABT_API_PUBLIC
Create a new scheduler configuration.
Definition: config.c:102
ABT_SCHED_PRIO
@ ABT_SCHED_PRIO
Definition: abt.h:465
ABT_barrier_get_num_waiters
int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters) ABT_API_PUBLIC
Get the number of waiters of a barrier.
Definition: barrier.c:248
ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP
@ ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP
Definition: abt.h:588
ABT_unit_create_from_thread_fn
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:1249
ABT_sched_config_type
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1068
ABT_pool_access
ABT_pool_access
Pool access type.
Definition: abt.h:514
ABT_xstream_state
ABT_xstream_state
State of an execution stream.
Definition: abt.h:396
ABT_thread_get_attr
int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC
Get attributes of a work unit.
Definition: thread.c:2094