reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

projects/openmp/runtime/src/kmp_barrier.cpp
  801   bool uninitialized = thr_bar->team == NULL;
  802   bool team_changed = team != thr_bar->team;
  803   bool team_sz_changed = nproc != thr_bar->nproc;
  804   bool tid_changed = tid != thr_bar->old_tid;
  808     __kmp_get_hierarchy(nproc, thr_bar);
  812     thr_bar->my_level = thr_bar->depth - 1; // default for master
  812     thr_bar->my_level = thr_bar->depth - 1; // default for master
  813     thr_bar->parent_tid = -1; // default for master
  817       while (d < thr_bar->depth) { // find parent based on level of thread in
  820         if (d == thr_bar->depth - 2) { // reached level right below the master
  821           thr_bar->parent_tid = 0;
  822           thr_bar->my_level = d;
  824         } else if ((rem = tid % thr_bar->skip_per_level[d + 1]) !=
  827           thr_bar->parent_tid = tid - rem;
  828           thr_bar->my_level = d;
  834     thr_bar->offset = 7 - (tid - thr_bar->parent_tid - 1);
  834     thr_bar->offset = 7 - (tid - thr_bar->parent_tid - 1);
  835     thr_bar->old_tid = tid;
  836     thr_bar->wait_flag = KMP_BARRIER_NOT_WAITING;
  837     thr_bar->team = team;
  838     thr_bar->parent_bar =
  839         &team->t.t_threads[thr_bar->parent_tid]->th.th_bar[bt].bb;
  842     thr_bar->team = team;
  843     thr_bar->parent_bar =
  844         &team->t.t_threads[thr_bar->parent_tid]->th.th_bar[bt].bb;
  848     thr_bar->nproc = nproc;
  849     thr_bar->leaf_kids = thr_bar->base_leaf_kids;
  849     thr_bar->leaf_kids = thr_bar->base_leaf_kids;
  850     if (thr_bar->my_level == 0)
  851       thr_bar->leaf_kids = 0;
  852     if (thr_bar->leaf_kids && (kmp_uint32)tid + thr_bar->leaf_kids + 1 > nproc)
  852     if (thr_bar->leaf_kids && (kmp_uint32)tid + thr_bar->leaf_kids + 1 > nproc)
  853       thr_bar->leaf_kids = nproc - tid - 1;
  854     thr_bar->leaf_state = 0;
  855     for (int i = 0; i < thr_bar->leaf_kids; ++i)
  856       ((char *)&(thr_bar->leaf_state))[7 - i] = 1;