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 kmp_team_t *parent_team = master_th->th.th_team; in __kmpc_fork_call()
410 this_thr->th.th_teams_microtask = microtask; in __kmpc_fork_teams()
411 this_thr->th.th_teams_level = in __kmpc_fork_teams()
412 this_thr->th.th_team->t.t_level; // AC: can be >0 on host in __kmpc_fork_teams()
415 kmp_team_t *parent_team = this_thr->th.th_team; in __kmpc_fork_teams()
426 if (this_thr->th.th_teams_size.nteams == 0) { in __kmpc_fork_teams()
429 KMP_DEBUG_ASSERT(this_thr->th.th_set_nproc >= 1); in __kmpc_fork_teams()
430 KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1); in __kmpc_fork_teams()
431 KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1); in __kmpc_fork_teams()
445 KMP_DEBUG_ASSERT(this_thr->th.th_cg_roots); in __kmpc_fork_teams()
446 kmp_cg_root_t *tmp = this_thr->th.th_cg_roots; in __kmpc_fork_teams()
447 this_thr->th.th_cg_roots = tmp->up; in __kmpc_fork_teams()
450 this_thr, tmp, this_thr->th.th_cg_roots, tmp->cg_nthreads)); in __kmpc_fork_teams()
457 KMP_DEBUG_ASSERT(this_thr->th.th_cg_roots); in __kmpc_fork_teams()
458 this_thr->th.th_current_task->td_icvs.thread_limit = in __kmpc_fork_teams()
459 this_thr->th.th_cg_roots->cg_thread_limit; in __kmpc_fork_teams()
461 this_thr->th.th_teams_microtask = NULL; in __kmpc_fork_teams()
462 this_thr->th.th_teams_level = 0; in __kmpc_fork_teams()
463 *(kmp_int64 *)(&this_thr->th.th_teams_size) = 0L; in __kmpc_fork_teams()
532 serial_team = this_thr->th.th_serial_team; in __kmpc_end_serialized_parallel()
534 kmp_task_team_t *task_team = this_thr->th.th_task_team; in __kmpc_end_serialized_parallel()
542 KMP_DEBUG_ASSERT(this_thr->th.th_team == serial_team); in __kmpc_end_serialized_parallel()
543 KMP_DEBUG_ASSERT(serial_team != this_thr->th.th_root->r.r_root_team); in __kmpc_end_serialized_parallel()
549 this_thr->th.ompt_thread_info.state != ompt_state_overhead) { in __kmpc_end_serialized_parallel()
568 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmpc_end_serialized_parallel()
576 copy_icvs(&serial_team->t.t_threads[0]->th.th_current_task->td_icvs, top); in __kmpc_end_serialized_parallel()
593 this_thr->th.th_def_allocator = serial_team->t.t_def_allocator; // restore in __kmpc_end_serialized_parallel()
613 this_thr->th.th_team = serial_team->t.t_parent; in __kmpc_end_serialized_parallel()
614 this_thr->th.th_info.ds.ds_tid = serial_team->t.t_master_tid; in __kmpc_end_serialized_parallel()
617 this_thr->th.th_team_nproc = serial_team->t.t_parent->t.t_nproc; /* JPH */ in __kmpc_end_serialized_parallel()
618 this_thr->th.th_team_master = in __kmpc_end_serialized_parallel()
620 this_thr->th.th_team_serialized = this_thr->th.th_team->t.t_serialized; in __kmpc_end_serialized_parallel()
623 this_thr->th.th_dispatch = in __kmpc_end_serialized_parallel()
624 &this_thr->th.th_team->t.t_dispatch[serial_team->t.t_master_tid]; in __kmpc_end_serialized_parallel()
628 KMP_ASSERT(this_thr->th.th_current_task->td_flags.executing == 0); in __kmpc_end_serialized_parallel()
629 this_thr->th.th_current_task->td_flags.executing = 1; in __kmpc_end_serialized_parallel()
633 this_thr->th.th_task_team = in __kmpc_end_serialized_parallel()
634 this_thr->th.th_team->t.t_task_team[this_thr->th.th_task_state]; in __kmpc_end_serialized_parallel()
638 global_tid, this_thr->th.th_task_team, this_thr->th.th_team)); in __kmpc_end_serialized_parallel()
652 this_thr->th.ompt_thread_info.state = in __kmpc_end_serialized_parallel()
653 ((this_thr->th.th_team_serialized) ? ompt_state_work_serial in __kmpc_end_serialized_parallel()
752 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier()
796 kmp_team_t *team = this_thr->th.th_team; in __kmpc_master()
840 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_master()
886 kmp_team_t *team = this_thr->th.th_team; in __kmpc_masked()
927 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_masked()
951 kmp_info_t *th; in __kmpc_ordered() local
967 th = __kmp_threads[gtid]; in __kmpc_ordered()
978 th->th.ompt_thread_info.wait_id = lck; in __kmpc_ordered()
979 th->th.ompt_thread_info.state = ompt_state_wait_ordered; in __kmpc_ordered()
991 if (th->th.th_dispatch->th_deo_fcn != 0) in __kmpc_ordered()
992 (*th->th.th_dispatch->th_deo_fcn)(&gtid, &cid, loc); in __kmpc_ordered()
999 th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmpc_ordered()
1000 th->th.ompt_thread_info.wait_id = 0; in __kmpc_ordered()
1024 kmp_info_t *th; in __kmpc_end_ordered() local
1034 th = __kmp_threads[gtid]; in __kmpc_end_ordered()
1036 if (th->th.th_dispatch->th_dxo_fcn != 0) in __kmpc_end_ordered()
1037 (*th->th.th_dispatch->th_dxo_fcn)(&gtid, &cid, loc); in __kmpc_end_ordered()
1309 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical()
1526 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical_with_hint()
1565 ti = __kmp_threads[global_tid]->th.ompt_thread_info; in __kmpc_critical_with_hint()
1736 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier_master()
1800 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_barrier_master_nowait()
1848 kmp_team_t *team = this_thr->th.th_team; in __kmpc_single()
1896 kmp_team_t *team = this_thr->th.th_team; in __kmpc_end_single()
2205 __kmp_threads[gtid]->th.th_ident = loc; in __kmpc_copyprivate()
2219 __kmp_threads[gtid]->th.th_ident = loc; // TODO: check if it is needed (e.g. in __kmpc_copyprivate()
3309 ((__kmp_threads[(gtid)]->th.th_local.packed_reduction_method) = (rmethod))
3312 (__kmp_threads[(gtid)]->th.th_local.packed_reduction_method)
3424 __kmp_swap_teams_for_teams_reduction(kmp_info_t *th, kmp_team_t **team_p, in __kmp_swap_teams_for_teams_reduction() argument
3429 if (th->th.th_teams_microtask) { in __kmp_swap_teams_for_teams_reduction()
3430 *team_p = team = th->th.th_team; in __kmp_swap_teams_for_teams_reduction()
3431 if (team->t.t_level == th->th.th_teams_level) { in __kmp_swap_teams_for_teams_reduction()
3433 KMP_DEBUG_ASSERT(!th->th.th_info.ds.ds_tid); // AC: check that tid == 0 in __kmp_swap_teams_for_teams_reduction()
3435 th->th.th_info.ds.ds_tid = team->t.t_master_tid; in __kmp_swap_teams_for_teams_reduction()
3436 th->th.th_team = team->t.t_parent; in __kmp_swap_teams_for_teams_reduction()
3437 th->th.th_team_nproc = th->th.th_team->t.t_nproc; in __kmp_swap_teams_for_teams_reduction()
3438 th->th.th_task_team = th->th.th_team->t.t_task_team[0]; in __kmp_swap_teams_for_teams_reduction()
3439 *task_state = th->th.th_task_state; in __kmp_swap_teams_for_teams_reduction()
3440 th->th.th_task_state = 0; in __kmp_swap_teams_for_teams_reduction()
3449 __kmp_restore_swapped_teams(kmp_info_t *th, kmp_team_t *team, int task_state) { in __kmp_restore_swapped_teams() argument
3451 th->th.th_info.ds.ds_tid = 0; in __kmp_restore_swapped_teams()
3452 th->th.th_team = team; in __kmp_restore_swapped_teams()
3453 th->th.th_team_nproc = team->t.t_nproc; in __kmp_restore_swapped_teams()
3454 th->th.th_task_team = team->t.t_task_team[task_state]; in __kmp_restore_swapped_teams()
3455 __kmp_type_convert(task_state, &(th->th.th_task_state)); in __kmp_restore_swapped_teams()
3483 kmp_info_t *th; in __kmpc_reduce_nowait() local
3509 th = __kmp_thread_from_gtid(global_tid); in __kmpc_reduce_nowait()
3510 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_reduce_nowait()
3532 OMPT_REDUCTION_DECL(th, global_tid); in __kmpc_reduce_nowait()
3591 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_reduce_nowait()
3617 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_reduce_nowait()
3711 kmp_info_t *th; in __kmpc_reduce() local
3738 th = __kmp_thread_from_gtid(global_tid); in __kmpc_reduce()
3739 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_reduce()
3745 OMPT_REDUCTION_DECL(th, global_tid); in __kmpc_reduce()
3780 __kmp_threads[global_tid]->th.th_ident = in __kmpc_reduce()
3807 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_reduce()
3830 kmp_info_t *th; in __kmpc_end_reduce() local
3837 th = __kmp_thread_from_gtid(global_tid); in __kmpc_end_reduce()
3838 teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); in __kmpc_end_reduce()
3844 OMPT_REDUCTION_DECL(th, global_tid); in __kmpc_end_reduce()
3862 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3888 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3910 __kmp_threads[global_tid]->th.th_ident = loc; in __kmpc_end_reduce()
3932 __kmp_restore_swapped_teams(th, team, task_state); in __kmpc_end_reduce()
3959 return thread->th.th_current_task->td_task_id; in __kmpc_get_taskid()
3974 parent_task = thread->th.th_current_task->td_parent; in __kmpc_get_parent_taskid()
3995 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_init() local
3996 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_init()
3998 kmp_disp_t *pr_buf = th->th.th_dispatch; in __kmpc_doacross_init()
4020 th, sizeof(kmp_int64) * (4 * num_dims + 1)); in __kmpc_doacross_init()
4090 flags = (kmp_uint32 *)__kmp_thread_calloc(th, size, 1); in __kmpc_doacross_init()
4118 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_wait() local
4119 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_wait()
4130 pr_buf = th->th.th_dispatch; in __kmpc_doacross_wait()
4216 &(OMPT_CUR_TASK_INFO(th)->task_data), deps, (kmp_uint32)num_dims); in __kmpc_doacross_wait()
4230 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_post() local
4231 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_post()
4243 pr_buf = th->th.th_dispatch; in __kmpc_doacross_post()
4284 &(OMPT_CUR_TASK_INFO(th)->task_data), deps, (kmp_uint32)num_dims); in __kmpc_doacross_post()
4300 kmp_info_t *th = __kmp_threads[gtid]; in __kmpc_doacross_fini() local
4301 kmp_team_t *team = th->th.th_team; in __kmpc_doacross_fini()
4302 kmp_disp_t *pr_buf = th->th.th_dispatch; in __kmpc_doacross_fini()
4311 if (num_done == th->th.th_team_nproc) { in __kmpc_doacross_fini()
4320 __kmp_thread_free(th, CCAST(kmp_uint32 *, sh_buf->doacross_flags)); in __kmpc_doacross_fini()
4328 __kmp_thread_free(th, (void *)pr_buf->th_doacross_info); in __kmpc_doacross_fini()