atomic<T&gt memory semantics

atomic<T&gt memory semantics


I've been through a few threads on the tbb forum that talk about atomic and the lack ofunfenced/relaxed memomy semantic, but I didn't managed tounderstand the reasons of that choice.
Can someone explain? Isn't unfenced semantic usefull (when the processor supports it at least)?


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

x86 doesn't...

Relaxed atomics are definitely useful. The usage that justifies them single-handed is atomic reference counting.
My guess as to why TBB does not feature relaxed atomics is that, well, it's heavily rooted in x86 systems regardless of declared portability. Another possible reason is that AFAICT TBB is never declare atomics as a first-class user API.

All about lock-free algorithms, multicore, scalability, parallel computing and related topics:

Leave a Comment

Please sign in to add a comment. Not a member? Join today