Migrate interp1d to FastInterpolations backend#99
Open
mgyoo86 wants to merge 2 commits into
Open
Conversation
Replace the in-house TypedInterp wrapper and DataInterpolations constructors in interp1d with FastInterpolations' typed interpolation functions (constant_interp, linear_interp, pchip_interp, quadratic_interp, cubic_interp), using ExtendExtrap() for extrapolation. Add FastInterpolations as a dependency and a Float32 return-type test to lock in element-type stability.
…tions Remove the explicit Integer/Rational guard and the length-based scheme fallbacks (length==1/2/3/4) in interp1d. FastInterpolations 0.4.11 handles these cases natively, so the wrapper only needs to dispatch on the requested scheme. Bump FastInterpolations compat to 0.4.11 and drop the now-obsolete Integer/Rational type-stability tests.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #99 +/- ##
==========================================
- Coverage 43.95% 43.94% -0.01%
==========================================
Files 15 15
Lines 31419 31407 -12
==========================================
- Hits 13810 13803 -7
+ Misses 17609 17604 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move
interp1dfromDataInterpolations+ in-houseTypedInterpwrapper to the newFastInterpolationspackage. The zero-allocation / type-stability machinery from #85 now lives in a dedicated package, so IMASdd no longer maintains it directly.Main Changes
FastInterpolationsdependencyinterp1dto useFastInterpolationsAPI, except for :lagrange schemePerformance Impact
1. Pure interpolation (linear, 51 grid × 1000 queries, in-place)
2. Upstream:
IMAS.trace_surfaces