#pragma once // Common rectangle path: use block coordinates directly, avoiding 64-bit tile divisions. // One thread keeps its coordinate while scanning all seeds, as in stage 03. __global__ void outerRectKernel(DeviceArgs a,show::Hit* hits,unsigned long long* count) { __shared__ uint64_t xs[16+show::MAX_N-1],zs[16+show::MAX_N-1]; const unsigned lane=threadIdx.y*16+threadIdx.x; const uint64_t xb=uint64_t(blockIdx.x)*16,zb=uint64_t(blockIdx.y)*16; if(lane=a.width || zi>=a.height) return; for(uint64_t s=0;s