Developer Guide and Reference

  • 2021.4
  • 09/27/2021
  • Public Content

DPCT1078

Message

Consider replacing
memory_order::acq_rel
with
memory_order::seq_cst
for correctness if strong memory order restrictions are needed.

Detailed Help

memory_order::acq_rel
is a light-weight fence that is sufficient for memory synchronization in most programs. If a program needs total sequentially consistent memory order to ensure correctness, replace
memory_order::acq_rel
with
memory_order::seq_cst
.

Suggestions to Fix

Replace
memory_order::acq_rel
with
memory_order::seq_cst
if stricter memory order is needed.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.