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

unnecessary type promotion #62

Closed
AlfTetzlaff opened this issue Jun 19, 2020 · 2 comments
Closed

unnecessary type promotion #62

AlfTetzlaff opened this issue Jun 19, 2020 · 2 comments

Comments

@AlfTetzlaff
Copy link

AlfTetzlaff commented Jun 19, 2020

Hi, playing around with the package I just saw that it is often not type stable, e.g. putting in an image containing Float32 it returns a Float64 image. Affected functions I have tested:

Resize
Rotate
Shear
Zoom

I think working on this issue would increase the performance even more.

Edit: Example:

raw = rand(Float32,8,100,100)
img = view(reinterpret(SVector{8,Float32}, raw), 1,:,:)  # now its an AbstractMatrix
imgcp = copy(img)  # for demo purposes
pl = Rotate(123)
aug = augment(imgcp, pl)
typeof(aug) == typeof(imgcp)
@johnnychen94 johnnychen94 changed the title Type stability unnecessary type promotion Jun 19, 2020
@maxfreu
Copy link
Contributor

maxfreu commented Jun 26, 2020

This issue is probably upstream and related to #359 in Interpolations.jl.

@AlfTetzlaff
Copy link
Author

Closing, as the fix in Interpolations.jl has been merged.

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

No branches or pull requests

2 participants