| OPENMP API Specification: Version 5.0 November 2018

1.4.6  OpenMP Memory Consistency

The following rules guarantee the observable completion order of memory operations, as seen by all threads.

The flush operation can be specified using the flush directive, and is also implied at various locations in an OpenMP program: see Section 2.17.8 on page 677 for details.

SVG-Viewer needed.

Note – Since flush operations by themselves cannot prevent data races, explicit flush operations are only useful in combination with non-sequentially consistent atomic directives.

SVG-Viewer needed.

OpenMP programs that:

behave as though operations on shared variables were simply interleaved in an order consistent with the order in which they are performed by each thread. The relaxed consistency model is invisible for such programs, and any explicit flush operations in such programs are redundant.