FLAMEGPU2 icon indicating copy to clipboard operation
FLAMEGPU2 copied to clipboard

DeviceMacroProperty AtomicAdd and AtomicSub

Open mondus opened this issue 9 months ago • 1 comments

DeviceMacroProperty has operator overloading for + and - which is incorrect within the API docs as it suggests that this atomically modifies the value (it does not). We should add support for atomic add and sub (sub should use add but negate the value to avoid type restrictions). Both should have return values. We should also update the API docs so they are correct and update the user docs to make it clear which operators modify the value (i.e. -= and += are atomic).

mondus avatar May 07 '24 15:05 mondus

userguide will want add, sub added to the table of misc. atomic functions.

Robadob avatar May 07 '24 18:05 Robadob