diff --git a/src/fast_gicp/cuda/gaussian_voxelmap.cu b/src/fast_gicp/cuda/gaussian_voxelmap.cu index eb4f909..1939418 100644 --- a/src/fast_gicp/cuda/gaussian_voxelmap.cu +++ b/src/fast_gicp/cuda/gaussian_voxelmap.cu @@ -224,7 +224,7 @@ void GaussianVoxelMap::create_voxelmap(const thrust::device_vector(0), thrust::counting_iterator(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(0), thrust::counting_iterator(voxelmap_info.num_voxels), ndt_finalize_voxels_kernel(num_points, voxel_means, voxel_covs)); cudaStreamSynchronize(stream); cudaStreamDestroy(stream); @@ -249,7 +249,7 @@ void GaussianVoxelMap::create_voxelmap(const thrust::device_vector(0), thrust::counting_iterator(voxelmap_info.num_voxels), finalize_voxels_kernel(num_points, voxel_means, voxel_covs)); + thrust::for_each(thrust::cuda::par.on(stream), thrust::counting_iterator(0), thrust::counting_iterator(voxelmap_info.num_voxels), finalize_voxels_kernel(num_points, voxel_means, voxel_covs)); cudaStreamSynchronize(stream); cudaStreamDestroy(stream);