24#if ENABLE_LIBOMPTARGET
25static void (*tgt_target_nowait_query)(
void **);
27void __kmp_init_target_task() {
28 *(
void **)(&tgt_target_nowait_query) =
KMP_DLSYM(
"__tgt_target_nowait_query");
40#if OMP_TASKGRAPH_EXPERIMENTAL
41static kmp_tdg_info_t *__kmp_find_tdg(
kmp_int32 tdg_id);
73#if OMP_TASKGRAPH_EXPERIMENTAL
83 for (
int j =
i - 1;
j >= 0; --
j)
103 KE_TRACE(10, (
"__kmp_realloc_task_deque: T#%d reallocating deque[from %d to "
104 "%d] for thread_data %p\n",
111 for (
i = thread_data->td.td_deque_head,
j = 0;
j <
size;
113 new_deque[
j] = thread_data->td.td_deque[
i];
117 thread_data->td.td_deque_head = 0;
118 thread_data->td.td_deque_tail =
size;
119 thread_data->td.td_deque = new_deque;
120 thread_data->td.td_deque_size =
new_size;
127 thread_data->td.td_deque_last_stolen = -1;
128 KE_TRACE(20, (
"__kmp_alloc_task_pri_list: T#%d allocating deque[%d] "
129 "for thread_data %p\n",
148 thread_data = &lst->
td;
153 thread_data = &list->td;
154 list->priority = pri;
159 while (next_queue && next_queue->
priority > pri) {
161 next_queue = lst->
next;
164 if (next_queue == NULL) {
167 thread_data = &list->td;
168 list->priority = pri;
171 }
else if (next_queue->
priority == pri) {
173 thread_data = &next_queue->
td;
177 thread_data = &list->td;
178 list->priority = pri;
179 list->next = next_queue;
193 (
"__kmp_push_priority_task: T#%d trying to push task %p, pri %d.\n",
194 gtid, taskdata, pri));
203 thread_data = &list->td;
204 list->priority = pri;
215 thread_data = &lst->
td;
226 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
230 thread->th.th_current_task)) {
232 KA_TRACE(20, (
"__kmp_push_priority_task: T#%d deque is full; returning "
233 "TASK_NOT_PUSHED for task %p\n",
244 thread_data->td.td_deque[thread_data->td.td_deque_tail] = taskdata;
246 thread_data->td.td_deque_tail =
247 (thread_data->td.td_deque_tail + 1) &
TASK_DEQUE_MASK(thread_data->td);
248 TCW_4(thread_data->td.td_deque_ntasks,
249 TCR_4(thread_data->td.td_deque_ntasks) + 1);
252 KA_TRACE(20, (
"__kmp_push_priority_task: T#%d returning "
253 "TASK_SUCCESSFULLY_PUSHED: task=%p ntasks=%d head=%u tail=%u\n",
254 gtid, taskdata, thread_data->td.td_deque_ntasks,
255 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
283 (
"__kmp_push_task: T#%d trying to push task %p.\n", gtid, taskdata));
292 (
"__kmp_push_task: T#%d untied_count (%d) incremented for task %p\n",
298 KA_TRACE(20, (
"__kmp_push_task: T#%d team serialized; returning "
299 "TASK_NOT_PUSHED for task %p\n",
325 if (
UNLIKELY(thread_data->td.td_deque == NULL)) {
331 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
335 thread->th.th_current_task)) {
336 KA_TRACE(20, (
"__kmp_push_task: T#%d deque is full; returning "
337 "TASK_NOT_PUSHED for task %p\n",
343 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
354 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
358 thread->th.th_current_task)) {
360 KA_TRACE(20, (
"__kmp_push_task: T#%d deque is full on 2nd check; "
361 "returning TASK_NOT_PUSHED for task %p\n",
374 thread_data->td.td_deque[thread_data->td.td_deque_tail] =
377 thread_data->td.td_deque_tail =
378 (thread_data->td.td_deque_tail + 1) &
TASK_DEQUE_MASK(thread_data->td);
379 TCW_4(thread_data->td.td_deque_ntasks,
380 TCR_4(thread_data->td.td_deque_ntasks) + 1);
383 KA_TRACE(20, (
"__kmp_push_task: T#%d returning TASK_SUCCESSFULLY_PUSHED: "
384 "task=%p ntasks=%d head=%u tail=%u\n",
385 gtid, taskdata, thread_data->td.td_deque_ntasks,
386 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
398 KF_TRACE(10, (
"__kmp_pop_current_task_from_thread(enter): T#%d "
399 "this_thread=%p, curtask=%p, "
400 "curtask_parent=%p\n",
401 0, this_thr, this_thr->th.th_current_task,
402 this_thr->th.th_current_task->td_parent));
404 this_thr->th.th_current_task = this_thr->th.th_current_task->td_parent;
406 KF_TRACE(10, (
"__kmp_pop_current_task_from_thread(exit): T#%d "
407 "this_thread=%p, curtask=%p, "
408 "curtask_parent=%p\n",
409 0, this_thr, this_thr->th.th_current_task,
410 this_thr->th.th_current_task->td_parent));
423 KF_TRACE(10, (
"__kmp_push_current_task_to_thread(enter): T#%d this_thread=%p "
426 tid, this_thr, this_thr->th.th_current_task,
427 team->
t.t_implicit_task_taskdata[tid].td_parent));
432 if (this_thr->th.th_current_task != &team->
t.t_implicit_task_taskdata[0]) {
433 team->
t.t_implicit_task_taskdata[0].td_parent =
434 this_thr->th.th_current_task;
435 this_thr->th.th_current_task = &team->
t.t_implicit_task_taskdata[0];
438 team->
t.t_implicit_task_taskdata[tid].td_parent =
439 team->
t.t_implicit_task_taskdata[0].td_parent;
440 this_thr->th.th_current_task = &team->
t.t_implicit_task_taskdata[tid];
443 KF_TRACE(10, (
"__kmp_push_current_task_to_thread(exit): T#%d this_thread=%p "
446 tid, this_thr, this_thr->th.th_current_task,
447 team->
t.t_implicit_task_taskdata[tid].td_parent));
461 (
"__kmp_task_start(enter): T#%d starting task %p: current_task=%p\n",
462 gtid, taskdata, current_task));
485 thread->th.th_current_task = taskdata;
501 KA_TRACE(10, (
"__kmp_task_start(exit): T#%d task=%p\n", gtid, taskdata));
515 ompt_task_status_t
status = ompt_task_switch;
516 if (
__kmp_threads[gtid]->th.ompt_thread_info.ompt_task_yielded) {
518 __kmp_threads[gtid]->th.ompt_thread_info.ompt_task_yielded = 0;
523 &(current_task->ompt_task_info.task_data),
status,
524 &(taskdata->ompt_task_info.task_data));
526 taskdata->ompt_task_info.scheduling_parent = current_task;
533 ompt_task_status_t
status) {
538 status = ompt_task_cancel;
543 &(taskdata->ompt_task_info.task_data),
status,
544 (resumed_task ? &(resumed_task->ompt_task_info.task_data) : NULL));
553 void *return_address) {
557 KA_TRACE(10, (
"__kmpc_omp_task_begin_if0(enter): T#%d loc=%p task=%p "
559 gtid, loc_ref, taskdata, current_task));
566 KA_TRACE(20, (
"__kmpc_omp_task_begin_if0: T#%d untied_count (%d) "
567 "incremented for task %p\n",
577 if (current_task->ompt_task_info.frame.enter_frame.ptr == NULL) {
578 current_task->ompt_task_info.frame.enter_frame.ptr =
579 taskdata->ompt_task_info.frame.exit_frame.ptr = frame_address;
580 current_task->ompt_task_info.frame.enter_frame_flags =
581 taskdata->ompt_task_info.frame.exit_frame_flags =
588 &(taskdata->ompt_task_info.task_data),
591 __ompt_task_start(
task, current_task, gtid);
595 KA_TRACE(10, (
"__kmpc_omp_task_begin_if0(exit): T#%d loc=%p task=%p,\n", gtid,
604 void *return_address) {
628 OMPT_STORE_RETURN_ADDRESS(gtid);
629 __kmpc_omp_task_begin_if0_ompt(loc_ref, gtid,
task,
631 OMPT_LOAD_RETURN_ADDRESS(gtid));
646 (
"__kmpc_omp_task_begin(enter): T#%d loc=%p task=%p current_task=%p\n",
651 KA_TRACE(10, (
"__kmpc_omp_task_begin(exit): T#%d loc=%p task=%p,\n", gtid,
664 KA_TRACE(30, (
"__kmp_free_task: T#%d freeing data from task %p\n", gtid,
677 task->data1.destructors = NULL;
681#if OMP_TASKGRAPH_EXPERIMENTAL
683 if (!taskdata->is_taskgraph) {
687 __kmp_fast_free(thread, taskdata);
691#if OMP_TASKGRAPH_EXPERIMENTAL
709 KA_TRACE(20, (
"__kmp_free_task: T#%d freed task %p\n", gtid, taskdata));
732 while (children == 0) {
735 KA_TRACE(20, (
"__kmp_free_task_and_ancestors(enter): T#%d task %p complete "
736 "and freeing itself\n",
742 taskdata = parent_taskdata;
752 if (children == 0 && flags_old.
complete == 1) {
759 KA_TRACE(100, (
"__kmp_free_task_and_ancestors: T#%d cleans "
760 "dephash of implicit task %p\n",
775 20, (
"__kmp_free_task_and_ancestors(exit): T#%d task %p has %d children; "
776 "not freeing it yet\n",
777 gtid, taskdata, children));
795#if OMP_TASKGRAPH_EXPERIMENTAL
817 thread->th.th_task_team;
818#if OMP_TASKGRAPH_EXPERIMENTAL
825 KA_TRACE(10, (
"__kmp_task_finish(enter): T#%d finishing task %p and resuming "
827 gtid, taskdata, resumed_task));
831#if OMP_TASKGRAPH_EXPERIMENTAL
832 is_taskgraph = taskdata->is_taskgraph;
841 (
"__kmp_task_finish: T#%d untied_count (%d) decremented for task %p\n",
846 if (resumed_task == NULL) {
851 thread->th.th_current_task = resumed_task;
853 KA_TRACE(10, (
"__kmp_task_finish(exit): T#%d partially done task %p, "
854 "resuming task %p\n",
855 gtid, taskdata, resumed_task));
866 if (resumed_task == NULL) {
884 destr_thunk(gtid,
task);
891 bool completed =
true;
908 __ompt_task_finish(
task, resumed_task, ompt_task_detach);
928 __ompt_task_finish(
task, resumed_task, ompt_task_switch);
939#if OMP_TASKGRAPH_EXPERIMENTAL
946 __ompt_task_finish(
task, resumed_task, ompt_task_complete);
958#if OMP_TASKGRAPH_EXPERIMENTAL
986 20, (
"__kmp_task_finish: T#%d finished task %p, %d incomplete children\n",
987 gtid, taskdata, children));
993 thread->th.th_current_task = resumed_task;
1001#if OMP_TASKGRAPH_EXPERIMENTAL
1015 10, (
"__kmp_task_finish(exit): T#%d finished task %p, resuming task %p\n",
1016 gtid, taskdata, resumed_task));
1025 KA_TRACE(10, (
"__kmpc_omp_task_complete_if0(enter): T#%d loc=%p task=%p\n",
1031 KA_TRACE(10, (
"__kmpc_omp_task_complete_if0(exit): T#%d loc=%p task=%p\n",
1036 ompt_frame_t *ompt_frame;
1038 ompt_frame->enter_frame = ompt_data_none;
1063 __kmpc_omp_task_complete_if0_ompt(loc_ref, gtid,
task);
1075 KA_TRACE(10, (
"__kmpc_omp_task_complete(enter): T#%d loc=%p task=%p\n", gtid,
1081 KA_TRACE(10, (
"__kmpc_omp_task_complete(exit): T#%d loc=%p task=%p\n", gtid,
1099 kmp_team_t *team,
int tid,
int set_curr_task) {
1104 (
"__kmp_init_implicit_task(enter): T#:%d team=%p task=%p, reinit=%s\n",
1105 tid, team,
task, set_curr_task ?
"TRUE" :
"FALSE"));
1108 task->td_team = team;
1111 task->td_ident = loc_ref;
1112 task->td_taskwait_ident = NULL;
1113 task->td_taskwait_counter = 0;
1114 task->td_taskwait_thread = 0;
1121 task->td_flags.task_serial = 1;
1123 task->td_flags.team_serial = (team->
t.t_serialized) ? 1 : 0;
1125 task->td_flags.started = 1;
1126 task->td_flags.executing = 1;
1127 task->td_flags.complete = 0;
1128 task->td_flags.freed = 0;
1129#if OMP_TASKGRAPH_EXPERIMENTAL
1130 task->td_flags.onced = 0;
1133 task->td_depnode = NULL;
1137 if (set_curr_task) {
1141 task->td_taskgroup = NULL;
1142 task->td_dephash = NULL;
1151 __ompt_task_init(
task, tid);
1154 KF_TRACE(10, (
"__kmp_init_implicit_task(exit): T#:%d team=%p task=%p\n", tid,
1165#if ENABLE_LIBOMPTARGET
1168 if (
UNLIKELY(kmp_target_sync_cb != NULL))
1169 (*kmp_target_sync_cb)(NULL, thread->th.th_info.ds.ds_gtid,
1172 if (
task->td_dephash) {
1174 task->td_flags.complete = 1;
1175#if OMP_TASKGRAPH_EXPERIMENTAL
1176 task->td_flags.onced = 1;
1180 if (children == 0 && flags_old.
complete == 1) {
1186 KA_TRACE(100, (
"__kmp_finish_implicit_task: T#%d cleans "
1187 "dephash of implicit task %p\n",
1188 thread->th.th_info.ds.ds_gtid,
task));
1203 task->td_dephash = NULL;
1233 size_t sizeof_kmp_task_t,
size_t sizeof_shareds,
1240 size_t shareds_offset;
1255 KA_TRACE(10, (
"__kmp_task_alloc(enter): T#%d loc=%p, flags=(0x%x) "
1256 "sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
1257 gtid, loc_ref, *((
kmp_int32 *)flags), sizeof_kmp_task_t,
1271 KMP_CHECK_UPDATE(thread->th.th_task_team->tt.tt_untied_task_encountered, 1);
1285 if ((thread->th.th_task_team) == NULL) {
1290 (
"T#%d creating task team in __kmp_task_alloc for proxy task\n",
1293 thread->th.th_task_team = team->
t.t_task_team[thread->th.th_task_state];
1301 (
"T#%d enabling tasking in __kmp_task_alloc for proxy task\n", gtid));
1303 kmp_int32 tid = thread->th.th_info.ds.ds_tid;
1306 if (thread_data->td.td_deque == NULL) {
1325 KA_TRACE(30, (
"__kmp_task_alloc: T#%d First malloc size: %ld\n", gtid,
1327 KA_TRACE(30, (
"__kmp_task_alloc: T#%d Second malloc size: %ld\n", gtid,
1332 taskdata = (
kmp_taskdata_t *)__kmp_fast_allocate(thread, shareds_offset +
1342#if KMP_ARCH_X86 || KMP_ARCH_PPC64 || KMP_ARCH_S390X || !KMP_HAVE_QUAD
1349 if (sizeof_shareds > 0) {
1351 task->
shareds = &((
char *)taskdata)[shareds_offset];
1362 taskdata->
td_team = thread->th.th_team;
1384 taskdata->
td_team = shadow_thread->th.th_team;
1385 taskdata->
td_task_team = shadow_thread->th.th_task_team;
1406#if OMP_TASKGRAPH_EXPERIMENTAL
1408 taskdata->is_taskgraph = 0;
1409 taskdata->tdg =
nullptr;
1426 __ompt_task_init(taskdata, gtid);
1446#if OMP_TASKGRAPH_EXPERIMENTAL
1447 kmp_tdg_info_t *tdg = __kmp_find_tdg(__kmp_curr_tdg_idx);
1448 if (tdg && __kmp_tdg_is_recording(tdg->tdg_status) &&
1450 taskdata->is_taskgraph = 1;
1451 taskdata->tdg = __kmp_global_tdgs[__kmp_curr_tdg_idx];
1456 KA_TRACE(20, (
"__kmp_task_alloc(exit): T#%d created task %p parent=%p\n",
1463 kmp_int32 flags,
size_t sizeof_kmp_task_t,
1464 size_t sizeof_shareds,
1471 KA_TRACE(10, (
"__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s %s %s) "
1472 "sizeof_task=%ld sizeof_shared=%ld entry=%p\n",
1473 gtid, loc_ref, input_flags->
tiedness ?
"tied " :
"untied",
1474 input_flags->
proxy ?
"proxy" :
"",
1475 input_flags->
detachable ?
"detachable" :
"", sizeof_kmp_task_t,
1481 KA_TRACE(20, (
"__kmpc_omp_task_alloc(exit): T#%d retval %p\n", gtid, retval));
1488 size_t sizeof_kmp_task_t,
1489 size_t sizeof_shareds,
1495 input_flags.target = 1;
1498 input_flags.hidden_helper =
TRUE;
1525 KA_TRACE(30, (
"__kmpc_omp_reg_task_with_affinity: T#%d aff[%d] "
1526 "base_addr=0x%llx len=%zu flags={%d,%d,%d}\n",
1527 gtid,
i, (
unsigned long long)affin_list[
i].base_addr,
1528 affin_list[
i].len, (
int)affin_list[
i].flags.
flag1,
1551 30, (
"__kmp_invoke_task(enter): T#%d invoking task %p, current_task=%p\n",
1552 gtid, taskdata, current_task));
1560 (
"__kmp_invoke_task: T#%d running bottom finish for proxy task %p\n",
1565 KA_TRACE(30, (
"__kmp_invoke_task(exit): T#%d completed bottom finish for "
1566 "proxy task %p, resuming task %p\n",
1567 gtid, taskdata, current_task));
1579 oldInfo = thread->th.ompt_thread_info;
1580 thread->th.ompt_thread_info.
wait_id = 0;
1581 thread->th.ompt_thread_info.state = (thread->th.th_team_serialized)
1582 ? ompt_state_work_serial
1583 : ompt_state_work_parallel;
1604#if OMPT_SUPPORT && OMPT_OPTIONAL
1605 ompt_data_t *task_data;
1610 ((taskgroup && taskgroup->
cancel_request) ? ompt_cancel_taskgroup
1611 : ompt_cancel_parallel) |
1612 ompt_cancel_discarded_task,
1625#if KMP_STATS_ENABLED
1628 case FORK_JOIN_BARRIER:
1652 __ompt_task_start(
task, current_task, gtid);
1654#if OMPT_SUPPORT && OMPT_OPTIONAL
1656 taskdata->ompt_task_info.dispatch_chunk.iterations > 0)) {
1657 ompt_data_t
instance = ompt_data_none;
1658 instance.ptr = &(taskdata->ompt_task_info.dispatch_chunk);
1661 &(team_info->
parallel_data), &(taskdata->ompt_task_info.task_data),
1662 ompt_dispatch_taskloop_chunk,
instance);
1663 taskdata->ompt_task_info.dispatch_chunk = {0, 0};
1668 if (ompd_state & OMPD_ENABLE_BP)
1669 ompd_bp_task_begin();
1672#if USE_ITT_BUILD && USE_ITT_NOTIFY
1677 if (kmp_itt_count_task) {
1680 if (thread->th.th_bar_arrive_time)
1681 cur_time = __itt_get_timestamp();
1683 kmp_itt_count_task = 0;
1688#if ENABLE_LIBOMPTARGET
1698#ifdef KMP_GOMP_COMPAT
1709#if USE_ITT_BUILD && USE_ITT_NOTIFY
1710 if (kmp_itt_count_task) {
1712 thread->th.th_bar_arrive_time += (__itt_get_timestamp() - cur_time);
1720 if (ompd_state & OMPD_ENABLE_BP)
1728 thread->th.ompt_thread_info = oldInfo;
1730 taskdata->ompt_task_info.frame.exit_frame = ompt_data_none;
1739 __ompt_task_finish(
task, current_task, ompt_task_switch);
1745 (
"__kmp_invoke_task(exit): T#%d completed task %p, resuming task %p\n",
1746 gtid, taskdata, current_task));
1764 KA_TRACE(10, (
"__kmpc_omp_task_parts(enter): T#%d loc=%p task=%p\n", gtid,
1765 loc_ref, new_taskdata));
1773 &(
parent->ompt_task_info.task_data), &(
parent->ompt_task_info.frame),
1774 &(new_taskdata->ompt_task_info.task_data),
1793 (
"__kmpc_omp_task_parts(exit): T#%d returning TASK_CURRENT_NOT_QUEUED: "
1794 "loc=%p task=%p, return: TASK_CURRENT_NOT_QUEUED\n",
1795 gtid, loc_ref, new_taskdata));
1799 parent->ompt_task_info.frame.enter_frame = ompt_data_none;
1818 bool serialize_immediate) {
1821#if OMP_TASKGRAPH_EXPERIMENTAL
1822 if (new_taskdata->is_taskgraph &&
1823 __kmp_tdg_is_recording(new_taskdata->tdg->tdg_status)) {
1824 kmp_tdg_info_t *tdg = new_taskdata->tdg;
1826 if (new_taskdata->td_tdg_task_id >= new_taskdata->tdg->map_size) {
1830 if (new_taskdata->td_tdg_task_id >= tdg->map_size) {
1833 kmp_node_info_t *old_record = tdg->record_map;
1835 new_size *
sizeof(kmp_node_info_t));
1837 KMP_MEMCPY(new_record, old_record, old_size *
sizeof(kmp_node_info_t));
1838 tdg->record_map = new_record;
1844 __kmp_successors_size *
sizeof(
kmp_int32));
1845 new_record[
i].task =
nullptr;
1846 new_record[
i].successors = successorsList;
1847 new_record[
i].nsuccessors = 0;
1848 new_record[
i].npredecessors = 0;
1849 new_record[
i].successors_size = __kmp_successors_size;
1859 if (tdg->record_map[new_taskdata->td_tdg_task_id].task ==
nullptr) {
1860 tdg->record_map[new_taskdata->td_tdg_task_id].task = new_task;
1861 tdg->record_map[new_taskdata->td_tdg_task_id].parent_task =
1874 if (serialize_immediate)
1881 kmp_int32 nthreads = this_thr->th.th_team_nproc;
1882 for (
int i = 0;
i < nthreads; ++
i) {
1884 if (thread == this_thr)
1886 if (thread->th.th_sleep_loc != NULL) {
1912#if KMP_DEBUG || OMPT_SUPPORT
1915 KA_TRACE(10, (
"__kmpc_omp_task(enter): T#%d loc=%p task=%p\n", gtid, loc_ref,
1923 OMPT_STORE_RETURN_ADDRESS(gtid);
1925 if (!
parent->ompt_task_info.frame.enter_frame.ptr) {
1926 parent->ompt_task_info.frame.enter_frame.ptr =
1931 &(
parent->ompt_task_info.task_data),
1932 &(
parent->ompt_task_info.frame),
1933 &(new_taskdata->ompt_task_info.task_data),
1935 OMPT_LOAD_RETURN_ADDRESS(gtid));
1940 __ompt_task_finish(new_task,
1941 new_taskdata->ompt_task_info.scheduling_parent,
1943 new_taskdata->ompt_task_info.frame.exit_frame = ompt_data_none;
1950 KA_TRACE(10, (
"__kmpc_omp_task(exit): T#%d returning "
1951 "TASK_CURRENT_NOT_QUEUED: loc=%p task=%p\n",
1952 gtid, loc_ref, new_taskdata));
1955 parent->ompt_task_info.frame.enter_frame = ompt_data_none;
1979#if KMP_DEBUG || OMPT_SUPPORT
1982 KA_TRACE(10, (
"__kmpc_omp_task(enter): T#%d loc=%p task=%p\n", gtid, loc_ref,
1989 if (!
parent->ompt_task_info.frame.enter_frame.ptr)
1993 &(
parent->ompt_task_info.task_data), &(
parent->ompt_task_info.frame),
1994 &(new_taskdata->ompt_task_info.task_data),
2002 KA_TRACE(10, (
"__kmpc_omp_task(exit): T#%d returning "
2003 "TASK_CURRENT_NOT_QUEUED: loc=%p task=%p\n",
2004 gtid, loc_ref, new_taskdata));
2007 parent->ompt_task_info.frame.enter_frame = ompt_data_none;
2015 void *frame_address,
2016 void *return_address) {
2019 int thread_finished =
FALSE;
2022 KA_TRACE(10, (
"__kmpc_omp_taskwait(enter): T#%d loc=%p\n", gtid, loc_ref));
2027 taskdata = thread->th.th_current_task;
2029#if OMPT_SUPPORT && OMPT_OPTIONAL
2030 ompt_data_t *my_task_data;
2031 ompt_data_t *my_parallel_data;
2034 my_task_data = &(taskdata->ompt_task_info.task_data);
2035 my_parallel_data = OMPT_CUR_TEAM_DATA(thread);
2037 taskdata->ompt_task_info.frame.enter_frame.ptr = frame_address;
2041 ompt_sync_region_taskwait, ompt_scope_begin, my_parallel_data,
2042 my_task_data, return_address);
2047 ompt_sync_region_taskwait, ompt_scope_begin, my_parallel_data,
2048 my_task_data, return_address);
2053#if ENABLE_LIBOMPTARGET
2071 void *itt_sync_obj = NULL;
2073 KMP_ITT_TASKWAIT_STARTING(itt_sync_obj);
2080 must_wait = must_wait || (thread->th.th_task_team != NULL &&
2081 thread->th.th_task_team->tt.tt_found_proxy_tasks);
2086 thread->th.th_task_team->tt.tt_hidden_helper_task_encountered);
2090 RCAST(std::atomic<kmp_uint32> *,
2100 KMP_ITT_TASKWAIT_FINISHED(itt_sync_obj);
2108#if OMPT_SUPPORT && OMPT_OPTIONAL
2112 ompt_sync_region_taskwait, ompt_scope_end, my_parallel_data,
2113 my_task_data, return_address);
2117 ompt_sync_region_taskwait, ompt_scope_end, my_parallel_data,
2118 my_task_data, return_address);
2120 taskdata->ompt_task_info.frame.enter_frame = ompt_data_none;
2125 KA_TRACE(10, (
"__kmpc_omp_taskwait(exit): T#%d task %p finished waiting, "
2126 "returning TASK_CURRENT_NOT_QUEUED\n",
2132#if OMPT_SUPPORT && OMPT_OPTIONAL
2135 void *frame_address,
2136 void *return_address) {
2145#if OMPT_SUPPORT && OMPT_OPTIONAL
2147 OMPT_STORE_RETURN_ADDRESS(gtid);
2149 OMPT_LOAD_RETURN_ADDRESS(gtid));
2159 int thread_finished =
FALSE;
2164 KA_TRACE(10, (
"__kmpc_omp_taskyield(enter): T#%d loc=%p end_part = %d\n",
2165 gtid, loc_ref, end_part));
2170 taskdata = thread->th.th_current_task;
2182 void *itt_sync_obj = NULL;
2184 KMP_ITT_TASKWAIT_STARTING(itt_sync_obj);
2189 if (task_team != NULL) {
2193 thread->th.ompt_thread_info.ompt_task_yielded = 1;
2201 thread->th.ompt_thread_info.ompt_task_yielded = 0;
2207 KMP_ITT_TASKWAIT_FINISHED(itt_sync_obj);
2215 KA_TRACE(10, (
"__kmpc_omp_taskyield(exit): T#%d task %p resuming, "
2216 "returning TASK_CURRENT_NOT_QUEUED\n",
2320template <
typename T>
2333 KA_TRACE(10, (
"__kmpc_task_reduction_init: T#%d, tg %p, exiting nth=1\n",
2337 KA_TRACE(10, (
"__kmpc_task_reduction_init: T#%d, taskgroup %p, #items %d\n",
2341 for (
int i = 0;
i < num; ++
i) {
2346 arr[
i].reduce_shar =
data[
i].reduce_shar;
2349 arr[
i].reduce_comb =
data[
i].reduce_comb;
2350 arr[
i].reduce_init =
data[
i].reduce_init;
2351 arr[
i].reduce_fini =
data[
i].reduce_fini;
2353 if (!
arr[
i].flags.lazy_priv) {
2356 arr[
i].reduce_pend = (
char *)(
arr[
i].reduce_priv) + nth *
size;
2357 if (
arr[
i].reduce_init != NULL) {
2359 for (
size_t j = 0;
j < nth; ++
j) {
2390#if OMP_TASKGRAPH_EXPERIMENTAL
2391 kmp_tdg_info_t *tdg = __kmp_find_tdg(__kmp_curr_tdg_idx);
2392 if (tdg && __kmp_tdg_is_recording(tdg->tdg_status)) {
2393 kmp_tdg_info_t *this_tdg = __kmp_global_tdgs[__kmp_curr_tdg_idx];
2394 this_tdg->rec_taskred_data =
2396 this_tdg->rec_num_taskred = num;
2417#if OMP_TASKGRAPH_EXPERIMENTAL
2418 kmp_tdg_info_t *tdg = __kmp_find_tdg(__kmp_curr_tdg_idx);
2419 if (tdg && __kmp_tdg_is_recording(tdg->tdg_status)) {
2420 kmp_tdg_info_t *this_tdg = __kmp_global_tdgs[__kmp_curr_tdg_idx];
2421 this_tdg->rec_taskred_data =
2423 this_tdg->rec_num_taskred = num;
2432template <
typename T>
2436 KA_TRACE(20, (
"__kmp_task_reduction_init_copy: Th %p, init taskgroup %p,"
2438 thr, tg, reduce_data));
2443 for (
int i = 0;
i < num; ++
i) {
2444 arr[
i].reduce_shar =
data[
i].reduce_shar;
2462 kmp_int32 nth = thread->th.th_team_nproc;
2468 tg = thread->th.th_current_task->td_taskgroup;
2472 kmp_int32 tid = thread->th.th_info.ds.ds_tid;
2474#if OMP_TASKGRAPH_EXPERIMENTAL
2475 if ((thread->th.th_current_task->is_taskgraph) &&
2476 (!__kmp_tdg_is_recording(
2477 __kmp_global_tdgs[__kmp_curr_tdg_idx]->tdg_status))) {
2478 tg = thread->th.th_current_task->td_taskgroup;
2487 while (tg != NULL) {
2490 for (
int i = 0;
i < num; ++
i) {
2491 if (!
arr[
i].flags.lazy_priv) {
2494 return (
char *)(
arr[
i].reduce_priv) + tid *
arr[
i].reduce_size;
2497 void **p_priv = (
void **)(
arr[
i].reduce_priv);
2501 for (
int j = 0;
j < nth; ++
j)
2502 if (
data == p_priv[
j])
2506 if (p_priv[tid] == NULL) {
2509 if (
arr[
i].reduce_init != NULL) {
2510 if (
arr[
i].reduce_orig != NULL) {
2511 ((
void (*)(
void *,
void *))
arr[
i].reduce_init)(
2512 p_priv[tid],
arr[
i].reduce_orig);
2514 ((
void (*)(
void *))
arr[
i].reduce_init)(p_priv[tid]);
2538 for (
int i = 0;
i < num; ++
i) {
2539 void *sh_data =
arr[
i].reduce_shar;
2540 void (*f_fini)(
void *) = (
void (*)(
void *))(
arr[
i].reduce_fini);
2541 void (*f_comb)(
void *,
void *) =
2542 (
void (*)(
void *,
void *))(
arr[
i].reduce_comb);
2543 if (!
arr[
i].flags.lazy_priv) {
2544 void *pr_data =
arr[
i].reduce_priv;
2546 for (
int j = 0;
j < nth; ++
j) {
2547 void *priv_data = (
char *)pr_data +
j *
size;
2548 f_comb(sh_data, priv_data);
2553 void **pr_data = (
void **)(
arr[
i].reduce_priv);
2554 for (
int j = 0;
j < nth; ++
j) {
2555 if (pr_data[
j] != NULL) {
2556 f_comb(sh_data, pr_data[
j]);
2579template <
typename T>
2588 (
"__kmpc_reduction_modifier_init: T#%d, tg %p, exiting nth=1\n",
2589 gtid, thr->th.th_current_task->td_taskgroup));
2590 return (
void *)thr->th.th_current_task->td_taskgroup;
2596 if (reduce_data == NULL &&
2616 tg = thr->th.th_current_task->td_taskgroup;
2639 int num,
void *
data) {
2683 KA_TRACE(10, (
"__kmpc_taskgroup: T#%d loc=%p group=%p\n", gtid,
loc, tg_new));
2692#if OMPT_SUPPORT && OMPT_OPTIONAL
2694 void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
2698 ompt_data_t my_task_data = taskdata->ompt_task_info.task_data;
2700 ompt_data_t my_parallel_data = team->
t.ompt_team_info.parallel_data;
2703 ompt_sync_region_taskgroup, ompt_scope_begin, &(my_parallel_data),
2704 &(my_task_data), codeptr);
2716 int thread_finished =
FALSE;
2718#if OMPT_SUPPORT && OMPT_OPTIONAL
2720 ompt_data_t my_task_data;
2721 ompt_data_t my_parallel_data;
2722 void *codeptr =
nullptr;
2724 team = thread->th.th_team;
2725 my_task_data = taskdata->ompt_task_info.task_data;
2727 my_parallel_data = team->
t.ompt_team_info.parallel_data;
2728 codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
2734 KA_TRACE(10, (
"__kmpc_end_taskgroup(enter): T#%d loc=%p\n", gtid,
loc));
2746 void *itt_sync_obj = NULL;
2748 KMP_ITT_TASKWAIT_STARTING(itt_sync_obj);
2752#if OMPT_SUPPORT && OMPT_OPTIONAL
2755 ompt_sync_region_taskgroup, ompt_scope_begin, &(my_parallel_data),
2756 &(my_task_data), codeptr);
2760#if ENABLE_LIBOMPTARGET
2768 (thread->th.th_task_team != NULL &&
2769 (thread->th.th_task_team->tt.tt_found_proxy_tasks ||
2770 thread->th.th_task_team->tt.tt_hidden_helper_task_encountered))) {
2772 RCAST(std::atomic<kmp_uint32> *, &(taskgroup->
count)), 0U);
2781#if OMPT_SUPPORT && OMPT_OPTIONAL
2784 ompt_sync_region_taskgroup, ompt_scope_end, &(my_parallel_data),
2785 &(my_task_data), codeptr);
2790 KMP_ITT_TASKWAIT_FINISHED(itt_sync_obj);
2803 void *priv0 =
arr[0].reduce_priv;
2808 if (cnt == thread->th.th_team_nproc - 1) {
2827 if (cnt == thread->th.th_team_nproc - 1) {
2849 KA_TRACE(10, (
"__kmpc_end_taskgroup(exit): T#%d task %p finished waiting\n",
2852#if OMPT_SUPPORT && OMPT_OPTIONAL
2855 ompt_sync_region_taskgroup, ompt_scope_end, &(my_parallel_data),
2856 &(my_task_data), codeptr);
2871 20, (
"__kmp_get_priority_task(exit #1): T#%d No tasks to get\n", gtid));
2880 }
while (ntasks > 0);
2882 KA_TRACE(20, (
"__kmp_get_priority_task(exit #2): T#%d No tasks to get\n",
2891 thread_data = &list->td;
2893 deque_ntasks = thread_data->td.td_deque_ntasks;
2894 if (deque_ntasks == 0) {
2896 KA_TRACE(20, (
"__kmp_get_priority_task: T#%d No tasks to get from %p\n",
2900 }
while (deque_ntasks == 0);
2902 int target = thread_data->td.td_deque_head;
2904 taskdata = thread_data->td.td_deque[
target];
2907 thread_data->td.td_deque_head =
2913 KA_TRACE(20, (
"__kmp_get_priority_task(exit #3): T#%d could not get task "
2914 "from %p: task_team=%p ntasks=%d head=%u tail=%u\n",
2915 gtid, thread_data, task_team, deque_ntasks,
target,
2916 thread_data->td.td_deque_tail));
2923 for (
i = 1;
i < deque_ntasks; ++
i) {
2925 taskdata = thread_data->td.td_deque[
target];
2932 if (taskdata == NULL) {
2936 10, (
"__kmp_get_priority_task(exit #4): T#%d could not get task from "
2937 "%p: task_team=%p ntasks=%d head=%u tail=%u\n",
2938 gtid, thread_data, task_team, deque_ntasks,
2939 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
2944 for (
i =
i + 1;
i < deque_ntasks; ++
i) {
2947 thread_data->td.td_deque[prev] = thread_data->td.td_deque[
target];
2951 thread_data->td.td_deque_tail ==
2953 thread_data->td.td_deque_tail =
target;
2955 thread_data->td.td_deque_ntasks = deque_ntasks - 1;
2976 KA_TRACE(10, (
"__kmp_remove_my_task(enter): T#%d ntasks=%d head=%u tail=%u\n",
2977 gtid, thread_data->td.td_deque_ntasks,
2978 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
2980 if (
TCR_4(thread_data->td.td_deque_ntasks) == 0) {
2982 (
"__kmp_remove_my_task(exit #1): T#%d No tasks to remove: "
2983 "ntasks=%d head=%u tail=%u\n",
2984 gtid, thread_data->td.td_deque_ntasks,
2985 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
2991 if (
TCR_4(thread_data->td.td_deque_ntasks) == 0) {
2994 (
"__kmp_remove_my_task(exit #2): T#%d No tasks to remove: "
2995 "ntasks=%d head=%u tail=%u\n",
2996 gtid, thread_data->td.td_deque_ntasks,
2997 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
3001 tail = (thread_data->td.td_deque_tail - 1) &
3003 taskdata = thread_data->td.td_deque[
tail];
3006 thread->th.th_current_task)) {
3010 (
"__kmp_remove_my_task(exit #3): T#%d TSC blocks tail task: "
3011 "ntasks=%d head=%u tail=%u\n",
3012 gtid, thread_data->td.td_deque_ntasks,
3013 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
3017 thread_data->td.td_deque_tail =
tail;
3018 TCW_4(thread_data->td.td_deque_ntasks, thread_data->td.td_deque_ntasks - 1);
3022 KA_TRACE(10, (
"__kmp_remove_my_task(exit #4): T#%d task %p removed: "
3023 "ntasks=%d head=%u tail=%u\n",
3024 gtid, taskdata, thread_data->td.td_deque_ntasks,
3025 thread_data->td.td_deque_head, thread_data->td.td_deque_tail));
3036 std::atomic<kmp_int32> *unfinished_threads,
3037 int *thread_finished,
3053 victim_td = &threads_data[victim_tid];
3054 victim_thr = victim_td->td.td_thr;
3057 KA_TRACE(10, (
"__kmp_steal_task(enter): T#%d try to steal from T#%d: "
3058 "task_team=%p ntasks=%d head=%u tail=%u\n",
3060 victim_td->td.td_deque_ntasks, victim_td->td.td_deque_head,
3061 victim_td->td.td_deque_tail));
3063 if (
TCR_4(victim_td->td.td_deque_ntasks) == 0) {
3064 KA_TRACE(10, (
"__kmp_steal_task(exit #1): T#%d could not steal from T#%d: "
3065 "task_team=%p ntasks=%d head=%u tail=%u\n",
3067 victim_td->td.td_deque_ntasks, victim_td->td.td_deque_head,
3068 victim_td->td.td_deque_tail));
3074 int ntasks =
TCR_4(victim_td->td.td_deque_ntasks);
3078 KA_TRACE(10, (
"__kmp_steal_task(exit #2): T#%d could not steal from T#%d: "
3079 "task_team=%p ntasks=%d head=%u tail=%u\n",
3081 victim_td->td.td_deque_head, victim_td->td.td_deque_tail));
3087 taskdata = victim_td->td.td_deque[victim_td->td.td_deque_head];
3090 victim_td->td.td_deque_head =
3096 KA_TRACE(10, (
"__kmp_steal_task(exit #3): T#%d could not steal from "
3097 "T#%d: task_team=%p ntasks=%d head=%u tail=%u\n",
3099 victim_td->td.td_deque_head, victim_td->td.td_deque_tail));
3104 target = victim_td->td.td_deque_head;
3106 for (
i = 1;
i < ntasks; ++
i) {
3108 taskdata = victim_td->td.td_deque[
target];
3115 if (taskdata == NULL) {
3118 KA_TRACE(10, (
"__kmp_steal_task(exit #4): T#%d could not steal from "
3119 "T#%d: task_team=%p ntasks=%d head=%u tail=%u\n",
3121 victim_td->td.td_deque_head, victim_td->td.td_deque_tail));
3125 for (
i =
i + 1;
i < ntasks; ++
i) {
3128 victim_td->td.td_deque[prev] = victim_td->td.td_deque[
target];
3132 victim_td->td.td_deque_tail ==
3134 victim_td->td.td_deque_tail =
target;
3136 if (*thread_finished) {
3146 (
"__kmp_steal_task: T#%d inc unfinished_threads to %d: task_team=%p\n",
3147 gtid,
count + 1, task_team));
3148 *thread_finished =
FALSE;
3150 TCW_4(victim_td->td.td_deque_ntasks, ntasks - 1);
3156 (
"__kmp_steal_task(exit #5): T#%d stole task %p from T#%d: "
3157 "task_team=%p ntasks=%d head=%u tail=%u\n",
3159 ntasks, victim_td->td.td_deque_head, victim_td->td.td_deque_tail));
3184 std::atomic<kmp_int32> *unfinished_threads;
3185 kmp_int32 nthreads, victim_tid = -2, use_own_tasks = 1, new_victim = 0,
3186 tid = thread->th.th_info.ds.ds_tid;
3191 if (task_team == NULL || current_task == NULL)
3194 KA_TRACE(15, (
"__kmp_execute_tasks_template(enter): T#%d final_spin=%d "
3195 "*thread_finished=%d\n",
3196 gtid, final_spin, *thread_finished));
3210#if ENABLE_LIBOMPTARGET
3221 if (
task == NULL && use_own_tasks) {
3224 if ((
task == NULL) && (nthreads > 1)) {
3228 if (victim_tid == -2) {
3229 victim_tid = threads_data[tid].td.td_deque_last_stolen;
3232 other_thread = threads_data[victim_tid].td.td_thr;
3234 if (victim_tid != -1) {
3236 }
else if (!new_victim) {
3243 if (victim_tid >= tid) {
3247 other_thread = threads_data[victim_tid].td.td_thr;
3259 (
TCR_PTR(
CCAST(
void *, other_thread->th.th_sleep_loc)) !=
3277 thread_finished, is_constrained);
3280 if (threads_data[tid].td.td_deque_last_stolen != victim_tid) {
3281 threads_data[tid].td.td_deque_last_stolen = victim_tid;
3297#if USE_ITT_BUILD && USE_ITT_NOTIFY
3298 if (__itt_sync_create_ptr || KMP_ITT_DEBUG) {
3299 if (itt_sync_obj == NULL) {
3303 __kmp_itt_task_starting(itt_sync_obj);
3308 if (itt_sync_obj != NULL)
3309 __kmp_itt_task_finished(itt_sync_obj);
3316 if (
flag == NULL || (!final_spin &&
flag->done_check())) {
3319 (
"__kmp_execute_tasks_template: T#%d spin condition satisfied\n",
3323 if (thread->th.th_task_team == NULL) {
3329 if (!use_own_tasks &&
TCR_4(threads_data[tid].td.td_deque_ntasks) != 0) {
3330 KA_TRACE(20, (
"__kmp_execute_tasks_template: T#%d stolen task spawned "
3331 "other tasks, restart\n",
3346 if (!*thread_finished) {
3351 KA_TRACE(20, (
"__kmp_execute_tasks_template: T#%d dec "
3352 "unfinished_threads to %d task_team=%p\n",
3353 gtid,
count, task_team));
3354 *thread_finished =
TRUE;
3362 if (
flag != NULL &&
flag->done_check()) {
3365 (
"__kmp_execute_tasks_template: T#%d spin condition satisfied\n",
3373 if (thread->th.th_task_team == NULL) {
3375 (
"__kmp_execute_tasks_template: T#%d no more tasks\n", gtid));
3384 if (
flag == NULL || (!final_spin &&
flag->done_check())) {
3386 (
"__kmp_execute_tasks_template: T#%d spin condition satisfied\n",
3393 if (nthreads == 1 &&
3398 (
"__kmp_execute_tasks_template: T#%d can't find work\n", gtid));
3404template <
bool C,
bool S>
3410 thread, gtid,
flag, final_spin,
3414template <
bool C,
bool S>
3420 thread, gtid,
flag, final_spin,
3424template <
bool C,
bool S>
3430 thread, gtid,
flag, final_spin,
3439 thread, gtid,
flag, final_spin,
3474 int nthreads,
i, is_init_thread;
3476 KA_TRACE(10, (
"__kmp_enable_tasking(enter): T#%d\n",
3489 if (!is_init_thread) {
3493 (
"__kmp_enable_tasking(exit): T#%d: threads array already set up.\n",
3505 for (
i = 0;
i < nthreads;
i++) {
3509 if (
i == this_thr->th.th_info.ds.ds_tid) {
3518 if ((sleep_loc =
TCR_PTR(
CCAST(
void *, thread->th.th_sleep_loc))) !=
3520 KF_TRACE(50, (
"__kmp_enable_tasking: T#%d waking up thread T#%d\n",
3525 KF_TRACE(50, (
"__kmp_enable_tasking: T#%d don't wake up thread T#%d\n",
3532 KA_TRACE(10, (
"__kmp_enable_tasking(exit): T#%d\n",
3583 thread_data->td.td_deque_last_stolen = -1;
3591 (
"__kmp_alloc_task_deque: T#%d allocating deque[%d] for thread_data %p\n",
3605 if (thread_data->td.td_deque != NULL) {
3607 TCW_4(thread_data->td.td_deque_ntasks, 0);
3609 thread_data->td.td_deque = NULL;
3625 int is_init_thread =
FALSE;
3646 is_init_thread =
TRUE;
3647 if (maxthreads < nthreads) {
3649 if (*threads_data_p != NULL) {
3655 (
"__kmp_realloc_task_threads_data: T#%d reallocating "
3656 "threads data for task_team %p, new_size = %d, old_size = %d\n",
3669 (*threads_data_p) = new_data;
3672 KE_TRACE(10, (
"__kmp_realloc_task_threads_data: T#%d allocating "
3673 "threads data for task_team %p, size = %d\n",
3688 for (
i = 0;
i < nthreads;
i++) {
3690 thread_data->td.td_thr = team->
t.t_threads[
i];
3692 if (thread_data->td.td_deque_last_stolen >= nthreads) {
3696 thread_data->td.td_deque_last_stolen = -1;
3705 return is_init_thread;
3731 while (list != NULL) {
3744 int team_nth = team->
t.t_nproc;
3764 KA_TRACE(20, (
"__kmp_allocate_task_team: T#%d entering; team = %p\n",
3778 if (task_team == NULL) {
3779 KE_TRACE(10, (
"__kmp_allocate_task_team: T#%d allocating "
3780 "task team for team %p\n",
3787#if USE_ITT_BUILD && USE_ITT_NOTIFY && KMP_DEBUG
3790 __itt_suppress_mark_range(
3791 __itt_suppress_range, __itt_suppress_threading_errors,
3793 __itt_suppress_mark_range(__itt_suppress_range,
3794 __itt_suppress_threading_errors,
3806 KA_TRACE(20, (
"__kmp_allocate_task_team: T#%d exiting; task_team = %p "
3807 "unfinished_threads init'd to %d\n",
3817 KA_TRACE(20, (
"__kmp_free_task_team: T#%d task_team = %p\n",
3870 thread->th.th_task_team = current->
task_team = NULL;
3871 current->
next = node;
3888 thread->th.th_task_team = current->
task_team;
3911 thread = thread->th.th_next_pool) {
3915 if (
TCR_PTR(thread->th.th_task_team) == NULL) {
3916 KA_TRACE(10, (
"__kmp_wait_to_unref_task_team: T#%d task_team == NULL\n",
3923 thread->th.th_task_team = NULL;
3930 KA_TRACE(10, (
"__kmp_wait_to_unref_task_team: Waiting for T#%d to "
3931 "unreference task_team\n",
3937 if ((sleep_loc =
TCR_PTR(
CCAST(
void *, thread->th.th_sleep_loc))) !=
3941 (
"__kmp_wait_to_unref_task_team: T#%d waking up thread T#%d\n",
3964 if (team == this_thr->th.th_serial_team ||
3965 team == this_thr->th.th_root->r.r_root_team) {
3967 if (team->
t.t_task_team[0] == NULL) {
3970 20, (
"__kmp_task_team_setup: Primary T#%d created new task_team %p"
3971 " for serial/root team %p\n",
3983 if (team->
t.t_task_team[this_thr->th.th_task_state] == NULL) {
3984 team->
t.t_task_team[this_thr->th.th_task_state] =
3986 KA_TRACE(20, (
"__kmp_task_team_setup: Primary T#%d created new task_team %p"
3987 " for team %d at parity=%d\n",
3989 team->
t.t_task_team[this_thr->th.th_task_state], team->
t.t_id,
3990 this_thr->th.th_task_state));
3999 int other_team = 1 - this_thr->th.th_task_state;
4001 if (team->
t.t_task_team[other_team] == NULL) {
4003 KA_TRACE(20, (
"__kmp_task_team_setup: Primary T#%d created second new "
4004 "task_team %p for team %d at parity=%d\n",
4006 team->
t.t_task_team[other_team], team->
t.t_id, other_team));
4013 KA_TRACE(20, (
"__kmp_task_team_setup: Primary T#%d reset next task_team "
4014 "%p for team %d at parity=%d\n",
4016 team->
t.t_task_team[other_team], team->
t.t_id, other_team));
4024 for (
int i = 0;
i < 2; ++
i) {
4032 if (thread_data->td.td_deque == NULL) {
4050 this_thr->th.th_task_state = (
kmp_uint8)(1 - this_thr->th.th_task_state);
4054 TCW_PTR(this_thr->th.th_task_team,
4055 team->
t.t_task_team[this_thr->th.th_task_state]);
4057 (
"__kmp_task_team_sync: Thread T#%d task team switched to task_team "
4058 "%p from Team #%d (parity=%d)\n",
4060 team->
t.t_id, this_thr->th.th_task_state));
4072 kmp_task_team_t *task_team = team->t.t_task_team[this_thr->th.th_task_state];
4079 KA_TRACE(20, (
"__kmp_task_team_wait: Primary T#%d waiting for all tasks "
4080 "(for unfinished_threads to reach 0) on task_team = %p\n",
4086 RCAST(std::atomic<kmp_uint32> *,
4095 (
"__kmp_task_team_wait: Primary T#%d deactivating task_team %p: "
4096 "setting active to false, setting local and team's pointer to NULL\n",
4104 TCW_PTR(this_thr->th.th_task_team, NULL);
4114 std::atomic<kmp_uint32> *spin =
RCAST(
4115 std::atomic<kmp_uint32> *,
4116 &team->
t.t_task_team[thread->th.th_task_state]->tt.tt_unfinished_threads);
4153 KA_TRACE(20, (
"__kmp_give_task: trying to give task %p to thread %d.\n",
4162 if (thread_data->td.td_deque == NULL) {
4166 (
"__kmp_give_task: thread %d has no queue while giving task %p.\n",
4171 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
4175 (
"__kmp_give_task: queue is full while giving task %p to thread %d.\n",
4184 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
4194 if (
TCR_4(thread_data->td.td_deque_ntasks) >=
4196 KA_TRACE(30, (
"__kmp_give_task: queue is full while giving task %p to "
4203 goto release_and_exit;
4211 thread_data->td.td_deque[thread_data->td.td_deque_tail] = taskdata;
4213 thread_data->td.td_deque_tail =
4214 (thread_data->td.td_deque_tail + 1) &
TASK_DEQUE_MASK(thread_data->td);
4215 TCW_4(thread_data->td.td_deque_ntasks,
4216 TCR_4(thread_data->td.td_deque_ntasks) + 1);
4219 KA_TRACE(30, (
"__kmp_give_task: successfully gave task %p to thread %d.\n",
4228#define PROXY_TASK_FLAG 0x40000000
4252#if OMP_TASKGRAPH_EXPERIMENTAL
4307 10, (
"__kmp_proxy_task_completed(enter): T#%d proxy task %p completing\n",
4317 (
"__kmp_proxy_task_completed(exit): T#%d proxy task %p completing\n",
4339 thread = team->
t.t_threads[k];
4340 k = (k + 1) % nthreads;
4350 for (
int i = 0;
i < nthreads; ++
i) {
4351 thread = team->
t.t_threads[
i];
4352 if (thread->th.th_sleep_loc != NULL) {
4373 (
"__kmp_proxy_task_completed_ooo(enter): proxy task completing ooo %p\n",
4386 (
"__kmp_proxy_task_completed_ooo(exit): proxy task completing ooo %p\n",
4405 bool detached =
false;
4419 __ompt_task_finish(
ptask, NULL, ompt_task_early_fulfill);
4430 __ompt_task_finish(
ptask, NULL, ompt_task_late_fulfill);
4436 if (thread->th.th_team == team) {
4457#
if OMP_TASKGRAPH_EXPERIMENTAL
4466 size_t shareds_offset;
4469 KA_TRACE(10, (
"__kmp_task_dup_alloc(enter): Th %p, source task %p\n", thread,
4477 KA_TRACE(30, (
"__kmp_task_dup_alloc: Th %p, malloc size %ld\n", thread,
4480 taskdata = (
kmp_taskdata_t *)__kmp_fast_allocate(thread, task_size);
4484 KMP_MEMCPY(taskdata, taskdata_src, task_size);
4489#if OMP_TASKGRAPH_EXPERIMENTAL
4490 if (taskdata->is_taskgraph && !taskloop_recur &&
4491 __kmp_tdg_is_recording(taskdata_src->tdg->tdg_status))
4496 shareds_offset = (
char *)task_src->shareds - (
char *)taskdata_src;
4497 task->
shareds = &((
char *)taskdata)[shareds_offset];
4523 (
"__kmp_task_dup_alloc(exit): Th %p, created task %p, parent=%p\n",
4524 thread, taskdata, taskdata->
td_parent));
4527 __ompt_task_init(taskdata, thread->th.th_info.ds.ds_gtid);
4546 size_t lower_offset;
4547 size_t upper_offset;
4552 lower_offset((
char *)lb - (
char *)task),
4553 upper_offset((
char *)ub - (
char *)task) {
4559 lower_offset(bounds.lower_offset), upper_offset(bounds.upper_offset) {}
4564#if defined(KMP_GOMP_COMPAT)
4566 if (!taskdata->td_flags.native) {
4567 retval = *(
kmp_int64 *)((
char *)task + lower_offset);
4570 if (taskdata->td_size_loop_bounds == 4) {
4580 retval = *(
kmp_int64 *)((
char *)task + lower_offset);
4586#if defined(KMP_GOMP_COMPAT)
4588 if (!taskdata->td_flags.native) {
4589 retval = *(
kmp_int64 *)((
char *)task + upper_offset);
4592 if (taskdata->td_size_loop_bounds == 4) {
4601 retval = *(
kmp_int64 *)((
char *)task + upper_offset);
4606#if defined(KMP_GOMP_COMPAT)
4608 if (!taskdata->td_flags.native) {
4609 *(
kmp_uint64 *)((
char *)task + lower_offset) = lb;
4612 if (taskdata->td_size_loop_bounds == 4) {
4621 *(
kmp_uint64 *)((
char *)task + lower_offset) = lb;
4625#if defined(KMP_GOMP_COMPAT)
4627 if (!taskdata->td_flags.native) {
4628 *(
kmp_uint64 *)((
char *)task + upper_offset) = ub;
4631 if (taskdata->td_size_loop_bounds == 4) {
4640 *(
kmp_uint64 *)((
char *)task + upper_offset) = ub;
4684 (last_chunk < 0 ? last_chunk : extras));
4687 KA_TRACE(20, (
"__kmp_taskloop_linear: T#%d: %lld tasks, grainsize %lld, "
4688 "extras %lld, last_chunk %lld, i=%lld,%lld(%d)%lld, dup %p\n",
4689 gtid, num_tasks, grainsize, extras, last_chunk, lower, upper,
4690 ub_glob, st, task_dup));
4693 for (
i = 0;
i < num_tasks; ++
i) {
4696 chunk_minus_1 = grainsize - 1;
4698 chunk_minus_1 = grainsize;
4701 upper = lower + st * chunk_minus_1;
4705 if (
i == num_tasks - 1) {
4709 if (upper == ub_glob)
4711 }
else if (st > 0) {
4722#if OMP_TASKGRAPH_EXPERIMENTAL
4733 next_task_bounds.
set_lb(lower);
4735 next_task_bounds.
set_ub(upper + (st > 0 ? 1 : -1));
4737 next_task_bounds.
set_ub(upper);
4739 if (ptask_dup != NULL)
4741 ptask_dup(next_task,
task, lastpriv);
4743 (
"__kmp_taskloop_linear: T#%d; task #%llu: task %p: lower %lld, "
4744 "upper %lld stride %lld, (offsets %p %p)\n",
4745 gtid,
i, next_task, lower, upper, st,
4753 OMPT_GET_DISPATCH_CHUNK(next_taskdata->ompt_task_info.dispatch_chunk,
4804 void *task_dup =
p->task_dup;
4815 void *codeptr_ra =
p->codeptr_ra;
4821 (
"__kmp_taskloop_task: T#%d, task %p: %lld tasks, grainsize"
4822 " %lld, extras %lld, last_chunk %lld, i=%lld,%lld(%d), dup %p\n",
4823 gtid, taskdata, num_tasks, grainsize, extras, last_chunk, *lb, *ub,
4827 if (num_tasks > num_t_min)
4829 grainsize, extras, last_chunk, tc, num_t_min,
4836 grainsize, extras, last_chunk, tc,
4842 KA_TRACE(40, (
"__kmp_taskloop_task(exit): T#%d\n", gtid));
4878 (
"__kmp_taskloop_recur: T#%d, task %p: %lld tasks, grainsize"
4879 " %lld, extras %lld, last_chunk %lld, i=%lld,%lld(%d), dup %p\n",
4880 gtid, taskdata, num_tasks, grainsize, extras, last_chunk, *lb, *ub,
4887 size_t lower_offset =
4888 (
char *)lb - (
char *)
task;
4889 size_t upper_offset =
4890 (
char *)ub - (
char *)
task;
4893 (last_chunk < 0 ? last_chunk : extras));
4899 kmp_int64 last_chunk0 = 0, last_chunk1 = 0;
4903 if (last_chunk < 0) {
4905 last_chunk1 = last_chunk;
4906 tc0 = grainsize * n_tsk0;
4908 }
else if (n_tsk0 <= extras) {
4911 ext1 = extras - n_tsk0;
4912 tc0 = gr_size0 * n_tsk0;
4917 tc1 = grainsize * n_tsk1;
4920 ub0 = lower + st * (tc0 - 1);
4924#if OMP_TASKGRAPH_EXPERIMENTAL
4931 *(
kmp_uint64 *)((
char *)next_task + lower_offset) = lb1;
4932 if (ptask_dup != NULL)
4933 ptask_dup(next_task,
task, 0);
4939 thread->th.th_current_task = taskdata->
td_parent;
4944 thread->th.th_current_task = current_task;
4946 p->task = next_task;
4947 p->lb = (
kmp_uint64 *)((
char *)next_task + lower_offset);
4948 p->ub = (
kmp_uint64 *)((
char *)next_task + upper_offset);
4949 p->task_dup = task_dup;
4951 p->ub_glob = ub_glob;
4952 p->num_tasks = n_tsk1;
4953 p->grainsize = grainsize;
4955 p->last_chunk = last_chunk1;
4957 p->num_t_min = num_t_min;
4959 p->codeptr_ra = codeptr_ra;
4962#if OMP_TASKGRAPH_EXPERIMENTAL
4964 new_task_data->tdg = taskdata->tdg;
4965 new_task_data->is_taskgraph = 0;
4976 if (n_tsk0 > num_t_min)
4978 ext0, last_chunk0, tc0, num_t_min,
4985 gr_size0, ext0, last_chunk0, tc0,
4991 KA_TRACE(40, (
"__kmp_taskloop_recur(exit): T#%d\n", gtid));
4997 int modifier,
void *task_dup) {
5001#if OMPT_SUPPORT && OMPT_OPTIONAL
5002 OMPT_STORE_RETURN_ADDRESS(gtid);
5007#if OMP_TASKGRAPH_EXPERIMENTAL
5025 KA_TRACE(20, (
"__kmp_taskloop: T#%d, task %p, lb %lld, ub %lld, st %lld, "
5026 "grain %llu(%d, %d), dup %p\n",
5027 gtid, taskdata, lower, upper, st, grainsize,
sched, modifier,
5032 tc = upper - lower + 1;
5033 }
else if (st < 0) {
5034 tc = (lower - upper) / (-st) + 1;
5036 tc = (upper - lower) / st + 1;
5039 KA_TRACE(20, (
"__kmp_taskloop(exit): T#%d zero-trip loop\n", gtid));
5047#if OMPT_SUPPORT && OMPT_OPTIONAL
5052 ompt_work_taskloop, ompt_scope_begin, &(team_info->
parallel_data),
5057 if (num_tasks_min == 0)
5066 grainsize = thread->th.th_team_nproc *
static_cast<kmp_uint64>(10);
5069 if (grainsize > tc) {
5074 num_tasks = grainsize;
5075 grainsize = tc / num_tasks;
5076 extras = tc % num_tasks;
5080 if (grainsize > tc) {
5086 num_tasks = (tc + grainsize - 1) / grainsize;
5087 last_chunk = tc - (num_tasks * grainsize);
5090 num_tasks = tc / grainsize;
5092 grainsize = tc / num_tasks;
5093 extras = tc % num_tasks;
5102 (last_chunk < 0 ? last_chunk : extras));
5114 grainsize, extras, last_chunk, tc,
5121 }
else if (num_tasks > num_tasks_min && !taskdata->
td_flags.
native) {
5122 KA_TRACE(20, (
"__kmp_taskloop: T#%d, go recursive: tc %llu, #tasks %llu"
5123 "(%lld), grain %llu, extras %llu, last_chunk %lld\n",
5124 gtid, tc, num_tasks, num_tasks_min, grainsize, extras,
5127 grainsize, extras, last_chunk, tc, num_tasks_min,
5133 KA_TRACE(20, (
"__kmp_taskloop: T#%d, go linear: tc %llu, #tasks %llu"
5134 "(%lld), grain %llu, extras %llu, last_chunk %lld\n",
5135 gtid, tc, num_tasks, num_tasks_min, grainsize, extras,
5138 grainsize, extras, last_chunk, tc,
5145#if OMPT_SUPPORT && OMPT_OPTIONAL
5148 ompt_work_taskloop, ompt_scope_end, &(team_info->
parallel_data),
5154#if OMPT_SUPPORT && OMPT_OPTIONAL
5155 OMPT_STORE_RETURN_ADDRESS(gtid);
5159 KA_TRACE(20, (
"__kmp_taskloop(exit): T#%d\n", gtid));
5182 KA_TRACE(20, (
"__kmpc_taskloop(enter): T#%d\n", gtid));
5183 __kmp_taskloop(
loc, gtid,
task, if_val, lb, ub, st, nogroup,
sched, grainsize,
5185 KA_TRACE(20, (
"__kmpc_taskloop(exit): T#%d\n", gtid));
5208 int modifier,
void *task_dup) {
5210 KA_TRACE(20, (
"__kmpc_taskloop_5(enter): T#%d\n", gtid));
5211 __kmp_taskloop(
loc, gtid,
task, if_val, lb, ub, st, nogroup,
sched, grainsize,
5212 modifier, task_dup);
5213 KA_TRACE(20, (
"__kmpc_taskloop_5(exit): T#%d\n", gtid));
5258#if OMP_TASKGRAPH_EXPERIMENTAL
5263static kmp_tdg_info_t *__kmp_find_tdg(
kmp_int32 tdg_id) {
5264 kmp_tdg_info_t *
res =
nullptr;
5265 if (__kmp_max_tdgs == 0)
5268 if (__kmp_global_tdgs == NULL)
5270 sizeof(kmp_tdg_info_t *) * __kmp_max_tdgs);
5272 if ((__kmp_global_tdgs[tdg_id]) &&
5273 (__kmp_global_tdgs[tdg_id]->tdg_status != KMP_TDG_NONE))
5274 res = __kmp_global_tdgs[tdg_id];
5281void __kmp_print_tdg_dot(kmp_tdg_info_t *tdg,
kmp_int32 gtid) {
5283 KA_TRACE(10, (
"__kmp_print_tdg_dot(enter): T#%d tdg_id=%d \n", gtid, tdg_id));
5286 sprintf(file_name,
"tdg_%d.dot", tdg_id);
5293 " subgraph cluster {\n"
5297 fprintf(tdg_file,
" %d[style=bold]\n",
i);
5299 fprintf(tdg_file,
" }\n");
5301 kmp_int32 nsuccessors = tdg->record_map[
i].nsuccessors;
5302 kmp_int32 *successors = tdg->record_map[
i].successors;
5303 if (nsuccessors > 0) {
5305 fprintf(tdg_file,
" %d -> %d \n",
i, successors[
j]);
5308 fprintf(tdg_file,
"}");
5309 KA_TRACE(10, (
"__kmp_print_tdg_dot(exit): T#%d tdg_id=%d \n", gtid, tdg_id));
5316void __kmp_exec_tdg(
kmp_int32 gtid, kmp_tdg_info_t *tdg) {
5318 KA_TRACE(10, (
"__kmp_exec_tdg(enter): T#%d tdg_id=%d num_roots=%d\n", gtid,
5319 tdg->tdg_id, tdg->num_roots));
5320 kmp_node_info_t *this_record_map = tdg->record_map;
5321 kmp_int32 *this_root_tasks = tdg->root_tasks;
5322 kmp_int32 this_num_roots = tdg->num_roots;
5328 if (tdg->rec_taskred_data) {
5336 this_record_map[
j].parent_task = parent_task;
5339 this_record_map[
j].parent_task->td_taskgroup;
5342 this_record_map[
j].npredecessors);
5345 if (parent_taskgroup) {
5360 KA_TRACE(10, (
"__kmp_exec_tdg(exit): T#%d tdg_id=%d num_roots=%d\n", gtid,
5361 tdg->tdg_id, tdg->num_roots));
5369static inline void __kmp_start_record(
kmp_int32 gtid,
5370 kmp_taskgraph_flags_t *flags,
5372 kmp_tdg_info_t *tdg =
5374 __kmp_global_tdgs[__kmp_curr_tdg_idx] = tdg;
5376 tdg->tdg_id = tdg_id;
5377 tdg->map_size = INIT_MAPSIZE;
5378 tdg->num_roots = -1;
5379 tdg->root_tasks =
nullptr;
5380 tdg->tdg_status = KMP_TDG_RECORDING;
5381 tdg->rec_num_taskred = 0;
5382 tdg->rec_taskred_data =
nullptr;
5386 kmp_node_info_t *this_record_map =
5387 (kmp_node_info_t *)
__kmp_allocate(INIT_MAPSIZE *
sizeof(kmp_node_info_t));
5391 this_record_map[
i].task =
nullptr;
5392 this_record_map[
i].successors = successorsList;
5393 this_record_map[
i].nsuccessors = 0;
5394 this_record_map[
i].npredecessors = 0;
5395 this_record_map[
i].successors_size = __kmp_successors_size;
5399 __kmp_global_tdgs[__kmp_curr_tdg_idx]->record_map = this_record_map;
5413 kmp_taskgraph_flags_t *flags = (kmp_taskgraph_flags_t *)&input_flags;
5415 (
"__kmpc_start_record_task(enter): T#%d loc=%p flags=%d tdg_id=%d\n",
5416 gtid, loc_ref, input_flags, tdg_id));
5418 if (__kmp_max_tdgs == 0) {
5421 (
"__kmpc_start_record_task(abandon): T#%d loc=%p flags=%d tdg_id = %d, "
5422 "__kmp_max_tdgs = 0\n",
5423 gtid, loc_ref, input_flags, tdg_id));
5428 if (kmp_tdg_info_t *tdg = __kmp_find_tdg(tdg_id)) {
5430 __kmp_exec_tdg(gtid, tdg);
5433 __kmp_curr_tdg_idx = tdg_id;
5435 __kmp_start_record(gtid, flags, tdg_id);
5439 KA_TRACE(10, (
"__kmpc_start_record_task(exit): T#%d TDG %d starts to %s\n",
5440 gtid, tdg_id,
res ?
"record" :
"execute"));
5447void __kmp_end_record(
kmp_int32 gtid, kmp_tdg_info_t *tdg) {
5449 kmp_node_info_t *this_record_map = tdg->record_map;
5453 kmp_int32 this_map_size = tdg->map_size;
5458 if (this_record_map[
i].npredecessors == 0) {
5459 this_root_tasks[this_num_roots++] =
i;
5464 tdg->map_size = this_map_size;
5465 tdg->num_roots = this_num_roots;
5466 tdg->root_tasks = this_root_tasks;
5468 tdg->tdg_status = KMP_TDG_READY;
5470 if (thread->th.th_current_task->td_dephash) {
5472 thread->th.th_current_task->td_dephash = NULL;
5478 this_record_map[
i].npredecessors);
5483 __kmp_print_tdg_dot(tdg, gtid);
5495 kmp_tdg_info_t *tdg = __kmp_find_tdg(tdg_id);
5497 KA_TRACE(10, (
"__kmpc_end_record_task(enter): T#%d loc=%p finishes recording"
5498 " tdg=%d with flags=%d\n",
5499 gtid, loc_ref, tdg_id, input_flags));
5500 if (__kmp_max_tdgs) {
5503 if (__kmp_tdg_is_recording(tdg->tdg_status))
5504 __kmp_end_record(gtid, tdg);
5506 KA_TRACE(10, (
"__kmpc_end_record_task(exit): T#%d loc=%p finished recording"
5507 " tdg=%d, its status is now READY\n",
5508 gtid, loc_ref, tdg_id));
void * target(void *task)
int task_entry(kmp_int32 gtid, kmp_task_t *task)
int execute_tasks(kmp_info_t *this_thr, kmp_int32 gtid, int final_spin, int *thread_finished USE_ITT_BUILD_ARG(void *itt_sync_obj), kmp_int32 is_constrained)
This class safely opens and closes a C-style FILE* object using RAII semantics.
kmp_uint64 get_ub() const
void set_ub(kmp_uint64 ub)
size_t get_lower_offset() const
void set_lb(kmp_uint64 lb)
size_t get_upper_offset() const
kmp_taskloop_bounds_t(kmp_task_t *_task, const kmp_taskloop_bounds_t &bounds)
kmp_taskloop_bounds_t(kmp_task_t *_task, kmp_uint64 *lb, kmp_uint64 *ub)
kmp_uint64 get_lb() const
kmp_int32(* kmp_routine_entry_t)(kmp_int32, void *)
struct kmp_task kmp_task_t
struct kmp_taskred_data kmp_taskred_data_t
Internal struct for reduction data item related info saved by the library.
struct kmp_task_red_input kmp_task_red_input_t
Internal struct for reduction data item related info set up by compiler.
struct kmp_taskred_flags kmp_taskred_flags_t
Flags for special info per task reduction item.
struct kmp_taskred_input kmp_taskred_input_t
Internal struct for reduction data item related info set up by compiler.
void * __kmpc_task_reduction_get_th_data(int gtid, void *tskgrp, void *data)
void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, void *task_dup)
void * __kmpc_task_reduction_modifier_init(ident_t *loc, int gtid, int is_ws, int num, void *data)
void * __kmpc_taskred_modifier_init(ident_t *loc, int gtid, int is_ws, int num, void *data)
bool __kmpc_omp_has_task_team(kmp_int32 gtid)
void __kmpc_proxy_task_completed_ooo(kmp_task_t *ptask)
void __kmpc_task_reduction_modifier_fini(ident_t *loc, int gtid, int is_ws)
kmp_int32 __kmpc_omp_reg_task_with_affinity(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 naffins, kmp_task_affinity_info_t *affin_list)
void __kmpc_taskloop_5(ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, int modifier, void *task_dup)
void * __kmpc_task_reduction_init(int gtid, int num, void *data)
void __kmpc_proxy_task_completed(kmp_int32 gtid, kmp_task_t *ptask)
void * __kmpc_taskred_init(int gtid, int num, void *data)
void ** __kmpc_omp_get_target_async_handle_ptr(kmp_int32 gtid)
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 size_t void * data
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 new_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 * instance
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 count
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 size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d __itt_event event
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 parent
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 p
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 size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id tail
kmp_info_t * __kmp_hidden_helper_main_thread
kmp_global_t __kmp_global
union kmp_task_team kmp_task_team_t
void __kmp_hidden_helper_worker_thread_signal()
#define KMP_YIELD_OVERSUB_ELSE_SPIN(count, time)
#define KMP_MAX_BLOCKTIME
#define INITIAL_TASK_DEQUE_SIZE
struct kmp_taskgroup kmp_taskgroup_t
#define KMP_TASKDATA_TO_TASK(taskdata)
#define KMP_NOT_SAFE_TO_REAP
#define TASK_DEQUE_MASK(td)
unsigned short __kmp_get_random(kmp_info_t *thread)
kmp_tasking_mode_t __kmp_tasking_mode
void __kmp_abort_thread(void)
volatile kmp_info_t * __kmp_thread_pool
#define KMP_GEN_TASK_ID()
kmp_bootstrap_lock_t __kmp_task_team_lock
int __kmp_omp_cancellation
#define TASK_DEQUE_SIZE(td)
#define KMP_GTID_TO_SHADOW_GTID(gtid)
#define __kmp_get_thread()
union kmp_depnode kmp_depnode_t
#define TASK_CURRENT_NOT_QUEUED
static int __kmp_tid_from_gtid(int gtid)
volatile int __kmp_init_hidden_helper
@ KMP_EVENT_UNINITIALIZED
@ KMP_EVENT_ALLOW_COMPLETION
volatile int __kmp_init_middle
#define KMP_CHECK_UPDATE(a, b)
#define KMP_TASK_TO_TASKDATA(task)
union KMP_ALIGN_CACHE kmp_thread_data kmp_thread_data_t
#define TASK_SUCCESSFULLY_PUSHED
struct kmp_task_affinity_info kmp_task_affinity_info_t
#define __kmp_thread_malloc(th, size)
void __kmp_middle_initialize(void)
static void copy_icvs(kmp_internal_control_t *dst, kmp_internal_control_t *src)
#define KMP_TASKING_ENABLED(task_team)
kmp_info_t ** __kmp_threads
#define KMP_HIDDEN_HELPER_THREAD(gtid)
int __kmp_enable_task_throttling
int __kmp_task_stealing_constraint
union kmp_team kmp_team_t
#define KMP_INIT_YIELD(count)
#define KMP_INIT_BACKOFF(time)
volatile int __kmp_init_parallel
kmp_int32 __kmp_enable_hidden_helper
#define __kmp_allocate(size)
enum library_type __kmp_library
struct kmp_tasking_flags kmp_tasking_flags_t
struct kmp_task_pri kmp_task_pri_t
kmp_uint64 __kmp_taskloop_min_tasks
std::atomic< kmp_int32 > __kmp_unexecuted_hidden_helper_tasks
kmp_info_t ** __kmp_hidden_helper_threads
bool __kmp_wpolicy_passive
void __kmp_hidden_helper_initialize()
kmp_int32 __kmp_max_task_priority
static void __kmp_assert_valid_gtid(kmp_int32 gtid)
static kmp_info_t * __kmp_thread_from_gtid(int gtid)
static int __kmp_gtid_from_thread(const kmp_info_t *thr)
struct kmp_taskdata kmp_taskdata_t
union KMP_ALIGN_CACHE kmp_info kmp_info_t
#define __kmp_thread_free(th, ptr)
KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86 KMP_ARCH_X86<<, 2i, 1, KMP_ARCH_X86) ATOMIC_CMPXCHG(fixed2, shr, kmp_int16, 16, > KMP_ARCH_X86 KMP_ARCH_X86 kmp_uint32
#define KMP_DEBUG_USE_VAR(x)
#define KMP_BUILD_ASSERT(expr)
#define KMP_DEBUG_ASSERT(cond)
#define KMP_ASSERT2(cond, msg)
unsigned long long kmp_uint64
static volatile kmp_i18n_cat_status_t status
#define KMP_FSYNC_RELEASING(obj)
#define KMP_FSYNC_ACQUIRED(obj)
#define KMP_FSYNC_SPIN_ACQUIRED(obj)
#define KMP_FSYNC_CANCEL(obj)
#define KMP_FSYNC_SPIN_PREPARE(obj)
#define USE_ITT_BUILD_ARG(x)
#define KMP_FSYNC_SPIN_INIT(obj, spin)
int __kmp_acquire_tas_lock(kmp_tas_lock_t *lck, kmp_int32 gtid)
void __kmp_init_tas_lock(kmp_tas_lock_t *lck)
int __kmp_release_tas_lock(kmp_tas_lock_t *lck, kmp_int32 gtid)
static void __kmp_release_bootstrap_lock(kmp_bootstrap_lock_t *lck)
kmp_ticket_lock_t kmp_bootstrap_lock_t
static int __kmp_test_lock(kmp_lock_t *lck, kmp_int32 gtid)
static int __kmp_acquire_bootstrap_lock(kmp_bootstrap_lock_t *lck)
static void __kmp_release_lock(kmp_lock_t *lck, kmp_int32 gtid)
static void __kmp_init_bootstrap_lock(kmp_bootstrap_lock_t *lck)
#define KMP_BOOTSTRAP_LOCK_INITIALIZER(lock)
#define KMP_ATOMIC_AND(p, v)
#define KMP_ATOMIC_ST_REL(p, v)
bool __kmp_atomic_compare_store(std::atomic< T > *p, T expected, T desired)
#define KMP_ATOMIC_LD_ACQ(p)
#define KMP_ATOMIC_ST_RLX(p, v)
#define KMP_FALLTHROUGH()
#define KMP_ATOMIC_DEC(p)
#define KMP_ATOMIC_LD_RLX(p)
#define KMP_COMPARE_AND_STORE_ACQ32(p, cv, sv)
unsigned long kmp_uintptr_t
#define KMP_ATOMIC_OR(p, v)
#define KMP_ATOMIC_INC(p)
#define KMP_MEMCPY_S(dst, bsz, src, cnt)
Functions for collecting statistics.
#define KMP_PUSH_PARTITIONED_TIMER(name)
#define KMP_GET_THREAD_STATE()
#define KMP_POP_PARTITIONED_TIMER()
#define KMP_SET_THREAD_STATE_BLOCK(state_name)
#define KMP_TIME_PARTITIONED_BLOCK(name)
#define KMP_COUNT_BLOCK(n)
static void __kmp_dephash_free(kmp_info_t *thread, kmp_dephash_t *h)
static void __kmp_dephash_free_entries(kmp_info_t *thread, kmp_dephash_t *h)
static void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task)
void __kmp_free_task_team(kmp_info_t *thread, kmp_task_team_t *task_team)
template int __kmp_atomic_execute_tasks_64< true, false >(kmp_info_t *, kmp_int32, kmp_atomic_flag_64< true, false > *, int, int *USE_ITT_BUILD_ARG(void *), kmp_int32)
void __kmp_call_init(kmp_taskred_data_t &item, size_t j)
void __kmp_call_init< kmp_task_red_input_t >(kmp_taskred_data_t &item, size_t offset)
void(* p_task_dup_t)(kmp_task_t *, kmp_task_t *, kmp_int32)
void * __kmp_task_reduction_modifier_init(ident_t *loc, int gtid, int is_ws, int num, T *data)
static void __kmp_task_reduction_clean(kmp_info_t *th, kmp_taskgroup_t *tg)
static void __kmpc_omp_task_complete_if0_template(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *task)
kmp_task_t * __kmpc_omp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t task_entry)
void __kmp_reap_task_teams(void)
kmp_int32 __kmpc_omp_taskyield(ident_t *loc_ref, kmp_int32 gtid, int end_part)
kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task)
static void __kmp_task_start(kmp_int32 gtid, kmp_task_t *task, kmp_taskdata_t *current_task)
void __kmp_pop_task_team_node(kmp_info_t *thread, kmp_team_t *team)
int __kmp_execute_tasks_64(kmp_info_t *thread, kmp_int32 gtid, kmp_flag_64< C, S > *flag, int final_spin, int *thread_finished USE_ITT_BUILD_ARG(void *itt_sync_obj), kmp_int32 is_constrained)
void __kmp_wait_to_unref_task_teams(void)
static kmp_task_team_t * __kmp_allocate_task_team(kmp_info_t *thread, kmp_team_t *team)
void __kmp_task_team_sync(kmp_info_t *this_thr, kmp_team_t *team)
void __kmp_task_reduction_init_copy(kmp_info_t *thr, int num, T *data, kmp_taskgroup_t *tg, void *reduce_data)
void __kmpc_omp_task_complete_if0(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *task)
static void __kmp_realloc_task_deque(kmp_info_t *thread, kmp_thread_data_t *thread_data)
static void __kmp_bottom_half_finish_proxy(kmp_int32 gtid, kmp_task_t *ptask)
void __kmpc_end_taskgroup(ident_t *loc, int gtid)
void __kmpc_omp_task_begin_if0(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *task)
static void __kmp_first_top_half_finish_proxy(kmp_taskdata_t *taskdata)
static int __kmp_execute_tasks_template(kmp_info_t *thread, kmp_int32 gtid, C *flag, int final_spin, int *thread_finished USE_ITT_BUILD_ARG(void *itt_sync_obj), kmp_int32 is_constrained)
static void __kmp_free_task_and_ancestors(kmp_int32 gtid, kmp_taskdata_t *taskdata, kmp_info_t *thread)
static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, kmp_taskdata_t *resumed_task)
static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, kmp_taskdata_t *current_task)
static kmp_thread_data_t * __kmp_get_priority_deque_data(kmp_task_team_t *task_team, kmp_int32 pri)
template int __kmp_execute_tasks_64< false, true >(kmp_info_t *, kmp_int32, kmp_flag_64< false, true > *, int, int *USE_ITT_BUILD_ARG(void *), kmp_int32)
void __kmp_finish_implicit_task(kmp_info_t *thread)
template int __kmp_execute_tasks_32< false, false >(kmp_info_t *, kmp_int32, kmp_flag_32< false, false > *, int, int *USE_ITT_BUILD_ARG(void *), kmp_int32)
struct __taskloop_params __taskloop_params_t
kmp_event_t * __kmpc_task_allow_completion_event(ident_t *loc_ref, int gtid, kmp_task_t *task)
static void __kmp_free_task_threads_data(kmp_task_team_t *task_team)
void __kmp_assign_orig(kmp_taskred_data_t &item, T &src)
static kmp_int32 __kmpc_omp_taskwait_template(ident_t *loc_ref, kmp_int32 gtid, void *frame_address, void *return_address)
static void __kmp_task_reduction_fini(kmp_info_t *th, kmp_taskgroup_t *tg)
static void __kmp_free_task(kmp_int32 gtid, kmp_taskdata_t *taskdata, kmp_info_t *thread)
template int __kmp_execute_tasks_64< true, false >(kmp_info_t *, kmp_int32, kmp_flag_64< true, false > *, int, int *USE_ITT_BUILD_ARG(void *), kmp_int32)
int __kmp_atomic_execute_tasks_64(kmp_info_t *thread, kmp_int32 gtid, kmp_atomic_flag_64< C, S > *flag, int final_spin, int *thread_finished USE_ITT_BUILD_ARG(void *itt_sync_obj), kmp_int32 is_constrained)
void __kmp_task_team_wait(kmp_info_t *this_thr, kmp_team_t *team USE_ITT_BUILD_ARG(void *itt_sync_obj), int wait)
kmp_int32 __kmpc_omp_task_parts(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task)
static kmp_task_pri_t * __kmp_alloc_task_pri_list()
static void __kmp_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, int modifier, void *task_dup)
kmp_int32 __kmp_omp_taskloop_task(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, void *codeptr_ra)
void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr, kmp_team_t *team, int tid, int set_curr_task)
static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task)
static kmp_task_t * __kmp_steal_task(kmp_int32 victim_tid, kmp_int32 gtid, kmp_task_team_t *task_team, std::atomic< kmp_int32 > *unfinished_threads, int *thread_finished, kmp_int32 is_constrained)
void * __kmp_task_reduction_init(int gtid, int num, T *data)
static void __kmp_enable_tasking(kmp_task_team_t *task_team, kmp_info_t *this_thr)
static bool __kmp_give_task(kmp_info_t *thread, kmp_int32 tid, kmp_task_t *task, kmp_int32 pass)
int __kmp_execute_tasks_32(kmp_info_t *thread, kmp_int32 gtid, kmp_flag_32< C, S > *flag, int final_spin, int *thread_finished USE_ITT_BUILD_ARG(void *itt_sync_obj), kmp_int32 is_constrained)
static kmp_task_t * __kmp_get_priority_task(kmp_int32 gtid, kmp_task_team_t *task_team, kmp_int32 is_constrained)
void __kmp_tasking_barrier(kmp_team_t *team, kmp_info_t *thread, int gtid)
void __kmp_free_implicit_task(kmp_info_t *thread)
int __kmp_execute_tasks_oncore(kmp_info_t *thread, kmp_int32 gtid, kmp_flag_oncore *flag, int final_spin, int *thread_finished USE_ITT_BUILD_ARG(void *itt_sync_obj), kmp_int32 is_constrained)
static size_t __kmp_round_up_to_val(size_t size, size_t val)
kmp_task_t * __kmpc_omp_target_task_alloc(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t task_entry, kmp_int64 device_id)
void __kmp_fulfill_event(kmp_event_t *event)
void __kmp_assign_orig< kmp_taskred_input_t >(kmp_taskred_data_t &item, kmp_taskred_input_t &src)
static void __kmpc_omp_task_begin_if0_template(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *task, void *frame_address, void *return_address)
void __kmp_assign_orig< kmp_task_red_input_t >(kmp_taskred_data_t &item, kmp_task_red_input_t &src)
static int __kmp_realloc_task_threads_data(kmp_info_t *thread, kmp_task_team_t *task_team)
template int __kmp_atomic_execute_tasks_64< false, true >(kmp_info_t *, kmp_int32, kmp_atomic_flag_64< false, true > *, int, int *USE_ITT_BUILD_ARG(void *), kmp_int32)
static kmp_task_team_t * __kmp_free_task_teams
kmp_task_t * __kmp_task_dup_alloc(kmp_info_t *thread, kmp_task_t *task_src)
kmp_task_t * __kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, kmp_tasking_flags_t *flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t task_entry)
kmp_int32 __kmpc_omp_taskwait(ident_t *loc_ref, kmp_int32 gtid)
int __kmp_taskloop_task(int gtid, void *ptask)
void __kmp_push_current_task_to_thread(kmp_info_t *this_thr, kmp_team_t *team, int tid)
void __kmp_push_task_team_node(kmp_info_t *thread, kmp_team_t *team)
static void __kmp_second_top_half_finish_proxy(kmp_taskdata_t *taskdata)
static void __kmp_free_task_pri_list(kmp_task_team_t *task_team)
static bool __kmp_task_is_allowed(int gtid, const kmp_int32 is_constrained, const kmp_taskdata_t *tasknew, const kmp_taskdata_t *taskcurr)
static kmp_task_t * __kmp_remove_my_task(kmp_info_t *thread, kmp_int32 gtid, kmp_task_team_t *task_team, kmp_int32 is_constrained)
void __kmpc_taskgroup(ident_t *loc, int gtid)
kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task, bool serialize_immediate)
static void __kmp_task_team_init(kmp_task_team_t *task_team, kmp_team_t *team)
void __kmp_pop_current_task_from_thread(kmp_info_t *this_thr)
void __kmp_task_team_setup(kmp_info_t *this_thr, kmp_team_t *team)
static void __kmp_alloc_task_deque(kmp_info_t *thread, kmp_thread_data_t *thread_data)
static void __kmp_free_task_deque(kmp_thread_data_t *thread_data)
static kmp_int32 __kmp_push_priority_task(kmp_int32 gtid, kmp_info_t *thread, kmp_taskdata_t *taskdata, kmp_task_team_t *task_team, kmp_int32 pri)
void __kmpc_give_task(kmp_task_t *ptask, kmp_int32 start=0)
void __kmp_call_init< kmp_taskred_input_t >(kmp_taskred_data_t &item, size_t offset)
void __kmp_taskloop_linear(ident_t *loc, int gtid, kmp_task_t *task, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, kmp_uint64 ub_glob, kmp_uint64 num_tasks, kmp_uint64 grainsize, kmp_uint64 extras, kmp_int64 last_chunk, kmp_uint64 tc, void *task_dup)
void __kmp_taskloop_recur(ident_t *, int, kmp_task_t *, kmp_uint64 *, kmp_uint64 *, kmp_int64, kmp_uint64, kmp_uint64, kmp_uint64, kmp_uint64, kmp_int64, kmp_uint64, kmp_uint64, void *)
static bool __kmp_track_children_task(kmp_taskdata_t *taskdata)
static void __kmp_null_resume_wrapper(kmp_info_t *thr)
int __kmpc_start_record_task(ident_t *, int, int, int)
void __kmpc_end_record_task(ident_t *, int, int, int)
ompt_callbacks_active_t ompt_enabled
ompt_callbacks_internal_t ompt_callbacks
#define OMPT_GET_RETURN_ADDRESS(level)
#define TASK_TYPE_DETAILS_FORMAT(info)
#define OMPT_FRAME_FLAGS_APP
#define OMPT_GET_FRAME_ADDRESS(level)
#define OMPT_FRAME_FLAGS_RUNTIME
ompt_team_info_t * __ompt_get_teaminfo(int depth, int *size)
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_task_info_t * __ompt_get_task_info_object(int depth)
__attribute__((noinline))
kmp_lock_t * mtx_locks[MAX_MTX_DEPS]
kmp_int32 tt_found_proxy_tasks
KMP_ALIGN_CACHE std::atomic< kmp_int32 > tt_unfinished_threads
kmp_bootstrap_lock_t tt_task_pri_lock
std::atomic< kmp_int32 > tt_num_task_pri
kmp_bootstrap_lock_t tt_threads_lock
kmp_int32 tt_untied_task_encountered
kmp_task_pri_t * tt_task_pri_list
kmp_int32 tt_hidden_helper_task_encountered
kmp_thread_data_t * tt_threads_data
KMP_ALIGN_CACHE volatile kmp_uint32 tt_active
kmp_task_team_t * tt_next
union kmp_event_t::@225247164214002037241165027111053205022334261172 ed
struct kmp_task_affinity_info::@350356156072337073036041067341377344020243343142 flags
kmp_task_team_list_t * next
kmp_task_team_t * task_team
void * shareds
pointer to block of pointers to shared vars
kmp_uint32 td_taskwait_counter
ident_t * td_taskwait_ident
kmp_task_team_t * td_task_team
kmp_dephash_t * td_dephash
kmp_taskdata_t * td_parent
std::atomic< kmp_int32 > td_incomplete_child_tasks
std::atomic< kmp_int32 > td_untied_count
kmp_taskgroup_t * td_taskgroup
kmp_info_p * td_alloc_thread
kmp_depnode_t * td_depnode
kmp_int32 td_taskwait_thread
kmp_tasking_flags_t td_flags
kmp_taskdata_t * td_last_tied
KMP_ALIGN_CACHE kmp_internal_control_t td_icvs
kmp_event_t td_allow_completion_event
kmp_target_data_t td_target_data
KMP_ALIGN_CACHE std::atomic< kmp_int32 > td_allocated_child_tasks
std::atomic< kmp_int32 > cancel_request
std::atomic< kmp_int32 > count
struct kmp_taskgroup * parent
kmp_int32 reduce_num_data
unsigned priority_specified
unsigned destructors_thunk
Internal struct for reduction data item related info saved by the library.
void * reduce_init
data initialization routine (two parameters)
void * reduce_priv
array of thread specific items
void * reduce_pend
end of private data for faster comparison op
void * reduce_comb
data combiner routine
kmp_taskred_flags_t flags
flags for additional info from compiler
void * reduce_fini
data finalization routine
size_t reduce_size
size of data item
void * reduce_shar
shared between tasks item to reduce into
void * reduce_orig
original item (can be used in UDR initializer)
Flags for special info per task reduction item.
unsigned lazy_priv
1 - use lazy alloc/init (e.g.
ompt_data_t parallel_data
int(* routine)(int, struct task *)
int __kmp_is_thread_alive(kmp_info_t *th, DWORD *exit_val)