You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your atomic operations all use the sequentially-consistent ordering. This imposes a hard barrier on all atomic operations. For loads this can be more efficiently replaced with a memory_order_acquire and for stores this should be replaced with memory_order_release. On load/stores (aka CAS operations) you can do: memory_order_acq_rel for success and memory_order_relaxed for failure.
If you happen to have a store after the CAS, you can downgrade the success order to memory_order_acquire.
Your atomic operations all use the sequentially-consistent ordering. This imposes a hard barrier on all atomic operations. For loads this can be more efficiently replaced with a
memory_order_acquire
and for stores this should be replaced withmemory_order_release
. On load/stores (aka CAS operations) you can do: memory_order_acq_rel for success and memory_order_relaxed for failure.If you happen to have a store after the CAS, you can downgrade the success order to
memory_order_acquire
.See: https://en.cppreference.com/w/cpp/atomic/memory_order
The text was updated successfully, but these errors were encountered: