Commit beeaec2
committed
feat!: Implement step parameter space iteration for chunks
* Modify StepParameterSpaceIterator to handle parameter spaces that
include a CHUNK[INT] parameter. The iteration pattern depends on the
values in the 'chunks' object of the parameter definition.
* If targetRuntimeSeconds is 0 or unspecified, split the CHUNK[INT]
dimension into chunks, and then iterate over the whole space with
that selection of chunks.
* If targetRuntimeSeconds is a positive integer, move the CHUNK[INT]
dimension to the innermost loop, and dynamically select the chunk
each time it advances. Let the user of the iterator modify its
chunks_default_task_count to adapt the chunk size over time.
* The StepParameterSpaceIterator object behaved more like a
pseudo-container than an iterator. Change it to act as the iterator
itself (returning 'self' from __iter__() instead of a new object).
* Changed how the special case zero-dimensional iteration works to be
a Node/Iterator pair just like the others, for a more uniform
interface.
* Changes to IntRangeExpr:
* Fix a bug in IntRangeExpr.from_list that wasn't handling the end of a
linear sequence correctly.
* Change the string representation of IntRangeExpr to use "," instead of
"-" when there are just two values.
* Add and update unit tests for all of the modifications.
* Update parameter space validation to ensure only one CHUNK[INT]
parameter is defined.
Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>1 parent 1d2f554 commit beeaec2
File tree
10 files changed
+1064
-52
lines changed- src/openjd/model
- v2023_09
- test/openjd
- model
- _internal
- v2023_09
10 files changed
+1064
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
| 189 | + | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
| 588 | + | |
587 | 589 | | |
588 | 590 | | |
589 | 591 | | |
| |||
909 | 911 | | |
910 | 912 | | |
911 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| 212 | + | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
| |||
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
71 | | - | |
72 | 67 | | |
73 | 68 | | |
74 | | - | |
| 69 | + | |
75 | 70 | | |
76 | 71 | | |
77 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
| |||
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
93 | | - | |
| 90 | + | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
97 | | - | |
| 94 | + | |
98 | 95 | | |
99 | | - | |
| 96 | + | |
100 | 97 | | |
101 | | - | |
102 | | - | |
| 98 | + | |
| 99 | + | |
103 | 100 | | |
104 | 101 | | |
105 | 102 | | |
| |||
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments