The
memory
model
was
extended
to
distinguish
different
types
of
flush
operations
according
to
specified
flush
properties
(see
Section 1.4.4)
and
to
define
a
happens
before
order
based
on
synchronizing
flush
operations
(see
Section 1.4.5).
Various
changes
throughout
the
specification
were
made
to
provide
initial
support
of
C11,
C++11,
C++14,
C++17
and
Fortran
2008
(see
Section 1.7).
Full
support
of
Fortran
2003
was
completed
(see
Section 1.7).
The
target-offload-var
internal
control
variable
(see
Chapter 2)
and
the
OMP_TARGET_OFFLOAD
environment
variable
(see
Section 21.2.8)
were
added
to
support
runtime
control
of
the
execution
of
device
constructs.
Control
over
whether
nested
parallelism
is
enabled
or
disabled
was
integrated
into
the
max-active-levels-var
internal
control
variable
(see
Section 2.2),
the
default
value
of
which
is
now
implementation
defined,
unless
determined
according
to
the
values
of
the
OMP_NUM_THREADS
(see
Section 21.1.2)
or
OMP_PROC_BIND
(see
Section 21.1.7)
environment
variables.
Support
for
array
shaping
(see
Section 3.2.4)
and
for
array
sections
with
non-unit
strides
in
C
and
C++
(see
Section 3.2.5)
was
added
to
facilitate
specification
of
discontiguous
storage,
and
the
targetupdate
construct
(see
Section 13.9)
and
the
depend
clause
(see
Section 15.9.5)
were
extended
to
allow
the
use
of
shape-operators
(see
Section 3.2.4).
Iterators
(see
Section 3.2.6)
were
added
to
support
expressions
in
a
list
that
expand
to
multiple
expressions.
The
canonical
loop
form
was
defined
for
Fortran
and,
for
all
base
languages,
extended
to
permit
non-rectangular
loop
nests
(see
Section 4.4.1).
The
relational-op
in
the
canonical
loop
form
for
C/C++
was
extended
to
include
!=
(see
Section 4.4.1).
To
support
conditional
assignment
to
lastprivate
variables,
the
conditional
modifier
was
added
to
the
lastprivate
clause
(see
Section 5.4.5).
The
inscan
modifier
for
the
reduction
clause
(see
Section 5.5.8)
and
the
scan
directive
(see
Section 5.6)
were
added
to
support
inclusive
and
exclusive
scan
computations.
To
support
task
reductions,
the
task
modifier
was
added
to
the
reduction
clause
(see
Section 5.5.8),
the
task_reduction
clause
(see
Section 5.5.9)
was
added
to
the
taskgroup
construct
(see
Section 15.4),
and
the
in_reduction
clause
(see
Section 5.5.10)
was
added
to
the
task
(see
Section 12.5)
and
target
(see
Section 13.8)
constructs.
To
support
taskloop
reductions,
the
reduction
(see
Section 5.5.8)
and
in_reduction
(see
Section 5.5.10)
clauses
were
added
to
the
taskloop
construct
(see
Section 12.6).
The
description
of
the
map
clause
was
modified
to
clarify
the
mapping
order
when
multiple
map-types
are
specified
for
a
variable
or
structure
members
of
a
variable
on
the
same
construct.
The
close
map-type-modifier
was
added
as
a
hint
for
the
runtime
to
allocate
memory
close
to
the
target
device
(see
Section 5.8.3).
The
capability
to
map
C/C++
pointer
variables
and
to
assign
the
address
of
device
memory
that
is
mapped
by
an
array
section
to
them
was
added.
Support
for
mapping
of
Fortran
pointer
and
allocatable
variables,
including
pointer
and
allocatable
components
of
variables,
was
added
(see
Section 5.8.3).
The
defaultmap
clause
(see
Section 5.8.7)
was
extended
to
allow
selecting
the
data-mapping
or
data-sharing
attributes
for
any
of
the
scalar,
aggregate,
pointer,
or
allocatable
classes
on
a
per-region
basis.
Additionally
it
accepts
the
none
parameter
to
support
the
requirement
that
all
variables
referenced
in
the
construct
must
be
explicitly
mapped
or
privatized.
The
declaremapper
directive
was
added
to
support
mapping
of
data
types
with
direct
and
indirect
members
(see
Section 5.8.8).
Predefined
memory
spaces
(see
Section 6.1),
predefined
memory
allocators
and
allocator
traits
(see
Section 6.2)
and
directives,
clauses
and
API
routines
(see
Chapter 6
and
Section 18.13)
to
use
them
were
added
to
support
different
kinds
of
memories.
Metadirectives
(see
Section 7.4)
and
declare
variant
directives
(see
Section 7.5)
were
added
to
support
selection
of
directive
variants
and
declared
function
variants
at
a
call
site,
respectively,
based
on
compile-time
traits
of
the
enclosing
context.
Support
for
nested
declaretarget
directives
was
added
(see
Section 7.8).
The
requires
directive
(see
Section 8.2)
was
added
to
support
applications
that
require
implementation-specific
features.
The
teams
construct
(see
Section 10.2)
was
extended
to
support
execution
on
the
host
device
without
an
enclosing
target
construct
(see
Section 13.8).
The
loop
construct
and
the
order(concurrent)
clause
were
added
to
support
compiler
optimization
and
parallelization
of
loops
for
which
iterations
may
execute
in
any
order,
including
concurrently
(see
Section 10.3
and
Section 11.7).
The
collapse
of
associated
loops
that
are
imperfectly
nested
loops
was
defined
for
the
simd
(see
Section 10.4),
worksharing-loop
(see
Section 11.5),
distribute
(see
Section 11.6)
and
taskloop
(see
Section 12.6)
constructs.
The
simd
construct
(see
Section 10.4)
was
extended
to
accept
the
if,
nontemporal,
and
order(concurrent)
clauses
and
to
allow
the
use
of
atomic
constructs
within
it.
The
default
loop
schedule
modifier
for
worksharing-loop
constructs
without
the
static
schedule
and
the
ordered
clause
was
changed
to
nonmonotonic
(see
Section 11.5).
The
affinity
clause
was
added
to
the
task
construct
(see
Section 12.5)
to
support
hints
that
indicate
data
affinity
of
explicit
tasks.
The
detach
clause
for
the
task
construct
(see
Section 12.5)
and
the
omp_fulfill_event
runtime
routine
(see
Section 18.11.1)
were
added
to
support
execution
of
detachable
tasks.
The
taskloop
construct
(see
Section 12.6)
was
added
to
the
list
of
constructs
that
can
be
canceled
by
the
cancel
construct
(see
Section 16.1)).
To
support
mutually
exclusive
inout
sets,
a
mutexinoutset
dependence-type
was
added
to
the
depend
clause
(see
Section 12.9
and
Section 15.9.5).
The
semantics
of
the
use_device_ptr
clause
for
pointer
variables
was
clarified
and
the
use_device_addr
clause
for
using
the
device
address
of
non-pointer
variables
inside
the
targetdata
construct
was
added
(see
Section 13.5).
To
support
reverse
offload,
the
ancestor
modifier
was
added
to
the
device
clause
for
the
target
construct
(see
Section 13.8).
To
reduce
programmer
effort,
implicit
declare
target
directives
for
some
functions
(C,
C++,
Fortran)
and
subroutines
(Fortran)
were
added
(see
Section 13.8
and
Section 7.8).
The
targetupdate
construct
(see
Section 13.9)
was
modified
to
allow
array
sections
that
specify
discontiguous
storage.
The
to
and
from
clauses
on
the
targetupdate
construct
(see
Section 13.9),
the
depend
clause
on
task
generating
constructs
(see
Section 15.9.5),
and
the
map
clause
(see
Section 5.8.3)
were
extended
to
allow
any
lvalue
expression
as
a
list
item
for
C/C++.
Lock
hints
were
renamed
to
synchronization
hints,
and
the
old
names
were
deprecated
(see
Section 15.1).
The
depend
clause
was
added
to
the
taskwait
construct
(see
Section 15.5).
To
support
acquire
and
release
semantics
with
weak
memory
ordering,
the
acq_rel,
acquire,
and
release
clauses
were
added
to
the
atomic
construct
(see
Section 15.8.4)
and
flush
construct
(see
Section 15.8.5),
and
the
memory
ordering
semantics
of
implicit
flushes
on
various
constructs
and
runtime
routines
were
clarified
(see
Section 15.8.6).
The
atomic
construct
was
extended
with
the
hint
clause
(see
Section 15.8.4).
The
depend
clause
(see
Section 15.9.5)
was
extended
to
support
iterators
and
to
support
depend
objects
that
can
be
created
with
the
new
depobj
construct.
New
combined
constructs
mastertaskloop,
parallelmaster,
parallelmastertaskloop,
mastertaskloopsimd
parallelmastertaskloopsimd
(see
Section 17.3)
were
added.
The
omp_get_supported_active_levels
routine
was
added
to
query
the
number
of
active
levels
of
parallelism
supported
by
the
implementation
(see
Section 18.2.14).
Runtime
routines
omp_set_affinity_format
(see
Section 18.3.8),
omp_get_affinity_format
(see
Section 18.3.9),
omp_set_affinity
(see
Section 18.3.10),
and
omp_capture_affinity
(see
Section 18.3.11)
and
environment
variables
OMP_DISPLAY_AFFINITY
(see
Section 21.2.4)
and
OMP_AFFINITY_FORMAT
(see
Section 21.2.5)
were
added
to
provide
OpenMP
runtime
thread
affinity
information.
The
omp_pause_resource
and
omp_pause_resource_all
runtime
routines
were
added
to
allow
the
runtime
to
relinquish
resources
used
by
OpenMP
(see
Section 18.6.1
and
Section 18.6.2).
The
omp_get_device_num
runtime
routine
(see
Section 18.7.5)
was
added
to
support
determination
of
the
device
on
which
a
thread
is
executing.
Support
for
a
first-party
tool
interface
(see
Chapter 19)
was
added.
Support
for
a
third-party
tool
interface
(see
Chapter 20)
was
added.
Support
for
controlling
offloading
behavior
with
the
OMP_TARGET_OFFLOAD
environment
variable
was
added
(see
Section 21.2.8).
Stubs
for
Runtime
Library
Routines
(previously
Appendix
A)
were
moved
to
a
separate
document.
Interface
Declarations
(previously
Appendix
B)
were
moved
to
a
separate
document.