ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
198 int abt_errno, init_stage = 0;
221 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
224 p_global->tool_thread_cb_f = NULL;
225 p_global->tool_thread_user_arg = NULL;
233 p_global->p_xstream_head = NULL;
234 p_global->num_xstreams = 0;
253 p_local_xstream, &p_primary_ythread);
262 p_global->p_primary_ythread = p_primary_ythread;
263 p_local_xstream->p_thread = &p_primary_ythread->
thread;
269 if (p_global->print_config ==
ABT_TRUE) {
275 if (init_stage >= 2) {
280 if (init_stage >= 1) {
308 "ABT_finalize must be called by the primary ES.");
313 "ABT_finalize must be called by the primary ULT.");
317 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
334 p_local_xstream->p_thread = NULL;
#define ABT_ERR_INV_THREAD
Error code: invalid work unit.
#define ABTD_SPINLOCK_STATIC_INITIALIZER()
static void ABTD_atomic_relaxed_store_uint64(ABTD_atomic_uint64 *ptr, uint64_t val)
int ABT_bool
Boolean type.
static void ABTI_ythread_yield_orphan(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_self, ABT_sync_event_type sync_event_type, void *p_sync)
#define ABT_ERR_UNINITIALIZED
Error code: Argobots it not initialized.
@ ABTI_XSTREAM_TYPE_PRIMARY
static uint32_t ABTD_atomic_acquire_load_uint32(const ABTD_atomic_uint32 *ptr)
#define ABT_ERR_INV_XSTREAM
Error code: invalid execution stream.
static ABTU_ret_err int init_library(void)
static ABTI_global * ABTI_global_get_global(void)
ABTI_global * gp_ABTI_global
void ABTI_pool_reset_id(void)
#define ABTI_CHECK_ERROR(abt_errno)
#define ABTI_CHECK_TRUE_MSG(cond, abt_errno, msg)
ABTU_ret_err int ABTI_ythread_create_primary(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABTI_ythread **p_ythread)
#define ABTI_CHECK_YIELDABLE(p_thread, pp_ythread, abt_errno)
int ABT_finalize(void)
Finalize the Argobots execution environment.
#define ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(val)
ABTU_ret_err int ABTI_mem_init(ABTI_global *p_global)
int ABT_init(int argc, char **argv)
Initialize the Argobots execution environment.
#define ABTI_THREAD_TYPE_PRIMARY
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
#define ABTI_HANDLE_ERROR(n)
void ABTI_xstream_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABT_bool force_free)
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
void ABTI_sched_finish(ABTI_sched *p_sched)
static void ABTD_atomic_relaxed_store_int(ABTD_atomic_int *ptr, int val)
void ABTI_mem_finalize(ABTI_global *p_global)
void ABTI_unit_finalize_hash_table(ABTI_global *p_global)
static ABT_bool is_initialized_library(void)
ABTI_sched * p_main_sched
void ABTI_sched_reset_id(void)
#define ABTI_ASSERT(cond)
static ABTI_local * ABTI_local_get_local(void)
void ABTI_unit_init_hash_table(ABTI_global *p_global)
static void ABTI_local_set_xstream(ABTI_xstream *p_local_xstream)
#define ABT_SUCCESS
Error code: the routine returns successfully.
void ABTD_env_init(ABTI_global *p_global)
void ABTD_affinity_finalize(ABTI_global *p_global)
ABTI_xstream * p_xstream_head
static ABTI_xstream * ABTI_local_get_xstream_or_null(ABTI_local *p_local)
#define ABTI_IS_EXT_THREAD_ENABLED
static uint32_t g_ABTI_num_inits
static ABTI_local * ABTI_xstream_get_local(ABTI_xstream *p_xstream)
#define ABT_TRUE
True constant for ABT_bool.
static void ABTD_spinlock_clear(ABTD_spinlock *p_lock)
void ABTI_xstream_start_primary(ABTI_global *p_global, ABTI_xstream **pp_local_xstream, ABTI_xstream *p_xstream, ABTI_ythread *p_ythread)
#define ABT_FALSE
False constant for ABT_bool.
int ABT_initialized(void)
Check if the Argobots execution environment has been initialized.
ABT_bool ABTI_initialized(void)
void ABTI_ythread_free_primary(ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread *p_ythread)
#define ABTI_UB_ASSERT(cond)
static void ABTU_free(void *ptr)
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
static void ABTI_global_set_global(ABTI_global *p_global)
ABTI_xstream * p_last_xstream
static ABTU_ret_err int finailze_library(void)
struct ABTI_local ABTI_local
static ABTD_atomic_uint32 g_ABTI_initialized
#define ABTI_CHECK_TRUE(cond, abt_errno)
@ ABT_THREAD_STATE_RUNNING
void ABTI_thread_reset_id(void)
static void ABTD_atomic_release_store_uint32(ABTD_atomic_uint32 *ptr, uint32_t val)
static ABTI_xstream * ABTI_local_get_xstream(ABTI_local *p_local)
ABTU_ret_err int ABTI_xstream_create_primary(ABTI_global *p_global, ABTI_xstream **pp_xstream)
static ABTD_spinlock g_ABTI_init_lock
void ABTI_info_print_config(ABTI_global *p_global, FILE *fp)