#pragma once // Archived experiment; excluded from the teaching sequence and normal build. // Stage 03b (mode 31): flatten the whole (seed,x,z) product into fine work items. template __global__ void positionKernel( DeviceArgs a, show::Hit* hits, unsigned long long* count ) { const uint64_t area=a.width*a.height, total=a.seeds*area; const uint64_t stride=uint64_t(gridDim.x)*blockDim.x; for(uint64_t i=uint64_t(blockIdx.x)*blockDim.x+threadIdx.x;i(a.seed+s,x,z,a.n)) emit(a,hits,count,a.seed+s,x,z); } }