Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Atomics.h File Reference
#include <atomic>

Go to the source code of this file.

Functions

template<class T >
bool AtomicMin (atomic< T > &ioAtomic, const T inValue, const memory_order inMemoryOrder=memory_order_seq_cst)
 Atomically compute the min(ioAtomic, inValue) and store it in ioAtomic, returns true if value was updated. More...
 
template<class T >
bool AtomicMax (atomic< T > &ioAtomic, const T inValue, const memory_order inMemoryOrder=memory_order_seq_cst)
 Atomically compute the max(ioAtomic, inValue) and store it in ioAtomic, returns true if value was updated. More...
 

Function Documentation

◆ AtomicMax()

template<class T >
bool AtomicMax ( atomic< T > &  ioAtomic,
const T  inValue,
const memory_order  inMemoryOrder = memory_order_seq_cst 
)

Atomically compute the max(ioAtomic, inValue) and store it in ioAtomic, returns true if value was updated.

◆ AtomicMin()

template<class T >
bool AtomicMin ( atomic< T > &  ioAtomic,
const T  inValue,
const memory_order  inMemoryOrder = memory_order_seq_cst 
)

Atomically compute the min(ioAtomic, inValue) and store it in ioAtomic, returns true if value was updated.