- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider the example A.2.2c on page 157 of the OpenMP 3.0 spec [not a new feature in openmp3 as far as I know].
(Available from here: http://www.openmp.org/mp-documents/spec30.pdf)
Question: Is this example and explanitive text correct about only data being defined at the end? If so, can you please explain to me why this is so?
Thread 0 has flushed the data and then the flag [ordering imposed by flush directives] in that order.
Thread 1 cannot cross the line 36 flush pragma until flag is 1, and hence data is 42. how can only data be the only one defined at the final print statement?
Thanks,
Jonathan.
(Available from here: http://www.openmp.org/mp-documents/spec30.pdf)
Question: Is this example and explanitive text correct about only data being defined at the end? If so, can you please explain to me why this is so?
Thread 0 has flushed the data and then the flag [ordering imposed by flush directives] in that order.
Thread 1 cannot cross the line 36 flush pragma until flag is 1, and hence data is 42. how can only data be the only one defined at the final print statement?
Thanks,
Jonathan.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My comments on the referenced secton is the author made a typographical error.
IMHO lines 34:38 should be placed before line 28 (just inside the opening brace)
Anyone else wish to comment?
Good catch.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page