kernels (K9): blocks.cu becomes an include-only entry; kernels under step/
blocks.cu keeps its header, includes and #error guards and then includes the kernels, as kernel_v2.cu does: - step/block_transfer.cu: BlockHaloCopy, BlockExplode, BlockExplodeProjected, BlockCoalesce - step/block_boundary.cu: BlockCurvedBoundary, BlockAccumulateExchange - step/block_step.cu: BlockStep (rejects BLOCK_ROOT_BC == 2) - step/block_channel.cu: unchanged (mode 2 only) Kernel text moved verbatim (checked against the previous blocks.cu) and in the same definition order, so the translation unit is the same sequence of kernels. The two source-reading tests follow the move: test_projected_explosion reads step/block_transfer.cu, test_refinement_mrt reads blocks.cu + step/block_step.cu; their assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
af406b44bf
commit
bf5088f84c
6 files changed
+163
-149
No files matched your search
@@ -162,7 +162,7 @@ class ProjectedKernelTests(unittest.TestCase):
|
||||
targets = child.owner.ravel()[p.ghost_fine]
|
||||
donors = parent.owner.ravel()[p.ghost_coarse]
|
||||
source = (Path(__file__).resolve().parents[2] /
|
||||
"src/CelerisLab/lbm/kernels/blocks.cu").read_text()
|
||||
"src/CelerisLab/lbm/kernels/step/block_transfer.cu").read_text()
|
||||
kernel = source.split('extern "C" __global__ void BlockExplodeProjected(',1)[1]
|
||||
kernel = 'void BlockExplodeProjected(' + kernel.split('// Targets are receiver-local SOURCE slots',1)[0]
|
||||
def array(name, values, kind):
|
||||
|
||||
@@ -22,7 +22,7 @@ class RefinementMRTHost(unittest.TestCase):
|
||||
|
||||
def test_srt_statements_and_guards_preserved(self):
|
||||
"""MRT is an additive compile-time branch; SRT statements and other guards remain."""
|
||||
blocks = (KERNELS / "blocks.cu").read_text()
|
||||
blocks = (KERNELS / "blocks.cu").read_text() + (KERNELS / "step/block_step.cu").read_text()
|
||||
channel = (KERNELS / "step/block_channel.cu").read_text()
|
||||
block_collision = (KERNELS / "operators/block_collision.cuh").read_text()
|
||||
self.assertIn('#include "operators/block_collision.cuh"', blocks)
|
||||
|
||||
Reference in new issue
Block a user