#ifndef FAST_GICP_CUDA_GAUSSIAN_VOXELMAP_CUH #define FAST_GICP_CUDA_GAUSSIAN_VOXELMAP_CUH #include #include #include namespace fast_gicp { namespace cuda { struct VoxelMapInfo { int num_voxels; int num_buckets; int max_bucket_scan_count; float voxel_resolution; }; class GaussianVoxelMap { public: GaussianVoxelMap(float resolution, int init_num_buckets = 8192, int max_bucket_scan_count = 10); void create_voxelmap(const thrust::device_vector& points); void create_voxelmap(const thrust::device_vector& points, const thrust::device_vector& covariances); private: void create_bucket_table(cudaStream_t stream, const thrust::device_vector& points); public: const int init_num_buckets; VoxelMapInfo voxelmap_info; thrust::device_vector voxelmap_info_ptr; thrust::device_vector> buckets; // voxel data thrust::device_vector num_points; thrust::device_vector voxel_means; thrust::device_vector voxel_covs; }; } // namespace cuda } // namespace fast_gicp #endif