dsl: Move SubDimension thickness evaluation to the thicknesses themselves
Fixes issues with standalone use of SubDimension.symbolic_min or SubDimension.symbolic_max in an operator. Previously variants on
x = Dimension('x')
ix = SubDimension.left('ix', x, 2)
f = Function(name="f", dimensions=(ix,), shape=(5,), dtype=np.int32)
eqns = Eq(f[ix.symbolic_max], 1)
op = Operator(eqns)
op(x_m=0)
would suffer from two issues:
- The SubDimension thickness (
ix.symbolic_max) would not be concretised fromx_ltkntox_ltkn0 - The SubDimension thickness would never be given a value by
_arg_valuesunless the user explicitly passed it to the operator (and even then, it would not be adjusted to reflect any MPI decomposition)
These are rectified by this PR.
Codecov Report
Attention: Patch coverage is 97.03704% with 4 lines in your changes missing coverage. Please review.
Project coverage is 87.26%. Comparing base (
2f4f80f) to head (6e7c017). Report is 21 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| devito/ir/equations/algorithms.py | 81.81% | 1 Missing and 1 partial :warning: |
| devito/types/dimension.py | 97.82% | 1 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #2470 +/- ##
==========================================
+ Coverage 87.22% 87.26% +0.04%
==========================================
Files 238 238
Lines 45258 45278 +20
Branches 4019 4022 +3
==========================================
+ Hits 39475 39512 +37
+ Misses 5103 5085 -18
- Partials 680 681 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Merged, thanks