25#define THREAD_LOCAL __declspec(thread)
27#define THREAD_LOCAL __thread
30#define OMPT_WEAK_ATTRIBUTE KMP_WEAK_ATTRIBUTE_INTERNAL
36#define LWT_FROM_TEAM(team) (team)->t.ompt_serialized_team_info
38#define OMPT_THREAD_ID_BITS 16
73 team = team->
t.t_parent;
89 return &lwt->ompt_team_info;
93 *
size = team->
t.t_nproc;
96 return &team->
t.ompt_team_info;
119 if (!lwt && taskdata) {
135 }
else if (taskdata) {
136 info = &taskdata->ompt_task_info;
160 if (!lwt && taskdata) {
162 if (taskdata->ompt_task_info.scheduling_parent) {
163 taskdata = taskdata->ompt_task_info.scheduling_parent;
164 }
else if (next_lwt) {
180 }
else if (taskdata) {
181 info = &taskdata->ompt_task_info;
206 return &(thread->th.ompt_thread_info.thread_data);
219 ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)(uintptr_t)variable;
227 *omp_wait_id = ti->th.ompt_thread_info.wait_id;
228 return ti->th.ompt_thread_info.state;
230 return ompt_state_undefined;
238 ompt_data_t **parallel_data,
261 ompt_data_t *ompt_pid,
void *codeptr) {
275 int on_heap,
bool always) {
278 thr->th.th_team->t.t_serialized >
284 link_lwt->
heap = on_heap;
289 *OMPT_CUR_TEAM_INFO(thr) = tmp_team;
293 thr->th.th_team->t.ompt_serialized_team_info;
294 link_lwt->
parent = my_parent;
295 thr->th.th_team->t.ompt_serialized_team_info = link_lwt;
297 if (ompd_state & OMPD_ENABLE_BP) {
298 ompd_bp_parallel_begin();
304 *OMPT_CUR_TASK_INFO(thr) = tmp_task;
310 if (ompd_state & OMPD_ENABLE_BP) {
311 ompd_bp_parallel_begin();
323 *OMPT_CUR_TASK_INFO(thr) = tmp_task;
325 if (ompd_state & OMPD_ENABLE_BP) {
326 ompd_bp_parallel_end();
329 thr->th.th_team->t.ompt_serialized_team_info = lwtask->
parent;
333 *OMPT_CUR_TEAM_INFO(thr) = tmp_team;
349 ompt_data_t *task_data = thr ? OMPT_CUR_TASK_DATA(thr) : NULL;
358 ompt_data_t **task_data,
359 ompt_frame_t **task_frame,
360 ompt_data_t **parallel_data,
365 if (ancestor_level < 0)
372 int level = ancestor_level;
376 if (taskdata == NULL)
378 kmp_team *team = thr->th.th_team, *prev_team = NULL;
384 while (ancestor_level > 0) {
391 if (!lwt && taskdata) {
393 if (taskdata->ompt_task_info.scheduling_parent) {
394 taskdata = taskdata->ompt_task_info.scheduling_parent;
395 }
else if (next_lwt) {
404 team = team->
t.t_parent;
417 *
type = ompt_task_implicit;
419 }
else if (taskdata) {
420 info = &taskdata->ompt_task_info;
421 team_info = &team->
t.ompt_team_info;
426 *
type = ompt_task_initial;
431 *task_data = info ? &info->
task_data : NULL;
435 *task_frame = info ? &info->
frame : NULL;
438 *parallel_data = team_info ? &(team_info->
parallel_data) : NULL;
445 else if (!prev_team) {
455 *thread_num = prev_team->t.t_master_tid;
487 team->
t.ompt_team_info.parallel_data = ompt_pid;
495 static uint64_t thread = 1;
507 if (thr->th.ompt_thread_info.parallel_flags & ompt_parallel_league)
508 return ompt_sync_region_barrier_teams;
510 return ompt_sync_region_barrier_implicit_parallel;
514 return ompt_sync_region_barrier_implementation;
516 kmp_int32 flags = thr->th.th_ident->flags;
519 return ompt_sync_region_barrier_explicit;
522 return ompt_sync_region_barrier_implicit_workshare;
524 return ompt_sync_region_barrier_implementation;
@ KMP_IDENT_BARRIER_IMPL
To Mark implicit barriers.
@ KMP_IDENT_BARRIER_EXPL
To mark a 'barrier' directive in user code.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t size
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
kmp_info_t ** __kmp_threads
#define __kmp_allocate(size)
void __kmp_serial_initialize(void)
union KMP_ALIGN_CACHE kmp_info kmp_info_t
#define KMP_TEST_THEN_INC64(p)
#define TASK_TYPE_DETAILS_FORMAT(info)
void __ompt_thread_assign_wait_id(void *variable)
ompt_task_info_t * __ompt_get_scheduling_taskinfo(int depth)
int __ompt_get_task_memory_internal(void **addr, size_t *size, int blocknum)
ompt_team_info_t * __ompt_get_teaminfo(int depth, int *size)
void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, kmp_info_t *thr, int gtid, ompt_data_t *ompt_pid, void *codeptr)
int __ompt_get_state_internal(ompt_wait_id_t *omp_wait_id)
ompt_data_t * __ompt_get_target_task_data()
#define OMPT_THREAD_ID_BITS
int __ompt_get_task_info_internal(int ancestor_level, int *type, ompt_data_t **task_data, ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num)
ompt_data_t * __ompt_get_task_data()
void __ompt_lw_taskteam_link(ompt_lw_taskteam_t *lwt, kmp_info_t *thr, int on_heap, bool always)
ompt_task_info_t * __ompt_get_task_info_object(int depth)
#define LWT_FROM_TEAM(team)
static uint64_t __ompt_get_unique_id_internal()
void __ompt_team_assign_id(kmp_team_t *team, ompt_data_t ompt_pid)
void __ompt_force_initialization()
void __ompt_lw_taskteam_unlink(kmp_info_t *thr)
ompt_sync_region_t __ompt_get_barrier_kind(enum barrier_type bt, kmp_info_t *thr)
ompt_data_t * __ompt_get_thread_data_internal()
int __ompt_get_parallel_info_internal(int ancestor_level, ompt_data_t **parallel_data, int *team_size)
kmp_taskdata_t * td_parent
kmp_tasking_flags_t td_flags
ompt_team_info_t ompt_team_info
struct ompt_lw_taskteam_s * parent
ompt_task_info_t ompt_task_info
struct kmp_taskdata * scheduling_parent
void * master_return_address
ompt_data_t parallel_data