Lines Matching defs:team

51 //  thread_data: thread data for task team thread containing stack
107 // thread_data: thread data for task team thread containing stack
166 return; // Don't push anything on stack if team or team tasks are serialized
226 // Don't pop anything from stack if team or team tasks are serialized
354 // Deques of non-default priority tasks are shared between all threads in team,
401 // __kmp_push_priority_task: Add a task to the team's priority task deque
513 KA_TRACE(20, ("__kmp_push_task: T#%d team serialized; returning "
609 // when team ends
629 // new team
632 // team: team for implicit task data
633 // tid: thread within team to set up
634 void __kmp_push_current_task_to_thread(kmp_info_t *this_thr, kmp_team_t *team,
637 // tasks of new team
642 team->t.t_implicit_task_taskdata[tid].td_parent));
647 if (this_thr->th.th_current_task != &team->t.t_implicit_task_taskdata[0]) {
648 team->t.t_implicit_task_taskdata[0].td_parent =
650 this_thr->th.th_current_task = &team->t.t_implicit_task_taskdata[0];
653 team->t.t_implicit_task_taskdata[tid].td_parent =
654 team->t.t_implicit_task_taskdata[0].td_parent;
655 this_thr->th.th_current_task = &team->t.t_implicit_task_taskdata[tid];
662 team->t.t_implicit_task_taskdata[tid].td_parent));
682 // TODO: GEH - make sure root team implicit task is initialized properly.
1006 // 1. team parallel and tasking not serialized;
1009 // The reason for the 3rd one is for serialized team that found detached task,
1229 // TODO: GEH - make sure root team implicit task is initialized properly.
1325 // team: team for this_thr
1326 // tid: thread id of given thread within team
1332 kmp_team_t *team, int tid, int set_curr_task) {
1333 kmp_taskdata_t *task = &team->t.t_implicit_task_taskdata[tid];
1337 ("__kmp_init_implicit_task(enter): T#:%d team=%p task=%p, reinit=%s\n",
1338 tid, team, task, set_curr_task ? "TRUE" : "FALSE"));
1341 task->td_team = team;
1356 task->td_flags.team_serial = (team->t.t_serialized) ? 1 : 0;
1376 __kmp_push_current_task_to_thread(this_thr, team, tid);
1387 KF_TRACE(10, ("__kmp_init_implicit_task(exit): T#:%d team=%p task=%p\n", tid,
1388 team, task));
1464 kmp_team_t *team = thread->th.th_team;
1493 if (flags->tiedness == TASK_UNTIED && !team->t.t_serialized) {
1512 /* This should only happen if the team is serialized
1513 setup a task team and propagate it to the thread */
1514 KMP_DEBUG_ASSERT(team->t.t_serialized);
1516 ("T#%d creating task team in __kmp_task_alloc for proxy task\n",
1518 __kmp_task_team_setup(thread, team);
1519 thread->th.th_task_team = team->t.t_task_team[thread->th.th_task_state];
1606 // If it is hidden helper task, we need to set the team and task team
1618 taskdata->td_flags.team_serial = (team->t.t_serialized) ? 1 : 0;
1620 // GEH - Note we serialize the task if the team is serialized to make sure
2092 kmp_team_t *team = this_thr->th.th_team;
2095 kmp_info_t *thread = team->t.t_threads[i];
2796 kmp_team_t *team = thr->th.th_team;
2799 reduce_data = KMP_ATOMIC_LD_RLX(&team->t.t_tg_reduce_data[is_ws]);
2801 __kmp_atomic_compare_store(&team->t.t_tg_reduce_data[is_ws], reduce_data,
2810 KMP_DEBUG_ASSERT(KMP_ATOMIC_LD_RLX(&team->t.t_tg_fini_counter[0]) == 0);
2811 KMP_DEBUG_ASSERT(KMP_ATOMIC_LD_RLX(&team->t.t_tg_fini_counter[1]) == 0);
2812 KMP_ATOMIC_ST_REL(&team->t.t_tg_reduce_data[is_ws], reduce_data);
2815 (reduce_data = KMP_ATOMIC_LD_ACQ(&team->t.t_tg_reduce_data[is_ws])) ==
2901 kmp_team_t *team = thread->th.th_team;
2904 ompt_data_t my_parallel_data = team->t.ompt_team_info.parallel_data;
2923 kmp_team_t *team;
2928 team = thread->th.th_team;
2931 my_parallel_data = team->t.ompt_team_info.parallel_data;
2999 // check if <priv> data of the first reduction variable shared for the team
3009 // cleanup fields in the team structure:
3027 // cleanup fields in team structure:
3561 // If this thread's task team is NULL, primary thread has recognized that
3658 // __kmp_enable_tasking: Allocate task team and resume threads sleeping at the
3660 // First thread in allocates the task team atomically.
3727 * Utility routines for "task teams". A task team (kmp_task_t) is kind of
3732 * primary thread may exit the barrier code and free the team data structure,
3737 * spawned my a member of the team, and the thread still needs access to all
3738 * to each thread in the team, so that it can steal work from it.
3758 // Lock for task team data structures
3765 // per task team since task teams are recycled. No lock is needed during
3812 // Allocates a threads_data array for a task team, either by allocating an
3840 kmp_team_t *team = thread->th.th_team;
3901 thread_data->td.td_thr = team->t.t_threads[i];
3920 // Deallocates a threads_data array for a task team, including any attached
3954 kmp_team_t *team) {
3955 int team_nth = team->t.t_nproc;
3956 // Only need to init if task team is isn't active or team size changed
3968 // Allocates a task team associated with a specific team, taking it from
3969 // the global task team free list if possible. Also initializes data
3972 kmp_team_t *team) {
3975 KA_TRACE(20, ("__kmp_allocate_task_team: T#%d entering; team = %p\n",
3976 (thread ? __kmp_gtid_from_thread(thread) : -1), team));
3979 // Take a task team from the task team pool
3991 "task team for team %p\n",
3992 __kmp_gtid_from_thread(thread), team));
3993 // Allocate a new task team if one is not available. Cannot use
4015 __kmp_task_team_init(task_team, team);
4025 // Frees the task team associated with a specific thread, and adds it
4026 // to the global task team free list.
4031 // Put task team back on free list
4042 // Free all the task teams on the task team free list.
4069 // View the array of two task team pointers as a pair of pointers:
4073 void __kmp_push_task_team_node(kmp_info_t *thread, kmp_team_t *team) {
4074 KMP_DEBUG_ASSERT(team->t.t_nproc == 1);
4076 (kmp_task_team_list_t *)(&team->t.t_task_team[0]);
4085 // Serial team pops a task team off the stack
4086 void __kmp_pop_task_team_node(kmp_info_t *thread, kmp_team_t *team) {
4087 KMP_DEBUG_ASSERT(team->t.t_nproc == 1);
4089 (kmp_task_team_list_t *)(&team->t.t_task_team[0]);
4105 // trying to steal tasks. Wait for each thread to unreference its task team.
4167 // __kmp_task_team_setup: Create a task_team for the current team, but use
4169 void __kmp_task_team_setup(kmp_info_t *this_thr, kmp_team_t *team) {
4172 // For the serial and root teams, setup the first task team pointer to point
4173 // to task team. The other pointer is a stack of task teams from previous
4175 if (team == this_thr->th.th_serial_team ||
4176 team == this_thr->th.th_root->r.r_root_team) {
4177 KMP_DEBUG_ASSERT(team->t.t_nproc == 1);
4178 if (team->t.t_task_team[0] == NULL) {
4179 team->t.t_task_team[0] = __kmp_allocate_task_team(this_thr, team);
4182 " for serial/root team %p\n",
4183 __kmp_gtid_from_thread(this_thr), team->t.t_task_team[0], team));
4186 __kmp_task_team_init(team->t.t_task_team[0], team);
4192 // If it exists, it is the current task team and shouldn't be touched yet as
4194 if (team->t.t_task_team[this_thr->th.th_task_state] == NULL) {
4195 team->t.t_task_team[this_thr->th.th_task_state] =
4196 __kmp_allocate_task_team(this_thr, team);
4198 " for team %d at parity=%d\n",
4200 team->t.t_task_team[this_thr->th.th_task_state], team->t.t_id,
4212 if (team->t.t_task_team[other_team] == NULL) { // setup other team as well
4213 team->t.t_task_team[other_team] = __kmp_allocate_task_team(this_thr, team);
4215 "task_team %p for team %d at parity=%d\n",
4217 team->t.t_task_team[other_team], team->t.t_id, other_team));
4218 } else { // Leave the old task team struct in place for the upcoming region;
4220 kmp_task_team_t *task_team = team->t.t_task_team[other_team];
4221 __kmp_task_team_init(task_team, team);
4222 // if team size has changed, the first thread to enable tasking will
4225 "%p for team %d at parity=%d\n",
4227 team->t.t_task_team[other_team], team->t.t_id, other_team));
4236 kmp_task_team_t *task_team = team->t.t_task_team[i];
4251 // __kmp_task_team_sync: Propagation of task team data from team to threads
4252 // which happens just after the release phase of a team barrier. This may be
4254 void __kmp_task_team_sync(kmp_info_t *this_thr, kmp_team_t *team) {
4256 KMP_DEBUG_ASSERT(team != this_thr->th.th_serial_team);
4257 KMP_DEBUG_ASSERT(team != this_thr->th.th_root->r.r_root_team);
4263 // It is now safe to propagate the task team pointer from the team struct to
4266 team->t.t_task_team[this_thr->th.th_task_state]);
4268 ("__kmp_task_team_sync: Thread T#%d task team switched to task_team "
4271 team->t.t_id, this_thr->th.th_task_state));
4282 kmp_team_t *team USE_ITT_BUILD_ARG(void *itt_sync_obj), int wait) {
4283 kmp_task_team_t *task_team = team->t.t_task_team[this_thr->th.th_task_state];
4302 // Deactivate the old task team, so that the worker threads will stop
4307 "setting active to false, setting local and team's pointer to NULL\n",
4324 void __kmp_tasking_barrier(kmp_team_t *team, kmp_info_t *thread, int gtid) {
4327 &team->t.t_task_team[thread->th.th_task_state]->tt.tt_unfinished_threads);
4441 - the top half is the one that can be done from a thread outside the team
4442 - the bottom half must be run from a thread within the team
4445 threads of the team. Once the td_incomplete_child_task counter of the parent
4512 team. Run first and bottom halves directly.
4537 // corresponding team
4538 kmp_team_t *team = taskdata->td_team;
4539 kmp_int32 nthreads = team->t.t_nproc;
4550 thread = team->t.t_threads[k];
4562 thread = team->t.t_threads[i];
4576 the team.
4645 kmp_team_t *team = taskdata->td_team;
4647 if (thread->th.th_team == team) {
4723 // Only need to keep track of child task counts if team parallel and tasking
5454 a task team allocated to it. Otherwise, returns FALSE.
5456 Checks if the current thread has a task team.