Lines Matching defs:master_th

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