1.

How does OpenMP make it possible to program in shared memory?

Answer»

To control the automatic creation of THREADS in OpenMP, pragmas are used. The threads share memory because they share the ADDRESS SPACE. They do, however, have access to a local view of the shared variables via "private" variables. Each thread gets its own variablecopy, which the compiler can optionally initialise with the ORIGINAL variable. The references to private variables are statically UPDATED to the new variables within the thread.



Discussion

No Comment Found