gtsam_points
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gtsam_points::GaussianVoxelMapGPU Class Reference

Gaussian distribution voxelmap on GPU. More...

#include <gaussian_voxelmap_gpu.hpp>

Inheritance diagram for gtsam_points::GaussianVoxelMapGPU:
Inheritance graph
[legend]
Collaboration diagram for gtsam_points::GaussianVoxelMapGPU:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< GaussianVoxelMapGPU >
 
using ConstPtr = std::shared_ptr< const GaussianVoxelMapGPU >
 
- Public Types inherited from gtsam_points::GaussianVoxelMap
using Ptr = std::shared_ptr< GaussianVoxelMap >
 
using ConstPtr = std::shared_ptr< const GaussianVoxelMap >
 
- Public Types inherited from gtsam_points::OffloadableGPU
using Ptr = std::shared_ptr< OffloadableGPU >
 
using ConstPtr = std::shared_ptr< const OffloadableGPU >
 

Public Member Functions

 GaussianVoxelMapGPU (float resolution, int init_num_buckets=8192 *2, int max_bucket_scan_count=10, double target_points_drop_rate=1e-3, CUstream_st *stream=0)
 
virtual double voxel_resolution () const override
 Voxel resolution.
 
virtual void insert (const PointCloud &frame) override
 
void save_compact (const std::string &path) const override
 Save the voxelmap.
 
size_t memory_usage_gpu () const override
 Memory usage in bytes on the GPU.
 
bool loaded_on_gpu () const override
 Check if the data is loaded on the GPU.
 
bool offload_gpu (CUstream_st *stream=0) override
 Offload data from GPU to CPU.
 
bool reload_gpu (CUstream_st *stream=0) override
 Reload data from CPU to GPU.
 
- Public Member Functions inherited from gtsam_points::OffloadableGPU
std::uint64_t last_accessed_time () const
 Time of the last access to this object.
 
virtual bool touch (CUstream_st *stream=0)
 Reload data from CPU to GPU (if necessary) and update the last access time.
 

Static Public Member Functions

static GaussianVoxelMapGPU::Ptr load (const std::string &path)
 Load a voxelmap from a file.
 
- Static Public Member Functions inherited from gtsam_points::OffloadableGPU
static std::uint64_t current_access_time ()
 Current global access time counter.
 

Public Attributes

CUstream_st * stream
 
const int init_num_buckets
 Initial number of buckets.
 
const double target_points_drop_rate
 Allowable points drop rate.
 
VoxelMapInfo voxelmap_info
 Voxelmap information.
 
VoxelMapInfovoxelmap_info_ptr
 Voxelmap information on GPU memory.
 
VoxelBucketbuckets
 Voxel buckets for hashing.
 
int * num_points
 Number of points in eac voxel.
 
Eigen::Vector3f * voxel_means
 Voxel means.
 
Eigen::Matrix3f * voxel_covs
 Voxel covariances.
 
float * voxel_intensities
 Voxel intentisities.
 
std::vector< VoxelBucketoffloaded_buckets
 Offloaded buckets.
 
std::vector< int > offloaded_num_points
 Offloaded number of points.
 
std::vector< Eigen::Vector3f > offloaded_voxel_means
 Offloaded voxel means.
 
std::vector< Eigen::Matrix3f > offloaded_voxel_covs
 Offloaded voxel covariances.
 

Additional Inherited Members

- Protected Attributes inherited from gtsam_points::OffloadableGPU
std::uint64_t last_access
 Last access time of this object.
 
- Static Protected Attributes inherited from gtsam_points::OffloadableGPU
static std::atomic_uint64_t access_counter
 Global counter for the last access time.
 

Detailed Description

Gaussian distribution voxelmap on GPU.

Constructor & Destructor Documentation

◆ GaussianVoxelMapGPU()

gtsam_points::GaussianVoxelMapGPU::GaussianVoxelMapGPU ( float  resolution,
int  init_num_buckets = 8192 *2,
int  max_bucket_scan_count = 10,
double  target_points_drop_rate = 1e-3,
CUstream_st *  stream = 0 
)
Parameters
resolutionVoxel resolution
init_num_bucketsInitial buckets size
max_bucket_scan_countMaximum number of open hashmap addressing trials. If a target voxel coord is not found in successive N buckets, it is considered to be not found. Setting a larger value makes the hashing slower but results in a smaller memory footprint.
target_points_drop_rateThis parameter allows to drop a fraction of points during the bucket creation.

Member Function Documentation

◆ insert()

virtual void gtsam_points::GaussianVoxelMapGPU::insert ( const PointCloud frame)
overridevirtual

Insert a point cloud frame into the voxelmap

Note
Incremental insertion is not supported for GPU

Implements gtsam_points::GaussianVoxelMap.

◆ load()

static GaussianVoxelMapGPU::Ptr gtsam_points::GaussianVoxelMapGPU::load ( const std::string &  path)
static

Load a voxelmap from a file.

Parameters
pathPath to a voxelmap file to be loaded

◆ loaded_on_gpu()

bool gtsam_points::GaussianVoxelMapGPU::loaded_on_gpu ( ) const
overridevirtual

Check if the data is loaded on the GPU.

Implements gtsam_points::OffloadableGPU.

◆ memory_usage_gpu()

size_t gtsam_points::GaussianVoxelMapGPU::memory_usage_gpu ( ) const
overridevirtual

Memory usage in bytes on the GPU.

Reimplemented from gtsam_points::OffloadableGPU.

◆ offload_gpu()

bool gtsam_points::GaussianVoxelMapGPU::offload_gpu ( CUstream_st *  stream = 0)
overridevirtual

Offload data from GPU to CPU.

Returns
true if the data offload is conducted, false if the data is already on the CPU

Implements gtsam_points::OffloadableGPU.

◆ reload_gpu()

bool gtsam_points::GaussianVoxelMapGPU::reload_gpu ( CUstream_st *  stream = 0)
overridevirtual

Reload data from CPU to GPU.

Returns
true if the data upload is conducted, false if the data is already on the GPU

Implements gtsam_points::OffloadableGPU.

◆ save_compact()

void gtsam_points::GaussianVoxelMapGPU::save_compact ( const std::string &  path) const
overridevirtual

Save the voxelmap.

Parameters
pathDestination path to save the voxelmap

Implements gtsam_points::GaussianVoxelMap.

◆ voxel_resolution()

virtual double gtsam_points::GaussianVoxelMapGPU::voxel_resolution ( ) const
inlineoverridevirtual

Voxel resolution.

Implements gtsam_points::GaussianVoxelMap.


The documentation for this class was generated from the following file: