![]() |
ATLAS Offline Software
|
Atomic min/max functions. More...
Go to the source code of this file.
Namespaces | |
| namespace | CxxUtils |
Functions | |
| template<class T> | |
| T | CxxUtils::atomic_fetch_max (std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst) |
| Atomically calculate maximum. | |
| template<class T> | |
| T | CxxUtils::atomic_fetch_min (std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst) |
| Atomically calculate minimum. | |
Atomic min/max functions.
These add atomic operations for finding the minimum or maximum. These have been proposed for addition to the standard, but have not yet made it in:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3696.htm http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0493r0.pdf
Definition in file atomic_fetch_minmax.h.