Lines Matching refs:master_th
913 kmp_info_t *master_th, int master_gtid) { in __kmp_fork_team_threads() argument
922 master_th->th.th_info.ds.ds_tid = 0; in __kmp_fork_team_threads()
923 master_th->th.th_team = team; in __kmp_fork_team_threads()
924 master_th->th.th_team_nproc = team->t.t_nproc; in __kmp_fork_team_threads()
925 master_th->th.th_team_master = master_th; in __kmp_fork_team_threads()
926 master_th->th.th_team_serialized = FALSE; in __kmp_fork_team_threads()
927 master_th->th.th_dispatch = &team->t.t_dispatch[0]; in __kmp_fork_team_threads()
932 kmp_hot_team_ptr_t *hot_teams = master_th->th.th_hot_teams; in __kmp_fork_team_threads()
936 if (master_th->th.th_teams_microtask) { // are we inside the teams? in __kmp_fork_team_threads()
937 if (master_th->th.th_teams_size.nteams > 1) { in __kmp_fork_team_threads()
942 master_th->th.th_teams_level == team->t.t_level) { in __kmp_fork_team_threads()
967 team->t.t_threads[0] = master_th; in __kmp_fork_team_threads()
968 __kmp_initialize_info(master_th, team, 0, master_gtid); in __kmp_fork_team_threads()
985 thr->th.th_teams_microtask = master_th->th.th_teams_microtask; in __kmp_fork_team_threads()
986 thr->th.th_teams_level = master_th->th.th_teams_level; in __kmp_fork_team_threads()
987 thr->th.th_teams_size = master_th->th.th_teams_size; in __kmp_fork_team_threads()
1355 kmp_info_t *master_th; in __kmp_fork_call() local
1388 master_th = __kmp_threads[gtid]; // AC: potentially unsafe, not in sync with in __kmp_fork_call()
1390 parent_team = master_th->th.th_team; in __kmp_fork_call()
1391 master_tid = master_th->th.th_info.ds.ds_tid; in __kmp_fork_call()
1392 master_this_cons = master_th->th.th_local.this_construct; in __kmp_fork_call()
1393 root = master_th->th.th_root; in __kmp_fork_call()
1395 master_set_numthreads = master_th->th.th_set_nproc; in __kmp_fork_call()
1419 teams_level = master_th->th.th_teams_level; in __kmp_fork_call()
1421 p_hot_teams = &master_th->th.th_hot_teams; in __kmp_fork_call()
1445 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1449 master_th->th.th_ident = loc; in __kmp_fork_call()
1451 if (master_th->th.th_teams_microtask && ap && in __kmp_fork_call()
1463 if (parent_team == master_th->th.th_serial_team) { in __kmp_fork_call()
1486 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_fork_call()
1490 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); in __kmp_fork_call()
1494 implicit_task_data = OMPT_CUR_TASK_DATA(master_th); in __kmp_fork_call()
1496 OMPT_CUR_TASK_INFO(master_th)->thread_num = in __kmp_fork_call()
1499 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), in __kmp_fork_call()
1501 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_fork_call()
1505 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
1528 OMPT_CUR_TASK_INFO(master_th)->frame.exit_frame = ompt_data_none; in __kmp_fork_call()
1532 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_fork_call()
1534 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_fork_call()
1535 __ompt_lw_taskteam_unlink(master_th); in __kmp_fork_call()
1538 &ompt_parallel_data, OMPT_CUR_TASK_DATA(master_th), in __kmp_fork_call()
1542 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1553 parent_team->t.t_def_allocator = master_th->th.th_def_allocator; // save in __kmp_fork_call()
1558 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_fork_call()
1560 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 1, true); in __kmp_fork_call()
1566 if (master_set_numthreads < master_th->th.th_teams_size.nth) { in __kmp_fork_call()
1575 master_th->th.th_set_nproc = 0; in __kmp_fork_call()
1592 && master_th->th.th_teams_size.nteams == 1) { in __kmp_fork_call()
1594 master_th->th.th_frame_time = tmp_time; in __kmp_fork_call()
1606 root, parent_team, master_th, gtid)); in __kmp_fork_call()
1610 root, parent_team, master_th, gtid)); in __kmp_fork_call()
1633 KMP_DEBUG_ASSERT(master_th->th.th_task_team == in __kmp_fork_call()
1634 parent_team->t.t_task_team[master_th->th.th_task_state]); in __kmp_fork_call()
1640 master_th->th.th_current_task->td_icvs.max_active_levels) { in __kmp_fork_call()
1656 if ((get__max_active_levels(master_th) == 1 && in __kmp_fork_call()
1685 master_th->th.th_set_nproc = 0; in __kmp_fork_call()
1704 master_th->th.th_serial_team->t.t_pkfn = microtask; in __kmp_fork_call()
1709 master_th->th.th_serial_team->t.t_ident = loc; in __kmp_fork_call()
1712 master_th->th.th_serial_team->t.t_level--; in __kmp_fork_call()
1723 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_fork_call()
1726 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); in __kmp_fork_call()
1729 task_info = OMPT_CUR_TASK_INFO(master_th); in __kmp_fork_call()
1732 OMPT_CUR_TASK_INFO(master_th)->thread_num = in __kmp_fork_call()
1735 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), in __kmp_fork_call()
1737 OMPT_CUR_TASK_INFO(master_th)->thread_num, in __kmp_fork_call()
1742 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
1766 OMPT_CUR_TASK_INFO(master_th)->thread_num, in __kmp_fork_call()
1769 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_fork_call()
1770 __ompt_lw_taskteam_unlink(master_th); in __kmp_fork_call()
1777 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1781 KMP_DEBUG_ASSERT(master_th->th.th_team == in __kmp_fork_call()
1782 master_th->th.th_serial_team); in __kmp_fork_call()
1783 team = master_th->th.th_team; in __kmp_fork_call()
1804 ompt_task_info_t *task_info = OMPT_CUR_TASK_INFO(master_th); in __kmp_fork_call()
1808 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_initial); in __kmp_fork_call()
1816 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1833 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid, in __kmp_fork_call()
1835 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0); in __kmp_fork_call()
1837 task_info = OMPT_CUR_TASK_INFO(master_th); in __kmp_fork_call()
1841 implicit_task_data = OMPT_CUR_TASK_DATA(master_th); in __kmp_fork_call()
1844 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th), in __kmp_fork_call()
1847 OMPT_CUR_TASK_INFO(master_th)->thread_num = in __kmp_fork_call()
1852 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
1875 OMPT_CUR_TASK_INFO(master_th)->thread_num, in __kmp_fork_call()
1879 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_fork_call()
1880 __ompt_lw_taskteam_unlink(master_th); in __kmp_fork_call()
1887 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1894 __ompt_lw_taskteam_init(&lwt, master_th, gtid, &ompt_parallel_data, in __kmp_fork_call()
1898 __ompt_lw_taskteam_link(&lwt, master_th, 1); in __kmp_fork_call()
1919 parent_team->t.t_active_level, master_th, in __kmp_fork_call()
1920 master_th->th.th_current_task, in __kmp_fork_call()
1921 master_th->th.th_current_task->td_icvs.max_active_levels)); in __kmp_fork_call()
1925 master_th->th.th_current_task->td_flags.executing = 0; in __kmp_fork_call()
1927 if (!master_th->th.th_teams_microtask || level > teams_level) { in __kmp_fork_call()
1933 int nthreads_icv = master_th->th.th_current_task->td_icvs.nproc; in __kmp_fork_call()
1942 kmp_proc_bind_t proc_bind = master_th->th.th_set_proc_bind; in __kmp_fork_call()
1945 if (master_th->th.th_current_task->td_icvs.proc_bind == proc_bind_false) { in __kmp_fork_call()
1951 proc_bind = master_th->th.th_current_task->td_icvs.proc_bind; in __kmp_fork_call()
1959 master_th->th.th_current_task->td_icvs.proc_bind)) { in __kmp_fork_call()
1965 master_th->th.th_set_proc_bind = proc_bind_default; in __kmp_fork_call()
1969 copy_icvs(&new_icvs, &master_th->th.th_current_task->td_icvs); in __kmp_fork_call()
1985 argc USE_NESTED_HOT_ARG(master_th)); in __kmp_fork_call()
1994 &master_th->th.th_current_task->td_icvs, in __kmp_fork_call()
1995 argc USE_NESTED_HOT_ARG(master_th)); in __kmp_fork_call()
2012 if (!master_th->th.th_teams_microtask || level > teams_level) { in __kmp_fork_call()
2029 KMP_CHECK_UPDATE(team->t.t_def_allocator, master_th->th.th_def_allocator); in __kmp_fork_call()
2041 KMP_DEBUG_ASSERT(master_th->th.th_task_team == in __kmp_fork_call()
2042 parent_team->t.t_task_team[master_th->th.th_task_state]); in __kmp_fork_call()
2045 __kmp_gtid_from_thread(master_th), in __kmp_fork_call()
2046 master_th->th.th_task_team, parent_team, in __kmp_fork_call()
2047 team->t.t_task_team[master_th->th.th_task_state], team)); in __kmp_fork_call()
2049 if (active_level || master_th->th.th_task_team) { in __kmp_fork_call()
2051 KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack); in __kmp_fork_call()
2052 if (master_th->th.th_task_state_top >= in __kmp_fork_call()
2053 master_th->th.th_task_state_stack_sz) { // increase size in __kmp_fork_call()
2054 kmp_uint32 new_size = 2 * master_th->th.th_task_state_stack_sz; in __kmp_fork_call()
2058 for (i = 0; i < master_th->th.th_task_state_stack_sz; ++i) { in __kmp_fork_call()
2059 new_stack[i] = master_th->th.th_task_state_memo_stack[i]; in __kmp_fork_call()
2061 for (i = master_th->th.th_task_state_stack_sz; i < new_size; in __kmp_fork_call()
2065 old_stack = master_th->th.th_task_state_memo_stack; in __kmp_fork_call()
2066 master_th->th.th_task_state_memo_stack = new_stack; in __kmp_fork_call()
2067 master_th->th.th_task_state_stack_sz = new_size; in __kmp_fork_call()
2071 master_th->th in __kmp_fork_call()
2072 .th_task_state_memo_stack[master_th->th.th_task_state_top] = in __kmp_fork_call()
2073 master_th->th.th_task_state; in __kmp_fork_call()
2074 master_th->th.th_task_state_top++; in __kmp_fork_call()
2076 if (master_th->th.th_hot_teams && in __kmp_fork_call()
2078 team == master_th->th.th_hot_teams[active_level].hot_team) { in __kmp_fork_call()
2080 master_th->th.th_task_state = in __kmp_fork_call()
2081 master_th->th in __kmp_fork_call()
2082 .th_task_state_memo_stack[master_th->th.th_task_state_top]; in __kmp_fork_call()
2085 master_th->th.th_task_state = 0; in __kmp_fork_call()
2091 KMP_DEBUG_ASSERT((master_th->th.th_task_team == NULL) || in __kmp_fork_call()
2127 __kmp_fork_team_threads(root, team, master_th, gtid); in __kmp_fork_call()
2129 &master_th->th.th_current_task->td_icvs, loc); in __kmp_fork_call()
2132 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
2139 && !master_th->th.th_teams_microtask) { // not in teams construct in __kmp_fork_call()
2148 master_th->th.th_frame_time = tmp_time; in __kmp_fork_call()
2167 root, team, master_th, gtid)); in __kmp_fork_call()
2192 root, team, master_th, gtid)); in __kmp_fork_call()
2231 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
2271 kmp_info_t *master_th; in __kmp_join_call() local
2278 master_th = __kmp_threads[gtid]; in __kmp_join_call()
2279 root = master_th->th.th_root; in __kmp_join_call()
2280 team = master_th->th.th_team; in __kmp_join_call()
2283 master_th->th.th_ident = loc; in __kmp_join_call()
2292 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_join_call()
2300 __kmp_gtid_from_thread(master_th), team, in __kmp_join_call()
2301 team->t.t_task_team[master_th->th.th_task_state], in __kmp_join_call()
2302 master_th->th.th_task_team)); in __kmp_join_call()
2303 KMP_DEBUG_ASSERT(master_th->th.th_task_team == in __kmp_join_call()
2304 team->t.t_task_team[master_th->th.th_task_state]); in __kmp_join_call()
2309 if (master_th->th.th_teams_microtask) { in __kmp_join_call()
2312 int tlevel = master_th->th.th_teams_level; in __kmp_join_call()
2328 __kmp_join_restore_state(master_th, parent_team); in __kmp_join_call()
2350 master_th->th.th_task_state = in __kmp_join_call()
2374 (!master_th->th.th_teams_microtask || /* not in teams construct */ in __kmp_join_call()
2375 master_th->th.th_teams_size.nteams == 1)) { in __kmp_join_call()
2376 master_th->th.th_ident = loc; in __kmp_join_call()
2382 master_th->th.th_frame_time, 0, loc, in __kmp_join_call()
2383 master_th->th.th_team_nproc, 1); in __kmp_join_call()
2390 if (master_th->th.th_teams_microtask && !exit_teams && in __kmp_join_call()
2392 team->t.t_level == master_th->th.th_teams_level + 1) { in __kmp_join_call()
2404 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit); in __kmp_join_call()
2408 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th); in __kmp_join_call()
2409 __ompt_lw_taskteam_unlink(master_th); in __kmp_join_call()
2421 if (master_th->th.th_team_nproc < master_th->th.th_teams_size.nth) { in __kmp_join_call()
2422 int old_num = master_th->th.th_team_nproc; in __kmp_join_call()
2423 int new_num = master_th->th.th_teams_size.nth; in __kmp_join_call()
2443 other_threads[i]->th.th_task_state = master_th->th.th_task_state; in __kmp_join_call()
2450 __kmp_join_ompt(gtid, master_th, parent_team, &ompt_parallel_data, in __kmp_join_call()
2459 master_th->th.th_info.ds.ds_tid = team->t.t_master_tid; in __kmp_join_call()
2460 master_th->th.th_local.this_construct = team->t.t_master_this_cons; in __kmp_join_call()
2462 master_th->th.th_dispatch = &parent_team->t.t_dispatch[team->t.t_master_tid]; in __kmp_join_call()
2469 if (!master_th->th.th_teams_microtask || in __kmp_join_call()
2470 team->t.t_level > master_th->th.th_teams_level) { in __kmp_join_call()
2486 OMPT_CUR_TASK_INFO(master_th)->thread_num, flags); in __kmp_join_call()
2494 master_th, team)); in __kmp_join_call()
2495 __kmp_pop_current_task_from_thread(master_th); in __kmp_join_call()
2499 master_th->th.th_first_place = team->t.t_first_place; in __kmp_join_call()
2500 master_th->th.th_last_place = team->t.t_last_place; in __kmp_join_call()
2502 master_th->th.th_def_allocator = team->t.t_def_allocator; in __kmp_join_call()
2514 master_th)); // this will free worker threads in __kmp_join_call()
2521 master_th->th.th_team = parent_team; in __kmp_join_call()
2522 master_th->th.th_team_nproc = parent_team->t.t_nproc; in __kmp_join_call()
2523 master_th->th.th_team_master = parent_team->t.t_threads[0]; in __kmp_join_call()
2524 master_th->th.th_team_serialized = parent_team->t.t_serialized; in __kmp_join_call()
2528 parent_team != master_th->th.th_serial_team && in __kmp_join_call()
2531 master_th->th.th_serial_team USE_NESTED_HOT_ARG(NULL)); in __kmp_join_call()
2532 master_th->th.th_serial_team = parent_team; in __kmp_join_call()
2536 if (master_th->th.th_task_state_top > in __kmp_join_call()
2538 KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack); in __kmp_join_call()
2540 master_th->th.th_task_state_memo_stack[master_th->th.th_task_state_top] = in __kmp_join_call()
2541 master_th->th.th_task_state; in __kmp_join_call()
2542 --master_th->th.th_task_state_top; // pop in __kmp_join_call()
2544 master_th->th.th_task_state = in __kmp_join_call()
2545 master_th->th in __kmp_join_call()
2546 .th_task_state_memo_stack[master_th->th.th_task_state_top]; in __kmp_join_call()
2549 master_th->th.th_task_team = in __kmp_join_call()
2550 parent_team->t.t_task_team[master_th->th.th_task_state]; in __kmp_join_call()
2553 __kmp_gtid_from_thread(master_th), master_th->th.th_task_team, in __kmp_join_call()
2560 master_th->th.th_current_task->td_flags.executing = 1; in __kmp_join_call()
2570 __kmp_join_ompt(gtid, master_th, parent_team, parallel_data, flags, in __kmp_join_call()
4621 kmp_info_t *master_th = team->t.t_threads[0]; in __kmp_partition_places() local
4622 KMP_DEBUG_ASSERT(master_th != NULL); in __kmp_partition_places()
4624 int first_place = master_th->th.th_first_place; in __kmp_partition_places()
4625 int last_place = master_th->th.th_last_place; in __kmp_partition_places()
4626 int masters_place = master_th->th.th_current_place; in __kmp_partition_places()