From cda46b99e7da36eecb5047e59bdd5316d1e08c8d Mon Sep 17 00:00:00 2001 From: Chris Liu <943678231@qq.com> Date: Sat, 4 May 2024 12:05:43 +0800 Subject: [PATCH] fix max_iidx for last pack in find_depth_bound_cuda_kernel --- wisp/csrc/render/find_depth_bound_cuda.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wisp/csrc/render/find_depth_bound_cuda.cu b/wisp/csrc/render/find_depth_bound_cuda.cu index 1175584..3e2e899 100644 --- a/wisp/csrc/render/find_depth_bound_cuda.cu +++ b/wisp/csrc/render/find_depth_bound_cuda.cu @@ -26,7 +26,7 @@ find_depth_bound_cuda_kernel( if (tidx < num_packs && curr_idxes_in[tidx] > -1) { uint iidx = curr_idxes_in[tidx]; - uint max_iidx = (tidx == num_packs-1) ? num_packs : curr_idxes_in[tidx+1]; + uint max_iidx = (tidx == num_packs-1) ? num_nugs : curr_idxes_in[tidx+1]; float query = query_depth[tidx]; while (iidx < max_iidx) {