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

Lines Matching refs:team

41 //  thread_data: thread data for task team thread containing stack
97 // thread_data: thread data for task team thread containing stack
156 return; // Don't push anything on stack if team or team tasks are serialized
216 // Don't pop anything from stack if team or team tasks are serialized
348 KA_TRACE(20, ("__kmp_push_task: T#%d team serialized; returning "
435 // when team ends
455 // new team
458 // team: team for implicit task data
459 // tid: thread within team to set up
460 void __kmp_push_current_task_to_thread(kmp_info_t *this_thr, kmp_team_t *team,
463 // tasks of new team
468 team->t.t_implicit_task_taskdata[tid].td_parent));
473 if (this_thr->th.th_current_task != &team->t.t_implicit_task_taskdata[0]) {
474 team->t.t_implicit_task_taskdata[0].td_parent =
476 this_thr->th.th_current_task = &team->t.t_implicit_task_taskdata[0];
479 team->t.t_implicit_task_taskdata[tid].td_parent =
480 team->t.t_implicit_task_taskdata[0].td_parent;
481 this_thr->th.th_current_task = &team->t.t_implicit_task_taskdata[tid];
488 team->t.t_implicit_task_taskdata[tid].td_parent));
508 // TODO: GEH - make sure root team implicit task is initialized properly.
932 // Only need to keep track of count if team parallel and tasking not
969 // TODO: GEH - make sure root team implicit task is initialized properly.
1050 // team: team for this_thr
1051 // tid: thread id of given thread within team
1057 kmp_team_t *team, int tid, int set_curr_task) {
1058 kmp_taskdata_t *task = &team->t.t_implicit_task_taskdata[tid];
1062 ("__kmp_init_implicit_task(enter): T#:%d team=%p task=%p, reinit=%s\n",
1063 tid, team, task, set_curr_task ? "TRUE" : "FALSE"));
1066 task->td_team = team;
1081 task->td_flags.team_serial = (team->t.t_serialized) ? 1 : 0;
1098 __kmp_push_current_task_to_thread(this_thr, team, tid);
1109 KF_TRACE(10, ("__kmp_init_implicit_task(exit): T#:%d team=%p task=%p\n", tid,
1110 team, task));
1183 kmp_team_t *team = thread->th.th_team;
1200 if (flags->tiedness == TASK_UNTIED && !team->t.t_serialized) {
1218 /* This should only happen if the team is serialized
1219 setup a task team and propagate it to the thread */
1220 KMP_DEBUG_ASSERT(team->t.t_serialized);
1222 ("T#%d creating task team in __kmp_task_alloc for proxy task\n",
1225 thread, team,
1226 1); // 1 indicates setup the current team regardless of nthreads
1227 thread->th.th_task_team = team->t.t_task_team[thread->th.th_task_state];
1293 taskdata->td_team = team;
1321 taskdata->td_flags.team_serial = (team->t.t_serialized) ? 1 : 0;
1323 // GEH - Note we serialize the task if the team is serialized to make sure
1354 // Only need to keep track of child task counts if team parallel and tasking not
2336 kmp_team_t *team = thr->th.th_team;
2339 reduce_data = KMP_ATOMIC_LD_RLX(&team->t.t_tg_reduce_data[is_ws]);
2341 __kmp_atomic_compare_store(&team->t.t_tg_reduce_data[is_ws], reduce_data,
2350 KMP_DEBUG_ASSERT(KMP_ATOMIC_LD_RLX(&team->t.t_tg_fini_counter[0]) == 0);
2351 KMP_DEBUG_ASSERT(KMP_ATOMIC_LD_RLX(&team->t.t_tg_fini_counter[1]) == 0);
2352 KMP_ATOMIC_ST_REL(&team->t.t_tg_reduce_data[is_ws], reduce_data);
2355 (reduce_data = KMP_ATOMIC_LD_ACQ(&team->t.t_tg_reduce_data[is_ws])) ==
2439 kmp_team_t *team = thread->th.th_team;
2442 ompt_data_t my_parallel_data = team->t.ompt_team_info.parallel_data;
2460 kmp_team_t *team;
2465 team = thread->th.th_team;
2468 my_parallel_data = team->t.ompt_team_info.parallel_data;
2533 // check if <priv> data of the first reduction variable shared for the team
2543 // cleanup fields in the team structure:
2561 // cleanup fields in team structure:
2991 // If this thread's task team is NULL, master has recognized that there are
3038 // __kmp_enable_tasking: Allocate task team and resume threads sleeping at the
3040 // First thread in allocates the task team atomically.
3107 * Utility routines for "task teams". A task team (kmp_task_t) is kind of
3112 * master thread may exit the barrier code and free the team data structure,
3117 * spawned my a member of the team, and the thread still needs access to all
3118 * to each thread in the team, so that it can steal work from it.
3138 // Lock for task team data structures
3145 // per task team since task teams are recycled. No lock is needed during
3192 // Allocates a threads_data array for a task team, either by allocating an
3220 kmp_team_t *team = thread->th.th_team;
3283 thread_data->td.td_thr = team->t.t_threads[i];
3302 // Deallocates a threads_data array for a task team, including any attached
3318 // Allocates a task team associated with a specific team, taking it from
3319 // the global task team free list if possible. Also initializes data
3322 kmp_team_t *team) {
3326 KA_TRACE(20, ("__kmp_allocate_task_team: T#%d entering; team = %p\n",
3327 (thread ? __kmp_gtid_from_thread(thread) : -1), team));
3330 // Take a task team from the task team pool
3342 "task team for team %p\n",
3343 __kmp_gtid_from_thread(thread), team));
3344 // Allocate a new task team if one is not available.
3357 task_team->tt.tt_nproc = nthreads = team->t.t_nproc;
3370 // Frees the task team associated with a specific thread, and adds it
3371 // to the global task team free list.
3376 // Put task team back on free list
3387 // Free all the task teams on the task team free list.
3413 // trying to steal tasks. Wait for each thread to unreference its task team.
3473 // __kmp_task_team_setup: Create a task_team for the current team, but use
3475 void __kmp_task_team_setup(kmp_info_t *this_thr, kmp_team_t *team, int always) {
3480 // If it exists, it is the current task team and shouldn't be touched yet as
3482 if (team->t.t_task_team[this_thr->th.th_task_state] == NULL &&
3483 (always || team->t.t_nproc > 1)) {
3484 team->t.t_task_team[this_thr->th.th_task_state] =
3485 __kmp_allocate_task_team(this_thr, team);
3487 "for team %d at parity=%d\n",
3489 team->t.t_task_team[this_thr->th.th_task_state],
3490 ((team != NULL) ? team->t.t_id : -1),
3501 if (team->t.t_nproc > 1) {
3503 if (team->t.t_task_team[other_team] == NULL) { // setup other team as well
3504 team->t.t_task_team[other_team] =
3505 __kmp_allocate_task_team(this_thr, team);
3507 "task_team %p for team %d at parity=%d\n",
3509 team->t.t_task_team[other_team],
3510 ((team != NULL) ? team->t.t_id : -1), other_team));
3511 } else { // Leave the old task team struct in place for the upcoming region;
3513 kmp_task_team_t *task_team = team->t.t_task_team[other_team];
3515 team->t.t_nproc != task_team->tt.tt_nproc) {
3516 TCW_4(task_team->tt.tt_nproc, team->t.t_nproc);
3520 team->t.t_nproc);
3523 // if team size has changed, the first thread to enable tasking will
3526 "%p for team %d at parity=%d\n",
3528 team->t.t_task_team[other_team],
3529 ((team != NULL) ? team->t.t_id : -1), other_team));
3534 // __kmp_task_team_sync: Propagation of task team data from team to threads
3535 // which happens just after the release phase of a team barrier. This may be
3537 void __kmp_task_team_sync(kmp_info_t *this_thr, kmp_team_t *team) {
3543 // It is now safe to propagate the task team pointer from the team struct to
3546 team->t.t_task_team[this_thr->th.th_task_state]);
3548 ("__kmp_task_team_sync: Thread T#%d task team switched to task_team "
3551 ((team != NULL) ? team->t.t_id : -1), this_thr->th.th_task_state));
3555 // barrier gather phase. Only called by master thread if #threads in team > 1 or
3563 kmp_team_t *team USE_ITT_BUILD_ARG(void *itt_sync_obj), int wait) {
3564 kmp_task_team_t *task_team = team->t.t_task_team[this_thr->th.th_task_state];
3582 // Deactivate the old task team, so that the worker threads will stop
3587 "setting active to false, setting local and team's pointer to NULL\n",
3605 void __kmp_tasking_barrier(kmp_team_t *team, kmp_info_t *thread, int gtid) {
3608 &team->t.t_task_team[thread->th.th_task_state]->tt.tt_unfinished_threads);
3721 - the top half is the one that can be done from a thread outside the team
3722 - the bottom half must be run from a thread within the team
3725 threads of the team. Once the td_incomplete_child_task counter of the parent
3787 team. Run first and bottom halves directly.
3812 the team.
3828 // corresponding team
3829 kmp_team_t *team = taskdata->td_team;
3830 kmp_int32 nthreads = team->t.t_nproc;
3841 thread = team->t.t_threads[k];
3902 kmp_team_t *team = taskdata->td_team;
3904 if (thread->th.th_team == team) {
3966 // Only need to keep track of child task counts if team parallel and tasking