ATLAS Offline Software
Namespaces | Functions
atomic_fetch_minmax.h File Reference

Atomic min/max functions. More...

#include "CxxUtils/stall.h"
#include <atomic>
Include dependency graph for atomic_fetch_minmax.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 CxxUtils
 

Functions

template<class T >
CxxUtils::atomic_fetch_max (std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst)
 Atomically calculate maximum. More...
 
template<class T >
CxxUtils::atomic_fetch_min (std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst)
 Atomically calculate minimum. More...
 

Detailed Description

Atomic min/max functions.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Nov, 2017 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.