Re: Mixing C++11 atomics and OpenMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The trick is not to try to be too cute by using OpenMP operations in
> one thread and hoping that they will synchronize with weaker C++11
> atomic operations in another thread.  It might work on one machine but
> not another.

I’m still uncertain what's supposed to work and what's not. Assume we
have a C++11 atomic variable and a loop that is associated with an
OpenMP loop directive. The atomic variable is accessed inside the loop
(e.g. compare-and-exchange). Does this work as we would expect, i.e.,
do the OpenMP threads access the variable atomically? And if so,
what's an example that does not work?




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux