Skip to content

Commit e0aaf84

Browse files
authored
fix invalid bucket access bug (#97)
* fix invalid bucket access bug * Update Dockerfile Co-authored-by: k.koide <[email protected]>
1 parent 0793d7b commit e0aaf84

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docker/focal_cuda/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nvidia/cuda:11.1-devel-ubuntu20.04
1+
FROM nvidia/cuda:11.6.2-devel-ubuntu20.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

src/fast_gicp/cuda/gaussian_voxelmap.cu

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ struct accumulate_points_kernel {
100100
const thrust::pair<Eigen::Vector3i, int>& bucket = thrust::raw_pointer_cast(buckets_ptr)[bucket_index];
101101

102102
if (equal(bucket.first, coord)) {
103+
if (bucket.second < 0) {
104+
break;
105+
}
106+
103107
int& num_points = thrust::raw_pointer_cast(num_points_ptr)[bucket.second];
104108
Eigen::Vector3f& voxel_mean = thrust::raw_pointer_cast(voxel_means_ptr)[bucket.second];
105109
Eigen::Matrix3f& voxel_cov = thrust::raw_pointer_cast(voxel_covs_ptr)[bucket.second];

0 commit comments

Comments
 (0)