Specialize blocked root boundary mode at compile time

This commit is contained in:
Frank14f committed 2026-10-21 18:35:27 +08:00
1 parent fce24a64e8
commit 3a374faace
13 files changed
+127 -39

No files matched your search

@@ -223,6 +223,8 @@ class BlockedBaseCPU(unittest.TestCase):
self.assertIs(collide[4], coarse.kind)
walls = [a for ptr, a in m["uploads"] if isinstance(ptr, str) and ptr == "d_block_wall"]
self.assertEqual(len(walls), 1)
self.assertEqual([call.kwargs["block_root_bc"] for call in
compiler.generate_config.call_args_list], [1, 0])
width, height, slot, speed = struct.unpack("=IIIf", walls[0])
self.assertEqual((width, height, slot), (NX, NY, 8))
self.assertAlmostEqual(speed, .001)