Use this forum to discuss the book: Using OpenMP - Portable Shared Memory Parallel Programming, by Barbara Chapman, Gabriele Jost and Ruud van der Pas Read the http://openmp.org/forum/viewtopic.php?f=8&t=465
for book info and to download the examples. Post your feedback about the book and examples to this forum
Page 156 of the book, section 5.5.3 says Private Versus Shared Data it says: Accessing shared data also requires dereferencing a pointer, which incurs a performance overhead.
What I have understood until now is that each thread gets a local copy of the shared data, and it can update the value of the other threads using flush.
In this context, can you help me understand which is the pointer that the book is talking about there?
- Posts: 1025
- Joined: Wed Jan 16, 2008 7:21 am
Each thread doesn't get a local copy of the shared data. Each thread accesses the shared data, usually through a pointer, and the shared data may be copied into a thread's cache when used. Hope that helps explain the problem you are having with the concept.