Skip to content

Add dedicated BlockIterators#206

Merged
Jutho merged 9 commits intomasterfrom
ld-blockiterator
Jan 24, 2025
Merged

Add dedicated BlockIterators#206
Jutho merged 9 commits intomasterfrom
ld-blockiterator

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Jan 17, 2025

This PR adds some dedicated iterators for going through the blocks of a single tensor.
This replaces the previous default implementation in terms of Iterators.map, in order to have more type stability (well-defined eltype and length), and the option to index into the iterators.
This should otherwise not change any external functionality (and in particular, it re-enables the syntax blocks(t)[c], which worked before v0.13) so I think it could be considered non-breaking.

@codecov
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 9 lines in your changes missing coverage. Please review.

Project coverage is 82.17%. Comparing base (660bdf7) to head (fa794bf).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/tensors/diagonal.jl 66.66% 4 Missing ⚠️
src/tensors/abstracttensor.jl 33.33% 2 Missing ⚠️
src/tensors/adjoint.jl 80.00% 2 Missing ⚠️
src/tensors/blockiterator.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
- Coverage   82.18%   82.17%   -0.02%     
==========================================
  Files          42       43       +1     
  Lines        5384     5424      +40     
==========================================
+ Hits         4425     4457      +32     
- Misses        959      967       +8     

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

@Jutho Jutho merged commit a264735 into master Jan 24, 2025
14 checks passed
@Jutho Jutho deleted the ld-blockiterator branch January 24, 2025 13:46
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