clarify sentence on semantics of release flush?

OpenMP 5.0 will be the next version of the OpenMP specification, which we expect will be officially released in 2018. This technical report is the latest draft of the 5.0 specs for public discussion.
Forum rules
The OpenMP Forums are now closed to new posts. Please visit Stack Overflow if you are in need of help: https://stackoverflow.com/questions/tagged/openmp
Locked
sfsiegel
Posts: 12
Joined: Mon Mar 24, 2014 4:47 pm

clarify sentence on semantics of release flush?

Post by sfsiegel »

Sec. 1.4.4, p25:

"A release flush guarantees that any prior operation that writes or
reads a shared variable will appear to be completed before any
operation that [1] writes or reads the same shared variable that [2]
follows an acquire flush with which it [3] synchronizes (see Section
Section 1.4.5 on page 26 for more details on flush synchronization)."

I think this sentence is confusing as written. It isn't clear to me if
"any operation" is referring to an operation in the same thread as the
thread performing the release flush, or to an operation in a different
thread (performing the acquire flush). Specific questions:

What does "that" [1] refer to? Presumably "any operation".

What does "that" [2] refer to?

If the answer is "the same shared variable" --- then what does it mean
to say a variable "follows" an acquire flush? A variable is not a
statement or operation.

If the answer is "any operation" then the wording is wrong. Maybe
"...before any operation that writes or reads the same shared variable
and that follows an acquire flush..."

What is the antecedent of "it" [3]? Is it the release flush?
If so, it might help to use "the release flush" instead of "it".

Even better, this complicated sentence could be broken down into
two or more sentences, e.g.:

"A release flush guarantees that any prior operation that writes or
reads a shared variable will appear to be completed before a certain
point. Specifically, any such operation will complete before..."

Locked