ARGOBOTS  1.1b1
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.1b1"
47 
68 #define ABT_NUMVERSION 10100101
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 
92 #define ABT_SUCCESS 0
93 
97 #define ABT_ERR_UNINITIALIZED 1
98 
104 #define ABT_ERR_MEM 2
105 
109 #define ABT_ERR_OTHER 3
110 
114 #define ABT_ERR_INV_XSTREAM 4
115 
119 #define ABT_ERR_INV_XSTREAM_RANK 5
120 
124 #define ABT_ERR_INV_XSTREAM_BARRIER 6
125 
129 #define ABT_ERR_INV_SCHED 7
130 
134 #define ABT_ERR_INV_SCHED_KIND 8
135 
139 #define ABT_ERR_INV_SCHED_PREDEF 9
140 
146 #define ABT_ERR_INV_SCHED_TYPE 10
147 
151 #define ABT_ERR_INV_SCHED_CONFIG 11
152 
156 #define ABT_ERR_INV_POOL 12
157 
161 #define ABT_ERR_INV_POOL_KIND 13
162 
166 #define ABT_ERR_INV_POOL_ACCESS 14
167 
171 #define ABT_ERR_INV_UNIT 15
172 
176 #define ABT_ERR_INV_THREAD 16
177 
181 #define ABT_ERR_INV_THREAD_ATTR 17
182 
190 #define ABT_ERR_INV_TASK 18
191 
195 #define ABT_ERR_INV_KEY 19
196 
200 #define ABT_ERR_INV_MUTEX 20
201 
205 #define ABT_ERR_INV_MUTEX_ATTR 21
206 
210 #define ABT_ERR_INV_COND 22
211 
215 #define ABT_ERR_INV_RWLOCK 23
216 
220 #define ABT_ERR_INV_EVENTUAL 24
221 
225 #define ABT_ERR_INV_FUTURE 25
226 
230 #define ABT_ERR_INV_BARRIER 26
231 
235 #define ABT_ERR_INV_TIMER 27
236 
240 #define ABT_ERR_INV_QUERY_KIND 28
241 
245 #define ABT_ERR_INV_TOOL_CONTEXT 52
246 
250 #define ABT_ERR_INV_ARG 53
251 
255 #define ABT_ERR_XSTREAM 29
256 
262 #define ABT_ERR_XSTREAM_STATE 30
263 
267 #define ABT_ERR_XSTREAM_BARRIER 31
268 
272 #define ABT_ERR_SCHED 32
273 
277 #define ABT_ERR_SCHED_CONFIG 33
278 
282 #define ABT_ERR_POOL 34
283 
287 #define ABT_ERR_UNIT 35
288 
292 #define ABT_ERR_THREAD 36
293 
301 #define ABT_ERR_TASK 37
302 
306 #define ABT_ERR_KEY 38
307 
311 #define ABT_ERR_MUTEX 39
312 
318 #define ABT_ERR_MUTEX_LOCKED 40
319 
323 #define ABT_ERR_COND 41
324 
330 #define ABT_ERR_COND_TIMEDOUT 42
331 
335 #define ABT_ERR_RWLOCK 43
336 
340 #define ABT_ERR_EVENTUAL 44
341 
345 #define ABT_ERR_FUTURE 45
346 
350 #define ABT_ERR_BARRIER 46
351 
355 #define ABT_ERR_TIMER 47
356 
360 #define ABT_ERR_MIGRATION_TARGET 48
361 
369 #define ABT_ERR_MIGRATION_NA 49
370 
376 #define ABT_ERR_MISSING_JOIN 50
377 
381 #define ABT_ERR_FEATURE_NA 51
382 
393 #define ABT_ERR_SYS 54
394 
398 #define ABT_ERR_CPUID 55
399 
409 };
410 
424 };
425 
441 };
442 
455 };
456 
480 };
481 
495 };
496 
516 };
517 
542 };
543 
561 };
562 
622 };
623 
641 };
642 
652 };
653 
681 };
682 
687 #define ABT_TOOL_EVENT_THREAD_NONE (0)
688 
692 #define ABT_TOOL_EVENT_THREAD_CREATE (1 << 0)
693 
697 #define ABT_TOOL_EVENT_THREAD_JOIN (1 << 1)
698 
702 #define ABT_TOOL_EVENT_THREAD_FREE (1 << 2)
703 
707 #define ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3)
708 
712 #define ABT_TOOL_EVENT_THREAD_RUN (1 << 4)
713 
717 #define ABT_TOOL_EVENT_THREAD_FINISH (1 << 5)
718 
722 #define ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6)
723 
727 #define ABT_TOOL_EVENT_THREAD_YIELD (1 << 7)
728 
732 #define ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8)
733 
737 #define ABT_TOOL_EVENT_THREAD_RESUME (1 << 9)
738 
742 #define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1))
743 
744 
746 #define ABT_TRUE 1
747 
748 #define ABT_FALSE 0
749 
757 #define ABT_XSTREAM_ANY_RANK -1
758 
759 /* Data Types */
760 struct ABT_xstream_opaque;
761 struct ABT_xstream_barrier_opaque;
762 struct ABT_sched_opaque;
763 struct ABT_sched_config_opaque;
764 struct ABT_pool_opaque;
765 struct ABT_pool_config_opaque;
766 struct ABT_unit_opaque;
767 struct ABT_thread_opaque;
768 struct ABT_thread_attr_opaque;
769 struct ABT_task_opaque;
770 struct ABT_key_opaque;
771 struct ABT_mutex_opaque;
772 struct ABT_mutex_attr_opaque;
773 struct ABT_cond_opaque;
774 struct ABT_rwlock_opaque;
775 struct ABT_eventual_opaque;
776 struct ABT_future_opaque;
777 struct ABT_barrier_opaque;
778 struct ABT_timer_opaque;
779 struct ABT_tool_context_opaque;
780 
787 typedef struct ABT_xstream_opaque * ABT_xstream;
799 typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier;
806 typedef struct ABT_sched_opaque * ABT_sched;
813 typedef struct ABT_sched_config_opaque * ABT_sched_config;
839 typedef struct ABT_pool_opaque * ABT_pool;
846 typedef struct ABT_pool_config_opaque * ABT_pool_config;
867 typedef struct ABT_unit_opaque * ABT_unit;
877 typedef uint64_t ABT_unit_id;
888 typedef struct ABT_thread_opaque * ABT_thread;
895 typedef struct ABT_thread_attr_opaque * ABT_thread_attr;
929 typedef struct ABT_thread_opaque * ABT_task;
936 typedef struct ABT_key_opaque * ABT_key;
943 typedef struct ABT_mutex_opaque * ABT_mutex;
950 typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr;
957 typedef struct ABT_cond_opaque * ABT_cond;
964 typedef struct ABT_rwlock_opaque * ABT_rwlock;
971 typedef struct ABT_eventual_opaque * ABT_eventual;
978 typedef struct ABT_future_opaque * ABT_future;
985 typedef struct ABT_barrier_opaque * ABT_barrier;
992 typedef struct ABT_timer_opaque * ABT_timer;
999 typedef int ABT_bool;
1011 typedef struct ABT_tool_context_opaque * ABT_tool_context;
1027 
1028 
1029 /* Null Object Handles */
1030 #define ABT_NULL 0
1031 #if ABT_NULL == 1
1032 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
1033 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
1034 #define ABT_SCHED_NULL ((ABT_sched) NULL)
1035 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
1036 #define ABT_POOL_NULL ((ABT_pool) NULL)
1037 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
1038 #define ABT_UNIT_NULL ((ABT_unit) NULL)
1039 #define ABT_THREAD_NULL ((ABT_thread) NULL)
1040 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
1041 #define ABT_TASK_NULL ((ABT_task) NULL)
1042 #define ABT_KEY_NULL ((ABT_key) NULL)
1043 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
1044 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
1045 #define ABT_COND_NULL ((ABT_cond) NULL)
1046 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
1047 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
1048 #define ABT_FUTURE_NULL ((ABT_future) NULL)
1049 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
1050 #define ABT_TIMER_NULL ((ABT_timer) NULL)
1051 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) NULL)
1052 #else
1053 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
1054 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
1055 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
1056 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
1057 #define ABT_POOL_NULL ((ABT_pool) (0x05))
1058 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
1059 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
1060 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
1061 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
1062 #define ABT_TASK_NULL ((ABT_task) (0x0a))
1063 #define ABT_KEY_NULL ((ABT_key) (0x0b))
1064 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
1065 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
1066 #define ABT_COND_NULL ((ABT_cond) (0x0e))
1067 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
1068 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
1069 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
1070 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
1071 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
1072 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14))
1073 #endif
1074 
1087 typedef struct {
1088  int dummy[16];
1090 
1112 #define ABT_MUTEX_INITIALIZER \
1113  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1114 
1139 #define ABT_RECURSIVE_MUTEX_INITIALIZER \
1140  { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1141 
1155 #define ABT_MUTEX_MEMORY_GET_HANDLE(p_mutex_memory) \
1156  ((ABT_mutex)p_mutex_memory)
1157 
1170 typedef struct {
1171  int dummy[16];
1172 } ABT_cond_memory;
1173 
1201 #define ABT_COND_INITIALIZER \
1202  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1203 
1218 #define ABT_COND_MEMORY_GET_HANDLE(p_cond_memory) \
1219  ((ABT_cond)p_cond_memory)
1220 
1225 typedef enum {
1233 
1238 typedef struct {
1240  int idx;
1244 
1288 
1289 /* Scheduler Functions */
1291 typedef void (*ABT_sched_run_fn)(ABT_sched);
1293 /* To get a pool ready for receiving a migration */
1295 
1300 typedef struct {
1399 } ABT_sched_def;
1400 
1401 /* Pool Functions */
1408 typedef void (*ABT_unit_free_fn)(ABT_unit *);
1410 typedef size_t (*ABT_pool_get_size_fn)(ABT_pool);
1414 typedef ABT_unit (*ABT_pool_pop_timedwait_fn)(ABT_pool, double); /* Deprecated .*/
1416 typedef int (*ABT_pool_free_fn)(ABT_pool);
1417 typedef int (*ABT_pool_print_all_fn)(ABT_pool, void *arg,
1418  void (*)(void*, ABT_unit));
1419 
1424 typedef struct {
1600 #ifdef ABT_ENABLE_VER_20_API
1601 
1620  ABT_pool_pop_wait_fn p_pop_wait;
1621 #endif
1622 
1689 } ABT_pool_def;
1690 
1691 /* Tool callback type. */
1692 typedef void (*ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event,
1693  ABT_tool_context context, void *user_arg);
1694 typedef void (*ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event,
1695  ABT_tool_context context, void *user_arg);
1696 
1697 /* Init & Finalize */
1698 int ABT_init(int argc, char **argv) ABT_API_PUBLIC;
1699 int ABT_finalize(void) ABT_API_PUBLIC;
1701 
1702 /* Execution Stream (ES) */
1703 int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC;
1704 int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools,
1705  ABT_pool *pools, ABT_sched_config config,
1706  ABT_xstream *newxstream) ABT_API_PUBLIC;
1707 int ABT_xstream_create_with_rank(ABT_sched sched, int rank,
1708  ABT_xstream *newxstream) ABT_API_PUBLIC;
1715 int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC;
1716 int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC;
1717 int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC;
1720  ABT_sched_predef predef,
1721  int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
1723 int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools,
1724  ABT_pool *pools) ABT_API_PUBLIC;
1726 int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2,
1727  ABT_bool *result) ABT_API_PUBLIC;
1728 int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC;
1729 int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *is_primary) ABT_API_PUBLIC;
1732 int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC;
1733 int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC;
1734 int ABT_xstream_set_affinity(ABT_xstream xstream, int num_cpuids, int *cpuids)
1736 int ABT_xstream_get_affinity(ABT_xstream xstream, int max_cpuids, int *cpuids,
1737  int *num_cpuids) ABT_API_PUBLIC;
1738 
1739 /* ES Barrier */
1740 int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
1744 
1745 /* Scheduler */
1746 int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools,
1747  ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
1748 int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools,
1749  ABT_pool *pools, ABT_sched_config config,
1750  ABT_sched *newsched) ABT_API_PUBLIC;
1753 int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC;
1754 int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC;
1755 int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx,
1756  ABT_pool *pools) ABT_API_PUBLIC;
1757 int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
1758 int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
1762 
1763 /* Scheduler config */
1765 int ABT_sched_config_read(ABT_sched_config config, int num_vars, ...) ABT_API_PUBLIC;
1767 
1768 /* Pool */
1770  ABT_pool *newpool) ABT_API_PUBLIC;
1772  ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
1775 int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
1776 int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
1777 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
1778 int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC;
1779 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs)
1783 int ABT_pool_print_all(ABT_pool pool, void *arg,
1784  void (*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC;
1786 int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC;
1788 int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC;
1789 
1790 /* Work Unit */
1792 
1793 /* User-level Thread (ULT) */
1794 int ABT_thread_create(ABT_pool pool, void (*thread_func)(void *), void *arg,
1795  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
1797  void (*thread_func)(void *), void *arg,
1798  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
1799 int ABT_thread_create_many(int num_threads, ABT_pool *pool_list,
1800  void (**thread_func_list)(void *), void **arg_list,
1801  ABT_thread_attr attr, ABT_thread *newthread_list)
1803 int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg,
1804  ABT_thread *thread) ABT_API_PUBLIC;
1806 int ABT_thread_free_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
1808 int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
1826  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
1828 int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *is_migratable) ABT_API_PUBLIC;
1829 int ABT_thread_is_primary(ABT_thread thread, ABT_bool *is_primary) ABT_API_PUBLIC;
1830 int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *is_unnamed) ABT_API_PUBLIC;
1831 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
1833 int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC;
1834 int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC;
1835 int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC;
1836 int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC;
1837 int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC;
1838 int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC;
1840 
1841 /* ULT Attributes */
1844 int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr,
1845  size_t stacksize) ABT_API_PUBLIC;
1846 int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr,
1847  size_t *stacksize) ABT_API_PUBLIC;
1849 int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC;
1851  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
1853 
1854 /* Tasklet */
1855 int ABT_task_create(ABT_pool pool, void (*task_func)(void *), void *arg,
1856  ABT_task *newtask) ABT_API_PUBLIC;
1857 int ABT_task_create_on_xstream(ABT_xstream xstream, void (*task_func)(void *),
1858  void *arg, ABT_task *newtask) ABT_API_PUBLIC;
1859 int ABT_task_revive(ABT_pool pool, void (*task_func)(void *), void *arg,
1860  ABT_task *task) ABT_API_PUBLIC;
1865 int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC;
1872 int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC;
1873 int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC;
1874 int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC;
1875 #define ABT_task_is_unnamed ABT_thread_is_unnamed
1876 #define ABT_task_set_specific ABT_thread_set_specific
1877 #define ABT_task_get_specific ABT_thread_get_specific
1878 
1879 /* Self */
1884 int ABT_self_set_specific(ABT_key key, void *value) ABT_API_PUBLIC;
1885 int ABT_self_get_specific(ABT_key key, void **value) ABT_API_PUBLIC;
1886 #define ABT_self_get_task ABT_self_get_thread
1887 #define ABT_self_get_task_id ABT_self_get_thread_id
1892 int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC;
1893 int ABT_self_yield(void) ABT_API_PUBLIC;
1895 int ABT_self_exit(void) ABT_API_PUBLIC;
1896 int ABT_self_set_arg(void *arg) ABT_API_PUBLIC;
1897 int ABT_self_get_arg(void **arg) ABT_API_PUBLIC;
1898 
1899 /* ULT-specific data */
1900 int ABT_key_create(void (*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC;
1902 int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC;
1903 int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC;
1904 
1905 /* Mutex */
1917 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
1919 
1920 /* Mutex Attributes */
1925 
1926 /* Condition variable */
1930 int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex,
1931  const struct timespec *abstime) ABT_API_PUBLIC;
1934 
1935 /* Readers writer lock */
1941 
1942 /* Eventual */
1943 int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC;
1945 int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC;
1946 int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready) ABT_API_PUBLIC;
1947 int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC;
1949 
1950 /* Futures */
1951 int ABT_future_create(uint32_t num_compartments, void (*cb_func)(void **arg),
1952  ABT_future *newfuture) ABT_API_PUBLIC;
1955 int ABT_future_test(ABT_future future, ABT_bool *is_ready) ABT_API_PUBLIC;
1956 int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC;
1958 
1959 /* Barrier */
1960 int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC;
1961 int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC;
1964 int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
1966 
1967 /* Error */
1968 int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC;
1969 
1970 /* Timer */
1971 double ABT_get_wtime(void) ABT_API_PUBLIC;
1973 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
1977 int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1978 int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1979 int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1980 int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC;
1981 
1982 /* Information */
1984  void *val) ABT_API_PUBLIC;
1987 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC;
1988 int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC;
1989 int ABT_info_print_pool(FILE* fp, ABT_pool pool) ABT_API_PUBLIC;
1990 int ABT_info_print_thread(FILE* fp, ABT_thread thread) ABT_API_PUBLIC;
1992 int ABT_info_print_task(FILE* fp, ABT_task task) ABT_API_PUBLIC;
1995 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
1996  void (*cb_func)(ABT_bool, void *),
1997  void *arg) ABT_API_PUBLIC;
1998 
1999 /* Tool Functions */
2001  uint64_t event_mask,
2002  void *user_arg) ABT_API_PUBLIC;
2003 int ABT_tool_query_thread(ABT_tool_context context, uint64_t event,
2004  ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC;
2005 
2006 #if defined(__cplusplus)
2007 }
2008 #endif
2009 
2010 #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:215
ABT_pool_pop_fn
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:1412
ABT_unit_get_task_fn
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:1404
ABT_task_state
ABT_task_state
State of a tasklet.
Definition: abt.h:434
ABT_INFO_QUERY_KIND_ENABLED_STACK_OVERFLOW_CHECK
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_OVERFLOW_CHECK
Definition: abt.h:621
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:1391
ABT_THREAD_STATE_TERMINATED
@ ABT_THREAD_STATE_TERMINATED
Definition: abt.h:423
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:1259
ABT_SYNC_EVENT_TYPE_USER
@ ABT_SYNC_EVENT_TYPE_USER
Definition: abt.h:662
ABT_sched_config_var
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1238
ABT_key
struct ABT_key_opaque * ABT_key
Work-unit-specific data key handle type.
Definition: abt.h:936
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:504
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:465
ABT_pool_def::u_get_task
ABT_unit_get_task_fn u_get_task
Unused function.
Definition: abt.h:1476
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:2008
ABT_thread_resume
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume a ULT.
Definition: thread.c:1188
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:730
ABT_eventual_reset
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset a readiness of an eventual.
Definition: eventual.c:361
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:174
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:1778
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:999
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:216
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:1405
ABT_THREAD_STATE_READY
@ ABT_THREAD_STATE_READY
Definition: abt.h:417
ABT_tool_query_kind
ABT_tool_query_kind
Tool query kind for ABT_tool_query_thread().
Definition: abt.h:628
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:673
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:632
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:638
ABT_EXEC_ENTITY_TYPE_EXT
@ ABT_EXEC_ENTITY_TYPE_EXT
Definition: abt.h:649
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:307
ABT_sched_run_fn
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:1291
ABT_cond_free
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free a condition variable.
Definition: cond.c:89
ABT_sched_def::type
ABT_sched_type type
Unused value.
Definition: abt.h:1307
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:258
ABT_TOOL_QUERY_KIND_CALLER_HANDLE
@ ABT_TOOL_QUERY_KIND_CALLER_HANDLE
Definition: abt.h:636
ABT_thread_attr
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
Definition: abt.h:895
ABT_task
struct ABT_thread_opaque * ABT_task
Work unit handle type.
Definition: abt.h:929
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:782
ABT_thread
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
Definition: abt.h:888
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:227
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:577
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:416
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:251
ABT_unit_get_type_fn
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:1402
ABT_info_print_all_xstreams
int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC
Print the information of all execution streams.
Definition: info.c:443
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:617
ABT_unit_create_from_task_fn
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
Definition: abt.h:1407
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
Definition: abt.h:638
ABT_future_free
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free a future.
Definition: futures.c:116
ABT_exec_entity_type
ABT_exec_entity_type
Type of execution entity.
Definition: abt.h:647
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:1899
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
Definition: abt.h:607
ABT_TASK_STATE_TERMINATED
@ ABT_TASK_STATE_TERMINATED
Definition: abt.h:440
ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
Definition: abt.h:619
ABT_future_wait
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on a future.
Definition: futures.c:165
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:707
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:1129
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:1455
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:1679
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
data
Definition: fifo.c:30
ABT_sched_exit
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Request a scheduler to finish.
Definition: sched.c:410
ABT_pool_pop_wait_fn
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
Definition: abt.h:1413
ABT_key_get
int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC
Get a value associated with a work-unit-specific data key in the calling work unit.
Definition: key.c:211
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:1938
ABT_rwlock_free
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free a readers-writer lock.
Definition: rwlock.c:87
ABT_pool_def::u_free
ABT_unit_free_fn u_free
Function that frees a work unit.
Definition: abt.h:1540
ABT_POOL_ACCESS_MPMC
@ ABT_POOL_ACCESS_MPMC
Definition: abt.h:541
ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN
@ ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN
Definition: abt.h:666
ABT_sched_def::run
ABT_sched_run_fn run
Function that defines a kernel of a scheduler.
Definition: abt.h:1365
ABT_sched_config
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
Definition: abt.h:813
ABT_SCHED_DEFAULT
@ ABT_SCHED_DEFAULT
Definition: abt.h:467
ABT_mutex
struct ABT_mutex_opaque * ABT_mutex
Mutex handle type.
Definition: abt.h:943
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:445
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:50
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:138
ABT_cond_memory
A struct that can be converted to ABT_cond.
Definition: abt.h:1170
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:1657
ABT_SYNC_EVENT_TYPE_MUTEX
@ ABT_SYNC_EVENT_TYPE_MUTEX
Definition: abt.h:670
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:898
ABT_self_get_thread
int ABT_self_get_thread(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
Definition: self.c:95
ABT_key_free
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free a work-unit-specific data key.
Definition: key.c:109
ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
@ ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
Definition: abt.h:590
ABT_pool_pop_timedwait_fn
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:1414
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:822
ABT_mutex_lock
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex.
Definition: mutex.c:181
ABT_SYNC_EVENT_TYPE_FUTURE
@ ABT_SYNC_EVENT_TYPE_FUTURE
Definition: abt.h:678
ABT_pool_def::u_get_type
ABT_unit_get_type_fn u_get_type
Unused function.
Definition: abt.h:1447
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:154
ABT_xstream_cancel
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Send a cancellation request to an execution stream.
Definition: stream.c:572
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:1494
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:88
ABT_sched_type
ABT_sched_type
Scheduler's work unit type.
Definition: abt.h:490
ABT_self_set_specific
int ABT_self_set_specific(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with a work-unit-specific data key in the calling work unit.
Definition: self.c:179
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:61
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:847
ABT_finalize
int ABT_finalize(void) ABT_API_PUBLIC
Finalize the Argobots execution environment.
Definition: global.c:130
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:983
ABT_pool_print_all_fn
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:1417
ABT_thread_attr_free
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free a ULT attribute.
Definition: thread_attr.c:92
ABT_pool
struct ABT_pool_opaque * ABT_pool
Pool handle type.
Definition: abt.h:839
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:752
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:660
ABT_POOL_ACCESS_MPSC
@ ABT_POOL_ACCESS_MPSC
Definition: abt.h:535
ABT_thread_state
ABT_thread_state
State of a work unit.
Definition: abt.h:415
ABT_thread_free
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Free a work unit.
Definition: thread.c:415
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:481
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:199
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:373
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:1162
ABT_POOL_ACCESS_PRIV
@ ABT_POOL_ACCESS_PRIV
Definition: abt.h:526
ABT_sched
struct ABT_sched_opaque * ABT_sched
Scheduler handle type.
Definition: abt.h:806
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:515
ABT_INFO_QUERY_KIND_FCONTEXT
@ ABT_INFO_QUERY_KIND_FCONTEXT
Definition: abt.h:615
ABT_SCHED_TYPE_ULT
@ ABT_SCHED_TYPE_ULT
Definition: abt.h:492
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:634
ABT_unit_free_fn
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:1408
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:1345
ABT_mutex_trylock
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex.
Definition: mutex.c:284
ABT_thread_exit
int ABT_thread_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
Definition: thread.c:616
ABT_SYNC_EVENT_TYPE_UNKNOWN
@ ABT_SYNC_EVENT_TYPE_UNKNOWN
Definition: abt.h:660
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:1694
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:658
ABT_THREAD_STATE_BLOCKED
@ ABT_THREAD_STATE_BLOCKED
Definition: abt.h:421
ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
@ ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
Definition: abt.h:594
ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
@ ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
Definition: abt.h:601
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:200
ABT_tool_context
struct ABT_tool_context_opaque * ABT_tool_context
Tool context handle type.
Definition: abt.h:1011
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 data key in a work unit.
Definition: thread.c:2043
ABT_mutex_attr
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Mutex attribute handle type.
Definition: abt.h:950
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:52
ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER
Definition: abt.h:579
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:391
ABT_SYNC_EVENT_TYPE_OTHER
@ ABT_SYNC_EVENT_TYPE_OTHER
Definition: abt.h:664
ABT_unit_id
uint64_t ABT_unit_id
Work unit ID type.
Definition: abt.h:877
ABT_pool_def
A struct that defines a pool.
Definition: abt.h:1424
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:787
ABT_pool_remove_fn
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1415
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:767
ABT_pool_init_fn
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:1409
ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
@ ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
Definition: abt.h:575
ABT_barrier
struct ABT_barrier_opaque * ABT_barrier
Barrier handle type.
Definition: abt.h:985
ABT_thread_yield
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: thread.c:1136
ABT_self_suspend
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the calling ULT.
Definition: self.c:524
ABT_unit_type
ABT_unit_type
Type of a work unit for scheduling.
Definition: abt.h:548
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:610
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:887
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:179
ABT_pool_config
struct ABT_pool_config_opaque * ABT_pool_config
Pool configuration handle type.
Definition: abt.h:846
ABT_TASK_STATE_RUNNING
@ ABT_TASK_STATE_RUNNING
Definition: abt.h:438
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:264
ABT_mutex_lock_high
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex with high priority.
Definition: mutex.c:249
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:443
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:1643
ABT_info_query_kind
ABT_info_query_kind
Query kind for ABT_info_query_config().
Definition: abt.h:567
ABT_pool_def::p_pop
ABT_pool_pop_fn p_pop
Function that pops a work unit from a pool.
Definition: abt.h:1599
ABT_pool_def::p_free
ABT_pool_free_fn p_free
Function that frees a pool.
Definition: abt.h:1670
ABT_future
struct ABT_future_opaque * ABT_future
Future handle type.
Definition: abt.h:978
ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
@ ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
Definition: abt.h:592
ABT_xstream_check_events
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Process events associated with a scheduler.
Definition: stream.c:1247
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:966
ABT_thread_join
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for a work unit to terminate.
Definition: thread.c:530
ABT_POOL_FIFO
@ ABT_POOL_FIFO
Definition: abt.h:506
ABT_mutex_attr_free
int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC
Free a mutex attribute.
Definition: mutex_attr.c:76
ABT_sched_init_fn
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:1290
ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
Definition: abt.h:599
ABT_pool_def::p_print_all
ABT_pool_print_all_fn p_print_all
Function that applies a user-given function to all work units in a pool.
Definition: abt.h:1688
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:1231
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:939
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:1020
ABT_pool_def::access
ABT_pool_access access
Access type.
Definition: abt.h:1437
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:351
ABT_sched_state
ABT_sched_state
Unused enum.
Definition: abt.h:450
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:114
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:156
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:1292
ABT_POOL_FIFO_WAIT
@ ABT_POOL_FIFO_WAIT
Definition: abt.h:515
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:331
ABT_unit
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
Definition: abt.h:867
ABT_INFO_QUERY_KIND_ENABLED_DEBUG
@ ABT_INFO_QUERY_KIND_ENABLED_DEBUG
Definition: abt.h:569
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:177
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:616
ABT_sched_config_var::type
ABT_sched_config_type type
Definition: abt.h:1242
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:1816
ABT_sched_config_free
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free a scheduler configuration.
Definition: config.c:242
ABT_SCHED_CONFIG_DOUBLE
@ ABT_SCHED_CONFIG_DOUBLE
Definition: abt.h:1229
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:522
ABT_SYNC_EVENT_TYPE_COND
@ ABT_SYNC_EVENT_TYPE_COND
Definition: abt.h:672
ABT_DEPRECATED
#define ABT_DEPRECATED
Definition: abt.h:78
ABT_eventual
struct ABT_eventual_opaque * ABT_eventual
Eventual handle type.
Definition: abt.h:971
ABT_SCHED_BASIC
@ ABT_SCHED_BASIC
Definition: abt.h:469
ABT_TASK_STATE_READY
@ ABT_TASK_STATE_READY
Definition: abt.h:436
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:1572
ABT_xstream_join
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for an execution stream to terminate.
Definition: stream.c:477
ABT_pool_def::p_push
ABT_pool_push_fn p_push
Function that pushes a work unit to a pool.
Definition: abt.h:1586
ABT_INFO_QUERY_KIND_ENABLED_TOOL
@ ABT_INFO_QUERY_KIND_ENABLED_TOOL
Definition: abt.h:613
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:168
ABT_self_exit
int ABT_self_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
Definition: self.c:556
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:306
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:1973
ABT_thread_id
ABT_unit_id ABT_thread_id
Work unit ID type.
Definition: abt.h:916
ABT_TOOL_QUERY_KIND_POOL
@ ABT_TOOL_QUERY_KIND_POOL
Definition: abt.h:630
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:558
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:1398
ABT_SYNC_EVENT_TYPE_BARRIER
@ ABT_SYNC_EVENT_TYPE_BARRIER
Definition: abt.h:680
ABT_mutex_attr_get_recursive
int ABT_mutex_attr_get_recursive(ABT_mutex_attr attr, ABT_bool *recursive) ABT_API_PUBLIC
Get a recursive property in a mutex attribute.
Definition: mutex_attr.c:153
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:263
ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
@ ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
Definition: abt.h:617
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:806
ABT_timer
struct ABT_timer_opaque * ABT_timer
Timer handle type.
Definition: abt.h:992
ABT_cond_broadcast
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
Definition: cond.c:317
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:1342
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:275
ABT_unit_get_thread_fn
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:1403
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 stream.
Definition: thread.c:1505
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:763
ABT_SCHED_STATE_READY
@ ABT_SCHED_STATE_READY
Definition: abt.h:451
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:586
ABT_thread_self
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
Definition: thread.c:714
ABT_xstream_barrier
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Execution-stream barrier handle type.
Definition: abt.h:799
ABT_pool_def::u_create_from_task
ABT_unit_create_from_task_fn u_create_from_task
Unused function.
Definition: abt.h:1524
ABT_self_get_specific
int ABT_self_get_specific(ABT_key key, void **value) ABT_API_PUBLIC
Get a value associated with a work-unit-specific data key in the calling work unit.
Definition: self.c:226
ABT_SYNC_EVENT_TYPE_EVENTUAL
@ ABT_SYNC_EVENT_TYPE_EVENTUAL
Definition: abt.h:676
ABT_pool_push_fn
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1411
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:475
ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
@ ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
Definition: abt.h:605
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:597
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:581
ABT_POOL_ACCESS_SPMC
@ ABT_POOL_ACCESS_SPMC
Definition: abt.h:539
ABT_XSTREAM_STATE_RUNNING
@ ABT_XSTREAM_STATE_RUNNING
Definition: abt.h:406
ABT_SCHED_STATE_RUNNING
@ ABT_SCHED_STATE_RUNNING
Definition: abt.h:452
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
Register a callback function in a work unit.
Definition: thread.c:1617
ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
Definition: abt.h:577
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:496
ABT_SYNC_EVENT_TYPE_RWLOCK
@ ABT_SYNC_EVENT_TYPE_RWLOCK
Definition: abt.h:674
ABT_SYNC_EVENT_TYPE_THREAD_JOIN
@ ABT_SYNC_EVENT_TYPE_THREAD_JOIN
Definition: abt.h:668
ABT_cond_wait
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on a condition variable.
Definition: cond.c:151
ABT_xstream_free
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Free an execution stream.
Definition: stream.c:413
ABT_sched_def::free
ABT_sched_free_fn free
Function that frees a scheduler.
Definition: abt.h:1381
ABT_initialized
int ABT_initialized(void) ABT_API_PUBLIC
Check if the Argobots execution environment has been initialized.
Definition: global.c:160
ABT_future_set
int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal a future.
Definition: futures.c:258
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:1736
ABT_UNIT_TYPE_THREAD
@ ABT_UNIT_TYPE_THREAD
Definition: abt.h:550
ABT_mutex_spinlock
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex in a busy-wait form.
Definition: mutex.c:324
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:397
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:494
ABT_UNIT_TYPE_XSTREAM
@ ABT_UNIT_TYPE_XSTREAM
Definition: abt.h:558
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:632
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:1056
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:88
ABT_POOL_ACCESS_SPSC
@ ABT_POOL_ACCESS_SPSC
Definition: abt.h:531
ABT_rwlock_wrlock
int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a writer.
Definition: rwlock.c:199
ABT_sched_def
A struct that defines a scheduler.
Definition: abt.h:1300
ABT_UNIT_TYPE_TASK
@ ABT_UNIT_TYPE_TASK
Definition: abt.h:556
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:697
ABT_self_yield
int ABT_self_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: self.c:483
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 tasklet.
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:841
ABT_rwlock_unlock
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock a readers-writer lock.
Definition: rwlock.c:253
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:1514
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:1294
ABT_SCHED_BASIC_WAIT
@ ABT_SCHED_BASIC_WAIT
Definition: abt.h:479
ABT_SCHED_RANDWS
@ ABT_SCHED_RANDWS
Definition: abt.h:477
ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
@ ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
Definition: abt.h:584
ABT_pool_get_size_fn
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:1410
ABT_task_equal
int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC
Compare two work-unit handles for equality.
Definition: task.c:480
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:233
ABT_future_reset
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset readiness of a future.
Definition: futures.c:323
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:1466
ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
Definition: abt.h:571
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:401
ABT_self_get_xstream_rank
int ABT_self_get_xstream_rank(int *rank) ABT_API_PUBLIC
Return a rank of an execution stream that is running the calling work unit.
Definition: self.c:65
ABT_mutex_memory
A struct that can be converted to ABT_mutex.
Definition: abt.h:1087
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:509
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:957
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 tasklet.
Definition: task.c:370
ABT_SCHED_STATE_TERMINATED
@ ABT_SCHED_STATE_TERMINATED
Definition: abt.h:454
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:720
ABT_pool_free_fn
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:1416
ABT_info_print_config
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Print the runtime information of Argobots.
Definition: info.c:396
ABT_SCHED_STATE_STOPPED
@ ABT_SCHED_STATE_STOPPED
Definition: abt.h:453
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:194
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:435
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:1227
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:98
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:335
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
Definition: abt.h:640
ABT_thread_yield_to
int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to another ULT.
Definition: thread.c:1022
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:927
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:355
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:274
ABT_mutex_unlock
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock a mutex.
Definition: mutex.c:357
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:456
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:1863
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:674
ABT_pool_def::p_init
ABT_pool_init_fn p_init
Function that frees a work unit.
Definition: abt.h:1554
ABT_sched_def::init
ABT_sched_init_fn init
Function that initializes a scheduler.
Definition: abt.h:1325
ABT_THREAD_STATE_RUNNING
@ ABT_THREAD_STATE_RUNNING
Definition: abt.h:419
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:229
ABT_xstream_revive
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Revive a terminated execution stream.
Definition: stream.c:340
ABT_sched_free
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Free a scheduler.
Definition: sched.c:234
ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
Definition: abt.h:588
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:1200
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:609
ABT_EXEC_ENTITY_TYPE_THREAD
@ ABT_EXEC_ENTITY_TYPE_THREAD
Definition: abt.h:651
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:1692
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 data key in a work unit.
Definition: thread.c:2092
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.
Definition: rwlock.c:40
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:1428
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:320
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:1092
ABT_rwlock
struct ABT_rwlock_opaque * ABT_rwlock
Readers-writer lock handle type.
Definition: abt.h:964
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:454
ABT_sched_free_fn
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:1292
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:504
ABT_mutex_get_attr
int ABT_mutex_get_attr(ABT_mutex mutex, ABT_mutex_attr *attr) ABT_API_PUBLIC
Get attributes of a mutex.
Definition: mutex.c:514
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:526
ABT_thread_cancel
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Send a cancellation request to a work unit.
Definition: thread.c:663
ABT_key_set
int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with a work-unit-specific data key in the calling work unit.
Definition: key.c:156
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:545
ABT_UNIT_TYPE_EXT
@ ABT_UNIT_TYPE_EXT
Definition: abt.h:560
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:91
ABT_sched_config_var::idx
int idx
Definition: abt.h:1240
ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
@ ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
Definition: abt.h:603
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
Definition: abt.h:611
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:568
ABT_XSTREAM_STATE_TERMINATED
@ ABT_XSTREAM_STATE_TERMINATED
Definition: abt.h:408
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_self_get_xstream
int ABT_self_get_xstream(ABT_xstream *xstream) ABT_API_PUBLIC
Get an execution stream that is running the calling work unit.
Definition: self.c:33
ABT_self_get_thread_id
int ABT_self_get_thread_id(ABT_unit_id *id) ABT_API_PUBLIC
Get ID of the calling work unit.
Definition: self.c:124
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:198
ABT_INFO_QUERY_KIND_ENABLED_LOG
@ ABT_INFO_QUERY_KIND_ENABLED_LOG
Definition: abt.h:573
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:220
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:145
ABT_SCHED_TYPE_TASK
@ ABT_SCHED_TYPE_TASK
Definition: abt.h:494
ABT_cond_signal
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition.
Definition: cond.c:285
ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
Definition: abt.h:586
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:832
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:473
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:596
ABT_unit_create_from_thread_fn
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:1406
ABT_sched_config_type
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1225
ABT_pool_access
ABT_pool_access
Pool access type.
Definition: abt.h:522
ABT_xstream_state
ABT_xstream_state
State of an execution stream.
Definition: abt.h:404
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:2137