blocks: one definition of a blocked level's config and kernel launches (C1a)
PeriodicBlockStepper and FixedPatchStepper each built the blocked level's kernel config (block window NX/NY, neutralized wall/slot/inlet fields, omega/tau check) and each spelled out the raw BlockHaloCopy and BlockCurvedBoundary argument lists. These now live once in lbm/blocks.py (level_config, launch_halo_copy, launch_curved_boundary), so a kernel ABI change has one host site. Both owners keep their own lifecycle; no new class, no behaviour or default change. PeriodicBlockStepper now checks its level config before any device work (same errors). Dense refinement levels keep their own config check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
21fe71d332
commit
18e8ef45f0
4 files changed
+54
-34
No files matched your search
@@ -198,7 +198,7 @@ class CpuContracts(unittest.TestCase):
|
||||
backend._copy = backend._step = Mock()
|
||||
backend.boundary, backend._curved, backend._tables, backend._links = None, None, {}, 0
|
||||
backend._dst, backend._src = Mock(), Mock()
|
||||
backend._block, backend._grid, backend._copy_grid = (32, 1, 1), (1, 1, 1), (1, 1)
|
||||
backend._block, backend._grid = (32, 1, 1), (1, 1, 1)
|
||||
backend._allocations = [Mock(), Mock()]
|
||||
backend._current, backend._spare = backend._allocations
|
||||
return backend
|
||||
|
||||
Reference in new issue
Block a user