LLVM OpenMP 20.0.0git
|
These functions are used for implementing #pragma omp parallel
.
More...
Typedefs | |
typedef void(* | kmpc_micro) (kmp_int32 *global_tid, kmp_int32 *bound_tid,...) |
The type for a microtask which gets passed to __kmpc_fork_call(). | |
Functions | |
void | __kmpc_push_num_threads (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads) |
void | __kmpc_push_num_threads_list (ident_t *loc, kmp_int32 global_tid, kmp_uint32 list_length, kmp_int32 *num_threads_list) |
void | __kmpc_fork_call (ident_t *loc, kmp_int32 argc, kmpc_micro microtask,...) |
void | __kmpc_fork_call_if (ident_t *loc, kmp_int32 argc, kmpc_micro microtask, kmp_int32 cond, void *args) |
void | __kmpc_push_num_teams (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_teams, kmp_int32 num_threads) |
void | __kmpc_set_thread_limit (ident_t *loc, kmp_int32 global_tid, kmp_int32 thread_limit) |
void | __kmpc_push_num_teams_51 (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_teams_lb, kmp_int32 num_teams_ub, kmp_int32 num_threads) |
void | __kmpc_fork_teams (ident_t *loc, kmp_int32 argc, kmpc_micro microtask,...) |
void | __kmpc_serialized_parallel (ident_t *loc, kmp_int32 global_tid) |
void | __kmpc_end_serialized_parallel (ident_t *loc, kmp_int32 global_tid) |
These functions are used for implementing #pragma omp parallel
.
typedef void(* kmpc_micro) (kmp_int32 *global_tid, kmp_int32 *bound_tid,...) |
The type for a microtask which gets passed to __kmpc_fork_call().
The arguments to the outlined function are
global_tid | the global thread identity of the thread executing the function. |
bound_tid | the local identity of the thread executing the function |
... | pointers to shared variables accessed by the function. |
loc | source location information |
global_tid | global thread number |
Leave a serialized parallel construct.
Definition at line 621 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_env_consistency_check, __kmp_free, __kmp_init_parallel, __kmp_parallel_initialize(), __kmp_pop_current_task_from_thread(), __kmp_pop_parallel(), __kmp_pop_task_team_node(), __kmp_reset_root_init_mask(), __kmp_resume_if_soft_paused(), __kmp_task_team_wait(), __kmp_tasking_mode, __kmp_threads, __ompt_get_task_info_internal(), __ompt_lw_taskteam_unlink(), copy_icvs(), ompt_callbacks_active_s::enabled, id::flags, KA_TRACE, KC_TRACE, KMP_ASSERT, KMP_DEBUG_ASSERT, KMP_IDENT_AUTOPAR, KMP_MB, loc, kmp_internal_control::next, ompt_callbacks, ompt_enabled, kmp_internal_control::serial_nesting_level, kmp_team::t, TCR_4, tskm_immediate_exec, kmp_task_team::tt, kmp_base_task_team::tt_found_proxy_tasks, kmp_base_task_team::tt_hidden_helper_task_encountered, and USE_ITT_BUILD_ARG.
Referenced by __kmp_join_call(), and __kmpc_fork_call_if().
void __kmpc_fork_call | ( | ident_t * | loc, |
kmp_int32 | argc, | ||
kmpc_micro | microtask, | ||
... | |||
) |
loc | source location information |
argc | total number of arguments in the ellipsis |
microtask | pointer to callback routine consisting of outlined parallel construct |
... | pointers to shared variables that aren't global |
Do the actual fork and call the microtask in the relevant number of threads.
Definition at line 307 of file kmp_csupport.cpp.
References __kmp_entry_gtid, __kmp_fork_call(), __kmp_invoke_task_func(), __kmp_join_call(), __kmp_threads, __kmpc_in_parallel(), ompt_callbacks_active_s::enabled, fork_context_intel, KMP_COUNT_BLOCK, KMP_GET_THREAD_STATE, KMP_POP_PARTITIONED_TIMER, KMP_PUSH_PARTITIONED_TIMER, KMP_SET_THREAD_STATE, kmp_va_addr_of, loc, microtask(), ompt_enabled, OMPT_GET_FRAME_ADDRESS, and VOLATILE_CAST.
Referenced by __kmp_hidden_helper_threads_initz_routine(), and __kmpc_fork_call_if().
void __kmpc_fork_call_if | ( | ident_t * | loc, |
kmp_int32 | argc, | ||
kmpc_micro | microtask, | ||
kmp_int32 | cond, | ||
void * | args | ||
) |
loc | source location information |
microtask | pointer to callback routine consisting of outlined parallel construct |
cond | condition for running in parallel |
args | struct of pointers to shared variables that aren't global |
Perform a fork only if the condition is true.
Definition at line 388 of file kmp_csupport.cpp.
References __kmp_entry_gtid, __kmp_invoke_microtask(), __kmpc_end_serialized_parallel(), __kmpc_fork_call(), __kmpc_serialized_parallel(), args, loc, microtask(), and VOLATILE_CAST.
Referenced by main().
void __kmpc_fork_teams | ( | ident_t * | loc, |
kmp_int32 | argc, | ||
kmpc_micro | microtask, | ||
... | |||
) |
loc | source location information |
argc | total number of arguments in the ellipsis |
microtask | pointer to callback routine consisting of outlined teams construct |
... | pointers to shared variables that aren't global |
Do the actual fork and call the microtask in the relevant number of threads.
Definition at line 502 of file kmp_csupport.cpp.
References __kmp_entry_gtid, __kmp_fork_call(), __kmp_free, __kmp_invoke_teams_master(), __kmp_join_call(), __kmp_push_num_teams(), __kmp_teams_master(), __kmp_threads, __kmp_tid_from_gtid(), kmp_cg_root::cg_nthreads, ompt_callbacks_active_s::enabled, fork_context_intel, i, KA_TRACE, KMP_COUNT_BLOCK, KMP_DEBUG_ASSERT, KMP_GET_THREAD_STATE, KMP_POP_PARTITIONED_TIMER, KMP_PUSH_PARTITIONED_TIMER, KMP_SET_THREAD_STATE, kmp_va_addr_of, loc, microtask(), ompt_enabled, OMPT_GET_FRAME_ADDRESS, kmp_team::t, kmp_cg_root::up, and VOLATILE_CAST.
Referenced by KMP_API_NAME_GOMP_TEAMS_REG(), and main().
void __kmpc_push_num_teams | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_int32 | num_teams, | ||
kmp_int32 | num_threads | ||
) |
loc | source location information |
global_tid | global thread number |
num_teams | number of teams requested for the teams construct |
num_threads | number of threads per team requested for the teams construct |
Set the number of teams to be used by the teams construct. This call is only required if the teams construct has a num_teams
clause or a thread_limit
clause (or both).
Definition at line 438 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_push_num_teams(), KA_TRACE, and loc.
Referenced by KMP_API_NAME_GOMP_TEAMS_REG(), and main().
void __kmpc_push_num_teams_51 | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_int32 | num_teams_lb, | ||
kmp_int32 | num_teams_ub, | ||
kmp_int32 | num_threads | ||
) |
loc | source location information |
global_tid | global thread number |
num_teams_lb | lower bound on number of teams requested for the teams construct |
num_teams_ub | upper bound on number of teams requested for the teams construct |
num_threads | number of threads per team requested for the teams construct |
Set the number of teams to be used by the teams construct. The number of initial teams cretaed will be greater than or equal to the lower bound and less than or equal to the upper bound. This call is only required if the teams construct has a num_teams
clause or a thread_limit
clause (or both).
Definition at line 481 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_push_num_teams_51(), KA_TRACE, and loc.
Referenced by check_num_teams().
loc | source location information |
global_tid | global thread number |
num_threads | number of threads requested for this parallel construct |
Set the number of threads to be used by the next fork spawned by this thread. This call is only required if the parallel construct has a num_threads
clause.
Definition at line 232 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_push_num_threads(), KA_TRACE, and loc.
void __kmpc_push_num_threads_list | ( | ident_t * | loc, |
kmp_int32 | global_tid, | ||
kmp_uint32 | list_length, | ||
kmp_int32 * | num_threads_list | ||
) |
loc | source location information |
global_tid | global thread number |
list_length | number of entries in the num_threads_list array |
num_threads_list | array of numbers of threads requested for this parallel construct and subsequent nested parallel constructs |
Set the number of threads to be used by the next fork spawned by this thread, and some nested forks as well. This call is only required if the parallel construct has a num_threads
clause that has a list of integers as the argument.
Definition at line 260 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_push_num_threads_list(), i, KA_TRACE, and loc.
loc | source location information |
global_tid | global thread number |
Enter a serialized parallel construct. This interface is used to handle a conditional parallel region, like this,
when the condition is false.
Definition at line 603 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), __kmp_serialized_parallel(), and loc.
Referenced by __kmp_fork_in_teams(), __kmp_serial_fork_call(), and __kmpc_fork_call_if().
loc | source location information |
global_tid | global thread number |
thread_limit | limit on number of threads which can be created within the current task |
Set the thread_limit for the current task This call is there to support thread_limit
clause on the target
construct
Definition at line 457 of file kmp_csupport.cpp.
References __kmp_assert_valid_gtid(), and __kmp_threads.