Lines Matching refs:th
150 return __kmp_entry_thread()->th.th_team->t.t_nproc; in __kmpc_bound_num_threads()
222 return __kmp_entry_thread()->th.th_root->r.r_active; in __kmpc_in_parallel()
299 kmp_team_t *parent_team = master_th->th.th_team; in __kmpc_fork_call()
389 this_thr->th.th_teams_microtask = microtask; in __kmpc_fork_teams()
390 this_thr->th.th_teams_level = in __kmpc_fork_teams()
391 this_thr->th.th_team->t.t_level; // AC: can be >0 on host in __kmpc_fork_teams()
394 kmp_team_t *parent_team = this_thr->th.th_team; in __kmpc_fork_teams()
405 if (this_thr->th.th_teams_size.nteams == 0) { in __kmpc_fork_teams()
408 KMP_DEBUG_ASSERT(this_thr->th.th_set_nproc >= 1); in __kmpc_fork_teams()
409 KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1); in __kmpc_fork_teams()
410 KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1); in __kmpc_fork_teams()
429 this_thr->th.th_teams_microtask = NULL; in __kmpc_fork_teams()
430 this_thr->th.th_teams_level = 0; in __kmpc_fork_teams()
431 *(kmp_int64 *)(&this_thr->th.th_teams_size) = 0L; in __kmpc_fork_teams()
489 serial_team = this_thr->th.th_serial_team; in __kmpc_end_serialized_parallel()
492 kmp_task_team_t *task_team = this_thr->th.th_task_team; in __kmpc_end_serialized_parallel()
502 KMP_DEBUG_ASSERT(this_thr->th.th_team == serial_team); in __kmpc_end_serialized_parallel()
503 KMP_DEBUG_ASSERT(serial_team != this_thr->th.th_root->r.r_root_team); in __kmpc_end_serialized_parallel()
509 this_thr->th.ompt_thread_info.state != ompt_state_overhead) { in __kmpc_end_serialized_parallel()
527 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmpc_end_serialized_parallel()
535 copy_icvs(&serial_team->t.t_threads[0]->th.th_current_task->td_icvs, top); in __kmpc_end_serialized_parallel()
553 this_thr->th.th_def_allocator = serial_team->t.t_def_allocator; // restore in __kmpc_end_serialized_parallel()
569 this_thr->th.th_team = serial_team->t.t_parent; in __kmpc_end_serialized_parallel()
570 this_thr->th.th_info.ds.ds_tid = serial_team->t.t_master_tid; in __kmpc_end_serialized_parallel()
573 this_thr->th.th_team_nproc = serial_team->t.t_parent->t.t_nproc; /* JPH */ in __kmpc_end_serialized_parallel()
574 this_thr->th.th_team_master = in __kmpc_end_serialized_parallel()
576 this_thr->th.th_team_serialized = this_thr->th.th_team->t.t_serialized; in __kmpc_end_serialized_parallel()
579 this_thr->th.th_dispatch = in __kmpc_end_serialized_parallel()
580 &this_thr->th.th_team->t.t_dispatch[serial_team->t.t_master_tid]; in __kmpc_end_serialized_parallel()
584 KMP_ASSERT(this_thr->th.th_current_task->td_flags.executing == 0); in __kmpc_end_serialized_parallel()
585 this_thr->th.th_current_task->td_flags.executing = 1; in __kmpc_end_serialized_parallel()
589 this_thr->th.th_task_team = in __kmpc_end_serialized_parallel()
590 this_thr->th.th_team->t.t_task_team[this_thr->th.th_task_state]; in __kmpc_end_serialized_parallel()
594 global_tid, this_thr->th.th_task_team, this_thr->th.th_team)); in __kmpc_end_serialized_parallel()
608 this_thr->th.ompt_thread_info.state = in __kmpc_end_serialized_parallel()
609 ((this_thr->th.th_team_serialized) ? ompt_state_work_serial in __kmpc_end_serialized_parallel()
716 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier()
757 kmp_team_t *team = this_thr->th.th_team; in __kmpc_master()
801 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_master()
829 kmp_info_t *th; in __kmpc_ordered() local
842 th = __kmp_threads[gtid]; in __kmpc_ordered()
853 th->th.ompt_thread_info.wait_id = lck; in __kmpc_ordered()
854 th->th.ompt_thread_info.state = ompt_state_wait_ordered; in __kmpc_ordered()
866 if (th->th.th_dispatch->th_deo_fcn != 0) in __kmpc_ordered()
867 (*th->th.th_dispatch->th_deo_fcn)(>id, &cid, loc); in __kmpc_ordered()
874 th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmpc_ordered()
875 th->th.ompt_thread_info.wait_id = 0; in __kmpc_ordered()
899 kmp_info_t *th; in __kmpc_end_ordered() local
908 th = __kmp_threads[gtid]; in __kmpc_end_ordered()
910 if (th->th.th_dispatch->th_dxo_fcn != 0) in __kmpc_end_ordered()
911 (*th->th.th_dispatch->th_dxo_fcn)(>id, &cid, loc); in __kmpc_end_ordered()
1189 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical()
1403 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical_with_hint()
1442 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical_with_hint()
1610 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier_master()
1672 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier_master_nowait()
1724 kmp_team_t *team = this_thr->th.th_team; in __kmpc_single()
1771 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_single()
2076 __kmp_threads[gtid]->th.th_ident = loc; in __kmpc_copyprivate()
2092 __kmp_threads[gtid]->th.th_ident = loc; // TODO: check if it is needed (e.g. in __kmpc_copyprivate()
3186 ((__kmp_threads[(gtid)]->th.th_local.packed_reduction_method) = (rmethod))
3189 (__kmp_threads[(gtid)]->th.th_local.packed_reduction_method)
3302 __kmp_swap_teams_for_teams_reduction(kmp_info_t *th, kmp_team_t **team_p, in __kmp_swap_teams_for_teams_reduction() argument
3307 if (th->th.th_teams_microtask) { in __kmp_swap_teams_for_teams_reduction()
3308 *team_p = team = th->th.th_team; in __kmp_swap_teams_for_teams_reduction()
3309 if (team->t.t_level == th->th.th_teams_level) { in __kmp_swap_teams_for_teams_reduction()
3311 KMP_DEBUG_ASSERT(!th->th.th_info.ds.ds_tid); // AC: check that tid == 0 in __kmp_swap_teams_for_teams_reduction()
3313 th->th.th_info.ds.ds_tid = team->t.t_master_tid; in __kmp_swap_teams_for_teams_reduction()
3314 th->th.th_team = team->t.t_parent; in __kmp_swap_teams_for_teams_reduction()
3315 th->th.th_team_nproc = th->th.th_team->t.t_nproc; in __kmp_swap_teams_for_teams_reduction()
3316 th->th.th_task_team = th->th.th_team->t.t_task_team[0]; in __kmp_swap_teams_for_teams_reduction()
3317 *task_state = th->th.th_task_state; in __kmp_swap_teams_for_teams_reduction()
3318 th->th.th_task_state = 0; in __kmp_swap_teams_for_teams_reduction()
3327 __kmp_restore_swapped_teams(kmp_info_t *th, kmp_team_t *team, int task_state) { in __kmp_restore_swapped_teams() argument
3329 th->th.th_info.ds.ds_tid = 0; in __kmp_restore_swapped_teams()
3330 th->th.th_team = team; in __kmp_restore_swapped_teams()
3331 th->th.th_team_nproc = team->t.t_nproc; in __kmp_restore_swapped_teams()
3332 th->th.th_task_team = team->t.t_task_team[task_state]; in __kmp_restore_swapped_teams()
3333 th->th.th_task_state = task_state; in __kmp_restore_swapped_teams()
3363 kmp_info_t *th; in __kmpc_reduce_nowait() local
3388 th = __kmp_thread_from_gtid(global_tid); in __kmpc_reduce_nowait()
3389 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_reduce_nowait()
3466 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_reduce_nowait()
3493 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_reduce_nowait()
3582 kmp_info_t *th; in __kmpc_reduce() local
3608 th = __kmp_thread_from_gtid(global_tid); in __kmpc_reduce()
3609 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_reduce()
3647 __kmp_threads[global_tid]->th.th_ident = in __kmpc_reduce()
3675 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_reduce()
3701 kmp_info_t *th; in __kmpc_end_reduce() local
3709 th = __kmp_thread_from_gtid(global_tid); in __kmpc_end_reduce()
3710 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_end_reduce()
3733 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3757 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3779 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3802 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_end_reduce()
3830 return thread->th.th_current_task->td_task_id; in __kmpc_get_taskid()
3845 parent_task = thread->th.th_current_task->td_parent; in __kmpc_get_parent_taskid()
3866 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_init() local
3867 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_init()
3869 kmp_disp_t *pr_buf = th->th.th_dispatch; in __kmpc_doacross_init()
3891 th, sizeof(kmp_int64) * (4 * num_dims + 1)); in __kmpc_doacross_init()
3960 flags = (kmp_uint32 *)__kmp_thread_calloc(th, size, 1); in __kmpc_doacross_init()
3986 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_wait() local
3987 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_wait()
3998 pr_buf = th->th.th_dispatch; in __kmpc_doacross_wait()
4079 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_post() local
4080 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_post()
4092 pr_buf = th->th.th_dispatch; in __kmpc_doacross_post()
4131 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_fini() local
4132 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_fini()
4133 kmp_disp_t *pr_buf = th->th.th_dispatch; in __kmpc_doacross_fini()
4141 if (num_done == th->th.th_team_nproc) { in __kmpc_doacross_fini()
4150 __kmp_thread_free(th, CCAST(kmp_uint32 *, sh_buf->doacross_flags)); in __kmpc_doacross_fini()
4158 __kmp_thread_free(th, (void *)pr_buf->th_doacross_info); in __kmpc_doacross_fini()