Commit 2d8d94f
WenoStencil: self-contained Taps tuple, no more Weno5Stencil policy dep
Consolidates the 19-tap WENO5 tuple into WenoStencil<W> itself, drops
the external dependency on StencilAccessor.h, and removes references
to the Weno5Stencil policy struct / Hull (neither needed now that the
hybrid SIMD StencilAccessor is on the way out per the cleanup plan).
Before:
WenoStencil.h -> #include <StencilAccessor.h>
using Taps = Weno5Stencil::Taps;
tapIndex() -> detail::findIndex<Taps, ...>();
After:
WenoStencil.h -> self-contained; no accessor include
nested TapPoint<DI,DJ,DK> as the tap-offset type
nested using Taps = std::tuple<TapPoint<...>, ...>;
private static findTap<DI,DJ,DK>() helper
(compile-time inverse map, same pattern as the
ex-detail::findIndex)
Tap ordering unchanged — canonical WenoPt<i,j,k>::idx convention
(center, x-axis -3..+3, y-axis -3..+3, z-axis -3..+3). Hull
intentionally absent (was only consumed by the hybrid StencilAccessor
prefetch path, which is no longer exercised).
StencilAccessor.h is left alone this pass: it still defines its own
StencilPoint + detail::findIndex + Weno5Stencil policy (with both
Taps and Hull) for the benchmark passes that still instantiate
StencilAccessor<..., Weno5Stencil>. Those will fall away when the
hybrid path is removed in a subsequent cleanup step; the decoupling
here is preparation for that.
LegacyStencilAccessor.h also unchanged — it still includes
StencilAccessor.h for StencilPoint/findIndex, and its callers use
Weno5Stencil as the policy type. WenoStencil<W>::Taps could replace
that role later, but since W=1 vs W=16 stencils would pin the policy
to a specific lane width, the more natural move is to introduce a
standalone tap-tuple header when StencilAccessor.h retires.
Verification on taperLER.vdb (31.8M active voxels, 24 threads):
- ex_weno_nanovdb_cpu, ex_narrowband_stencil_cpu,
ex_stencil_gather_cpu all rebuild and link clean.
- ex_weno_nanovdb_cpu output identical (slot-by-slot) to pre-refactor:
73.75% bit-exact, 3.53% in [1e-8,1e-7), 22.72% in [1e-7,1e-6),
0 voxels above 1e-6; max |Delta|=9.5e-7 at the same slot as before.
- Timings within noise (94.8 ms fast / 121.1 ms reference).
WenoStencil.md:
- §3.3 text refreshed: kPairs indices now cross-reference
WenoStencil<W>::Taps rather than Weno5Stencil::Taps.
- §5.3 tapIndex forwarding reference: detail::findIndex -> private
static findTap.
- §7.2 (the old "Consolidate the Weno5Stencil policy" to-do) removed;
the consolidation it proposed is this commit. §7.3 renumbered to §7.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Efty Sifakis <esifakis@nvidia.com>1 parent 3ffe1e7 commit 2d8d94f
2 files changed
Lines changed: 58 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
141 | 163 | | |
142 | 164 | | |
143 | 165 | | |
| |||
154 | 176 | | |
155 | 177 | | |
156 | 178 | | |
157 | | - | |
158 | | - | |
159 | 179 | | |
160 | 180 | | |
161 | | - | |
162 | | - | |
| 181 | + | |
163 | 182 | | |
164 | 183 | | |
165 | 184 | | |
166 | | - | |
167 | | - | |
| 185 | + | |
168 | 186 | | |
169 | 187 | | |
170 | 188 | | |
| |||
200 | 218 | | |
201 | 219 | | |
202 | 220 | | |
203 | | - | |
204 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
205 | 237 | | |
206 | 238 | | |
207 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
| 167 | + | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | | - | |
183 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 431 | + | |
441 | 432 | | |
442 | 433 | | |
443 | 434 | | |
444 | | - | |
| 435 | + | |
445 | 436 | | |
446 | 437 | | |
447 | 438 | | |
| |||
0 commit comments