semantics of flush with a variable list
"A flush construct with a list applies the flush operation to the
items in the list, and does not return until the operation is complete
for all specified list items."
My understanding of flush operations until this point was that
(conceptually) they can take place in the background, concurrently
with the continued execution of the thread, but that they must
"complete" before some specified future time. Here is how it is
described in Sec. 1.4.4:
"When a thread executes a strong flush, no later memory operation by
that thread for a variable involved in that strong flush is allowed to
start until the strong flush completes. The completion of a strong
flush of a set of variables executed by a thread is defined as the
point at which all writes to those variables performed by the thread
before the strong flush are visible in memory to all other threads and
that thread’s temporary view of all variables involved is discarded."
However the sentence on p.237 uses the word "return". What does it
mean to say a flush operation "returns"? For example:
#pragma omp flush(a,b)
Does it mean that control cannot reach the statement x=1 until the
flush operations on a and b have completed? That is different than
what I expected, which is that the flush operations can continue
running in the background, but all of them must complete before the
first access to a or b.
I think the word "return" is problematic and that this sentence should
be "The overall flush operation does not complete until all the
individual flush operations on the variables in the list have
completed" or something like that.