ARGOBOTS  1.1
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.1"
47 
68 #define ABT_NUMVERSION 10100300
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 
624 };
625 
643 };
644 
654 };
655 
683 };
684 
689 #define ABT_TOOL_EVENT_THREAD_NONE (0)
690 
694 #define ABT_TOOL_EVENT_THREAD_CREATE (1 << 0)
695 
699 #define ABT_TOOL_EVENT_THREAD_JOIN (1 << 1)
700 
704 #define ABT_TOOL_EVENT_THREAD_FREE (1 << 2)
705 
709 #define ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3)
710 
714 #define ABT_TOOL_EVENT_THREAD_RUN (1 << 4)
715 
719 #define ABT_TOOL_EVENT_THREAD_FINISH (1 << 5)
720 
724 #define ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6)
725 
729 #define ABT_TOOL_EVENT_THREAD_YIELD (1 << 7)
730 
734 #define ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8)
735 
739 #define ABT_TOOL_EVENT_THREAD_RESUME (1 << 9)
740 
744 #define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1))
745 
746 
748 #define ABT_TRUE 1
749 
750 #define ABT_FALSE 0
751 
759 #define ABT_XSTREAM_ANY_RANK -1
760 
761 /* Data Types */
762 struct ABT_xstream_opaque;
763 struct ABT_xstream_barrier_opaque;
764 struct ABT_sched_opaque;
765 struct ABT_sched_config_opaque;
766 struct ABT_pool_opaque;
767 struct ABT_pool_config_opaque;
768 struct ABT_unit_opaque;
769 struct ABT_thread_opaque;
770 struct ABT_thread_attr_opaque;
771 struct ABT_task_opaque;
772 struct ABT_key_opaque;
773 struct ABT_mutex_opaque;
774 struct ABT_mutex_attr_opaque;
775 struct ABT_cond_opaque;
776 struct ABT_rwlock_opaque;
777 struct ABT_eventual_opaque;
778 struct ABT_future_opaque;
779 struct ABT_barrier_opaque;
780 struct ABT_timer_opaque;
781 struct ABT_tool_context_opaque;
782 
789 typedef struct ABT_xstream_opaque * ABT_xstream;
801 typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier;
808 typedef struct ABT_sched_opaque * ABT_sched;
815 typedef struct ABT_sched_config_opaque * ABT_sched_config;
841 typedef struct ABT_pool_opaque * ABT_pool;
848 typedef struct ABT_pool_config_opaque * ABT_pool_config;
869 typedef struct ABT_unit_opaque * ABT_unit;
879 typedef uint64_t ABT_unit_id;
890 typedef struct ABT_thread_opaque * ABT_thread;
897 typedef struct ABT_thread_attr_opaque * ABT_thread_attr;
931 typedef struct ABT_thread_opaque * ABT_task;
938 typedef struct ABT_key_opaque * ABT_key;
945 typedef struct ABT_mutex_opaque * ABT_mutex;
952 typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr;
959 typedef struct ABT_cond_opaque * ABT_cond;
966 typedef struct ABT_rwlock_opaque * ABT_rwlock;
973 typedef struct ABT_eventual_opaque * ABT_eventual;
980 typedef struct ABT_future_opaque * ABT_future;
987 typedef struct ABT_barrier_opaque * ABT_barrier;
994 typedef struct ABT_timer_opaque * ABT_timer;
1001 typedef int ABT_bool;
1013 typedef struct ABT_tool_context_opaque * ABT_tool_context;
1029 
1030 
1031 /* Null Object Handles */
1032 #define ABT_NULL 0
1033 #if ABT_NULL == 1
1034 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
1035 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
1036 #define ABT_SCHED_NULL ((ABT_sched) NULL)
1037 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
1038 #define ABT_POOL_NULL ((ABT_pool) NULL)
1039 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
1040 #define ABT_UNIT_NULL ((ABT_unit) NULL)
1041 #define ABT_THREAD_NULL ((ABT_thread) NULL)
1042 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
1043 #define ABT_TASK_NULL ((ABT_task) NULL)
1044 #define ABT_KEY_NULL ((ABT_key) NULL)
1045 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
1046 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
1047 #define ABT_COND_NULL ((ABT_cond) NULL)
1048 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
1049 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
1050 #define ABT_FUTURE_NULL ((ABT_future) NULL)
1051 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
1052 #define ABT_TIMER_NULL ((ABT_timer) NULL)
1053 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) NULL)
1054 #else
1055 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
1056 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
1057 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
1058 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
1059 #define ABT_POOL_NULL ((ABT_pool) (0x05))
1060 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
1061 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
1062 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
1063 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
1064 #define ABT_TASK_NULL ((ABT_task) (0x0a))
1065 #define ABT_KEY_NULL ((ABT_key) (0x0b))
1066 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
1067 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
1068 #define ABT_COND_NULL ((ABT_cond) (0x0e))
1069 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
1070 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
1071 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
1072 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
1073 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
1074 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14))
1075 #endif
1076 
1089 typedef struct {
1090  int dummy[16];
1092 
1114 #define ABT_MUTEX_INITIALIZER \
1115  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1116 
1141 #define ABT_RECURSIVE_MUTEX_INITIALIZER \
1142  { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1143 
1157 #define ABT_MUTEX_MEMORY_GET_HANDLE(p_mutex_memory) \
1158  ((ABT_mutex)p_mutex_memory)
1159 
1172 typedef struct {
1173  int dummy[16];
1174 } ABT_cond_memory;
1175 
1203 #define ABT_COND_INITIALIZER \
1204  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1205 
1220 #define ABT_COND_MEMORY_GET_HANDLE(p_cond_memory) \
1221  ((ABT_cond)p_cond_memory)
1222 
1227 typedef enum {
1235 
1240 typedef struct {
1242  int idx;
1246 
1290 
1291 /* Scheduler Functions */
1293 typedef void (*ABT_sched_run_fn)(ABT_sched);
1295 /* To get a pool ready for receiving a migration */
1297 
1302 typedef struct {
1401 } ABT_sched_def;
1402 
1403 /* Pool Functions */
1410 typedef void (*ABT_unit_free_fn)(ABT_unit *);
1412 typedef size_t (*ABT_pool_get_size_fn)(ABT_pool);
1416 typedef ABT_unit (*ABT_pool_pop_timedwait_fn)(ABT_pool, double); /* Deprecated .*/
1418 typedef int (*ABT_pool_free_fn)(ABT_pool);
1419 typedef int (*ABT_pool_print_all_fn)(ABT_pool, void *arg,
1420  void (*)(void*, ABT_unit));
1421 
1426 typedef struct {
1591 #ifdef ABT_ENABLE_VER_20_API
1592 
1611  ABT_pool_pop_wait_fn p_pop_wait;
1612 #endif
1613 
1680 } ABT_pool_def;
1681 
1682 /* Tool callback type. */
1683 typedef void (*ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event,
1684  ABT_tool_context context, void *user_arg);
1685 typedef void (*ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event,
1686  ABT_tool_context context, void *user_arg);
1687 
1688 /* Init & Finalize */
1689 int ABT_init(int argc, char **argv) ABT_API_PUBLIC;
1690 int ABT_finalize(void) ABT_API_PUBLIC;
1692 
1693 /* Execution Stream (ES) */
1694 int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC;
1695 int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools,
1696  ABT_pool *pools, ABT_sched_config config,
1697  ABT_xstream *newxstream) ABT_API_PUBLIC;
1698 int ABT_xstream_create_with_rank(ABT_sched sched, int rank,
1699  ABT_xstream *newxstream) ABT_API_PUBLIC;
1706 int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC;
1707 int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC;
1708 int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC;
1711  ABT_sched_predef predef,
1712  int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
1714 int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools,
1715  ABT_pool *pools) ABT_API_PUBLIC;
1717 int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2,
1718  ABT_bool *result) ABT_API_PUBLIC;
1719 int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC;
1720 int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *is_primary) ABT_API_PUBLIC;
1723 int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC;
1724 int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC;
1725 int ABT_xstream_set_affinity(ABT_xstream xstream, int num_cpuids, int *cpuids)
1727 int ABT_xstream_get_affinity(ABT_xstream xstream, int max_cpuids, int *cpuids,
1728  int *num_cpuids) ABT_API_PUBLIC;
1729 
1730 /* ES Barrier */
1731 int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
1735 
1736 /* Scheduler */
1737 int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools,
1738  ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
1739 int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools,
1740  ABT_pool *pools, ABT_sched_config config,
1741  ABT_sched *newsched) ABT_API_PUBLIC;
1744 int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC;
1745 int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC;
1746 int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx,
1747  ABT_pool *pools) ABT_API_PUBLIC;
1748 int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
1749 int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
1753 
1754 /* Scheduler config */
1756 int ABT_sched_config_read(ABT_sched_config config, int num_vars, ...) ABT_API_PUBLIC;
1758 
1759 /* Pool */
1761  ABT_pool *newpool) ABT_API_PUBLIC;
1763  ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
1766 int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
1767 int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
1768 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
1769 int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC;
1770 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs)
1774 int ABT_pool_print_all(ABT_pool pool, void *arg,
1775  void (*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC;
1777 int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC;
1779 int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC;
1780 
1781 /* Work Unit */
1784 
1785 /* User-level Thread (ULT) */
1786 int ABT_thread_create(ABT_pool pool, void (*thread_func)(void *), void *arg,
1787  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
1789  void (*thread_func)(void *), void *arg,
1790  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
1791 int ABT_thread_create_many(int num_threads, ABT_pool *pool_list,
1792  void (**thread_func_list)(void *), void **arg_list,
1793  ABT_thread_attr attr, ABT_thread *newthread_list)
1795 int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg,
1796  ABT_thread *thread) ABT_API_PUBLIC;
1798 int ABT_thread_free_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
1800 int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
1819  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
1821 int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *is_migratable) ABT_API_PUBLIC;
1822 int ABT_thread_is_primary(ABT_thread thread, ABT_bool *is_primary) ABT_API_PUBLIC;
1823 int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *is_unnamed) ABT_API_PUBLIC;
1824 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
1826 int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC;
1827 int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC;
1828 int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC;
1829 int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC;
1830 int ABT_thread_get_thread_func(ABT_thread thread, void (**thread_func)(void *)) ABT_API_PUBLIC;
1831 int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC;
1832 int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC;
1834 
1835 /* ULT Attributes */
1838 int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr,
1839  size_t stacksize) ABT_API_PUBLIC;
1840 int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr,
1841  size_t *stacksize) ABT_API_PUBLIC;
1843 int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC;
1845  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
1847 
1848 /* Tasklet */
1849 int ABT_task_create(ABT_pool pool, void (*task_func)(void *), void *arg,
1850  ABT_task *newtask) ABT_API_PUBLIC;
1851 int ABT_task_create_on_xstream(ABT_xstream xstream, void (*task_func)(void *),
1852  void *arg, ABT_task *newtask) ABT_API_PUBLIC;
1853 int ABT_task_revive(ABT_pool pool, void (*task_func)(void *), void *arg,
1854  ABT_task *task) ABT_API_PUBLIC;
1859 int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC;
1866 int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC;
1867 int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC;
1868 int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC;
1869 #define ABT_task_is_unnamed ABT_thread_is_unnamed
1870 #define ABT_task_set_specific ABT_thread_set_specific
1871 #define ABT_task_get_specific ABT_thread_get_specific
1872 
1873 /* Self */
1878 int ABT_self_set_specific(ABT_key key, void *value) ABT_API_PUBLIC;
1879 int ABT_self_get_specific(ABT_key key, void **value) ABT_API_PUBLIC;
1880 #define ABT_self_get_task ABT_self_get_thread
1881 #define ABT_self_get_task_id ABT_self_get_thread_id
1887 int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC;
1890 int ABT_self_yield(void) ABT_API_PUBLIC;
1892 int ABT_self_exit(void) ABT_API_PUBLIC;
1893 int ABT_self_set_arg(void *arg) ABT_API_PUBLIC;
1894 int ABT_self_get_arg(void **arg) ABT_API_PUBLIC;
1895 int ABT_self_get_thread_func(void (**thread_func)(void *)) ABT_API_PUBLIC;
1896 
1897 /* ULT-specific data */
1898 int ABT_key_create(void (*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC;
1900 int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC;
1901 int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC;
1902 
1903 /* Mutex */
1915 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
1917 
1918 /* Mutex Attributes */
1923 
1924 /* Condition variable */
1928 int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex,
1929  const struct timespec *abstime) ABT_API_PUBLIC;
1932 
1933 /* Readers writer lock */
1939 
1940 /* Eventual */
1941 int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC;
1943 int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC;
1944 int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready) ABT_API_PUBLIC;
1945 int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC;
1947 
1948 /* Futures */
1949 int ABT_future_create(uint32_t num_compartments, void (*cb_func)(void **arg),
1950  ABT_future *newfuture) ABT_API_PUBLIC;
1953 int ABT_future_test(ABT_future future, ABT_bool *is_ready) ABT_API_PUBLIC;
1954 int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC;
1956 
1957 /* Barrier */
1958 int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC;
1959 int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC;
1962 int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
1964 
1965 /* Error */
1966 int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC;
1967 
1968 /* Timer */
1969 double ABT_get_wtime(void) ABT_API_PUBLIC;
1971 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
1975 int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1976 int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1977 int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC;
1978 int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC;
1979 
1980 /* Information */
1982  void *val) ABT_API_PUBLIC;
1985 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC;
1986 int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC;
1987 int ABT_info_print_pool(FILE* fp, ABT_pool pool) ABT_API_PUBLIC;
1988 int ABT_info_print_thread(FILE* fp, ABT_thread thread) ABT_API_PUBLIC;
1990 int ABT_info_print_task(FILE* fp, ABT_task task) ABT_API_PUBLIC;
1993 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
1994  void (*cb_func)(ABT_bool, void *),
1995  void *arg) ABT_API_PUBLIC;
1996 
1997 /* Tool Functions */
1999  uint64_t event_mask,
2000  void *user_arg) ABT_API_PUBLIC;
2001 int ABT_tool_query_thread(ABT_tool_context context, uint64_t event,
2002  ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC;
2003 
2004 #if defined(__cplusplus)
2005 }
2006 #endif
2007 
2008 #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:1414
ABT_unit_get_task_fn
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:1406
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:1419
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:1304
ABT_SYNC_EVENT_TYPE_USER
@ ABT_SYNC_EVENT_TYPE_USER
Definition: abt.h:664
ABT_sched_config_var
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1240
ABT_key
struct ABT_key_opaque * ABT_key
Work-unit-specific data key handle type.
Definition: abt.h:938
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:516
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:1457
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:2053
ABT_thread_resume
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume a ULT.
Definition: thread.c:1233
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:740
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:446
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:1823
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:1001
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:334
ABT_task_cancel
int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC
Send a termination request to a work unit.
Definition: task.c:221
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:1407
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:630
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:685
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:634
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:738
ABT_EXEC_ENTITY_TYPE_EXT
@ ABT_EXEC_ENTITY_TYPE_EXT
Definition: abt.h:651
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:312
ABT_sched_run_fn
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:1293
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:1309
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:73
ABT_task_self
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Get the calling work unit.
Definition: task.c:263
ABT_TOOL_QUERY_KIND_CALLER_HANDLE
@ ABT_TOOL_QUERY_KIND_CALLER_HANDLE
Definition: abt.h:638
ABT_thread_attr
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
Definition: abt.h:897
ABT_task
struct ABT_thread_opaque * ABT_task
Work unit handle type.
Definition: abt.h:931
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:792
ABT_thread
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
Definition: abt.h:890
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:585
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:421
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:253
ABT_self_get_thread_func
int ABT_self_get_thread_func(void(**thread_func)(void *)) ABT_API_PUBLIC
Retrieve a work-unit function of the calling work unit.
Definition: self.c:772
ABT_unit_get_type_fn
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:1404
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:455
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:626
ABT_unit_create_from_task_fn
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
Definition: abt.h:1409
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
Definition: abt.h:640
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:649
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:1944
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:716
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:1152
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:1483
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:1724
ABT_unit_set_associated_pool
int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
No operation.
Definition: unit.c:48
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:29
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:1415
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:1983
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:1531
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:668
ABT_sched_def::run
ABT_sched_run_fn run
Function that defines a kernel of a scheduler.
Definition: abt.h:1367
ABT_sched_config
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
Definition: abt.h:815
ABT_SCHED_DEFAULT
@ ABT_SCHED_DEFAULT
Definition: abt.h:467
ABT_mutex
struct ABT_mutex_opaque * ABT_mutex
Mutex handle type.
Definition: abt.h:945
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:1172
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:1648
ABT_SYNC_EVENT_TYPE_MUTEX
@ ABT_SYNC_EVENT_TYPE_MUTEX
Definition: abt.h:672
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:910
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:1416
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:834
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:680
ABT_pool_def::u_get_type
ABT_unit_get_type_fn u_get_type
Unused function.
Definition: abt.h:1445
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_pool_def::u_get_thread
ABT_unit_get_thread_fn u_get_thread
Unused function.
Definition: abt.h:1451
ABT_xstream_cancel
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Send a cancellation request to an execution stream.
Definition: stream.c:581
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:1475
ABT_self_get_last_pool
int ABT_self_get_last_pool(ABT_pool *pool) ABT_API_PUBLIC
Get the last pool of the calling work unit.
Definition: self.c:436
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:87
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:858
ABT_finalize
int ABT_finalize(void) ABT_API_PUBLIC
Finalize the Argobots execution environment.
Definition: global.c:140
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:1006
ABT_pool_print_all_fn
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:1419
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:841
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:761
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:669
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:420
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:200
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:1185
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:808
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:520
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:636
ABT_unit_free_fn
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:1410
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:122
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:1390
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:627
ABT_SYNC_EVENT_TYPE_UNKNOWN
@ ABT_SYNC_EVENT_TYPE_UNKNOWN
Definition: abt.h:662
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:1685
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:660
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:206
ABT_tool_context
struct ABT_tool_context_opaque * ABT_tool_context
Tool context handle type.
Definition: abt.h:1013
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:2119
ABT_mutex_attr
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Mutex attribute handle type.
Definition: abt.h:952
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:666
ABT_unit_id
uint64_t ABT_unit_id
Work unit ID type.
Definition: abt.h:879
ABT_pool_def
A struct that defines a pool.
Definition: abt.h:1426
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:789
ABT_pool_remove_fn
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1417
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:779
ABT_pool_init_fn
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:1411
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:987
ABT_thread_yield
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: thread.c:1181
ABT_self_suspend
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the calling ULT.
Definition: self.c:624
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:618
ABT_self_set_associated_pool
int ABT_self_set_associated_pool(ABT_pool pool) ABT_API_PUBLIC
Set an associated pool for the calling work unit.
Definition: self.c:518
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:898
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:848
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:272
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:474
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:1634
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:1590
ABT_pool_def::p_free
ABT_pool_free_fn p_free
Function that frees a pool.
Definition: abt.h:1661
ABT_future
struct ABT_future_opaque * ABT_future
Future handle type.
Definition: abt.h:980
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:1275
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:1009
ABT_thread_join
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for a work unit to terminate.
Definition: thread.c:538
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:1292
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:1679
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:1233
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:955
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:1043
ABT_pool_def::access
ABT_pool_access access
Access type.
Definition: abt.h:1439
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:161
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:1320
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:869
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:182
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:1244
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:1861
ABT_sched_config_free
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free a scheduler configuration.
Definition: config.c:243
ABT_SCHED_CONFIG_DOUBLE
@ ABT_SCHED_CONFIG_DOUBLE
Definition: abt.h:1231
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:531
ABT_SYNC_EVENT_TYPE_COND
@ ABT_SYNC_EVENT_TYPE_COND
Definition: abt.h:674
ABT_DEPRECATED
#define ABT_DEPRECATED
Definition: abt.h:78
ABT_eventual
struct ABT_eventual_opaque * ABT_eventual
Eventual handle type.
Definition: abt.h:973
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:388
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:1563
ABT_xstream_join
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for an execution stream to terminate.
Definition: stream.c:486
ABT_pool_def::p_push
ABT_pool_push_fn p_push
Function that pushes a work unit to a pool.
Definition: abt.h:1577
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:170
ABT_self_exit
int ABT_self_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
Definition: self.c:656
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:2018
ABT_thread_id
ABT_unit_id ABT_thread_id
Work unit ID type.
Definition: abt.h:918
ABT_TOOL_QUERY_KIND_POOL
@ ABT_TOOL_QUERY_KIND_POOL
Definition: abt.h:632
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:1400
ABT_SYNC_EVENT_TYPE_BARRIER
@ ABT_SYNC_EVENT_TYPE_BARRIER
Definition: abt.h:682
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:817
ABT_timer
struct ABT_timer_opaque * ABT_timer
Timer handle type.
Definition: abt.h:994
ABT_cond_broadcast
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
Definition: cond.c:316
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:1370
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:1405
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:291
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:1550
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:774
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:598
ABT_thread_self
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
Definition: thread.c:725
ABT_xstream_barrier
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Execution-stream barrier handle type.
Definition: abt.h:801
ABT_pool_def::u_create_from_task
ABT_unit_create_from_task_fn u_create_from_task
Unused function.
Definition: abt.h:1515
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:678
ABT_pool_push_fn
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1413
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:480
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:697
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:167
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:1662
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:501
ABT_SYNC_EVENT_TYPE_RWLOCK
@ ABT_SYNC_EVENT_TYPE_RWLOCK
Definition: abt.h:676
ABT_SYNC_EVENT_TYPE_THREAD_JOIN
@ ABT_SYNC_EVENT_TYPE_THREAD_JOIN
Definition: abt.h:670
ABT_thread_get_thread_func
int ABT_thread_get_thread_func(ABT_thread thread, void(**thread_func)(void *)) ABT_API_PUBLIC
Retrieve a work-unit function of a work unit.
Definition: thread.c:2084
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:422
ABT_sched_def::free
ABT_sched_free_fn free
Function that frees a scheduler.
Definition: abt.h:1383
ABT_initialized
int ABT_initialized(void) ABT_API_PUBLIC
Check if the Argobots execution environment has been initialized.
Definition: global.c:170
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:1781
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:402
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:644
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:1079
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:89
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_thread_get_unit
int ABT_thread_get_unit(ABT_thread thread, ABT_unit *unit) ABT_API_PUBLIC
Get a unit handle of the target work unit.
Definition: thread.c:968
ABT_sched_def
A struct that defines a scheduler.
Definition: abt.h:1302
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:707
ABT_self_yield
int ABT_self_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: self.c:583
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:57
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:850
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:1505
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:1296
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:1412
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:485
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_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:1089
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:510
ABT_pool_free
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free a pool.
Definition: pool.c:211
ABT_cond
struct ABT_cond_opaque * ABT_cond
Condition variable handle type.
Definition: abt.h:959
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:375
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:732
ABT_pool_free_fn
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:1418
ABT_info_print_config
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Print the runtime information of Argobots.
Definition: info.c:408
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:440
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:1229
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:340
ABT_self_get_unit
int ABT_self_get_unit(ABT_unit *unit) ABT_API_PUBLIC
Get a unit handle of the calling work unit.
Definition: self.c:553
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
Definition: abt.h:642
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:1067
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:938
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:358
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:1908
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:804
ABT_pool_def::p_init
ABT_pool_init_fn p_init
Function that frees a work unit.
Definition: abt.h:1545
ABT_sched_def::init
ABT_sched_init_fn init
Function that initializes a scheduler.
Definition: abt.h:1327
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:344
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:1224
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:653
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:1683
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:2168
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:1473
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:1115
ABT_rwlock
struct ABT_rwlock_opaque * ABT_rwlock
Readers-writer lock handle type.
Definition: abt.h:966
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:459
ABT_INFO_QUERY_KIND_WAIT_POLICY
@ ABT_INFO_QUERY_KIND_WAIT_POLICY
Definition: abt.h:623
ABT_sched_free_fn
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:1294
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:674
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:557
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:245
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:1242
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:203
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_unit_get_thread
int ABT_unit_get_thread(ABT_unit unit, ABT_thread *thread) ABT_API_PUBLIC
Get a thread handle of the target work unit.
Definition: unit.c:78
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:284
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:845
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:1408
ABT_sched_config_type
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1227
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:2213