-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add 1D
interpolation and Bilinear
interpolation
#3
base: main
Are you sure you want to change the base?
Conversation
be3133c
to
acc45fc
Compare
acc45fc
to
a5735a2
Compare
1D
interpolation and Bilinear
interpolation
Can we please break up this PR into one that adds the boiler plate, and another that adds implementations? |
println( | ||
"interpolation time = $(Statistics.median(trial_ml_cpu_ft64_interp)) on CPU for $nlevels levels with Float64\nConstructor time = $(Statistics.median(trial_ml_cpu_ft64_cons))", | ||
) | ||
@show "--------------Metal benchmarks---------------" |
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.
This should throw exceptions on incompatible devices right ? Could we reorganise the tests by available device extensions? (or perhaps renaming the tests is sufficient here)
could not load symbol "MTLCopyAllDevices":
julia: undefined symbol: MTLCopyAllDevices
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.
I am still working on cleaning up the tests. I will fix this shortly.
function interpolatebilinear!( | ||
ftarget::AbstractArray{FT,N}, | ||
bilinear::B, | ||
fsource::AbstractArray{FT,N}, |
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.
Shouldn't we allow the arrays for ftarget
and fsource
to have different lengths, rather than both being N
? E.g. if interpolating from low resolution to high resolution
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.
It does. Here, N
is just the dimension of the array! It just expects the arrays for the source and target to have the same number of dimensions.
It expects the source functions and target functions to be of sizes (n1, n2, ..., nh1_source, nh2_source)
and (n1, n2, ...., nh2_target, nh2_target)
respectively. It expects the horizontal dimensions at the end.
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.
Please take a look at the tests here: test/bilinearinterpolation.jl
for an example.
@juliasloan25 : I started a draft PR splitting off the 1D interpolation code here: #6 |
Purpose
Add 1D interpolation.