LLVM OpenMP 20.0.0git
|
These functions are used for implementing barriers. More...
Functions | |
void | __kmpc_flush (ident_t *loc) |
void | __kmpc_barrier (ident_t *loc, kmp_int32 global_tid) |
kmp_int32 | __kmpc_barrier_master (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_end_barrier_master (ident_t *loc, kmp_int32 global_tid) |
kmp_int32 | __kmpc_barrier_master_nowait (ident_t *loc, kmp_int32 global_tid) |
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_end_reduce_nowait (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *lck) |
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) |
void | __kmpc_end_reduce (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *lck) |
These functions are used for implementing barriers.
loc | source location information |
global_tid | thread id. |
Execute a barrier.
Definition at line 812 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_barrier(), __kmp_check_barrier(), __kmp_env_consistency_check, __kmp_init_parallel, __kmp_parallel_initialize(), __kmp_resume_if_soft_paused(), __kmp_threads, __ompt_get_task_info_internal(), bs_plain_barrier, ct_barrier, ompt_callbacks_active_s::enabled, FALSE, KC_TRACE, KMP_COUNT_BLOCK, KMP_WARNING, loc, ompt_enabled, OMPT_GET_FRAME_ADDRESS, and TCR_4.
Referenced by __kmpc_cancel_barrier(), KMP_API_NAME_GOMP_BARRIER(), and KMP_API_NAME_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER().
loc | source location information |
global_tid | thread id. |
Start execution of a combined barrier and master. The barrier is executed inside this function.
Definition at line 1800 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_barrier(), __kmp_check_barrier(), __kmp_env_consistency_check, __kmp_init_parallel, __kmp_parallel_initialize(), __kmp_resume_if_soft_paused(), __kmp_threads, __ompt_get_task_info_internal(), bs_plain_barrier, ct_barrier, ompt_callbacks_active_s::enabled, KC_TRACE, loc, ompt_enabled, OMPT_GET_FRAME_ADDRESS, status, TCR_4, and TRUE.
loc | source location information |
global_tid | thread id. |
Start execution of a combined barrier and master(nowait) construct. The barrier is executed inside this function. There is no equivalent "end" function, since the
Definition at line 1860 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_barrier(), __kmp_check_barrier(), __kmp_env_consistency_check, __kmp_init_parallel, __kmp_parallel_initialize(), __kmp_pop_sync(), __kmp_resume_if_soft_paused(), __kmp_threads, __kmpc_master(), __ompt_get_task_info_internal(), bs_plain_barrier, ct_barrier, ct_master, ompt_callbacks_active_s::enabled, FALSE, KC_TRACE, KMP_WARNING, loc, ompt_enabled, OMPT_GET_FRAME_ADDRESS, ret, and TCR_4.
loc | source location information |
global_tid | thread id. |
Complete the execution of a combined barrier and master. This function should only be called at the completion of the master
code. Other threads will still be waiting at the barrier and this call releases them.
Definition at line 1844 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_end_split_barrier(), bs_plain_barrier, and KC_TRACE.
void __kmpc_end_reduce | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_critical_name * | lck | ||
) |
loc | source location information |
global_tid | global thread id. |
lck | pointer to the unique lock data structure |
Finish the execution of a blocking reduce. The lck
pointer must be the same as that used in the corresponding start function.
Definition at line 3981 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_barrier(), __kmp_end_critical_section_reduce_block(), __kmp_end_split_barrier(), __kmp_env_consistency_check, __KMP_GET_REDUCTION_METHOD, __kmp_pop_sync(), __kmp_restore_swapped_teams(), __kmp_swap_teams_for_teams_reduction(), __kmp_thread_from_gtid(), __kmp_threads, __ompt_get_task_info_internal(), atomic_reduce_block, bs_plain_barrier, critical_reduce_block, ct_reduce, empty_reduce_block, ompt_callbacks_active_s::enabled, FALSE, KA_TRACE, KMP_ASSERT, lck, loc, ompt_enabled, OMPT_GET_FRAME_ADDRESS, OMPT_REDUCTION_DECL, OMPT_REDUCTION_END, TEST_REDUCTION_METHOD, tree_reduce_block, and UNPACK_REDUCTION_BARRIER.
Referenced by outlined().
void __kmpc_end_reduce_nowait | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_critical_name * | lck | ||
) |
loc | source location information |
global_tid | global thread id. |
lck | pointer to the unique lock data structure |
Finish the execution of a reduce nowait.
Definition at line 3790 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_end_critical_section_reduce_block(), __kmp_env_consistency_check, __KMP_GET_REDUCTION_METHOD, __kmp_pop_sync(), __kmp_thread_from_gtid(), atomic_reduce_block, critical_reduce_block, ct_reduce, empty_reduce_block, KA_TRACE, KMP_ASSERT, lck, loc, OMPT_REDUCTION_DECL, OMPT_REDUCTION_END, TEST_REDUCTION_METHOD, and tree_reduce_block.
loc | source location information. |
Execute flush
. This is implemented as a full memory fence. (Though depending on the memory ordering convention obeyed by the compiler even that may not be necessary).
Definition at line 790 of file kmp_csupport.cpp.
References __ompt_get_thread_data_internal(), KC_TRACE, KMP_MFENCE, ompt_callbacks, ompt_enabled, and OMPT_GET_RETURN_ADDRESS.
kmp_int32 __kmpc_reduce | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_int32 | num_vars, | ||
size_t | reduce_size, | ||
void * | reduce_data, | ||
void(*)(void *lhs_data, void *rhs_data) | reduce_func, | ||
kmp_critical_name * | lck | ||
) |
loc | source location information |
global_tid | global thread number |
num_vars | number of items (variables) to be reduced |
reduce_size | size of data in bytes to be reduced |
reduce_data | pointer to data to be reduced |
reduce_func | callback function providing reduction operation on two operands and returning result of reduction in lhs_data |
lck | pointer to the unique lock data structure |
A blocking reduce that includes an implicit barrier.
Definition at line 3859 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_barrier(), __kmp_determine_reduction_method(), __kmp_enter_critical_section_reduce_block(), __kmp_env_consistency_check, __kmp_init_parallel, __kmp_parallel_initialize(), __kmp_pop_sync(), __kmp_push_sync(), __kmp_restore_swapped_teams(), __kmp_resume_if_soft_paused(), __KMP_SET_REDUCTION_METHOD, __kmp_swap_teams_for_teams_reduction(), __kmp_thread_from_gtid(), __kmp_threads, __ompt_get_task_info_internal(), atomic_reduce_block, critical_reduce_block, ct_reduce, empty_reduce_block, ompt_callbacks_active_s::enabled, KA_TRACE, KMP_ASSERT, KMP_COUNT_BLOCK, lck, loc, ompt_enabled, OMPT_GET_FRAME_ADDRESS, OMPT_REDUCTION_BEGIN, OMPT_REDUCTION_DECL, TCR_4, TEST_REDUCTION_METHOD, tree_reduce_block, TRUE, and UNPACK_REDUCTION_BARRIER.
kmp_int32 __kmpc_reduce_nowait | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_int32 | num_vars, | ||
size_t | reduce_size, | ||
void * | reduce_data, | ||
void(*)(void *lhs_data, void *rhs_data) | reduce_func, | ||
kmp_critical_name * | lck | ||
) |
loc | source location information |
global_tid | global thread number |
num_vars | number of items (variables) to be reduced |
reduce_size | size of data in bytes to be reduced |
reduce_data | pointer to data to be reduced |
reduce_func | callback function providing reduction operation on two operands and returning result of reduction in lhs_data |
lck | pointer to the unique lock data structure |
The nowait version is used for a reduce clause with the nowait argument.
Definition at line 3630 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_barrier(), __kmp_determine_reduction_method(), __kmp_enter_critical_section_reduce_block(), __kmp_env_consistency_check, __kmp_init_parallel, __kmp_parallel_initialize(), __kmp_pop_sync(), __kmp_push_sync(), __kmp_restore_swapped_teams(), __kmp_resume_if_soft_paused(), __KMP_SET_REDUCTION_METHOD, __kmp_swap_teams_for_teams_reduction(), __kmp_thread_from_gtid(), __kmp_threads, __ompt_get_task_info_internal(), atomic_reduce_block, critical_reduce_block, ct_reduce, empty_reduce_block, ompt_callbacks_active_s::enabled, FALSE, KA_TRACE, KMP_ASSERT, KMP_COUNT_BLOCK, lck, loc, ompt_enabled, OMPT_GET_FRAME_ADDRESS, OMPT_REDUCTION_BEGIN, OMPT_REDUCTION_DECL, TCR_4, TEST_REDUCTION_METHOD, tree_reduce_block, and UNPACK_REDUCTION_BARRIER.