CLAUDE: 3-B rung B4 - pinned double-buffered bayer staging + async per-sensor H2D
Legacy tp_proc_set_image is a synchronous cudaMemcpy2D from pageable
JNA-marshalled memory (B0: 11.9 ms/scene, ~1.8 GB/s). New surface:
tp_proc_bayer_staging(slot 0/1) lazily allocates pinned staging
(num_cams*w*h floats) + a dedicated non-blocking copy stream + fence
event; tp_proc_set_image_staged enqueues the pinned->device copy of one
sensor and returns (sensor k DMAs while the host prepares k+1). All
resident-image consumers/writers fence (bayer_fence; kernel exec paths
already cuCtxSynchronize). Double buffer + non-blocking stream = the
RT-service inter-scene overlap provision. tp_proc_destroy drains the
copy stream before freeing pinned.
test_bayer_staged_jna (synthetic, cases.list 'bayer_staged'): both
slots x 16 sensors bit-exact readback + staged->legacy WAW ordering -
PASS. Full run_cases.sh ALL PASS (incl. pose_corr @tol 0).
Co-Authored-By:
Claude Fable 5 <noreply@anthropic.com>
Showing
jna/test_bayer_staged_jna.cu
0 → 100644
Please register or sign in to comment