FLAMEGPU / FLAMEGPU2

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

`LayerDescription::addHostFunction` API inconsistency #1221

Open ptheywood opened 3 months ago

ptheywood commented 3 months ago

Unlike agent functions which can be added to a LayerDescrption using an overloaded method which can take:

Host Functions can only be added by a function pointer.

    void addHostFunction(FLAMEGPU_HOST_FUNCTION_POINTER func_p);

Adding an overload which takes a HostFunctionDesciption object would improve API consistency.

(I believe this will have just been missed when HostFunctionDesciption was added during the DAG implementation)