Skip to content
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

Improved Options for Termination Conditions #50

Merged
merged 4 commits into from
Feb 11, 2023

Conversation

avik-pal
Copy link
Member

@avik-pal avik-pal commented Feb 8, 2023

No description provided.

src/termination.jl Outdated Show resolved Hide resolved
@ChrisRackauckas
Copy link
Member

Yeah this looks mostly good. It would be good for that number 30 to be tweakable, and add some tests, and I think this is done.

src/solve.jl Show resolved Hide resolved
@avik-pal avik-pal changed the title [WIP] Improved Options for Termination Conditions Improved Options for Termination Conditions Feb 9, 2023
src/algorithms.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
for mode in (:rel_safe, :rel_safe_best, :abs_safe, :abs_safe_best)
T = SteadyStateTerminationCriteria{mode}
mode_val = Val(mode)
@eval function _get_termination_condition(cond::$(T), storage)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do they need to be dispatches?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels wrong to have something that is known at compile time and make them runtime branches 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but is this improving runtime or just adding compile time?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular set of @evals isn't adding any compile time. But the _has_converged ones add like 0.8ms over 3.6ms compilation time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think it's a hyperoptimization to make this all dispatch, but we can keep it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants