Skip to content

Commit

Permalink
fix off stream bug (koide3#123)
Browse files Browse the repository at this point in the history
Co-authored-by: k.koide <[email protected]>
  • Loading branch information
2 people authored and themightyoarfish committed Sep 29, 2023
1 parent 4a8c7ff commit 6122eb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fast_gicp/cuda/gaussian_voxelmap.cu
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void GaussianVoxelMap::create_voxelmap(const thrust::device_vector<Eigen::Vector

thrust::for_each(thrust::cuda::par.on(stream), points.begin(), points.end(), accumulate_points_kernel(voxelmap_info_ptr.data(), buckets, num_points, voxel_means, voxel_covs));

thrust::for_each(thrust::counting_iterator<int>(0), thrust::counting_iterator<int>(voxelmap_info.num_voxels), ndt_finalize_voxels_kernel(num_points, voxel_means, voxel_covs));
thrust::for_each(thrust::cuda::par.on(stream), thrust::counting_iterator<int>(0), thrust::counting_iterator<int>(voxelmap_info.num_voxels), ndt_finalize_voxels_kernel(num_points, voxel_means, voxel_covs));

cudaStreamSynchronize(stream);
cudaStreamDestroy(stream);
Expand All @@ -249,7 +249,7 @@ void GaussianVoxelMap::create_voxelmap(const thrust::device_vector<Eigen::Vector
thrust::make_zip_iterator(thrust::make_tuple(points.end(), covariances.end())),
accumulate_points_kernel(voxelmap_info_ptr.data(), buckets, num_points, voxel_means, voxel_covs));

thrust::for_each(thrust::counting_iterator<int>(0), thrust::counting_iterator<int>(voxelmap_info.num_voxels), finalize_voxels_kernel(num_points, voxel_means, voxel_covs));
thrust::for_each(thrust::cuda::par.on(stream), thrust::counting_iterator<int>(0), thrust::counting_iterator<int>(voxelmap_info.num_voxels), finalize_voxels_kernel(num_points, voxel_means, voxel_covs));

cudaStreamSynchronize(stream);
cudaStreamDestroy(stream);
Expand Down

0 comments on commit 6122eb2

Please sign in to comment.