Oracle® Solaris Studio 12.4: OpenMP API User's Guide

Exit Print View

Updated: December 2014
 
 

9.1 OpenMP Memory Model

Memory accesses by multiple threads to the same variable without synchronization are not necessarily atomic with respect to each other. Several implementation-dependent and application-dependent factors affect whether accesses are atomic. Some variables might be larger than the largest atomic memory operation on the target platform. Some variables might be misaligned or of unknown alignment. Sometimes there are faster code sequences that use more loads (or stores). Therefore, the compiler and the runtime system might need to use multiple loads (or stores) to access the variable.

When a memory update is on a bit-field variable, the minimum size at which the memory update may also read and write back adjacent variables that are part of another variable such as array or structure elements is the same as that required by the base language. When a memory update is on a variable that is not a bit-field variable, the update will not read and write back adjacent variables that are part of another variable such as array or structure elements.