HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
atomic.h File Reference

Wrappers and utilities for atomics. More...

#include <OpenImageIO/oiioversion.h>
#include <OpenImageIO/platform.h>
#include <atomic>
+ Include dependency graph for atomic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OIIO_USE_STDATOMIC   1
 

Typedefs

typedef atomic< intatomic_int
 
typedef atomic< long long > atomic_ll
 

Functions

template<typename T >
OIIO_FORCEINLINE void atomic_min (atomic< T > &avar, const T &bval)
 Atomically set avar to the minimum of its current value and bval. More...
 
template<typename T >
OIIO_FORCEINLINE void atomic_max (atomic< T > &avar, const T &bval)
 Atomically set avar to the maximum of its current value and bval. More...
 
OIIO_FORCEINLINE float atomic_fetch_add (atomic< float > &a, float f)
 
OIIO_FORCEINLINE double atomic_fetch_add (atomic< double > &a, double f)
 

Detailed Description

Wrappers and utilities for atomics.

Definition in file atomic.h.

Macro Definition Documentation

#define OIIO_USE_STDATOMIC   1

Definition at line 18 of file atomic.h.

Typedef Documentation

typedef atomic<int> atomic_int

Definition at line 25 of file atomic.h.

typedef atomic<long long> atomic_ll

Definition at line 26 of file atomic.h.

Function Documentation

OIIO_FORCEINLINE float atomic_fetch_add ( atomic< float > &  a,
float  f 
)

Definition at line 59 of file atomic.h.

OIIO_FORCEINLINE double atomic_fetch_add ( atomic< double > &  a,
double  f 
)

Definition at line 72 of file atomic.h.

template<typename T >
OIIO_FORCEINLINE void atomic_max ( atomic< T > &  avar,
const T &  bval 
)

Atomically set avar to the maximum of its current value and bval.

Definition at line 46 of file atomic.h.

template<typename T >
OIIO_FORCEINLINE void atomic_min ( atomic< T > &  avar,
const T &  bval 
)

Atomically set avar to the minimum of its current value and bval.

Definition at line 33 of file atomic.h.