Lines Matching refs:th
147 return __kmp_entry_thread()->th.th_team->t.t_nproc; in __kmpc_bound_num_threads()
219 return __kmp_entry_thread()->th.th_root->r.r_active; in __kmpc_in_parallel()
291 ompt_frame = &master_th->th.th_current_task->ompt_task_info.frame; in __kmpc_fork_call()
408 this_thr->th.th_teams_microtask = microtask; in __kmpc_fork_teams()
409 this_thr->th.th_teams_level = in __kmpc_fork_teams()
410 this_thr->th.th_team->t.t_level; // AC: can be >0 on host in __kmpc_fork_teams()
413 kmp_team_t *parent_team = this_thr->th.th_team; in __kmpc_fork_teams()
424 if (this_thr->th.th_teams_size.nteams == 0) { in __kmpc_fork_teams()
427 KMP_DEBUG_ASSERT(this_thr->th.th_set_nproc >= 1); in __kmpc_fork_teams()
428 KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1); in __kmpc_fork_teams()
429 KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1); in __kmpc_fork_teams()
443 KMP_DEBUG_ASSERT(this_thr->th.th_cg_roots); in __kmpc_fork_teams()
444 kmp_cg_root_t *tmp = this_thr->th.th_cg_roots; in __kmpc_fork_teams()
445 this_thr->th.th_cg_roots = tmp->up; in __kmpc_fork_teams()
448 this_thr, tmp, this_thr->th.th_cg_roots, tmp->cg_nthreads)); in __kmpc_fork_teams()
455 KMP_DEBUG_ASSERT(this_thr->th.th_cg_roots); in __kmpc_fork_teams()
456 this_thr->th.th_current_task->td_icvs.thread_limit = in __kmpc_fork_teams()
457 this_thr->th.th_cg_roots->cg_thread_limit; in __kmpc_fork_teams()
459 this_thr->th.th_teams_microtask = NULL; in __kmpc_fork_teams()
460 this_thr->th.th_teams_level = 0; in __kmpc_fork_teams()
461 *(kmp_int64 *)(&this_thr->th.th_teams_size) = 0L; in __kmpc_fork_teams()
530 serial_team = this_thr->th.th_serial_team; in __kmpc_end_serialized_parallel()
532 kmp_task_team_t *task_team = this_thr->th.th_task_team; in __kmpc_end_serialized_parallel()
541 KMP_DEBUG_ASSERT(this_thr->th.th_team == serial_team); in __kmpc_end_serialized_parallel()
542 KMP_DEBUG_ASSERT(serial_team != this_thr->th.th_root->r.r_root_team); in __kmpc_end_serialized_parallel()
548 this_thr->th.ompt_thread_info.state != ompt_state_overhead) { in __kmpc_end_serialized_parallel()
567 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmpc_end_serialized_parallel()
575 copy_icvs(&serial_team->t.t_threads[0]->th.th_current_task->td_icvs, top); in __kmpc_end_serialized_parallel()
589 this_thr->th.th_def_allocator = serial_team->t.t_def_allocator; // restore in __kmpc_end_serialized_parallel()
610 this_thr->th.th_team = serial_team->t.t_parent; in __kmpc_end_serialized_parallel()
611 this_thr->th.th_info.ds.ds_tid = serial_team->t.t_master_tid; in __kmpc_end_serialized_parallel()
614 this_thr->th.th_team_nproc = serial_team->t.t_parent->t.t_nproc; /* JPH */ in __kmpc_end_serialized_parallel()
615 this_thr->th.th_team_master = in __kmpc_end_serialized_parallel()
617 this_thr->th.th_team_serialized = this_thr->th.th_team->t.t_serialized; in __kmpc_end_serialized_parallel()
620 this_thr->th.th_dispatch = in __kmpc_end_serialized_parallel()
621 &this_thr->th.th_team->t.t_dispatch[serial_team->t.t_master_tid]; in __kmpc_end_serialized_parallel()
623 KMP_ASSERT(this_thr->th.th_current_task->td_flags.executing == 0); in __kmpc_end_serialized_parallel()
624 this_thr->th.th_current_task->td_flags.executing = 1; in __kmpc_end_serialized_parallel()
628 this_thr->th.th_task_team = in __kmpc_end_serialized_parallel()
629 this_thr->th.th_team->t.t_task_team[this_thr->th.th_task_state]; in __kmpc_end_serialized_parallel()
633 global_tid, this_thr->th.th_task_team, this_thr->th.th_team)); in __kmpc_end_serialized_parallel()
636 if (this_thr->th.th_team->t.t_level == 0 && __kmp_affin_reset) { in __kmpc_end_serialized_parallel()
653 this_thr->th.ompt_thread_info.state = in __kmpc_end_serialized_parallel()
654 ((this_thr->th.th_team_serialized) ? ompt_state_work_serial in __kmpc_end_serialized_parallel()
753 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier()
797 kmp_team_t *team = this_thr->th.th_team; in __kmpc_master()
841 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_master()
887 kmp_team_t *team = this_thr->th.th_team; in __kmpc_masked()
928 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_masked()
952 kmp_info_t *th; in __kmpc_ordered() local
968 th = __kmp_threads[gtid]; in __kmpc_ordered()
979 th->th.ompt_thread_info.wait_id = lck; in __kmpc_ordered()
980 th->th.ompt_thread_info.state = ompt_state_wait_ordered; in __kmpc_ordered()
992 if (th->th.th_dispatch->th_deo_fcn != 0) in __kmpc_ordered()
993 (*th->th.th_dispatch->th_deo_fcn)(>id, &cid, loc); in __kmpc_ordered()
1000 th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmpc_ordered()
1001 th->th.ompt_thread_info.wait_id = 0; in __kmpc_ordered()
1025 kmp_info_t *th; in __kmpc_end_ordered() local
1035 th = __kmp_threads[gtid]; in __kmpc_end_ordered()
1037 if (th->th.th_dispatch->th_dxo_fcn != 0) in __kmpc_end_ordered()
1038 (*th->th.th_dispatch->th_dxo_fcn)(>id, &cid, loc); in __kmpc_end_ordered()
1310 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical()
1527 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical_with_hint()
1566 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical_with_hint()
1737 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier_master()
1801 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier_master_nowait()
1849 kmp_team_t *team = this_thr->th.th_team; in __kmpc_single()
1897 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_single()
2030 if (__kmp_threads[gtid]->th.th_team->t.t_level == 0 && __kmp_affin_reset) { in KMP_EXPAND_NAME()
2048 if (__kmp_threads[gtid]->th.th_team->t.t_level == 0 && __kmp_affin_reset) { in KMP_EXPAND_NAME()
2216 __kmp_threads[gtid]->th.th_ident = loc; in __kmpc_copyprivate()
2230 __kmp_threads[gtid]->th.th_ident = loc; // TODO: check if it is needed (e.g. in __kmpc_copyprivate()
2290 __kmp_threads[gtid]->th.th_ident = loc; in __kmpc_copyprivate_light()
3375 ((__kmp_threads[(gtid)]->th.th_local.packed_reduction_method) = (rmethod))
3378 (__kmp_threads[(gtid)]->th.th_local.packed_reduction_method)
3490 __kmp_swap_teams_for_teams_reduction(kmp_info_t *th, kmp_team_t **team_p, in __kmp_swap_teams_for_teams_reduction() argument
3495 if (th->th.th_teams_microtask) { in __kmp_swap_teams_for_teams_reduction()
3496 *team_p = team = th->th.th_team; in __kmp_swap_teams_for_teams_reduction()
3497 if (team->t.t_level == th->th.th_teams_level) { in __kmp_swap_teams_for_teams_reduction()
3499 KMP_DEBUG_ASSERT(!th->th.th_info.ds.ds_tid); // AC: check that tid == 0 in __kmp_swap_teams_for_teams_reduction()
3501 th->th.th_info.ds.ds_tid = team->t.t_master_tid; in __kmp_swap_teams_for_teams_reduction()
3502 th->th.th_team = team->t.t_parent; in __kmp_swap_teams_for_teams_reduction()
3503 th->th.th_team_nproc = th->th.th_team->t.t_nproc; in __kmp_swap_teams_for_teams_reduction()
3504 th->th.th_task_team = th->th.th_team->t.t_task_team[0]; in __kmp_swap_teams_for_teams_reduction()
3505 *task_state = th->th.th_task_state; in __kmp_swap_teams_for_teams_reduction()
3506 th->th.th_task_state = 0; in __kmp_swap_teams_for_teams_reduction()
3515 __kmp_restore_swapped_teams(kmp_info_t *th, kmp_team_t *team, int task_state) { in __kmp_restore_swapped_teams() argument
3517 th->th.th_info.ds.ds_tid = 0; in __kmp_restore_swapped_teams()
3518 th->th.th_team = team; in __kmp_restore_swapped_teams()
3519 th->th.th_team_nproc = team->t.t_nproc; in __kmp_restore_swapped_teams()
3520 th->th.th_task_team = team->t.t_task_team[task_state]; in __kmp_restore_swapped_teams()
3521 __kmp_type_convert(task_state, &(th->th.th_task_state)); in __kmp_restore_swapped_teams()
3549 kmp_info_t *th; in __kmpc_reduce_nowait() local
3575 th = __kmp_thread_from_gtid(global_tid); in __kmpc_reduce_nowait()
3576 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_reduce_nowait()
3598 OMPT_REDUCTION_DECL(th, global_tid); in __kmpc_reduce_nowait()
3657 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_reduce_nowait()
3683 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_reduce_nowait()
3777 kmp_info_t *th; in __kmpc_reduce() local
3804 th = __kmp_thread_from_gtid(global_tid); in __kmpc_reduce()
3805 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_reduce()
3811 OMPT_REDUCTION_DECL(th, global_tid); in __kmpc_reduce()
3846 __kmp_threads[global_tid]->th.th_ident = in __kmpc_reduce()
3873 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_reduce()
3896 kmp_info_t *th; in __kmpc_end_reduce() local
3903 th = __kmp_thread_from_gtid(global_tid); in __kmpc_end_reduce()
3904 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_end_reduce()
3910 OMPT_REDUCTION_DECL(th, global_tid); in __kmpc_end_reduce()
3928 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3954 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3976 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3998 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_end_reduce()
4025 return thread->th.th_current_task->td_task_id; in __kmpc_get_taskid()
4040 parent_task = thread->th.th_current_task->td_parent; in __kmpc_get_parent_taskid()
4061 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_init() local
4062 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_init()
4064 kmp_disp_t *pr_buf = th->th.th_dispatch; in __kmpc_doacross_init()
4086 th, sizeof(kmp_int64) * (4 * num_dims + 1)); in __kmpc_doacross_init()
4156 flags = (kmp_uint32 *)__kmp_thread_calloc(th, size, 1); in __kmpc_doacross_init()
4184 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_wait() local
4185 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_wait()
4196 pr_buf = th->th.th_dispatch; in __kmpc_doacross_wait()
4282 &(OMPT_CUR_TASK_INFO(th)->task_data), deps, (kmp_uint32)num_dims); in __kmpc_doacross_wait()
4296 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_post() local
4297 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_post()
4309 pr_buf = th->th.th_dispatch; in __kmpc_doacross_post()
4350 &(OMPT_CUR_TASK_INFO(th)->task_data), deps, (kmp_uint32)num_dims); in __kmpc_doacross_post()
4366 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_fini() local
4367 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_fini()
4368 kmp_disp_t *pr_buf = th->th.th_dispatch; in __kmpc_doacross_fini()
4377 if (num_done == th->th.th_team_nproc) { in __kmpc_doacross_fini()
4386 __kmp_thread_free(th, CCAST(kmp_uint32 *, sh_buf->doacross_flags)); in __kmpc_doacross_fini()
4394 __kmp_thread_free(th, (void *)pr_buf->th_doacross_info); in __kmpc_doacross_fini()
4480 kmp_team_t *team = __kmp_threads[gtid]->th.th_team; in __kmpc_scope()
4496 kmp_team_t *team = __kmp_threads[gtid]->th.th_team; in __kmpc_end_scope()