#include "omp.h"
#include "kmp.h"
#include "kmp_i18n.h"
#include "kmp_error.h"
#include "ompt-internal.h"
#include "ompt-specific.h"
Go to the source code of this file.
Defines | |
#define | __KMP_GET_REDUCTION_METHOD(gtid) ( __kmp_threads[ ( gtid ) ] -> th.th_local.packed_reduction_method ) |
#define | __KMP_SET_REDUCTION_METHOD(gtid, rmethod) ( ( __kmp_threads[ ( gtid ) ] -> th.th_local.packed_reduction_method ) = ( rmethod ) ) |
#define | ACQUIRE_LOCK __kmp_acquire_user_lock_with_checks |
#define | ACQUIRE_LOCK_TIMED __kmp_acquire_user_lock_with_checks_timed |
#define | ACQUIRE_NESTED_LOCK __kmp_acquire_nested_user_lock_with_checks |
#define | ACQUIRE_NESTED_LOCK_TIMED __kmp_acquire_nested_user_lock_with_checks_timed |
#define | DESTROY_LOCK __kmp_destroy_user_lock_with_checks |
#define | DESTROY_NESTED_LOCK __kmp_destroy_nested_user_lock_with_checks |
#define | INIT_LOCK __kmp_init_user_lock_with_checks |
#define | INIT_NESTED_LOCK __kmp_init_nested_user_lock_with_checks |
#define | MAX_MESSAGE 512 |
#define | RELEASE_LOCK __kmp_release_user_lock_with_checks |
#define | RELEASE_NESTED_LOCK __kmp_release_nested_user_lock_with_checks |
#define | TEST_LOCK __kmp_test_user_lock_with_checks |
#define | TEST_NESTED_LOCK __kmp_test_nested_user_lock_with_checks |
Functions | |
static __forceinline void | __kmp_end_critical_section_reduce_block (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *crit) |
static __forceinline void | __kmp_enter_critical_section_reduce_block (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *crit) |
static kmp_user_lock_p | __kmp_get_critical_section_ptr (kmp_critical_name *crit, ident_t const *loc, kmp_int32 gtid) |
void | __kmp_static_yield (int arg) |
void | __kmpc_barrier (ident_t *loc, kmp_int32 global_tid) |
kmp_int32 | __kmpc_barrier_master (ident_t *loc, kmp_int32 global_tid) |
kmp_int32 | __kmpc_barrier_master_nowait (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_begin (ident_t *loc, kmp_int32 flags) |
kmp_int32 | __kmpc_bound_num_threads (ident_t *loc) |
kmp_int32 | __kmpc_bound_thread_num (ident_t *loc) |
void | __kmpc_copyprivate (ident_t *loc, kmp_int32 gtid, size_t cpy_size, void *cpy_data, void(*cpy_func)(void *, void *), kmp_int32 didit) |
void | __kmpc_critical (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *crit) |
void | __kmpc_destroy_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | __kmpc_destroy_nest_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | __kmpc_end (ident_t *loc) |
void | __kmpc_end_barrier_master (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_end_critical (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *crit) |
void | __kmpc_end_master (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_end_ordered (ident_t *loc, kmp_int32 gtid) |
void | __kmpc_end_reduce (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *lck) |
void | __kmpc_end_reduce_nowait (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *lck) |
void | __kmpc_end_serialized_parallel (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_end_single (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_flush (ident_t *loc,...) |
void | __kmpc_for_static_fini (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_fork_call (ident_t *loc, kmp_int32 argc, kmpc_micro microtask,...) |
kmp_uint64 | __kmpc_get_parent_taskid () |
kmp_uint64 | __kmpc_get_taskid () |
kmp_int32 | __kmpc_global_num_threads (ident_t *loc) |
kmp_int32 | __kmpc_global_thread_num (ident_t *loc) |
kmp_int32 | __kmpc_in_parallel (ident_t *loc) |
void | __kmpc_init_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | __kmpc_init_nest_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
int | __kmpc_invoke_task_func (int gtid) |
kmp_int32 | __kmpc_master (ident_t *loc, kmp_int32 global_tid) |
kmp_int32 | __kmpc_ok_to_fork (ident_t *loc) |
void | __kmpc_ordered (ident_t *loc, kmp_int32 gtid) |
void | __kmpc_place_threads (int nC, int nT, int nO) |
void | __kmpc_pop_num_threads (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_push_num_threads (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads) |
kmp_int32 | __kmpc_reduce (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, size_t reduce_size, void *reduce_data, void(*reduce_func)(void *lhs_data, void *rhs_data), kmp_critical_name *lck) |
kmp_int32 | __kmpc_reduce_nowait (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, size_t reduce_size, void *reduce_data, void(*reduce_func)(void *lhs_data, void *rhs_data), kmp_critical_name *lck) |
void | __kmpc_serialized_parallel (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_set_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | __kmpc_set_nest_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
kmp_int32 | __kmpc_single (ident_t *loc, kmp_int32 global_tid) |
int | __kmpc_test_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
int | __kmpc_test_nest_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | __kmpc_unset_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | __kmpc_unset_nest_lock (ident_t *loc, kmp_int32 gtid, void **user_lock) |
void | kmpc_set_blocktime (int arg) |
void | kmpc_set_defaults (char const *str) |
void | kmpc_set_library (int arg) |
void | kmpc_set_stacksize (int arg) |
void | kmpc_set_stacksize_s (size_t arg) |
void | ompc_set_dynamic (int flag) |
void | ompc_set_nested (int flag) |
void | ompc_set_num_threads (int arg) |
#define __KMP_GET_REDUCTION_METHOD | ( | gtid | ) | ( __kmp_threads[ ( gtid ) ] -> th.th_local.packed_reduction_method ) |
Definition at line 1942 of file kmp_csupport.c.
Referenced by __kmpc_end_reduce(), and __kmpc_end_reduce_nowait().
#define __KMP_SET_REDUCTION_METHOD | ( | gtid, | |||
rmethod | ) | ( ( __kmp_threads[ ( gtid ) ] -> th.th_local.packed_reduction_method ) = ( rmethod ) ) |
Definition at line 1939 of file kmp_csupport.c.
Referenced by __kmpc_reduce(), and __kmpc_reduce_nowait().
#define ACQUIRE_LOCK __kmp_acquire_user_lock_with_checks |
Definition at line 1580 of file kmp_csupport.c.
Referenced by __kmpc_set_lock().
#define ACQUIRE_LOCK_TIMED __kmp_acquire_user_lock_with_checks_timed |
Definition at line 1581 of file kmp_csupport.c.
#define ACQUIRE_NESTED_LOCK __kmp_acquire_nested_user_lock_with_checks |
Definition at line 1582 of file kmp_csupport.c.
Referenced by __kmpc_set_nest_lock().
#define ACQUIRE_NESTED_LOCK_TIMED __kmp_acquire_nested_user_lock_with_checks_timed |
Definition at line 1583 of file kmp_csupport.c.
#define DESTROY_LOCK __kmp_destroy_user_lock_with_checks |
Definition at line 1588 of file kmp_csupport.c.
Referenced by __kmpc_destroy_lock().
#define DESTROY_NESTED_LOCK __kmp_destroy_nested_user_lock_with_checks |
Definition at line 1589 of file kmp_csupport.c.
Referenced by __kmpc_destroy_nest_lock().
#define INIT_LOCK __kmp_init_user_lock_with_checks |
Definition at line 1578 of file kmp_csupport.c.
Referenced by __kmpc_init_lock().
#define INIT_NESTED_LOCK __kmp_init_nested_user_lock_with_checks |
Definition at line 1579 of file kmp_csupport.c.
Referenced by __kmpc_init_nest_lock().
#define MAX_MESSAGE 512 |
Definition at line 55 of file kmp_csupport.c.
Referenced by __kmp_print_storage_map_gtid(), and __kmp_warn().
#define RELEASE_LOCK __kmp_release_user_lock_with_checks |
Definition at line 1584 of file kmp_csupport.c.
Referenced by __kmpc_unset_lock().
#define RELEASE_NESTED_LOCK __kmp_release_nested_user_lock_with_checks |
Definition at line 1585 of file kmp_csupport.c.
Referenced by __kmpc_unset_nest_lock().
#define TEST_LOCK __kmp_test_user_lock_with_checks |
Definition at line 1586 of file kmp_csupport.c.
Referenced by __kmpc_test_lock().
#define TEST_NESTED_LOCK __kmp_test_nested_user_lock_with_checks |
Definition at line 1587 of file kmp_csupport.c.
Referenced by __kmpc_test_nest_lock().
static __forceinline void __kmp_end_critical_section_reduce_block | ( | ident_t * | loc, | |
kmp_int32 | global_tid, | |||
kmp_critical_name * | crit | |||
) | [static] |
Definition at line 1977 of file kmp_csupport.c.
References __kmp_base_user_lock_size, __kmp_env_consistency_check, __kmp_pop_sync(), __kmp_release_user_lock_with_checks(), ct_critical, and KMP_ASSERT.
Referenced by __kmpc_end_reduce(), and __kmpc_end_reduce_nowait().
static __forceinline void __kmp_enter_critical_section_reduce_block | ( | ident_t * | loc, | |
kmp_int32 | global_tid, | |||
kmp_critical_name * | crit | |||
) | [static] |
Definition at line 1950 of file kmp_csupport.c.
References __kmp_acquire_user_lock_with_checks(), __kmp_base_user_lock_size, __kmp_env_consistency_check, __kmp_get_critical_section_ptr(), __kmp_push_sync(), ct_critical, INTEL_CRITICAL_SIZE, and KMP_DEBUG_ASSERT.
Referenced by __kmpc_reduce(), and __kmpc_reduce_nowait().
static kmp_user_lock_p __kmp_get_critical_section_ptr | ( | kmp_critical_name * | crit, | |
ident_t const * | loc, | |||
kmp_int32 | gtid | |||
) | [static] |
Definition at line 1021 of file kmp_csupport.c.
References __kmp_destroy_user_lock_with_checks(), __kmp_init_user_lock_with_checks(), __kmp_set_user_lock_location(), __kmp_user_lock_allocate(), __kmp_user_lock_free(), KMP_COMPARE_AND_STORE_PTR, KMP_DEBUG_ASSERT, kmp_lf_critical_section, status, and TCR_PTR.
Referenced by __kmp_enter_critical_section_reduce_block(), and __kmpc_critical().
void __kmp_static_yield | ( | int | arg | ) | [inline] |
Definition at line 1016 of file kmp_csupport.c.
References __kmp_yield().
void __kmpc_destroy_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1666 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_free(), __kmp_user_lock_kind, DESTROY_LOCK, kmp_tas_lock::lk, lk_tas, OMP_LOCK_T_SIZE, kmp_base_tas_lock::poll, and kmp_user_lock::tas.
Referenced by FTN_DESTROY_LOCK().
void __kmpc_destroy_nest_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1703 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_free(), __kmp_user_lock_kind, kmp_base_tas_lock::depth_locked, DESTROY_NESTED_LOCK, kmp_tas_lock::lk, lk_tas, OMP_NEST_LOCK_T_SIZE, kmp_base_tas_lock::poll, and kmp_user_lock::tas.
Referenced by FTN_DESTROY_NEST_LOCK().
kmp_uint64 __kmpc_get_parent_taskid | ( | ) |
Definition at line 2331 of file kmp_csupport.c.
References __kmp_get_gtid, and __kmp_thread_from_gtid.
kmp_uint64 __kmpc_get_taskid | ( | ) |
Definition at line 2307 of file kmp_csupport.c.
References __kmp_get_gtid, and __kmp_thread_from_gtid.
void __kmpc_init_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1599 of file kmp_csupport.c.
References __kmp_env_consistency_check, __kmp_init_serial, __kmp_set_user_lock_location(), __kmp_user_lock_allocate(), __kmp_user_lock_kind, INIT_LOCK, KMP_CHECK_USER_LOCK_INIT, KMP_DEBUG_ASSERT, KMP_FATAL, kmp_tas_lock::lk, lk_tas, OMP_LOCK_T_SIZE, kmp_base_tas_lock::poll, and kmp_user_lock::tas.
Referenced by FTN_INIT_LOCK().
void __kmpc_init_nest_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1632 of file kmp_csupport.c.
References __kmp_env_consistency_check, __kmp_init_serial, __kmp_set_user_lock_location(), __kmp_user_lock_allocate(), __kmp_user_lock_kind, kmp_base_tas_lock::depth_locked, INIT_NESTED_LOCK, KMP_CHECK_USER_LOCK_INIT, KMP_DEBUG_ASSERT, KMP_FATAL, kmp_tas_lock::lk, lk_tas, OMP_NEST_LOCK_T_SIZE, kmp_base_tas_lock::poll, and kmp_user_lock::tas.
Referenced by FTN_INIT_NEST_LOCK().
int __kmpc_invoke_task_func | ( | int | gtid | ) |
Definition at line 359 of file kmp_csupport.c.
References __kmp_invoke_task_func().
void __kmpc_place_threads | ( | int | nC, | |
int | nT, | |||
int | nO | |||
) |
Definition at line 2355 of file kmp_csupport.c.
References __kmp_init_serial, and __kmp_serial_initialize().
void __kmpc_pop_num_threads | ( | ident_t * | loc, | |
kmp_int32 | global_tid | |||
) |
Definition at line 279 of file kmp_csupport.c.
References KA_TRACE.
void __kmpc_set_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1742 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_kind, ACQUIRE_LOCK, kmp_tas_lock::lk, lk_tas, OMP_LOCK_T_SIZE, kmp_base_tas_lock::poll, and kmp_user_lock::tas.
Referenced by FTN_SET_LOCK().
void __kmpc_set_nest_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1766 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_kind, ACQUIRE_NESTED_LOCK, kmp_base_tas_lock::depth_locked, kmp_tas_lock::lk, lk_tas, OMP_NEST_LOCK_T_SIZE, kmp_base_tas_lock::poll, and kmp_user_lock::tas.
Referenced by FTN_SET_NEST_LOCK().
int __kmpc_test_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1874 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_kind, FTN_FALSE, FTN_TRUE, kmp_tas_lock::lk, lk_tas, OMP_LOCK_T_SIZE, kmp_base_tas_lock::poll, kmp_user_lock::tas, and TEST_LOCK.
Referenced by FTN_TEST_LOCK().
int __kmpc_test_nest_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1902 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_kind, kmp_base_tas_lock::depth_locked, kmp_tas_lock::lk, lk_tas, OMP_NEST_LOCK_T_SIZE, kmp_base_tas_lock::poll, kmp_user_lock::tas, and TEST_NESTED_LOCK.
Referenced by FTN_TEST_NEST_LOCK().
void __kmpc_unset_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1790 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_kind, KMP_MB, kmp_tas_lock::lk, lk_tas, OMP_LOCK_T_SIZE, ompt_callbacks, ompt_status, ompt_status_track_callback, kmp_base_tas_lock::poll, RELEASE_LOCK, kmp_user_lock::tas, and TCW_4.
Referenced by FTN_UNSET_LOCK().
void __kmpc_unset_nest_lock | ( | ident_t * | loc, | |
kmp_int32 | gtid, | |||
void ** | user_lock | |||
) |
Definition at line 1830 of file kmp_csupport.c.
References __kmp_lookup_user_lock(), __kmp_user_lock_kind, kmp_base_tas_lock::depth_locked, KMP_MB, KMP_NESTED_LOCK_RELEASED, kmp_tas_lock::lk, lk_tas, OMP_NEST_LOCK_T_SIZE, ompt_callbacks, ompt_status, ompt_status_track_callback, kmp_base_tas_lock::poll, RELEASE_NESTED_LOCK, kmp_user_lock::tas, and TCW_4.
Referenced by FTN_UNSET_NEST_LOCK().
void kmpc_set_blocktime | ( | int | arg | ) |
Definition at line 1434 of file kmp_csupport.c.
References __kmp_aux_set_blocktime(), __kmp_entry_gtid, __kmp_thread_from_gtid, and __kmp_tid_from_gtid.
Referenced by __kmp_aux_env_initialize().
void kmpc_set_defaults | ( | char const * | str | ) |
Definition at line 1454 of file kmp_csupport.c.
References __kmp_aux_set_defaults().
void kmpc_set_library | ( | int | arg | ) |
Definition at line 1447 of file kmp_csupport.c.
References __kmp_user_set_library().
void kmpc_set_stacksize | ( | int | arg | ) |
Definition at line 1420 of file kmp_csupport.c.
References __kmp_aux_set_stacksize().
void kmpc_set_stacksize_s | ( | size_t | arg | ) |
Definition at line 1427 of file kmp_csupport.c.
References __kmp_aux_set_stacksize().
void ompc_set_dynamic | ( | int | flag | ) |
Definition at line 1361 of file kmp_csupport.c.
References __kmp_entry_thread(), __kmp_save_internal_controls(), FALSE, set__dynamic, and TRUE.
Referenced by __kmp_aux_env_initialize().
void ompc_set_nested | ( | int | flag | ) |
Definition at line 1374 of file kmp_csupport.c.
References __kmp_entry_thread(), __kmp_save_internal_controls(), FALSE, set__nested, and TRUE.
Referenced by __kmp_aux_env_initialize().
void ompc_set_num_threads | ( | int | arg | ) |
Definition at line 1354 of file kmp_csupport.c.
References __kmp_entry_gtid, and __kmp_set_num_threads().
Referenced by __kmp_aux_env_initialize().