Search code examples
c++copenmpbarrier

About OMP barrier and dynamic array


Does OMP ensure that the contents of an dynamic array is up-to-date and is visible to all threads after an OMP barrier?


Solution

  • Yes. A barrier causes all threads' view of all accessible memory to be made consistent; that is, it implicitly flushes the entire state of the program.