FLAMEGPU / FLAMEGPU2

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

Double Precision Spatial Messaging #959

Open ptheywood opened 1 year ago

ptheywood commented 1 year ago

The current spatial messaging implementation uses float for the implicit x/y/z members (and associated methods such as getVirtualX).

Some users might want double precision spatial coordinates for e.g. large ranges but some dense regions, so we might want to provide a double variant.

Performance will be worse due to reduced FP64 units and incresed memory requirementsm but may be neccesary.

We could implement this in the future without breaking the API by either creating new copies of the single precision classes, with Double in the name. Alternatively we could templating the current classes, then typedef concrete versions, using the current name for single precision and a new name for double. This would be an ABI break, but not an API break (and we don't maintain a stable ABI).

Robadob commented 1 year ago

Alternatively we could...

This would be the cleaner approach.

ptheywood commented 1 month ago

This would have been useful in a recent model implementation, which is using MessageBruteForce instead as this is not available.