|
cds
2.3.2
|
[type-option] Option setter for C++ memory model More...
#include <cds/opt/options.h>
[type-option] Option setter for C++ memory model
The cds library supports following memory ordering constraints for atomic operations in container implementation:
v::relaxed_ordering - relaxed C++ memory model. This mode supports full set of memory ordering constraints: memory_order_relaxed, memory_order_acquire, memory_order_release and so on.v::sequential_consistent - sequentially consistent C++ memory model (default memory ordering for C++). In this mode any memory ordering constraint maps to memory_order_seq_cst.The Type template parameter can be v::relaxed_ordering or v::sequential_consistent.
You may mix different memory ordering options for different containers: one declare as sequentially consistent, another declare as relaxed. Usually, v::relaxed_ordering is the default memory ordering for libcds containers.