quadgrid 0.1
simple cartesian quad grid with particles for c++/octave
Loading...
Searching...
No Matches
atomicAdd.h File Reference
#include <atomic>

Go to the source code of this file.

Functions

template<typename T>
void atomicAdd (T *x, const T y)

Function Documentation

◆ atomicAdd()

template<typename T>
void atomicAdd ( T * x,
const T y )

Definition at line 9 of file atomicAdd.h.

10{
11 std::atomic_ref<T> x_ref(*x);
12 x_ref += y;
13}