Lines Matching refs:master_th

960                                     kmp_info_t *master_th, int master_gtid,  in __kmp_fork_team_threads()  argument
970 master_th->th.th_info.ds.ds_tid = 0; in __kmp_fork_team_threads()
971 master_th->th.th_team = team; in __kmp_fork_team_threads()
972 master_th->th.th_team_nproc = team->t.t_nproc; in __kmp_fork_team_threads()
973 master_th->th.th_team_master = master_th; in __kmp_fork_team_threads()
974 master_th->th.th_team_serialized = FALSE; in __kmp_fork_team_threads()
975 master_th->th.th_dispatch = &team->t.t_dispatch[0]; in __kmp_fork_team_threads()
980 kmp_hot_team_ptr_t *hot_teams = master_th->th.th_hot_teams; in __kmp_fork_team_threads()
984 if (master_th->th.th_teams_microtask) { // are we inside the teams? in __kmp_fork_team_threads()
985 if (master_th->th.th_teams_size.nteams > 1) { in __kmp_fork_team_threads()
990 master_th->th.th_teams_level == team->t.t_level) { in __kmp_fork_team_threads()
1015 team->t.t_threads[0] = master_th; in __kmp_fork_team_threads()
1016 __kmp_initialize_info(master_th, team, 0, master_gtid); in __kmp_fork_team_threads()
1033 thr->th.th_teams_microtask = master_th->th.th_teams_microtask; in __kmp_fork_team_threads()
1034 thr->th.th_teams_level = master_th->th.th_teams_level; in __kmp_fork_team_threads()
1035 thr->th.th_teams_size = master_th->th.th_teams_size; in __kmp_fork_team_threads()
1068 KMP_DEBUG_ASSERT_TASKTEAM_INVARIANT(team->t.t_parent, master_th); in __kmp_fork_team_threads()
1073 __kmp_gtid_from_thread(master_th), master_th->th.th_task_team, in __kmp_fork_team_threads()
1074 team->t.t_parent, team->t.t_task_team[master_th->th.th_task_state], in __kmp_fork_team_threads()
1079 master_th->th.th_task_state); in __kmp_fork_team_threads()
1086 KMP_CHECK_UPDATE(master_th->th.th_task_state, in __kmp_fork_team_threads()
1089 master_th->th.th_task_state = 0; in __kmp_fork_team_threads()
1094 master_th->th.th_task_state); in __kmp_fork_team_threads()
1096 master_th->th.th_task_state = 0; in __kmp_fork_team_threads()
1446 static inline bool __kmp_is_fork_in_teams(kmp_info_t *master_th, in __kmp_is_fork_in_teams() argument
1449 return (master_th->th.th_teams_microtask && ap && in __kmp_is_fork_in_teams()
1466 kmp_int32 argc, kmp_info_t *master_th, kmp_root_t *root, in __kmp_fork_in_teams() argument
1484 if (parent_team == master_th->th.th_serial_team) { in __kmp_fork_in_teams()
1507 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_fork_in_teams()
1511 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); in __kmp_fork_in_teams()
1515 implicit_task_data = OMPT_CUR_TASK_DATA(master_th); in __kmp_fork_in_teams()
1517 OMPT_CUR_TASK_INFO(master_th)->thread_num = __kmp_tid_from_gtid(gtid); in __kmp_fork_in_teams()
1519 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), implicit_task_data, in __kmp_fork_in_teams()
1520 1, OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_fork_in_teams()
1524 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_in_teams()
1548 OMPT_CUR_TASK_INFO(master_th)->frame.exit_frame = ompt_data_none; in __kmp_fork_in_teams()
1552 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_fork_in_teams()
1554 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_fork_in_teams()
1555 __ompt_lw_taskteam_unlink(master_th); in __kmp_fork_in_teams()
1558 &ompt_parallel_data, OMPT_CUR_TASK_DATA(master_th), in __kmp_fork_in_teams()
1561 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_in_teams()
1572 parent_team->t.t_def_allocator = master_th->th.th_def_allocator; // save in __kmp_fork_in_teams()
1579 master_th->th.th_teams_size.nth = parent_team->t.t_nproc; in __kmp_fork_in_teams()
1584 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, &ompt_parallel_data, in __kmp_fork_in_teams()
1586 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 1, true); in __kmp_fork_in_teams()
1592 if (master_set_numthreads <= master_th->th.th_teams_size.nth) { in __kmp_fork_in_teams()
1597 int old_proc = master_th->th.th_teams_size.nth; in __kmp_fork_in_teams()
1608 master_th->th.th_set_nproc = 0; in __kmp_fork_in_teams()
1621 kmp_proc_bind_t proc_bind = master_th->th.th_set_proc_bind; in __kmp_fork_in_teams()
1624 if (master_th->th.th_current_task->td_icvs.proc_bind == proc_bind_false) { in __kmp_fork_in_teams()
1629 proc_bind = master_th->th.th_current_task->td_icvs.proc_bind; in __kmp_fork_in_teams()
1637 master_th->th.th_current_task->td_icvs.proc_bind)) { in __kmp_fork_in_teams()
1644 master_th->th.th_current_task->td_icvs.proc_bind != proc_bind_icv) { in __kmp_fork_in_teams()
1646 for (i = 0; i < master_th->th.th_team_nproc; ++i) { in __kmp_fork_in_teams()
1651 master_th->th.th_set_proc_bind = proc_bind_default; in __kmp_fork_in_teams()
1658 && master_th->th.th_teams_size.nteams == 1) { in __kmp_fork_in_teams()
1660 master_th->th.th_frame_time = tmp_time; in __kmp_fork_in_teams()
1675 root, parent_team, master_th, gtid)); in __kmp_fork_in_teams()
1679 root, parent_team, master_th, gtid)); in __kmp_fork_in_teams()
1704 kmp_info_t *master_th, kmp_team_t *parent_team, in __kmp_serial_fork_call() argument
1729 master_th->th.th_serial_team->t.t_pkfn = microtask; in __kmp_serial_fork_call()
1734 master_th->th.th_serial_team->t.t_ident = loc; in __kmp_serial_fork_call()
1737 master_th->th.th_serial_team->t.t_level--; in __kmp_serial_fork_call()
1747 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_serial_fork_call()
1750 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); in __kmp_serial_fork_call()
1752 task_info = OMPT_CUR_TASK_INFO(master_th); in __kmp_serial_fork_call()
1755 OMPT_CUR_TASK_INFO(master_th)->thread_num = __kmp_tid_from_gtid(gtid); in __kmp_serial_fork_call()
1757 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), in __kmp_serial_fork_call()
1759 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_serial_fork_call()
1763 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_serial_fork_call()
1786 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_serial_fork_call()
1788 *ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_serial_fork_call()
1789 __ompt_lw_taskteam_unlink(master_th); in __kmp_serial_fork_call()
1795 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_serial_fork_call()
1799 KMP_DEBUG_ASSERT(master_th->th.th_team == master_th->th.th_serial_team); in __kmp_serial_fork_call()
1800 team = master_th->th.th_team; in __kmp_serial_fork_call()
1815 ompt_task_info_t *task_info = OMPT_CUR_TASK_INFO(master_th); in __kmp_serial_fork_call()
1819 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_initial); in __kmp_serial_fork_call()
1827 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_serial_fork_call()
1844 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_serial_fork_call()
1846 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); in __kmp_serial_fork_call()
1848 task_info = OMPT_CUR_TASK_INFO(master_th); in __kmp_serial_fork_call()
1852 implicit_task_data = OMPT_CUR_TASK_DATA(master_th); in __kmp_serial_fork_call()
1855 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), in __kmp_serial_fork_call()
1858 OMPT_CUR_TASK_INFO(master_th)->thread_num = __kmp_tid_from_gtid(gtid); in __kmp_serial_fork_call()
1862 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_serial_fork_call()
1885 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_serial_fork_call()
1888 *ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_serial_fork_call()
1889 __ompt_lw_taskteam_unlink(master_th); in __kmp_serial_fork_call()
1895 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_serial_fork_call()
1903 __ompt_lw_taskteam_init(&lwt, master_th, gtid, ompt_parallel_data, in __kmp_serial_fork_call()
1907 __ompt_lw_taskteam_link(&lwt, master_th, 1); in __kmp_serial_fork_call()
1937 kmp_info_t *master_th; in __kmp_fork_call() local
1973 master_th = __kmp_threads[gtid]; in __kmp_fork_call()
1975 parent_team = master_th->th.th_team; in __kmp_fork_call()
1976 master_tid = master_th->th.th_info.ds.ds_tid; in __kmp_fork_call()
1977 master_this_cons = master_th->th.th_local.this_construct; in __kmp_fork_call()
1978 root = master_th->th.th_root; in __kmp_fork_call()
1980 master_set_numthreads = master_th->th.th_set_nproc; in __kmp_fork_call()
1982 master_th->th.th_current_task->td_icvs.task_thread_limit; in __kmp_fork_call()
2005 teams_level = master_th->th.th_teams_level; in __kmp_fork_call()
2007 p_hot_teams = &master_th->th.th_hot_teams; in __kmp_fork_call()
2031 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
2035 master_th->th.th_ident = loc; in __kmp_fork_call()
2038 if (__kmp_is_fork_in_teams(master_th, microtask, level, teams_level, ap)) { in __kmp_fork_call()
2039 return __kmp_fork_in_teams(loc, gtid, parent_team, argc, master_th, root, in __kmp_fork_call()
2052 KMP_DEBUG_ASSERT_TASKTEAM_INVARIANT(parent_team, master_th); in __kmp_fork_call()
2059 master_th->th.th_current_task->td_icvs.max_active_levels)) || in __kmp_fork_call()
2095 master_th->th.th_set_nproc = 0; in __kmp_fork_call()
2099 invoker, master_th, parent_team, in __kmp_fork_call()
2111 parent_team->t.t_active_level, master_th, in __kmp_fork_call()
2112 master_th->th.th_current_task, in __kmp_fork_call()
2113 master_th->th.th_current_task->td_icvs.max_active_levels)); in __kmp_fork_call()
2117 master_th->th.th_current_task->td_flags.executing = 0; in __kmp_fork_call()
2119 if (!master_th->th.th_teams_microtask || level > teams_level) { in __kmp_fork_call()
2125 int nthreads_icv = master_th->th.th_current_task->td_icvs.nproc; in __kmp_fork_call()
2127 if (!master_th->th.th_set_nested_nth && in __kmp_fork_call()
2131 } else if (master_th->th.th_set_nested_nth) { in __kmp_fork_call()
2132 nested_nth = __kmp_override_nested_nth(master_th, level); in __kmp_fork_call()
2143 kmp_proc_bind_t proc_bind = master_th->th.th_set_proc_bind; in __kmp_fork_call()
2146 if (master_th->th.th_current_task->td_icvs.proc_bind == proc_bind_false) { in __kmp_fork_call()
2152 proc_bind = master_th->th.th_current_task->td_icvs.proc_bind; in __kmp_fork_call()
2155 if (master_th->th.th_teams_microtask && in __kmp_fork_call()
2165 master_th->th.th_current_task->td_icvs.proc_bind)) { in __kmp_fork_call()
2168 if (!master_th->th.th_teams_microtask || in __kmp_fork_call()
2175 master_th->th.th_set_proc_bind = proc_bind_default; in __kmp_fork_call()
2179 copy_icvs(&new_icvs, &master_th->th.th_current_task->td_icvs); in __kmp_fork_call()
2195 argc USE_NESTED_HOT_ARG(master_th)); in __kmp_fork_call()
2206 &master_th->th.th_current_task->td_icvs, in __kmp_fork_call()
2207 argc USE_NESTED_HOT_ARG(master_th)); in __kmp_fork_call()
2210 &master_th->th.th_current_task->td_icvs); in __kmp_fork_call()
2227 if (!master_th->th.th_teams_microtask || level > teams_level) { in __kmp_fork_call()
2244 KMP_CHECK_UPDATE(team->t.t_def_allocator, master_th->th.th_def_allocator); in __kmp_fork_call()
2254 if (master_th->th.th_set_nested_nth) { in __kmp_fork_call()
2256 nested_nth = __kmp_override_nested_nth(master_th, level); in __kmp_fork_call()
2258 KMP_INTERNAL_FREE(master_th->th.th_set_nested_nth); in __kmp_fork_call()
2259 master_th->th.th_set_nested_nth = NULL; in __kmp_fork_call()
2260 master_th->th.th_set_nested_nth_sz = 0; in __kmp_fork_call()
2261 master_th->th.th_nt_strict = false; in __kmp_fork_call()
2302 __kmp_fork_team_threads(root, team, master_th, gtid, !ap); in __kmp_fork_call()
2304 &master_th->th.th_current_task->td_icvs, loc); in __kmp_fork_call()
2307 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
2314 && !master_th->th.th_teams_microtask) { // not in teams construct in __kmp_fork_call()
2323 master_th->th.th_frame_time = tmp_time; in __kmp_fork_call()
2342 root, team, master_th, gtid)); in __kmp_fork_call()
2367 root, team, master_th, gtid)); in __kmp_fork_call()
2406 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
2446 kmp_info_t *master_th; in __kmp_join_call() local
2453 master_th = __kmp_threads[gtid]; in __kmp_join_call()
2454 root = master_th->th.th_root; in __kmp_join_call()
2455 team = master_th->th.th_team; in __kmp_join_call()
2458 master_th->th.th_ident = loc; in __kmp_join_call()
2467 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_join_call()
2475 __kmp_gtid_from_thread(master_th), team, in __kmp_join_call()
2476 team->t.t_task_team[master_th->th.th_task_state], in __kmp_join_call()
2477 master_th->th.th_task_team)); in __kmp_join_call()
2478 KMP_DEBUG_ASSERT_TASKTEAM_INVARIANT(team, master_th); in __kmp_join_call()
2483 if (master_th->th.th_teams_microtask) { in __kmp_join_call()
2486 int tlevel = master_th->th.th_teams_level; in __kmp_join_call()
2503 __ompt_lw_taskteam_unlink(master_th); in __kmp_join_call()
2505 __kmp_join_restore_state(master_th, parent_team); in __kmp_join_call()
2527 master_th->th.th_task_state = in __kmp_join_call()
2551 (!master_th->th.th_teams_microtask || /* not in teams construct */ in __kmp_join_call()
2552 master_th->th.th_teams_size.nteams == 1)) { in __kmp_join_call()
2553 master_th->th.th_ident = loc; in __kmp_join_call()
2559 master_th->th.th_frame_time, 0, loc, in __kmp_join_call()
2560 master_th->th.th_team_nproc, 1); in __kmp_join_call()
2570 master_th->th.th_first_place = team->t.t_first_place; in __kmp_join_call()
2571 master_th->th.th_last_place = team->t.t_last_place; in __kmp_join_call()
2575 if (master_th->th.th_teams_microtask && !exit_teams && in __kmp_join_call()
2577 team->t.t_level == master_th->th.th_teams_level + 1) { in __kmp_join_call()
2589 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_join_call()
2593 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_join_call()
2594 __ompt_lw_taskteam_unlink(master_th); in __kmp_join_call()
2606 if (master_th->th.th_team_nproc < master_th->th.th_teams_size.nth) { in __kmp_join_call()
2607 int old_num = master_th->th.th_team_nproc; in __kmp_join_call()
2608 int new_num = master_th->th.th_teams_size.nth; in __kmp_join_call()
2628 other_threads[i]->th.th_task_state = master_th->th.th_task_state; in __kmp_join_call()
2635 __kmp_join_ompt(gtid, master_th, parent_team, &ompt_parallel_data, in __kmp_join_call()
2644 master_th->th.th_info.ds.ds_tid = team->t.t_master_tid; in __kmp_join_call()
2645 master_th->th.th_local.this_construct = team->t.t_master_this_cons; in __kmp_join_call()
2647 master_th->th.th_dispatch = &parent_team->t.t_dispatch[team->t.t_master_tid]; in __kmp_join_call()
2654 if (!master_th->th.th_teams_microtask || in __kmp_join_call()
2655 team->t.t_level > master_th->th.th_teams_level) { in __kmp_join_call()
2671 OMPT_CUR_TASK_INFO(master_th)->thread_num, flags); in __kmp_join_call()
2679 master_th, team)); in __kmp_join_call()
2680 __kmp_pop_current_task_from_thread(master_th); in __kmp_join_call()
2682 master_th->th.th_def_allocator = team->t.t_def_allocator; in __kmp_join_call()
2694 master_th)); // this will free worker threads in __kmp_join_call()
2701 master_th->th.th_team = parent_team; in __kmp_join_call()
2702 master_th->th.th_team_nproc = parent_team->t.t_nproc; in __kmp_join_call()
2703 master_th->th.th_team_master = parent_team->t.t_threads[0]; in __kmp_join_call()
2704 master_th->th.th_team_serialized = parent_team->t.t_serialized; in __kmp_join_call()
2708 parent_team != master_th->th.th_serial_team && in __kmp_join_call()
2711 master_th->th.th_serial_team USE_NESTED_HOT_ARG(NULL)); in __kmp_join_call()
2712 master_th->th.th_serial_team = parent_team; in __kmp_join_call()
2719 master_th->th.th_task_state = (kmp_uint8)team->t.t_primary_task_state; in __kmp_join_call()
2722 master_th->th.th_task_team = in __kmp_join_call()
2723 parent_team->t.t_task_team[master_th->th.th_task_state]; in __kmp_join_call()
2726 __kmp_gtid_from_thread(master_th), master_th->th.th_task_team, in __kmp_join_call()
2733 master_th->th.th_current_task->td_flags.executing = 1; in __kmp_join_call()
2738 if (master_th->th.th_team->t.t_level == 0 && __kmp_affinity.flags.reset) { in __kmp_join_call()
2748 __kmp_join_ompt(gtid, master_th, parent_team, parallel_data, flags, in __kmp_join_call()
4822 kmp_info_t *master_th = team->t.t_threads[0]; in __kmp_partition_places() local
4823 KMP_DEBUG_ASSERT(master_th != NULL); in __kmp_partition_places()
4825 int first_place = master_th->th.th_first_place; in __kmp_partition_places()
4826 int last_place = master_th->th.th_last_place; in __kmp_partition_places()
4827 int masters_place = master_th->th.th_current_place; in __kmp_partition_places()