-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ordered execution of Init/Step/Exit/ExitCondition functions #708
Conversation
…f host functions Closes #707
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Could be worth updating docs to specify the order thing, I had assumed there was a note about lack of order. But apparently not.
https://docs.flamegpu.com/guide/3-behaviour-definition/6-host-functions.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/~https://github.com/FLAMEGPU/FLAMEGPU2/blob/master/include/flamegpu/model/ModelDescription.h
The doc comments for add init/step/exit all have a @note
about order not being guarnteed. This should be updated
I'd assumed it was in the docs not docblocks too, and was going to sort after it was merged. Will update the docblocks and open a PR against the userguide too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gj
Related Docs PR is in: FLAMEGPU/FLAMEGPU2-docs#63. Should be merged after this has passed CI and been merged. |
Use std::vector instead of std::set for insertion-ordered execution of host functions.
This means that init/step/exit functiond and exit condition functions are executed in the order they are added to the model, rather then the previous sorted by function pointer order.
Closes #707
This may potentially influence the results of models, so is a potentailly breaking change.