https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99666

            Bug ID: 99666
           Summary: [OpenMP][5.0] Support 'affinity' clause in 'omp task'
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openmp
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Just to make sure we do not forget it – applies to C/C++/Fortran. The following
is the same in OpenMP 5.0 and 5.1:


  omp task[clause[ [,] clause] ... ] new-line
...
where clause is one of the following:
...
  affinity([aff-modifier:] locator-list)
...

where  aff-modifier  is one of the following:

  iterator(iterators-definition)


The affinity clause is a hint to indicate data affinity of the generated task.
The task is recommended to execute closely to the location of the list items. A
program that relies on the task execution location being determined by this
list may have unspecified behavior.

The list items that appear in the affinity clause may reference iterators
defined by an iterators-definition appearing in the same clause. The list items
that appear in the affinity clause may include array sections.

---v--- C / C++ ---v---
The list items that appear in the affinity clause may use shape-operators.
---^--- C / C++ ---^---

If a list item appears in an affinity clause then data affinity refers to the
original list item.

Reply via email to