ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
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_POOL_CONFIG 56
172 
176 #define ABT_ERR_INV_POOL_USER_DEF 57
177 
181 #define ABT_ERR_INV_UNIT 15
182 
186 #define ABT_ERR_INV_THREAD 16
187 
191 #define ABT_ERR_INV_THREAD_ATTR 17
192 
200 #define ABT_ERR_INV_TASK 18
201 
205 #define ABT_ERR_INV_KEY 19
206 
210 #define ABT_ERR_INV_MUTEX 20
211 
215 #define ABT_ERR_INV_MUTEX_ATTR 21
216 
220 #define ABT_ERR_INV_COND 22
221 
225 #define ABT_ERR_INV_RWLOCK 23
226 
230 #define ABT_ERR_INV_EVENTUAL 24
231 
235 #define ABT_ERR_INV_FUTURE 25
236 
240 #define ABT_ERR_INV_BARRIER 26
241 
245 #define ABT_ERR_INV_TIMER 27
246 
250 #define ABT_ERR_INV_QUERY_KIND 28
251 
255 #define ABT_ERR_INV_TOOL_CONTEXT 52
256 
260 #define ABT_ERR_INV_ARG 53
261 
265 #define ABT_ERR_XSTREAM 29
266 
272 #define ABT_ERR_XSTREAM_STATE 30
273 
277 #define ABT_ERR_XSTREAM_BARRIER 31
278 
282 #define ABT_ERR_SCHED 32
283 
287 #define ABT_ERR_SCHED_CONFIG 33
288 
292 #define ABT_ERR_POOL 34
293 
297 #define ABT_ERR_UNIT 35
298 
302 #define ABT_ERR_THREAD 36
303 
311 #define ABT_ERR_TASK 37
312 
316 #define ABT_ERR_KEY 38
317 
321 #define ABT_ERR_MUTEX 39
322 
328 #define ABT_ERR_MUTEX_LOCKED 40
329 
333 #define ABT_ERR_COND 41
334 
340 #define ABT_ERR_COND_TIMEDOUT 42
341 
345 #define ABT_ERR_RWLOCK 43
346 
350 #define ABT_ERR_EVENTUAL 44
351 
355 #define ABT_ERR_FUTURE 45
356 
360 #define ABT_ERR_BARRIER 46
361 
365 #define ABT_ERR_TIMER 47
366 
370 #define ABT_ERR_MIGRATION_TARGET 48
371 
379 #define ABT_ERR_MIGRATION_NA 49
380 
386 #define ABT_ERR_MISSING_JOIN 50
387 
391 #define ABT_ERR_FEATURE_NA 51
392 
403 #define ABT_ERR_SYS 54
404 
408 #define ABT_ERR_CPUID 55
409 
419 };
420 
434 };
435 
451 };
452 
465 };
466 
490 };
491 
505 };
506 
550 };
551 
576 };
577 
595 };
596 
660 };
661 
679 };
680 
690 };
691 
719 };
720 
725 #define ABT_TOOL_EVENT_THREAD_NONE (0)
726 
730 #define ABT_TOOL_EVENT_THREAD_CREATE (1 << 0)
731 
735 #define ABT_TOOL_EVENT_THREAD_JOIN (1 << 1)
736 
740 #define ABT_TOOL_EVENT_THREAD_FREE (1 << 2)
741 
745 #define ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3)
746 
750 #define ABT_TOOL_EVENT_THREAD_RUN (1 << 4)
751 
755 #define ABT_TOOL_EVENT_THREAD_FINISH (1 << 5)
756 
760 #define ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6)
761 
765 #define ABT_TOOL_EVENT_THREAD_YIELD (1 << 7)
766 
770 #define ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8)
771 
775 #define ABT_TOOL_EVENT_THREAD_RESUME (1 << 9)
776 
780 #define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1))
781 
782 
784 #define ABT_TRUE 1
785 
786 #define ABT_FALSE 0
787 
795 #define ABT_XSTREAM_ANY_RANK -1
796 
797 /* Data Types */
798 struct ABT_xstream_opaque;
799 struct ABT_xstream_barrier_opaque;
800 struct ABT_sched_opaque;
801 struct ABT_sched_config_opaque;
802 struct ABT_pool_opaque;
803 struct ABT_pool_config_opaque;
804 struct ABT_pool_def;
805 struct ABT_unit_opaque;
806 struct ABT_thread_opaque;
807 struct ABT_thread_attr_opaque;
808 struct ABT_task_opaque;
809 struct ABT_key_opaque;
810 struct ABT_mutex_opaque;
811 struct ABT_mutex_attr_opaque;
812 struct ABT_cond_opaque;
813 struct ABT_rwlock_opaque;
814 struct ABT_eventual_opaque;
815 struct ABT_future_opaque;
816 struct ABT_barrier_opaque;
817 struct ABT_timer_opaque;
818 struct ABT_tool_context_opaque;
819 
826 typedef struct ABT_xstream_opaque * ABT_xstream;
838 typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier;
845 typedef struct ABT_sched_opaque * ABT_sched;
852 typedef struct ABT_sched_config_opaque * ABT_sched_config;
878 typedef struct ABT_pool_opaque * ABT_pool;
885 typedef struct ABT_pool_config_opaque * ABT_pool_config;
911 typedef struct ABT_unit_opaque * ABT_unit;
921 typedef uint64_t ABT_unit_id;
932 typedef struct ABT_thread_opaque * ABT_thread;
939 typedef struct ABT_thread_attr_opaque * ABT_thread_attr;
973 typedef struct ABT_thread_opaque * ABT_task;
980 typedef struct ABT_key_opaque * ABT_key;
987 typedef struct ABT_mutex_opaque * ABT_mutex;
994 typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr;
1001 typedef struct ABT_cond_opaque * ABT_cond;
1008 typedef struct ABT_rwlock_opaque * ABT_rwlock;
1015 typedef struct ABT_eventual_opaque * ABT_eventual;
1022 typedef struct ABT_future_opaque * ABT_future;
1029 typedef struct ABT_barrier_opaque * ABT_barrier;
1036 typedef struct ABT_timer_opaque * ABT_timer;
1043 typedef int ABT_bool;
1055 typedef struct ABT_tool_context_opaque * ABT_tool_context;
1071 
1072 
1073 /* Null Object Handles */
1074 #define ABT_NULL 0
1075 #if ABT_NULL == 1
1076 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
1077 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
1078 #define ABT_SCHED_NULL ((ABT_sched) NULL)
1079 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
1080 #define ABT_POOL_NULL ((ABT_pool) NULL)
1081 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
1082 #define ABT_UNIT_NULL ((ABT_unit) NULL)
1083 #define ABT_THREAD_NULL ((ABT_thread) NULL)
1084 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
1085 #define ABT_TASK_NULL ((ABT_task) NULL)
1086 #define ABT_KEY_NULL ((ABT_key) NULL)
1087 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
1088 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
1089 #define ABT_COND_NULL ((ABT_cond) NULL)
1090 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
1091 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
1092 #define ABT_FUTURE_NULL ((ABT_future) NULL)
1093 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
1094 #define ABT_TIMER_NULL ((ABT_timer) NULL)
1095 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) NULL)
1096 #define ABT_POOL_USER_DEF_NULL ((ABT_pool_user_def) NULL)
1097 #else
1098 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
1099 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
1100 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
1101 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
1102 #define ABT_POOL_NULL ((ABT_pool) (0x05))
1103 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
1104 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
1105 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
1106 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
1107 #define ABT_TASK_NULL ((ABT_task) (0x0a))
1108 #define ABT_KEY_NULL ((ABT_key) (0x0b))
1109 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
1110 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
1111 #define ABT_COND_NULL ((ABT_cond) (0x0e))
1112 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
1113 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
1114 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
1115 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
1116 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
1117 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14))
1118 #define ABT_POOL_USER_DEF_NULL ((ABT_pool_user_def) (0x15))
1119 #endif
1120 
1133 typedef struct {
1134  int dummy[16];
1136 
1158 #define ABT_MUTEX_INITIALIZER \
1159  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1160 
1185 #define ABT_RECURSIVE_MUTEX_INITIALIZER \
1186  { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1187 
1201 #define ABT_MUTEX_MEMORY_GET_HANDLE(p_mutex_memory) \
1202  ((ABT_mutex)p_mutex_memory)
1203 
1216 typedef struct {
1217  int dummy[16];
1218 } ABT_cond_memory;
1219 
1247 #define ABT_COND_INITIALIZER \
1248  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1249 
1264 #define ABT_COND_MEMORY_GET_HANDLE(p_cond_memory) \
1265  ((ABT_cond)p_cond_memory)
1266 
1283 typedef struct {
1284  int dummy[16];
1286 
1311 #define ABT_EVENTUAL_INITIALIZER \
1312  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1313 
1329 #define ABT_EVENTUAL_MEMORY_GET_HANDLE(p_eventual_memory) \
1330  ((ABT_eventual)p_eventual_memory)
1331 
1336 typedef enum {
1344 
1349 typedef struct {
1351  int idx;
1355 
1399 
1400 /* Scheduler Functions */
1402 typedef void (*ABT_sched_run_fn)(ABT_sched);
1404 /* To get a pool ready for receiving a migration */
1406 
1411 typedef struct {
1510 } ABT_sched_def;
1511 
1516 typedef enum {
1524 
1529 typedef struct {
1534  int key;
1538 
1551 
1566 typedef uint64_t ABT_pool_context;
1577 #define ABT_POOL_CONTEXT_PRIO_DEFAULT_PRIO ((ABT_pool_context)0x0)
1578 
1591 #define ABT_POOL_CONTEXT_PRIO_HIGH_PRIO ((ABT_pool_context)0x1)
1592 
1605 #define ABT_POOL_CONTEXT_PRIO_LOW_PRIO ((ABT_pool_context)0x2)
1606 
1616 #define ABT_POOL_CONTEXT_OWNER_DEFAULT ((ABT_pool_context)0x0)
1617 
1632 #define ABT_POOL_CONTEXT_OWNER_PRIMARY ((ABT_pool_context)0x100)
1633 
1649 #define ABT_POOL_CONTEXT_OWNER_SECONDARY ((ABT_pool_context)0x200)
1650 
1660 #define ABT_POOL_CONTEXT_OP_POOL_OTHER ((ABT_pool_context)0x0)
1661 
1673 #define ABT_POOL_CONTEXT_OP_THREAD_CREATE ((ABT_pool_context)0x1000)
1674 
1686 #define ABT_POOL_CONTEXT_OP_THREAD_CREATE_TO ((ABT_pool_context)0x2000)
1687 
1698 #define ABT_POOL_CONTEXT_OP_THREAD_REVIVE ((ABT_pool_context)0x4000)
1699 
1711 #define ABT_POOL_CONTEXT_OP_THREAD_REVIVE_TO ((ABT_pool_context)0x8000)
1712 
1722 #define ABT_POOL_CONTEXT_OP_THREAD_YIELD ((ABT_pool_context)0x10000)
1723 
1733 #define ABT_POOL_CONTEXT_OP_THREAD_YIELD_TO ((ABT_pool_context)0x20000)
1734 
1745 #define ABT_POOL_CONTEXT_OP_THREAD_RESUME_YIELD_TO ((ABT_pool_context)0x40000)
1746 
1757 #define ABT_POOL_CONTEXT_OP_THREAD_YIELD_LOOP ((ABT_pool_context)0x80000)
1758 
1768 #define ABT_POOL_CONTEXT_OP_THREAD_RESUME ((ABT_pool_context)0x100000)
1769 
1779 #define ABT_POOL_CONTEXT_OP_THREAD_MIGRATE ((ABT_pool_context)0x200000)
1780 
1781 /* Pool Functions */
1978 typedef void (*ABT_pool_user_pop_many_fn)(ABT_pool, ABT_thread *, size_t,
1979  size_t *, ABT_pool_context);
2003 typedef void (*ABT_pool_user_push_many_fn)(ABT_pool, const ABT_unit *, size_t,
2023 typedef void (*ABT_pool_user_print_all_fn)(ABT_pool, void *arg,
2024  void (*)(void *, ABT_thread));
2025 
2026 /* Pool Functions */
2033 typedef void (*ABT_unit_free_fn)(ABT_unit *);
2035 typedef size_t (*ABT_pool_get_size_fn)(ABT_pool);
2039 typedef ABT_unit (*ABT_pool_pop_timedwait_fn)(ABT_pool, double); /* Deprecated .*/
2041 typedef int (*ABT_pool_free_fn)(ABT_pool);
2042 typedef int (*ABT_pool_print_all_fn)(ABT_pool, void *arg,
2043  void (*)(void*, ABT_unit));
2044 
2214 #ifdef ABT_ENABLE_VER_20_API
2215 
2234  ABT_pool_pop_wait_fn p_pop_wait;
2235 #endif
2236 
2303 };
2305 
2306 /* Tool callback type. */
2307 typedef void (*ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event,
2308  ABT_tool_context context, void *user_arg);
2309 typedef void (*ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event,
2310  ABT_tool_context context, void *user_arg);
2311 
2312 /* Init & Finalize */
2313 int ABT_init(int argc, char **argv) ABT_API_PUBLIC;
2314 int ABT_finalize(void) ABT_API_PUBLIC;
2316 
2317 /* Execution Stream (ES) */
2318 int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC;
2319 int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools,
2320  ABT_pool *pools, ABT_sched_config config,
2321  ABT_xstream *newxstream) ABT_API_PUBLIC;
2322 int ABT_xstream_create_with_rank(ABT_sched sched, int rank,
2323  ABT_xstream *newxstream) ABT_API_PUBLIC;
2330 int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC;
2331 int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC;
2332 int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC;
2335  ABT_sched_predef predef,
2336  int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
2338 int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools,
2339  ABT_pool *pools) ABT_API_PUBLIC;
2341 int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2,
2342  ABT_bool *result) ABT_API_PUBLIC;
2343 int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC;
2344 int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *is_primary) ABT_API_PUBLIC;
2347 int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC;
2348 int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC;
2349 int ABT_xstream_set_affinity(ABT_xstream xstream, int num_cpuids, int *cpuids)
2351 int ABT_xstream_get_affinity(ABT_xstream xstream, int max_cpuids, int *cpuids,
2352  int *num_cpuids) ABT_API_PUBLIC;
2353 
2354 /* ES Barrier */
2355 int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
2359 
2360 /* Scheduler */
2361 int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools,
2362  ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
2363 int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools,
2364  ABT_pool *pools, ABT_sched_config config,
2365  ABT_sched *newsched) ABT_API_PUBLIC;
2368 int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC;
2369 int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC;
2370 int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx,
2371  ABT_pool *pools) ABT_API_PUBLIC;
2372 int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
2373 int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
2377 
2378 /* Scheduler config */
2380 int ABT_sched_config_read(ABT_sched_config config, int num_vars, ...) ABT_API_PUBLIC;
2382 int ABT_sched_config_set(ABT_sched_config config, int idx,
2383  ABT_sched_config_type type, const void *val) ABT_API_PUBLIC;
2384 int ABT_sched_config_get(ABT_sched_config config, int idx,
2385  ABT_sched_config_type *p_type, void *val) ABT_API_PUBLIC;
2386 
2387 /* Pool */
2389  ABT_pool *newpool) ABT_API_PUBLIC;
2391  ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
2394 int ABT_pool_is_empty(ABT_pool pool, ABT_bool *is_empty) ABT_API_PUBLIC;
2395 int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
2396 int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
2398 int ABT_pool_pop_thread_ex(ABT_pool pool, ABT_thread *thread,
2399  ABT_pool_context pool_ctx) ABT_API_PUBLIC;
2400 int ABT_pool_pop_threads(ABT_pool pool, ABT_thread *threads, size_t len,
2401  size_t *num) ABT_API_PUBLIC;
2402 int ABT_pool_pop_threads_ex(ABT_pool pool, ABT_thread *threads, size_t len,
2403  size_t *num, ABT_pool_context pool_ctx) ABT_API_PUBLIC;
2406  ABT_pool_context pool_ctx) ABT_API_PUBLIC;
2407 int ABT_pool_push_threads(ABT_pool pool, const ABT_thread *threads,
2408  size_t num) ABT_API_PUBLIC;
2409 int ABT_pool_push_threads_ex(ABT_pool pool, const ABT_thread *threads,
2410  size_t num, ABT_pool_context pool_ctx) ABT_API_PUBLIC;
2411 int ABT_pool_pop_wait_thread(ABT_pool pool, ABT_thread *thread,
2412  double time_secs) ABT_API_PUBLIC;
2414  double time_secs,
2415  ABT_pool_context pool_ctx) ABT_API_PUBLIC;
2416 int ABT_pool_print_all_threads(ABT_pool pool, void *arg,
2417  void (*print_fn)(void *arg, ABT_thread)) ABT_API_PUBLIC;
2419 int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC;
2421 int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC;
2422 
2423 /* Old Pool API. Use ABT_pool_xxx_thread() instead. */
2424 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
2425 int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC;
2426 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs)
2430 int ABT_pool_print_all(ABT_pool pool, void *arg,
2431  void (*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC;
2432 
2433 /* Pool config */
2436 int ABT_pool_config_set(ABT_pool_config config, int key, ABT_pool_config_type type,
2437  const void *val) ABT_API_PUBLIC;
2438 int ABT_pool_config_get(ABT_pool_config config, int key,
2439  ABT_pool_config_type *p_type, void *val) ABT_API_PUBLIC;
2440 
2441 /* Pool definition */
2443  ABT_pool_user_free_unit_fn p_free_unit,
2444  ABT_pool_user_is_empty_fn p_is_empty,
2463 
2464 /* Work Unit */
2467 
2468 /* User-level Thread (ULT) */
2469 int ABT_thread_create(ABT_pool pool, void (*thread_func)(void *), void *arg,
2470  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
2471 int ABT_thread_create_to(ABT_pool pool, void (*thread_func)(void *), void *arg,
2472  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
2474  void (*thread_func)(void *), void *arg,
2475  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
2476 int ABT_thread_create_many(int num_threads, ABT_pool *pool_list,
2477  void (**thread_func_list)(void *), void **arg_list,
2478  ABT_thread_attr attr, ABT_thread *newthread_list)
2480 int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg,
2481  ABT_thread *thread) ABT_API_PUBLIC;
2482 int ABT_thread_revive_to(ABT_pool pool, void (*thread_func)(void *), void *arg,
2483  ABT_thread *thread) ABT_API_PUBLIC;
2485 int ABT_thread_free_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
2487 int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
2506  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
2508 int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *is_migratable) ABT_API_PUBLIC;
2509 int ABT_thread_is_primary(ABT_thread thread, ABT_bool *is_primary) ABT_API_PUBLIC;
2510 int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *is_unnamed) ABT_API_PUBLIC;
2511 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
2513 int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC;
2514 int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC;
2515 int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC;
2516 int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC;
2517 int ABT_thread_get_thread_func(ABT_thread thread, void (**thread_func)(void *)) ABT_API_PUBLIC;
2518 int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC;
2519 int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC;
2521 
2522 /* ULT Attributes */
2525 int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr,
2526  size_t stacksize) ABT_API_PUBLIC;
2527 int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr,
2528  size_t *stacksize) ABT_API_PUBLIC;
2530 int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC;
2532  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
2534 
2535 /* Tasklet */
2536 int ABT_task_create(ABT_pool pool, void (*task_func)(void *), void *arg,
2537  ABT_task *newtask) ABT_API_PUBLIC;
2538 int ABT_task_create_on_xstream(ABT_xstream xstream, void (*task_func)(void *),
2539  void *arg, ABT_task *newtask) ABT_API_PUBLIC;
2540 int ABT_task_revive(ABT_pool pool, void (*task_func)(void *), void *arg,
2541  ABT_task *task) ABT_API_PUBLIC;
2546 int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC;
2553 int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC;
2554 int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC;
2555 int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC;
2556 #define ABT_task_is_unnamed ABT_thread_is_unnamed
2557 #define ABT_task_set_specific ABT_thread_set_specific
2558 #define ABT_task_get_specific ABT_thread_get_specific
2559 
2560 /* Self */
2565 int ABT_self_set_specific(ABT_key key, void *value) ABT_API_PUBLIC;
2566 int ABT_self_get_specific(ABT_key key, void **value) ABT_API_PUBLIC;
2567 #define ABT_self_get_task ABT_self_get_thread
2568 #define ABT_self_get_task_id ABT_self_get_thread_id
2574 int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC;
2577 int ABT_self_yield(void) ABT_API_PUBLIC;
2583 int ABT_self_exit(void) ABT_API_PUBLIC;
2587 int ABT_self_set_arg(void *arg) ABT_API_PUBLIC;
2588 int ABT_self_get_arg(void **arg) ABT_API_PUBLIC;
2589 int ABT_self_get_thread_func(void (**thread_func)(void *)) ABT_API_PUBLIC;
2590 
2591 /* ULT-specific data */
2592 int ABT_key_create(void (*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC;
2594 int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC;
2595 int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC;
2596 
2597 /* Mutex */
2609 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
2611 
2612 /* Mutex Attributes */
2617 
2618 /* Condition variable */
2622 int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex,
2623  const struct timespec *abstime) ABT_API_PUBLIC;
2626 
2627 /* Readers writer lock */
2633 
2634 /* Eventual */
2635 int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC;
2637 int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC;
2638 int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready) ABT_API_PUBLIC;
2639 int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC;
2641 
2642 /* Futures */
2643 int ABT_future_create(uint32_t num_compartments, void (*cb_func)(void **arg),
2644  ABT_future *newfuture) ABT_API_PUBLIC;
2647 int ABT_future_test(ABT_future future, ABT_bool *is_ready) ABT_API_PUBLIC;
2648 int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC;
2650 
2651 /* Barrier */
2652 int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC;
2653 int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC;
2656 int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
2658 
2659 /* Error */
2660 int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC;
2661 
2662 /* Timer */
2663 double ABT_get_wtime(void) ABT_API_PUBLIC;
2665 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
2669 int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
2670 int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
2671 int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC;
2672 int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC;
2673 
2674 /* Information */
2676  void *val) ABT_API_PUBLIC;
2679 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC;
2680 int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC;
2681 int ABT_info_print_pool(FILE* fp, ABT_pool pool) ABT_API_PUBLIC;
2682 int ABT_info_print_thread(FILE* fp, ABT_thread thread) ABT_API_PUBLIC;
2684 int ABT_info_print_task(FILE* fp, ABT_task task) ABT_API_PUBLIC;
2687 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
2688  void (*cb_func)(ABT_bool, void *),
2689  void *arg) ABT_API_PUBLIC;
2690 
2691 /* Tool Functions */
2693  uint64_t event_mask,
2694  void *user_arg) ABT_API_PUBLIC;
2695 int ABT_tool_query_thread(ABT_tool_context context, uint64_t event,
2696  ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC;
2697 
2698 #if defined(__cplusplus)
2699 }
2700 #endif
2701 
2702 #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:223
ABT_pool_pop_thread
int ABT_pool_pop_thread(ABT_pool pool, ABT_thread *thread) ABT_API_PUBLIC
Pop a work unit from a pool.
Definition: pool.c:475
ABT_pool_pop_fn
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:2037
ABT_unit_get_task_fn
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:2029
ABT_task_state
ABT_task_state
State of a tasklet.
Definition: abt.h:444
ABT_INFO_QUERY_KIND_ENABLED_STACK_OVERFLOW_CHECK
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_OVERFLOW_CHECK
Definition: abt.h:655
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:1485
ABT_THREAD_STATE_TERMINATED
@ ABT_THREAD_STATE_TERMINATED
Definition: abt.h:433
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:1503
ABT_SYNC_EVENT_TYPE_USER
@ ABT_SYNC_EVENT_TYPE_USER
Definition: abt.h:700
ABT_sched_config_var
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1349
ABT_key
struct ABT_key_opaque * ABT_key
Work-unit-specific data key handle type.
Definition: abt.h:980
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:585
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:104
ABT_pool_user_def_set_print_all
int ABT_pool_user_def_set_print_all(ABT_pool_user_def def, ABT_pool_user_print_all_fn p_print_all) ABT_API_PUBLIC
Register a print-all function to a pool definition.
Definition: pool_user_def.c:352
ABT_sched_predef
ABT_sched_predef
Predefined scheduler type.
Definition: abt.h:475
ABT_pool_def::u_get_task
ABT_unit_get_task_fn u_get_task
Unused function.
Definition: abt.h:2080
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:2284
ABT_thread_resume
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume a ULT.
Definition: thread.c:1427
ABT_self_resume_suspend_to
int ABT_self_resume_suspend_to(ABT_thread thread) ABT_API_PUBLIC
Suspend the calling ULT and jump to another suspended ULT.
Definition: self.c:887
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:1261
ABT_eventual_reset
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset a readiness of an eventual.
Definition: eventual.c:379
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:937
ABT_get_wtime
double ABT_get_wtime(void) ABT_API_PUBLIC
Get elapsed wall clock time.
Definition: timer.c:28
ABT_self_schedule
int ABT_self_schedule(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Execute a work unit on the calling ULT.
Definition: self.c:1088
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:181
ABT_sched_config_set
int ABT_sched_config_set(ABT_sched_config config, int idx, ABT_sched_config_type type, const void *val) ABT_API_PUBLIC
Register a value to a scheduler configuration.
Definition: sched_config.c:328
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:2038
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:1043
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:440
ABT_pool_print_all_threads
int ABT_pool_print_all_threads(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_thread)) ABT_API_PUBLIC
Apply a print function to every work unit in a pool.
Definition: pool.c:811
ABT_task_cancel
int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC
Send a termination request to a work unit.
Definition: task.c:227
ABT_pool_user_def_free
int ABT_pool_user_def_free(ABT_pool_user_def *def) ABT_API_PUBLIC
Free a pool definition.
Definition: pool_user_def.c:104
ABT_pool_user_def_set_get_size
int ABT_pool_user_def_set_get_size(ABT_pool_user_def def, ABT_pool_user_get_size_fn p_get_size) ABT_API_PUBLIC
Register a size inquiry function to a pool definition.
Definition: pool_user_def.c:212
ABT_timer_create
int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC
Create a new timer.
Definition: timer.c:60
ABT_pool_context
uint64_t ABT_pool_context
A pool context value.
Definition: abt.h:1566
ABT_unit_is_in_pool_fn
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
Definition: abt.h:2030
ABT_THREAD_STATE_READY
@ ABT_THREAD_STATE_READY
Definition: abt.h:427
ABT_tool_query_kind
ABT_tool_query_kind
Tool query kind for ABT_tool_query_thread().
Definition: abt.h:666
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:762
ABT_timer_free
int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC
Free a timer.
Definition: timer.c:144
ABT_TOOL_QUERY_KIND_STACK_DEPTH
@ ABT_TOOL_QUERY_KIND_STACK_DEPTH
Definition: abt.h:670
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:1182
ABT_EXEC_ENTITY_TYPE_EXT
@ ABT_EXEC_ENTITY_TYPE_EXT
Definition: abt.h:687
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:321
ABT_sched_run_fn
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:1402
ABT_cond_free
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free a condition variable.
Definition: cond.c:92
ABT_sched_def::type
ABT_sched_type type
Unused value.
Definition: abt.h:1418
ABT_task_self
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Get the calling work unit.
Definition: task.c:269
ABT_TOOL_QUERY_KIND_CALLER_HANDLE
@ ABT_TOOL_QUERY_KIND_CALLER_HANDLE
Definition: abt.h:674
ABT_thread_attr
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
Definition: abt.h:939
ABT_task
struct ABT_thread_opaque * ABT_task
Work unit handle type.
Definition: abt.h:973
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:1316
ABT_thread
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
Definition: abt.h:932
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:245
ABT_INFO_QUERY_KIND_ENABLED_LAZY_STACK_ALLOC
@ ABT_INFO_QUERY_KIND_ENABLED_LAZY_STACK_ALLOC
Definition: abt.h:659
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:782
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:436
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:354
ABT_pool_is_empty
int ABT_pool_is_empty(ABT_pool pool, ABT_bool *is_empty) ABT_API_PUBLIC
Check if a pool is empty.
Definition: pool.c:342
ABT_pool_config_type
ABT_pool_config_type
A struct that sets and gets a pool configuration.
Definition: abt.h:1516
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:1220
ABT_unit_get_type_fn
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:2027
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:522
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:640
ABT_unit_create_from_task_fn
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
Definition: abt.h:2032
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE
Definition: abt.h:676
ABT_future_free
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free a future.
Definition: futures.c:119
ABT_exec_entity_type
ABT_exec_entity_type
Type of execution entity.
Definition: abt.h:685
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:2167
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
Definition: abt.h:641
ABT_TASK_STATE_TERMINATED
@ ABT_TASK_STATE_TERMINATED
Definition: abt.h:450
ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
Definition: abt.h:653
ABT_future_wait
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on a future.
Definition: futures.c:172
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:738
ABT_pool_user_print_all_fn
void(* ABT_pool_user_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_thread))
Function that applies a user-given function to all work units in a pool.
Definition: abt.h:2023
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:1201
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:1552
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:1933
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_pool_user_create_unit_fn
ABT_unit(* ABT_pool_user_create_unit_fn)(ABT_pool, ABT_thread)
Function that creates an ABT_unit handle that is associated with an ABT_thread handle.
Definition: abt.h:1807
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:45
ABT_sched_exit
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Request a scheduler to finish.
Definition: sched.c:434
ABT_pool_pop_wait_fn
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
Definition: abt.h:2038
ABT_self_suspend_to
int ABT_self_suspend_to(ABT_thread thread) ABT_API_PUBLIC
Suspend the calling ULT and jump to another ULT.
Definition: self.c:832
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:221
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:2209
ABT_rwlock_free
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free a readers-writer lock.
Definition: rwlock.c:90
ABT_pool_def::u_free
ABT_unit_free_fn u_free
Function that frees a work unit.
Definition: abt.h:2154
ABT_POOL_ACCESS_MPMC
@ ABT_POOL_ACCESS_MPMC
Definition: abt.h:575
ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN
@ ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN
Definition: abt.h:704
ABT_sched_def::run
ABT_sched_run_fn run
Function that defines a kernel of a scheduler.
Definition: abt.h:1476
ABT_sched_config
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
Definition: abt.h:852
ABT_SCHED_DEFAULT
@ ABT_SCHED_DEFAULT
Definition: abt.h:477
ABT_mutex
struct ABT_mutex_opaque * ABT_mutex
Mutex handle type.
Definition: abt.h:987
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:469
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_pool_push_threads
int ABT_pool_push_threads(ABT_pool pool, const ABT_thread *threads, size_t num) ABT_API_PUBLIC
Push work units to a pool.
Definition: pool.c:671
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:146
ABT_rwlock_rdlock
int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a reader.
Definition: rwlock.c:144
ABT_cond_memory
A struct that can be converted to ABT_cond.
Definition: abt.h:1216
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:367
ABT_pool_def::p_remove
ABT_pool_remove_fn p_remove
Function that removes a work unit from a pool.
Definition: abt.h:2271
ABT_SYNC_EVENT_TYPE_MUTEX
@ ABT_SYNC_EVENT_TYPE_MUTEX
Definition: abt.h:708
ABT_pool_config_get
int ABT_pool_config_get(ABT_pool_config config, int key, ABT_pool_config_type *p_type, void *val) ABT_API_PUBLIC
Retrieve a value from a pool configuration.
Definition: pool_config.c:243
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:1009
ABT_self_get_thread
int ABT_self_get_thread(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
Definition: self.c:101
ABT_eventual_memory
A struct that can be converted to ABT_eventual.
Definition: abt.h:1283
ABT_key_free
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free a work-unit-specific data key.
Definition: key.c:112
ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
@ ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
Definition: abt.h:624
ABT_pool_pop_timedwait_fn
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:2039
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:925
ABT_mutex_lock
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex.
Definition: mutex.c:189
ABT_SYNC_EVENT_TYPE_FUTURE
@ ABT_SYNC_EVENT_TYPE_FUTURE
Definition: abt.h:716
ABT_pool_def::u_get_type
ABT_unit_get_type_fn u_get_type
Unused function.
Definition: abt.h:2068
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:160
ABT_pool_def::u_get_thread
ABT_unit_get_thread_fn u_get_thread
Unused function.
Definition: abt.h:2074
ABT_xstream_cancel
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Send a cancellation request to an execution stream.
Definition: stream.c:593
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:2098
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:468
ABT_timer_dup
int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC
Duplicate a timer.
Definition: timer.c:104
ABT_xstream_create
int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new execution stream.
Definition: stream.c:76
ABT_sched_type
ABT_sched_type
Scheduler's work unit type.
Definition: abt.h:500
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:191
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:1068
ABT_finalize
int ABT_finalize(void) ABT_API_PUBLIC
Finalize the Argobots execution environment.
Definition: global.c:141
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:1044
ABT_pool_print_all_fn
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:2042
ABT_pool_config_create
int ABT_pool_config_create(ABT_pool_config *config) ABT_API_PUBLIC
Create a new pool configuration.
Definition: pool_config.c:79
ABT_pool_config_var::type
ABT_pool_config_type type
Definition: abt.h:1536
ABT_thread_attr_free
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free a ULT attribute.
Definition: thread_attr.c:95
ABT_pool_user_push_many_fn
void(* ABT_pool_user_push_many_fn)(ABT_pool, const ABT_unit *, size_t, ABT_pool_context)
Function that pushes work units to a pool.
Definition: abt.h:2003
ABT_pool
struct ABT_pool_opaque * ABT_pool
Pool handle type.
Definition: abt.h:878
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:785
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: sched_config.c:47
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:687
ABT_pool_user_def
struct ABT_pool_def * ABT_pool_user_def
Pool definition.
Definition: abt.h:900
ABT_POOL_ACCESS_MPSC
@ ABT_POOL_ACCESS_MPSC
Definition: abt.h:569
ABT_thread_state
ABT_thread_state
State of a work unit.
Definition: abt.h:425
ABT_thread_free
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Free a work unit.
Definition: thread.c:612
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:513
ABT_POOL_RANDWS
@ ABT_POOL_RANDWS
Definition: abt.h:549
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: sched_config.c:221
ABT_pool_user_get_size_fn
size_t(* ABT_pool_user_get_size_fn)(ABT_pool)
Function that returns the number of work units in a pool.
Definition: abt.h:1927
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:395
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:1239
ABT_POOL_ACCESS_PRIV
@ ABT_POOL_ACCESS_PRIV
Definition: abt.h:560
ABT_pool_user_def_create
int ABT_pool_user_def_create(ABT_pool_user_create_unit_fn p_create_unit, ABT_pool_user_free_unit_fn p_free_unit, ABT_pool_user_is_empty_fn p_is_empty, ABT_pool_user_pop_fn p_pop, ABT_pool_user_push_fn p_push, ABT_pool_user_def *newdef) ABT_API_PUBLIC
Create a new pool definition.
Definition: pool_user_def.c:50
ABT_pool_user_push_fn
void(* ABT_pool_user_push_fn)(ABT_pool, ABT_unit, ABT_pool_context)
Function that pushes a work unit to a pool.
Definition: abt.h:1879
ABT_sched
struct ABT_sched_opaque * ABT_sched
Scheduler handle type.
Definition: abt.h:845
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:535
ABT_INFO_QUERY_KIND_FCONTEXT
@ ABT_INFO_QUERY_KIND_FCONTEXT
Definition: abt.h:649
ABT_pool_pop_threads_ex
int ABT_pool_pop_threads_ex(ABT_pool pool, ABT_thread *threads, size_t len, size_t *num, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Pop work units from a pool.
Definition: pool.c:578
ABT_SCHED_TYPE_ULT
@ ABT_SCHED_TYPE_ULT
Definition: abt.h:502
ABT_init
int ABT_init(int argc, char **argv) ABT_API_PUBLIC
Initialize the Argobots execution environment.
Definition: global.c:75
ABT_TOOL_QUERY_KIND_CALLER_TYPE
@ ABT_TOOL_QUERY_KIND_CALLER_TYPE
Definition: abt.h:672
ABT_pool_user_def_set_pop_wait
int ABT_pool_user_def_set_pop_wait(ABT_pool_user_def def, ABT_pool_user_pop_wait_fn p_pop_wait) ABT_API_PUBLIC
Register a pop-wait function to a pool definition.
Definition: pool_user_def.c:247
ABT_unit_free_fn
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:2033
ABT_POOL_CONFIG_INT
@ ABT_POOL_CONFIG_INT
Definition: abt.h:1518
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:125
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:1591
ABT_mutex_trylock
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex.
Definition: mutex.c:292
ABT_thread_exit
int ABT_thread_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
Definition: thread.c:824
ABT_SYNC_EVENT_TYPE_UNKNOWN
@ ABT_SYNC_EVENT_TYPE_UNKNOWN
Definition: abt.h:698
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:2309
ABT_timer_start
int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC
Start a timer.
Definition: timer.c:180
ABT_sync_event_type
ABT_sync_event_type
Type of synchronization event.
Definition: abt.h:696
ABT_THREAD_STATE_BLOCKED
@ ABT_THREAD_STATE_BLOCKED
Definition: abt.h:431
ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
@ ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
Definition: abt.h:628
ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
@ ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
Definition: abt.h:635
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:216
ABT_tool_context
struct ABT_tool_context_opaque * ABT_tool_context
Tool context handle type.
Definition: abt.h:1055
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:2356
ABT_pool_user_def_set_init
int ABT_pool_user_def_set_init(ABT_pool_user_def def, ABT_pool_user_init_fn p_init) ABT_API_PUBLIC
Register a pool initialization function to a pool definition.
Definition: pool_user_def.c:142
ABT_mutex_attr
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Mutex attribute handle type.
Definition: abt.h:994
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:613
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:420
ABT_SYNC_EVENT_TYPE_OTHER
@ ABT_SYNC_EVENT_TYPE_OTHER
Definition: abt.h:702
ABT_unit_id
uint64_t ABT_unit_id
Work unit ID type.
Definition: abt.h:921
ABT_pool_def
A struct that defines a pool.
Definition: abt.h:2049
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:826
ABT_POOL_CONFIG_DOUBLE
@ ABT_POOL_CONFIG_DOUBLE
Definition: abt.h:1520
ABT_pool_remove_fn
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:2040
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:860
ABT_pool_init_fn
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:2034
ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
@ ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
Definition: abt.h:609
ABT_barrier
struct ABT_barrier_opaque * ABT_barrier
Barrier handle type.
Definition: abt.h:1029
ABT_thread_yield
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: thread.c:1372
ABT_self_suspend
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the calling ULT.
Definition: self.c:784
ABT_unit_type
ABT_unit_type
Type of a work unit for scheduling.
Definition: abt.h:582
ABT_sched_config_access
ABT_sched_config_var ABT_sched_config_access
Unused predefined ABT_sched_config_var.
Definition: sched_config.c:44
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:1130
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:556
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:1111
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:173
ABT_pool_config
struct ABT_pool_config_opaque * ABT_pool_config
Pool configuration handle type.
Definition: abt.h:885
ABT_TASK_STATE_RUNNING
@ ABT_TASK_STATE_RUNNING
Definition: abt.h:448
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:270
ABT_mutex_lock_high
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex with high priority.
Definition: mutex.c:257
ABT_API_PUBLIC
#define ABT_API_PUBLIC
Definition: abt.h:14
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:509
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:2257
ABT_info_query_kind
ABT_info_query_kind
Query kind for ABT_info_query_config().
Definition: abt.h:601
ABT_pool_def::p_pop
ABT_pool_pop_fn p_pop
Function that pops a work unit from a pool.
Definition: abt.h:2213
ABT_pool_def::p_free
ABT_pool_free_fn p_free
Function that frees a pool.
Definition: abt.h:2284
ABT_future
struct ABT_future_opaque * ABT_future
Future handle type.
Definition: abt.h:1022
ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
@ ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
Definition: abt.h:626
ABT_thread_create_to
int ABT_thread_create_to(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC
Create a new ULT and yield to it.
Definition: thread.c:180
ABT_xstream_check_events
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Process events associated with a scheduler.
Definition: stream.c:1334
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:1231
ABT_thread_join
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for a work unit to terminate.
Definition: thread.c:733
ABT_POOL_FIFO
@ ABT_POOL_FIFO
Definition: abt.h:516
ABT_mutex_attr_free
int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC
Free a mutex attribute.
Definition: mutex_attr.c:79
ABT_sched_init_fn
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:1401
ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
Definition: abt.h:633
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:2302
ABT_barrier_free
int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC
Free a barrier.
Definition: barrier.c:144
ABT_SCHED_CONFIG_PTR
@ ABT_SCHED_CONFIG_PTR
Definition: abt.h:1342
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:982
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:1084
ABT_pool_def::access
ABT_pool_access access
Access type.
Definition: abt.h:2062
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:370
ABT_sched_state
ABT_sched_state
Unused enum.
Definition: abt.h:460
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:120
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:167
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:1381
ABT_POOL_FIFO_WAIT
@ ABT_POOL_FIFO_WAIT
Definition: abt.h:525
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:357
ABT_unit
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
Definition: abt.h:911
ABT_pool_user_pop_many_fn
void(* ABT_pool_user_pop_many_fn)(ABT_pool, ABT_thread *, size_t, size_t *, ABT_pool_context)
Function that pops work units from a pool.
Definition: abt.h:1978
ABT_INFO_QUERY_KIND_ENABLED_DEBUG
@ ABT_INFO_QUERY_KIND_ENABLED_DEBUG
Definition: abt.h:603
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_pool_user_def_set_free
int ABT_pool_user_def_set_free(ABT_pool_user_def def, ABT_pool_user_free_fn p_free) ABT_API_PUBLIC
Register a pool finalization function to a pool definition.
Definition: pool_user_def.c:177
ABT_pool_config_automatic
const ABT_pool_config_var ABT_pool_config_automatic
Predefined ABT_pool_config_var to configure whether the pool is freed automatically or not.
Definition: pool_config.c:39
ABT_task_free
int ABT_task_free(ABT_task *task) ABT_API_PUBLIC
Free a work unit.
Definition: task.c:188
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:668
ABT_sched_config_var::type
ABT_sched_config_type type
Definition: abt.h:1353
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:2079
ABT_sched_config_free
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free a scheduler configuration.
Definition: sched_config.c:269
ABT_SCHED_CONFIG_DOUBLE
@ ABT_SCHED_CONFIG_DOUBLE
Definition: abt.h:1340
ABT_eventual_free
int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC
Free an eventual.
Definition: eventual.c:102
ABT_xstream_exit
int ABT_xstream_exit(void) ABT_API_PUBLIC
Terminate an execution stream that is running the calling ULT.
Definition: stream.c:541
ABT_SYNC_EVENT_TYPE_COND
@ ABT_SYNC_EVENT_TYPE_COND
Definition: abt.h:710
ABT_DEPRECATED
#define ABT_DEPRECATED
Definition: abt.h:78
ABT_eventual
struct ABT_eventual_opaque * ABT_eventual
Eventual handle type.
Definition: abt.h:1015
ABT_SCHED_BASIC
@ ABT_SCHED_BASIC
Definition: abt.h:479
ABT_TASK_STATE_READY
@ ABT_TASK_STATE_READY
Definition: abt.h:446
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:870
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:209
ABT_pool_def::p_get_size
ABT_pool_get_size_fn p_get_size
Function that returns a work unit.
Definition: abt.h:2186
ABT_self_yield_to
int ABT_self_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to another ULT.
Definition: self.c:673
ABT_xstream_join
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for an execution stream to terminate.
Definition: stream.c:494
ABT_pool_def::p_push
ABT_pool_push_fn p_push
Function that pushes a work unit to a pool.
Definition: abt.h:2200
ABT_INFO_QUERY_KIND_ENABLED_TOOL
@ ABT_INFO_QUERY_KIND_ENABLED_TOOL
Definition: abt.h:647
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:268
ABT_self_exit
int ABT_self_exit(void) ABT_API_PUBLIC
Terminate a calling ULT.
Definition: self.c:934
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:323
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:2247
ABT_thread_id
ABT_unit_id ABT_thread_id
Work unit ID type.
Definition: abt.h:960
ABT_TOOL_QUERY_KIND_POOL
@ ABT_TOOL_QUERY_KIND_POOL
Definition: abt.h:668
ABT_pool_user_pop_wait_fn
ABT_thread(* ABT_pool_user_pop_wait_fn)(ABT_pool, double, ABT_pool_context)
Function that pops a work unit from a pool with wait.
Definition: abt.h:1950
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:1070
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:1509
ABT_SYNC_EVENT_TYPE_BARRIER
@ ABT_SYNC_EVENT_TYPE_BARRIER
Definition: abt.h:718
ABT_pool_config_set
int ABT_pool_config_set(ABT_pool_config config, int key, ABT_pool_config_type type, const void *val) ABT_API_PUBLIC
Register a value to a pool configuration.
Definition: pool_config.c:183
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:162
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:277
ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
@ ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
Definition: abt.h:651
ABT_self_exit_to
int ABT_self_exit_to(ABT_thread thread) ABT_API_PUBLIC
Terminate the calling ULT and jump to another ULT.
Definition: self.c:980
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:1024
ABT_pool_user_free_fn
void(* ABT_pool_user_free_fn)(ABT_pool)
Function that frees a pool.
Definition: abt.h:1911
ABT_timer
struct ABT_timer_opaque * ABT_timer
Timer handle type.
Definition: abt.h:1036
ABT_cond_broadcast
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
Definition: cond.c:346
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:1433
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:291
ABT_pool_config_free
int ABT_pool_config_free(ABT_pool_config *config) ABT_API_PUBLIC
Free a pool configuration.
Definition: pool_config.c:123
ABT_unit_get_thread_fn
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:2028
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:392
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:1755
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:978
ABT_SCHED_STATE_READY
@ ABT_SCHED_STATE_READY
Definition: abt.h:461
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:671
ABT_thread_self
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Get the calling work unit.
Definition: thread.c:926
ABT_xstream_barrier
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Execution-stream barrier handle type.
Definition: abt.h:838
ABT_pool_def::u_create_from_task
ABT_unit_create_from_task_fn u_create_from_task
Unused function.
Definition: abt.h:2138
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:240
ABT_SYNC_EVENT_TYPE_EVENTUAL
@ ABT_SYNC_EVENT_TYPE_EVENTUAL
Definition: abt.h:714
ABT_pool_push_fn
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:2036
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:675
ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
@ ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
Definition: abt.h:639
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:1139
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:221
ABT_pool_push_thread
int ABT_pool_push_thread(ABT_pool pool, ABT_thread thread) ABT_API_PUBLIC
Push a work unit to a pool.
Definition: pool.c:607
ABT_eventual_wait
int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC
Wait on an eventual.
Definition: eventual.c:173
ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER
Definition: abt.h:615
ABT_POOL_ACCESS_SPMC
@ ABT_POOL_ACCESS_SPMC
Definition: abt.h:573
ABT_XSTREAM_STATE_RUNNING
@ ABT_XSTREAM_STATE_RUNNING
Definition: abt.h:416
ABT_SCHED_STATE_RUNNING
@ ABT_SCHED_STATE_RUNNING
Definition: abt.h:462
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:1869
ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
Definition: abt.h:611
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:516
ABT_SYNC_EVENT_TYPE_RWLOCK
@ ABT_SYNC_EVENT_TYPE_RWLOCK
Definition: abt.h:712
ABT_POOL_CONFIG_PTR
@ ABT_POOL_CONFIG_PTR
Definition: abt.h:1522
ABT_SYNC_EVENT_TYPE_THREAD_JOIN
@ ABT_SYNC_EVENT_TYPE_THREAD_JOIN
Definition: abt.h:706
ABT_pool_user_free_unit_fn
void(* ABT_pool_user_free_unit_fn)(ABT_pool, ABT_unit)
Function that frees an ABT_unit handle.
Definition: abt.h:1824
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:2318
ABT_cond_wait
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on a condition variable.
Definition: cond.c:159
ABT_xstream_free
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Free an execution stream.
Definition: stream.c:427
ABT_sched_def::free
ABT_sched_free_fn free
Function that frees a scheduler.
Definition: abt.h:1492
ABT_initialized
int ABT_initialized(void) ABT_API_PUBLIC
Check if the Argobots execution environment has been initialized.
Definition: global.c:173
ABT_future_set
int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal a future.
Definition: futures.c:270
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:1993
ABT_UNIT_TYPE_THREAD
@ ABT_UNIT_TYPE_THREAD
Definition: abt.h:584
ABT_mutex_spinlock
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock a mutex in a busy-wait form.
Definition: mutex.c:332
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:417
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:522
ABT_pool_user_is_empty_fn
ABT_bool(* ABT_pool_user_is_empty_fn)(ABT_pool)
Function that returns if a pool is empty.
Definition: abt.h:1840
ABT_UNIT_TYPE_XSTREAM
@ ABT_UNIT_TYPE_XSTREAM
Definition: abt.h:592
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:719
ABT_self_resume_yield_to
int ABT_self_resume_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the calling ULT to another suspended ULT.
Definition: self.c:727
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:1123
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:98
ABT_POOL_ACCESS_SPSC
@ ABT_POOL_ACCESS_SPSC
Definition: abt.h:565
ABT_rwlock_wrlock
int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock a readers-writer lock as a writer.
Definition: rwlock.c:207
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:1187
ABT_sched_def
A struct that defines a scheduler.
Definition: abt.h:1411
ABT_pool_pop_thread_ex
int ABT_pool_pop_thread_ex(ABT_pool pool, ABT_thread *thread, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Pop a work unit from a pool.
Definition: pool.c:506
ABT_pool_user_pop_fn
ABT_thread(* ABT_pool_user_pop_fn)(ABT_pool, ABT_pool_context)
Function that pops a work unit from a pool.
Definition: abt.h:1859
ABT_UNIT_TYPE_TASK
@ ABT_UNIT_TYPE_TASK
Definition: abt.h:590
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:1226
ABT_pool_pop_wait_thread_ex
int ABT_pool_pop_wait_thread_ex(ABT_pool pool, ABT_thread *thread, double time_secs, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Pop a work unit from a pool.
Definition: pool.c:774
ABT_self_yield
int ABT_self_yield(void) ABT_API_PUBLIC
Yield the calling ULT to its parent ULT.
Definition: self.c:626
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:877
ABT_rwlock_unlock
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock a readers-writer lock.
Definition: rwlock.c:263
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:2128
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:324
ABT_sched_get_migr_pool_fn
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
Definition: abt.h:1405
ABT_SCHED_BASIC_WAIT
@ ABT_SCHED_BASIC_WAIT
Definition: abt.h:489
ABT_SCHED_RANDWS
@ ABT_SCHED_RANDWS
Definition: abt.h:487
ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
@ ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
Definition: abt.h:618
ABT_thread_revive_to
int ABT_thread_revive_to(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC
Revive a terminated ULT and yield to it.
Definition: thread.c:535
ABT_pool_get_size_fn
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:2035
ABT_pool_config_var::key
int key
Definition: abt.h:1534
ABT_pool_user_def_set_push_many
int ABT_pool_user_def_set_push_many(ABT_pool_user_def def, ABT_pool_user_push_many_fn p_push_many) ABT_API_PUBLIC
Register a push-many function to a pool definition.
Definition: pool_user_def.c:317
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:500
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:235
ABT_future_reset
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset readiness of a future.
Definition: futures.c:337
ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
Definition: abt.h:605
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:417
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:68
ABT_mutex_memory
A struct that can be converted to ABT_mutex.
Definition: abt.h:1133
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:1011
ABT_pool_free
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free a pool.
Definition: pool.c:269
ABT_cond
struct ABT_cond_opaque * ABT_cond
Condition variable handle type.
Definition: abt.h:1001
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:248
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:387
ABT_SCHED_STATE_TERMINATED
@ ABT_SCHED_STATE_TERMINATED
Definition: abt.h:464
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:811
ABT_pool_free_fn
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:2041
ABT_info_print_config
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Print the runtime information of Argobots.
Definition: info.c:473
ABT_SCHED_STATE_STOPPED
@ ABT_SCHED_STATE_STOPPED
Definition: abt.h:463
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:202
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:455
ABT_pool_create
int ABT_pool_create(ABT_pool_user_def def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool.
Definition: pool.c:111
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: sched_config.c:40
ABT_SCHED_CONFIG_INT
@ ABT_SCHED_CONFIG_INT
Definition: abt.h:1338
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:101
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:352
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:593
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
@ ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
Definition: abt.h:678
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:1281
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:1154
ABT_pool_user_init_fn
int(* ABT_pool_user_init_fn)(ABT_pool, ABT_pool_config)
Function that creates a pool.
Definition: abt.h:1896
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:458
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:291
ABT_mutex_unlock
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock a mutex.
Definition: mutex.c:365
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:482
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:102
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:2129
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:243
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:1255
ABT_pool_def::p_init
ABT_pool_init_fn p_init
Function that frees a work unit.
Definition: abt.h:2168
ABT_sched_def::init
ABT_sched_init_fn init
Function that initializes a scheduler.
Definition: abt.h:1436
ABT_THREAD_STATE_RUNNING
@ ABT_THREAD_STATE_RUNNING
Definition: abt.h:429
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:241
ABT_pool_config_var
A struct that sets and gets a pool configuration.
Definition: abt.h:1529
ABT_xstream_revive
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Revive a terminated execution stream.
Definition: stream.c:347
ABT_sched_free
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Free a scheduler.
Definition: sched.c:245
ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
Definition: abt.h:622
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:1281
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:643
ABT_EXEC_ENTITY_TYPE_THREAD
@ ABT_EXEC_ENTITY_TYPE_THREAD
Definition: abt.h:689
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:2307
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:2407
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: sched_config.c:51
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:1676
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:339
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:1162
ABT_rwlock
struct ABT_rwlock_opaque * ABT_rwlock
Readers-writer lock handle type.
Definition: abt.h:1008
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:474
ABT_pool_pop_wait_thread
int ABT_pool_pop_wait_thread(ABT_pool pool, ABT_thread *thread, double time_secs) ABT_API_PUBLIC
Pop a work unit from a pool.
Definition: pool.c:736
ABT_INFO_QUERY_KIND_WAIT_POLICY
@ ABT_INFO_QUERY_KIND_WAIT_POLICY
Definition: abt.h:657
ABT_sched_free_fn
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:1403
ABT_eventual_set
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC
Signal an eventual.
Definition: eventual.c:317
ABT_pool_kind
ABT_pool_kind
Predefined pool type.
Definition: abt.h:514
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:548
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:556
ABT_thread_cancel
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Send a cancellation request to a work unit.
Definition: thread.c:873
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:162
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:628
ABT_UNIT_TYPE_EXT
@ ABT_UNIT_TYPE_EXT
Definition: abt.h:594
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:307
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:1351
ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
@ ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
Definition: abt.h:637
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
Definition: abt.h:645
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:603
ABT_XSTREAM_STATE_TERMINATED
@ ABT_XSTREAM_STATE_TERMINATED
Definition: abt.h:418
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:133
ABT_eventual_create
int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC
Create a new eventual.
Definition: eventual.c:42
ABT_sched_config_get
int ABT_sched_config_get(ABT_sched_config config, int idx, ABT_sched_config_type *p_type, void *val) ABT_API_PUBLIC
Retrieve a value from a scheduler configuration.
Definition: sched_config.c:388
ABT_task_join
int ABT_task_join(ABT_task task) ABT_API_PUBLIC
Wait for a work unit to terminate.
Definition: task.c:209
ABT_INFO_QUERY_KIND_ENABLED_LOG
@ ABT_INFO_QUERY_KIND_ENABLED_LOG
Definition: abt.h:607
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:229
ABT_pool_user_def_set_pop_many
int ABT_pool_user_def_set_pop_many(ABT_pool_user_def def, ABT_pool_user_pop_many_fn p_pop_many) ABT_API_PUBLIC
Register a pop-many function to a pool definition.
Definition: pool_user_def.c:282
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:80
ABT_barrier_wait
int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC
Wait on a barrier.
Definition: barrier.c:197
ABT_mutex_free
int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC
Free a mutex.
Definition: mutex.c:151
ABT_pool_push_thread_ex
int ABT_pool_push_thread_ex(ABT_pool pool, ABT_thread thread, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Push a work unit to a pool.
Definition: pool.c:638
ABT_SCHED_TYPE_TASK
@ ABT_SCHED_TYPE_TASK
Definition: abt.h:504
ABT_cond_signal
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition.
Definition: cond.c:314
ABT_pool_push_threads_ex
int ABT_pool_push_threads_ex(ABT_pool pool, const ABT_thread *threads, size_t num, ABT_pool_context pool_ctx) ABT_API_PUBLIC
Push work units to a pool.
Definition: pool.c:705
ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
Definition: abt.h:620
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:1373
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:283
ABT_pool_pop_threads
int ABT_pool_pop_threads(ABT_pool pool, ABT_thread *threads, size_t len, size_t *num) ABT_API_PUBLIC
Pop work units from a pool.
Definition: pool.c:536
ABT_sched_config_create
int ABT_sched_config_create(ABT_sched_config *config,...) ABT_API_PUBLIC
Create a new scheduler configuration.
Definition: sched_config.c:119
ABT_SCHED_PRIO
@ ABT_SCHED_PRIO
Definition: abt.h:483
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:258
ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP
@ ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP
Definition: abt.h:630
ABT_unit_create_from_thread_fn
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:2031
ABT_sched_config_type
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1336
ABT_pool_access
ABT_pool_access
Pool access type.
Definition: abt.h:556
ABT_xstream_state
ABT_xstream_state
State of an execution stream.
Definition: abt.h:414
ABT_self_resume_exit_to
int ABT_self_resume_exit_to(ABT_thread thread) ABT_API_PUBLIC
Terminate the calling ULT and jump to another suspended ULT.
Definition: self.c:1033
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:2455