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

Avoid aliased copyto! by not calling copyto. #15

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

GunnarFarneback
Copy link
Owner

The fix for aliased copyto! in #11 didn't solve the problem that copyto! for SubArray still allocated and was kind of slow. This PR instead solves the aliasing problem by replacing the copyto! with a plain loop, which ensures the intended aliasing behavior.

Cf. tlnagy/TiffImages.jl#115 where the allocation problem was observed.

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (eaa54a3) 99.35% compared to head (0eee405) 99.35%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #15   +/-   ##
=======================================
  Coverage   99.35%   99.35%           
=======================================
  Files           1        1           
  Lines         468      468           
=======================================
  Hits          465      465           
  Misses          3        3           
Files Coverage Δ
src/Inflate.jl 99.35% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GunnarFarneback GunnarFarneback merged commit f16eec8 into master Oct 8, 2023
14 checks passed
@GunnarFarneback GunnarFarneback deleted the improved_aliasing_avoidance branch October 8, 2023 11:51
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.

2 participants