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

Timestep Arrays View #963

Merged
merged 6 commits into from
May 23, 2023
Merged

Timestep Arrays View #963

merged 6 commits into from
May 23, 2023

Conversation

lrennels
Copy link
Collaborator

This PR adds two methods to call view on TimestepArray types, only two for now at the most general level. They should work for all instances, though I have not yet implemented matching view methods for all of the possible permutations of arguments, like for TimestepVector and TimestepArray, which may improve performance.

I do note that used with too many dimensions and : this view method can be type unstable, but getindex with the same arguments and indices is also type unstable. This is something I'd like to work on tackling in a next PR but I don't think this exacerbates the issue, it just sometimes adds a tradeoff between memory allocation and type stability which is admittedly not ideal.

@lrennels lrennels marked this pull request as ready for review May 22, 2023 20:09
@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.30 ⚠️

Comparison is base (91a71f1) 85.12% compared to head (29296bf) 84.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #963      +/-   ##
==========================================
- Coverage   85.12%   84.83%   -0.30%     
==========================================
  Files          40       40              
  Lines        4041     4055      +14     
==========================================
  Hits         3440     3440              
- Misses        601      615      +14     
Flag Coverage Δ
unittests 84.83% <0.00%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/core/time_arrays.jl 88.10% <0.00%> (-3.64%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lrennels lrennels merged commit 9bdb805 into master May 23, 2023
@lrennels lrennels deleted the timearrays-view branch May 23, 2023 06:31
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