         dim3 blockPerGrid(((m_tileDomain.w * m_tileDomain.h) + 64 - 1) / 64);
         dim3 threadPerBlock(64);
 
-        auto& hitcount = m_compaction.getCount();
-
         int target_idx = 0;
 
         if (bounce == 0) {

                m_reservoirs[1].ptr(),
                m_intermediates[0].ptr(),
                m_intermediates[1].ptr(),
                width, height,
                m_hitidx.ptr(), hitcount.ptr());

            checkCudaKernel(computeSpatialReuse);


    idaten::Reservoir* dst_reservoirs,
    const idaten::ReSTIRIntermedidate* __restrict__ intermediates,
    idaten::ReSTIRIntermedidate* dst_intermediates,
    int width, int height)
{
    auto ix = blockIdx.x * blockDim.x + threadIdx.x;
    auto iy = blockIdx.y * blockDim.y + threadIdx.y;

    if (ix >= width || iy >= height) {
        return;
    }

    auto idx = getIdx(ix, iy, width);

    OnComputeSpatialReuse(
        idx,
