-
Notifications
You must be signed in to change notification settings - Fork 229
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
api: cleanup SubDimension and SubDomain #2219
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2219 +/- ##
==========================================
- Coverage 87.09% 87.08% -0.02%
==========================================
Files 228 228
Lines 40756 40762 +6
Branches 7463 7465 +2
==========================================
+ Hits 35498 35499 +1
- Misses 4654 4657 +3
- Partials 604 606 +2
|
devito/passes/clusters/implicit.py
Outdated
@@ -120,7 +121,7 @@ def callback(self, clusters, prefix): | |||
# once and for all at the top of the current IterationInterval, | |||
# and reuse them for one or more (potentially non-consecutive) | |||
# `clusters` | |||
if ispaceN not in seen: | |||
if ispaceN not in seen or (not ispaceN and d not in seend): |
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.
two questions:
- Is the
not ispaceN
really necessary? we get to this point only iflen(ispaceN) == 0
, so it should be implicit? - Instead of adding
seend
, can we not just put everything insideseen
? that is,seen
contains both IterationSpaces and plain Dimensions...
On second thought, I'm confused by the original code. If len(ispaceN) == 0
, then it means ispaceN == IterationSpace([])
no? I think I'm not seeing something obvious, and therefore at least the first comment above might make no sense...
BTw, since you're touching this file... could you polish:
Interval(i, 0, 0) -> Interval(i)
(a few lines above)
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.
My understanding is that you could have an IterationSpace
of length 0
but not empty in some weird corner case which is why was needed. but yeah can probably drop the not ispaceN
7ed87f2
to
b19ea1a
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.
OK, GTG now
b19ea1a
to
ca76218
Compare
No description provided.