• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/openmp/runtime/src/

Lines Matching refs:master_th

958                                     kmp_info_t *master_th, int master_gtid) {
967 master_th->th.th_info.ds.ds_tid = 0;
968 master_th->th.th_team = team;
969 master_th->th.th_team_nproc = team->t.t_nproc;
970 master_th->th.th_team_master = master_th;
971 master_th->th.th_team_serialized = FALSE;
972 master_th->th.th_dispatch = &team->t.t_dispatch[0];
977 kmp_hot_team_ptr_t *hot_teams = master_th->th.th_hot_teams;
981 if (master_th->th.th_teams_microtask) { // are we inside the teams?
982 if (master_th->th.th_teams_size.nteams > 1) {
987 master_th->th.th_teams_level == team->t.t_level) {
1012 team->t.t_threads[0] = master_th;
1013 __kmp_initialize_info(master_th, team, 0, master_gtid);
1030 thr->th.th_teams_microtask = master_th->th.th_teams_microtask;
1031 thr->th.th_teams_level = master_th->th.th_teams_level;
1032 thr->th.th_teams_size = master_th->th.th_teams_size;
1399 kmp_info_t *master_th;
1432 master_th = __kmp_threads[gtid]; // AC: potentially unsafe, not in sync with
1434 parent_team = master_th->th.th_team;
1435 master_tid = master_th->th.th_info.ds.ds_tid;
1436 master_this_cons = master_th->th.th_local.this_construct;
1437 root = master_th->th.th_root;
1439 master_set_numthreads = master_th->th.th_set_nproc;
1460 teams_level = master_th->th.th_teams_level;
1462 p_hot_teams = &master_th->th.th_hot_teams;
1486 master_th->th.ompt_thread_info.state = ompt_state_overhead;
1490 master_th->th.th_ident = loc;
1492 if (master_th->th.th_teams_microtask && ap &&
1504 if (parent_team == master_th->th.th_serial_team) {
1516 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid,
1520 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0);
1524 implicit_task_data = OMPT_CUR_TASK_DATA(master_th);
1526 OMPT_CUR_TASK_INFO(master_th)
1529 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th),
1531 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit);
1535 master_th->th.ompt_thread_info.state = ompt_state_work_parallel;
1558 OMPT_CUR_TASK_INFO(master_th)->frame.exit_frame = ompt_data_none;
1562 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit);
1564 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th);
1565 __ompt_lw_taskteam_unlink(master_th);
1568 &ompt_parallel_data, OMPT_CUR_TASK_DATA(master_th),
1572 master_th->th.ompt_thread_info.state = ompt_state_overhead;
1583 parent_team->t.t_def_allocator = master_th->th.th_def_allocator; // save
1588 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid,
1590 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 1, true);
1596 if (master_set_numthreads < master_th->th.th_teams_size.nth) {
1605 master_th->th.th_set_nproc = 0;
1618 "master_th=%p, gtid=%d\n",
1619 root, parent_team, master_th, gtid));
1622 "master_th=%p, gtid=%d\n",
1623 root, parent_team, master_th, gtid));
1643 KMP_DEBUG_ASSERT(master_th->th.th_task_team ==
1644 parent_team->t.t_task_team[master_th->th.th_task_state]);
1649 master_th->th.th_current_task->td_icvs.max_active_levels) {
1665 if ((get__max_active_levels(master_th) == 1 &&
1694 master_th->th.th_set_nproc = 0;
1714 master_th->th.th_serial_team->t.t_ident = loc;
1717 master_th->th.th_serial_team->t.t_level--;
1728 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid,
1731 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0);
1734 task_info = OMPT_CUR_TASK_INFO(master_th);
1737 OMPT_CUR_TASK_INFO(master_th)
1740 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th),
1742 OMPT_CUR_TASK_INFO(master_th)->thread_num,
1747 master_th->th.ompt_thread_info.state = ompt_state_work_parallel;
1771 OMPT_CUR_TASK_INFO(master_th)->thread_num,
1774 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th);
1775 __ompt_lw_taskteam_unlink(master_th);
1782 master_th->th.ompt_thread_info.state = ompt_state_overhead;
1786 KMP_DEBUG_ASSERT(master_th->th.th_team ==
1787 master_th->th.th_serial_team);
1788 team = master_th->th.th_team;
1809 ompt_task_info_t *task_info = OMPT_CUR_TASK_INFO(master_th);
1813 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_initial);
1821 master_th->th.ompt_thread_info.state = ompt_state_overhead;
1838 __ompt_lw_taskteam_init(&lw_taskteam, master_th, gtid,
1840 __ompt_lw_taskteam_link(&lw_taskteam, master_th, 0);
1842 task_info = OMPT_CUR_TASK_INFO(master_th);
1846 implicit_task_data = OMPT_CUR_TASK_DATA(master_th);
1849 ompt_scope_begin, OMPT_CUR_TEAM_DATA(master_th),
1852 OMPT_CUR_TASK_INFO(master_th)
1857 master_th->th.ompt_thread_info.state = ompt_state_work_parallel;
1880 OMPT_CUR_TASK_INFO(master_th)->thread_num,
1884 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th);
1885 __ompt_lw_taskteam_unlink(master_th);
1892 master_th->th.ompt_thread_info.state = ompt_state_overhead;
1899 __ompt_lw_taskteam_init(&lwt, master_th, gtid, &ompt_parallel_data,
1903 __ompt_lw_taskteam_link(&lwt, master_th, 1);
1922 KF_TRACE(10, ("__kmp_fork_call: parent_team_aclevel=%d, master_th=%p, "
1924 parent_team->t.t_active_level, master_th,
1925 master_th->th.th_current_task,
1926 master_th->th.th_current_task->td_icvs.max_active_levels));
1929 // KMP_ASSERT( master_th->th.th_current_task->td_flags.executing == 1 );
1930 master_th->th.th_current_task->td_flags.executing = 0;
1932 if (!master_th->th.th_teams_microtask || level > teams_level) {
1938 int nthreads_icv = master_th->th.th_current_task->td_icvs.nproc;
1947 kmp_proc_bind_t proc_bind = master_th->th.th_set_proc_bind;
1950 if (master_th->th.th_current_task->td_icvs.proc_bind == proc_bind_false) {
1956 proc_bind = master_th->th.th_current_task->td_icvs.proc_bind;
1964 master_th->th.th_current_task->td_icvs.proc_bind)) {
1970 master_th->th.th_set_proc_bind = proc_bind_default;
1974 copy_icvs(&new_icvs, &master_th->th.th_current_task->td_icvs);
1990 argc USE_NESTED_HOT_ARG(master_th));
1999 &master_th->th.th_current_task->td_icvs,
2000 argc USE_NESTED_HOT_ARG(master_th));
2017 if (!master_th->th.th_teams_microtask || level > teams_level) {
2034 KMP_CHECK_UPDATE(team->t.t_def_allocator, master_th->th.th_def_allocator);
2042 KMP_DEBUG_ASSERT(master_th->th.th_task_team ==
2043 parent_team->t.t_task_team[master_th->th.th_task_state]);
2046 __kmp_gtid_from_thread(master_th),
2047 master_th->th.th_task_team, parent_team,
2048 team->t.t_task_team[master_th->th.th_task_state], team));
2050 if (active_level || master_th->th.th_task_team) {
2052 KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack);
2053 if (master_th->th.th_task_state_top >=
2054 master_th->th.th_task_state_stack_sz) { // increase size
2055 kmp_uint32 new_size = 2 * master_th->th.th_task_state_stack_sz;
2059 for (i = 0; i < master_th->th.th_task_state_stack_sz; ++i) {
2060 new_stack[i] = master_th->th.th_task_state_memo_stack[i];
2062 for (i = master_th->th.th_task_state_stack_sz; i < new_size;
2066 old_stack = master_th->th.th_task_state_memo_stack;
2067 master_th->th.th_task_state_memo_stack = new_stack;
2068 master_th->th.th_task_state_stack_sz = new_size;
2072 master_th->th
2073 .th_task_state_memo_stack[master_th->th.th_task_state_top] =
2074 master_th->th.th_task_state;
2075 master_th->th.th_task_state_top++;
2077 if (master_th->th.th_hot_teams &&
2079 team == master_th->th.th_hot_teams[active_level].hot_team) {
2081 master_th->th.th_task_state =
2082 master_th->th
2083 .th_task_state_memo_stack[master_th->th.th_task_state_top];
2086 master_th->th.th_task_state = 0;
2092 KMP_DEBUG_ASSERT((master_th->th.th_task_team == NULL) ||
2128 __kmp_fork_team_threads(root, team, master_th, gtid);
2130 &master_th->th.th_current_task->td_icvs, loc);
2133 master_th->th.ompt_thread_info.state = ompt_state_work_parallel;
2140 && !master_th->th.th_teams_microtask) { // not in teams construct
2149 master_th->th.th_frame_time = tmp_time;
2167 ("__kmp_internal_fork : root=%p, team=%p, master_th=%p, gtid=%d\n",
2168 root, team, master_th, gtid));
2183 "master_th=%p, gtid=%d\n",
2184 root, team, master_th, gtid));
2224 master_th->th.ompt_thread_info.state = ompt_state_overhead;
2264 kmp_info_t *master_th;
2271 master_th = __kmp_threads[gtid];
2272 root = master_th->th.th_root;
2273 team = master_th->th.th_team;
2276 master_th->th.th_ident = loc;
2281 master_th->th.ompt_thread_info.state = ompt_state_overhead;
2289 __kmp_gtid_from_thread(master_th), team,
2290 team->t.t_task_team[master_th->th.th_task_state],
2291 master_th->th.th_task_team));
2292 KMP_DEBUG_ASSERT(master_th->th.th_task_team ==
2293 team->t.t_task_team[master_th->th.th_task_state]);
2298 if (master_th->th.th_teams_microtask) {
2301 int tlevel = master_th->th.th_teams_level;
2317 __kmp_join_restore_state(master_th, parent_team);
2331 master_th->th.th_task_state =
2351 !master_th->th.th_teams_microtask) { /* not in teams construct */
2352 master_th->th.th_ident = loc;
2358 master_th->th.th_frame_time, 0, loc,
2359 master_th->th.th_team_nproc, 1);
2366 if (master_th->th.th_teams_microtask && !exit_teams &&
2368 team->t.t_level == master_th->th.th_teams_level + 1) {
2380 OMPT_CUR_TASK_INFO(master_th)->thread_num, ompt_task_implicit);
2384 ompt_parallel_data = *OMPT_CUR_TEAM_DATA(master_th);
2385 __ompt_lw_taskteam_unlink(master_th);
2397 if (master_th->th.th_team_nproc < master_th->th.th_teams_size.nth) {
2398 int old_num = master_th->th.th_team_nproc;
2399 int new_num = master_th->th.th_teams_size.nth;
2419 other_threads[i]->th.th_task_state = master_th->th.th_task_state;
2426 __kmp_join_ompt(gtid, master_th, parent_team, &ompt_parallel_data,
2435 master_th->th.th_info.ds.ds_tid = team->t.t_master_tid;
2436 master_th->th.th_local.this_construct = team->t.t_master_this_cons;
2438 master_th->th.th_dispatch = &parent_team->t.t_dispatch[team->t.t_master_tid];
2445 if (!master_th->th.th_teams_microtask ||
2446 team->t.t_level > master_th->th.th_teams_level) {
2462 OMPT_CUR_TASK_INFO(master_th)->thread_num, flags);
2470 master_th, team));
2471 __kmp_pop_current_task_from_thread(master_th);
2475 master_th->th.th_first_place = team->t.t_first_place;
2476 master_th->th.th_last_place = team->t.t_last_place;
2478 master_th->th.th_def_allocator = team->t.t_def_allocator;
2486 master_th)); // this will free worker threads
2493 master_th->th.th_team = parent_team;
2494 master_th->th.th_team_nproc = parent_team->t.t_nproc;
2495 master_th->th.th_team_master = parent_team->t.t_threads[0];
2496 master_th->th.th_team_serialized = parent_team->t.t_serialized;
2500 parent_team != master_th->th.th_serial_team &&
2503 master_th->th.th_serial_team USE_NESTED_HOT_ARG(NULL));
2504 master_th->th.th_serial_team = parent_team;
2508 if (master_th->th.th_task_state_top >
2510 KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack);
2512 master_th->th.th_task_state_memo_stack[master_th->th.th_task_state_top] =
2513 master_th->th.th_task_state;
2514 --master_th->th.th_task_state_top; // pop
2516 master_th->th.th_task_state =
2517 master_th->th
2518 .th_task_state_memo_stack[master_th->th.th_task_state_top];
2521 master_th->th.th_task_team =
2522 parent_team->t.t_task_team[master_th->th.th_task_state];
2525 __kmp_gtid_from_thread(master_th), master_th->th.th_task_team,
2531 // KMP_ASSERT( master_th->th.th_current_task->td_flags.executing == 0 );
2532 master_th->th.th_current_task->td_flags.executing = 1;
2542 __kmp_join_ompt(gtid, master_th, parent_team, parallel_data, flags,
4497 kmp_info_t *master_th = team->t.t_threads[0];
4498 KMP_DEBUG_ASSERT(master_th != NULL);
4500 int first_place = master_th->th.th_first_place;
4501 int last_place = master_th->th.th_last_place;
4502 int masters_place = master_th->th.th_current_place;