-
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
Order of exitCondition functions. #270
Labels
Comments
It's actually undefined order.
They're stored in an `unordered_set` or `unordered_map` or something.
Logic being, that anything in the same "layer" should be able to run simultaneously. Hence order is irrelevant.
…On Fri, 15 May 2020 at 13:22, Peter Heywood ***@***.***> wrote:
Exit conditions are not executed in the order they are added to the model.
This is unintuivite (although not sure why anyone would actually have two which are order dependent..., i'm abusing it for testing purposes)
This should be well documented or changed to preserve order of adding to the model.
i.e.
FLAMEGPU_EXIT_CONDITION(exitCondition_a) {
printf("a\n");
return CONTINUE;
}
FLAMEGPU_EXIT_CONDITION(exitCondition_b) {
printf("b\n");
return CONTINUE;
}
// ...
model.addExitCondition(exitCondition_b);
model.addExitCondition(exitCondition_a);
// ...
will produce
a
b
I.e. it appears to be order of definition, not order of adding to the model.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
In which case it needs clearly documenting. |
Happy for you to add layers to init/exit functions if you think it's justified. |
Related to issue #268 which also calls for Exit condition documentation (for a different reason). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exit conditions are not executed in the order they are added to the model.
This is unintuivite (although not sure why anyone would actually have two which are order dependent..., i'm abusing it for testing purposes)
This should be well documented or changed to preserve order of adding to the model.
i.e.
will produce
I.e. it appears to be order of definition, not order of adding to the model.
Edit it does not appear to always be order of deinition either:
Edit: Currently, regular exit conditions are called prior to any python(maybe RTC?) exit conditions, which would also warrent documentation.
The text was updated successfully, but these errors were encountered: