FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
99 stars 19 forks source link

DeviceMacroProperty AtomicAdd and AtomicSub #1203

Open mondus opened 1 month ago

mondus commented 1 month ago

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).

Robadob commented 1 month ago

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