The
memory
model
was
extended
to
distinguish
different
types
of
flush
operations
according
to
specified
flush
properties
(see
Section 1.4.4
on
page 59)
and
to
define
a
happens
before
order
based
on
synchronizing
flush
operations
(see
Section 1.4.5
on
page 63).
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
on
page 83).
Fortran
2003
is
now
fully
supported
(see
Section 1.7
on
page 83).
The
requires
directive
(see
Section 2.4
on
page 165)
was
added
to
support
applications
that
require
implementation-specific
features.
The
target-offload-var
internal
control
variable
(see
Section 2.5
on
page 171)
and
the
OMP_TARGET_OFFLOAD
environment
variable
(see
Section 6.17
on
page 1680)
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.5.2
on
page 189),
the
default
value
of
which
is
now
implementation
defined,
unless
determined
according
to
the
values
of
the
OMP_NUM_THREADS
(see
Section 6.2
on
page 1650)
or
OMP_PROC_BIND
(see
Section 6.4
on
page 1653)
environment
variables.
Support
for
array
shaping
(see
Section 2.1.4
on
page 115)
and
for
array
sections
with
non-unit
strides
in
C
and
C++
(see
Section 2.1.5
on
page 118)
was
added
to
facilitate
specification
of
discontiguous
storage
and
the
targetupdate
construct
(see
Section 2.12.6
on
page 497)
and
the
depend
clause
(see
Section 2.17.11
on
page 736)
were
extended
to
allow
the
use
of
shape-operators
(see
Section 2.1.4
on
page 115).
Iterators
(see
Section 2.1.6
on
page 122)
were
added
to
support
expressions
in
a
list
that
expand
to
multiple
expressions.
The
metadirective
directive
(see
Section 2.3.4
on
page 154)
and
declarevariant
directive
(see
Section 2.3.5
on
page 159)
were
added
to
support
selection
of
directive
variants
and
declared
function
variants
at
a
callsite,
respectively,
based
on
compile-time
traits
of
the
enclosing
context.
The
teams
construct
(see
Section 2.7
on
page 236)
was
extended
to
support
execution
on
the
host
device
without
an
enclosing
target
construct
(see
Section 2.12.5
on
page 478).
The
canonical
loop
form
was
defined
for
Fortran
and,
for
all
base
languages,
extended
to
permit
non-rectangular
loop
nests
(see
Section 2.9.1
on
page 271).
The
relational-op
in
the
canonical
loop
form
for
C/C++
was
extended
to
include
!=
(see
Section 2.9.1
on
page 271).
The
default
loop
schedule
modifier
for
worksharing-loop
constructs
without
the
static
schedule
and
the
ordered
clause
was
changed
to
nonmonotonic
(see
Section 2.9.2
on
page 288).
The
collapse
of
associated
loops
that
are
imperfectly
nested
loops
was
defined
for
the
worksharing-loop
(see
Section 2.9.2
on
page 288),
simd
(see
Section 2.9.3.1
on
page 316),
taskloop
(see
Section 2.10.2
on
page 395)
and
distribute
(see
Section 2.9.4.2
on
page 350)
constructs.
The
simd
construct
(see
Section 2.9.3.1
on
page 316)
was
extended
to
accept
the
if,
nontemporal
and
order(concurrent)
clauses
and
to
allow
the
use
of
atomic
constructs
within
it.
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 2.9.5
on
page 363).
The
scan
directive
(see
Section 2.9.6
on
page 376)
and
the
inscan
modifier
for
the
reduction
clause
(see
Section 2.19.5.4
on
page 885)
were
added
to
support
inclusive
and
exclusive
scan
computations.
To
support
task
reductions,
the
task
(see
Section 2.10.1
on
page 384)
and
target
(see
Section 2.12.5
on
page 478)
constructs
were
extended
to
accept
the
in_reduction
clause
(see
Section 2.19.5.6
on
page 897),
the
taskgroup
construct
(see
Section 2.17.6
on
page 648)
was
extended
to
accept
the
task_reduction
clause
Section 2.19.5.5
on
page 896),
and
the
task
modifier
was
added
to
the
reduction
clause
(see
Section 2.19.5.4
on
page 885).
The
affinity
clause
was
added
to
the
task
construct
(see
Section 2.10.1
on
page 384)
to
support
hints
that
indicate
data
affinity
of
explicit
tasks.
The
detach
clause
for
the
task
construct
(see
Section 2.10.1
on
page 384)
and
the
omp_fulfill_event
runtime
routine
(see
Section 3.5.1
on
page 1184)
were
added
to
support
execution
of
detachable
tasks.
To
support
taskloop
reductions,
the
taskloop
(see
Section 2.10.2
on
page 395)
and
taskloop
simd
(see
Section 2.10.3
on
page 407)
constructs
were
extended
to
accept
the
reduction
(see
Section 2.19.5.4
on
page 885)
and
in_reduction
(see
Section 2.19.5.6
on
page 897)
clauses.
The
taskloop
construct
(see
Section 2.10.2
on
page 395)
was
added
to
the
list
of
constructs
that
can
be
canceled
by
the
cancel
construct
(see
Section 2.18.1
on
page 752)).
To
support
mutually
exclusive
inout
sets,
a
mutexinoutsetdependence-type
was
added
to
the
depend
clause
(see
Section 2.10.6
on
page 415
and
Section 2.17.11
on
page 736).
Predefined
memory
spaces
(see
Section 2.11.1
on
page 427),
predefined
memory
allocators
and
allocator
traits
(see
Section 2.11.2
on
page 428)
and
directives,
clauses
(see
Section 2.11
on
page 426
and
API
routines
(see
Section 3.7
on
page 1208)
to
use
them
were
added
to
support
different
kinds
of
memories.
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 2.12.2
on
page 451).
To
support
reverse
offload,
the
ancestor
modifier
was
added
to
the
device
clause
for
target
constructs
(see
Section 2.12.5
on
page 478).
To
reduce
programmer
effort
implicit
declare
target
directives
for
some
functions
(C,
C++,
Fortran)
and
subroutines
(Fortran)
were
added
(see
Section 2.12.5
on
page 478
and
Section 2.12.7
on
page 513).
The
targetupdate
construct
(see
Section 2.12.6
on
page 497)
was
modified
to
allow
array
sections
that
specify
discontiguous
storage.
The
to
and
from
clauses
on
the
targetupdate
construct
(see
Section 2.12.6
on
page 497),
the
depend
clause
on
task
generating
constructs
(see
Section 2.17.11
on
page 736),
and
the
map
clause
(see
Section 2.19.7.1
on
page 939)
were
extended
to
allow
any
lvalue
expression
as
a
list
item
for
C/C++.
Support
for
nested
declaretarget
directives
was
added
(see
Section 2.12.7
on
page 513).
New
combined
constructs
mastertaskloop
(see
Section 2.13.7
on
page 549),
parallelmaster
(see
Section 2.13.6
on
page 546),
parallelmastertaskloop
(see
Section 2.13.9
on
page 554),
mastertaskloopsimd
(see
Section 2.13.8
on
page 551),
parallelmastertaskloopsimd
(see
Section 2.13.10
on
page 556)
were
added.
The
depend
clause
was
added
to
the
taskwait
construct
(see
Section 2.17.5
on
page 642).
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 2.17.7
on
page 652)
and
flush
construct
(see
Section 2.17.8
on
page 677),
and
the
memory
ordering
semantics
of
implicit
flushes
on
various
constructs
and
runtime
routines
were
clarified
(see
Section 2.17.8.1
on
page 684).
The
atomic
construct
was
extended
with
the
hint
clause
(see
Section 2.17.7
on
page 652).
The
depend
clause
(see
Section 2.17.11
on
page 736)
was
extended
to
support
iterators
and
to
support
depend
objects
that
can
be
created
with
the
new
depobj
construct.
Lock
hints
were
renamed
to
synchronization
hints,
and
the
old
names
were
deprecated
(see
Section 2.17.12
on
page 746).
To
support
conditional
assignment
to
lastprivate
variables,
the
conditional
modifier
was
added
to
the
lastprivate
clause
(see
Section 2.19.4.5
on
page 862).
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
closemap-type-modifier
was
added
as
a
hint
for
the
runtime
to
allocate
memory
close
to
the
target
device
(see
Section 2.19.7.1
on
page 939).
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 2.19.7.1
on
page 939).
The
defaultmap
clause
(see
Section 2.19.7.2
on
page 978)
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 2.19.7.3
on
page 982).
The
omp_set_nested
(see
Section 3.2.10
on
page 1052)
and
omp_get_nested
(see
Section 3.2.11
on
page 1055)
routines
and
the
OMP_NESTED
environment
variable
(see
Section 6.9
on
page 1665)
were
deprecated.
The
omp_get_supported_active_levels
routine
was
added
to
query
the
number
of
active
levels
of
parallelism
supported
by
the
implementation
(see
Section 3.2.15
on
page 1067).
Runtime
routines
omp_set_affinity_format
(see
Section 3.2.30
on
page 1109),
omp_get_affinity_format
(see
Section 3.2.31
on
page 1112),
omp_set_affinity
(see
Section 3.2.32
on
page 1115),
and
omp_capture_affinity
(see
Section 3.2.33
on
page 1119)
and
environment
variables
OMP_DISPLAY_AFFINITY
(see
Section 6.13
on
page 1671)
and
OMP_AFFINITY_FORMAT
(see
Section 6.14
on
page 1674)
were
added
to
provide
OpenMP
runtime
thread
affinity
information.
The
omp_get_device_num
runtime
routine
(see
Section 3.2.37
on
page 1130)
was
added
to
support
determination
of
the
device
on
which
a
thread
is
executing.
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 3.2.43
on
page 1144
and
Section 3.2.44
on
page 1150).
Support
for
a
first-party
tool
interface
(see
Section 4
on
page 1229)
was
added.
Support
for
a
third-party
tool
interface
(see
Section 5
on
page 1485)
was
added.
Support
for
controlling
offloading
behavior
with
the
OMP_TARGET_OFFLOAD
environment
variable
was
added
(see
Section 6.17
on
page 1680).
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.