-
Notifications
You must be signed in to change notification settings - Fork 1
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 support for non-Tuple iterators #10
Conversation
252917a
to
0309240
Compare
f8a4f2e
to
e50c627
Compare
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 discussed the design with @dennisYatunin, and it looks good. The generated table is really nice for seeing how things perform, too.
It'll be nice to use this new version in ClimaCore
6278878
to
edaf0fd
Compare
fe32051
to
e530487
Compare
8fbd0a7
to
5ec4815
Compare
@Sbozzolo I have added a bunch of documentation to this PR, with a focus on guiding users through the all of the different problems addressed by |
5ec4815
to
6efc2a5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
============================================
- Coverage 100.00% 61.18% -38.82%
============================================
Files 1 8 +7
Lines 46 237 +191
============================================
+ Hits 46 145 +99
- Misses 0 92 +92 ☔ View full report in Codecov by Sentry. |
1c762cf
to
ec84259
Compare
Good work, and I think that makes sense. Thanks for taking this on. |
ebca47c
to
ff5f5ce
Compare
ff5f5ce
to
d13bab4
Compare
After some offline discussion, it looks like everyone is in agreement that the docs are now usable. The are still a few unit tests I'd like to add, and also a lingering issue regarding |
This PR adds an interface to
UnrolledUtilities
that allows it to handle non-Tuple
iterators as both inputs and outputs of unrolled functions.Content
Base.AbstractBroadcasted
interface for static iterators (a detailed summary is located at the top ofsrc/unrollable_interface.jl
).Base
, such as those generated by theenumerate
,zip
, andIterators.map
functions. Also removes theunrolled_zip
andunrolled_enumerate
functions, since they are no longer necessary. These functions were not used outside of this repository, so this shouldn't be a breaking change.NamedTuple
s and iterators fromStaticArrays
.Bool
s by a factor of 8 in comparison toNTuple{N, Bool}
.Tuple
with a static bitwise iterator can allow us to use 256Bool
s instead of 32 without triggering allocations, which will be useful for optimizing the non-orographic gravity wave tendency inClimaAtmos
. (cc @Xiaoyang-Xie)Base.accumulate
, along with an optimized version for static bitwise iterators. This could also be helpful for the gravity wave tendency.