gtsam_points
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
gtsam_points::PointCloudGPU Struct Reference

Point cloud frame on GPU memory. More...

#include <point_cloud_gpu.hpp>

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

Public Types

using Ptr = std::shared_ptr< PointCloudGPU >
 
using ConstPtr = std::shared_ptr< const PointCloudGPU >
 
- Public Types inherited from gtsam_points::PointCloudCPU
using Ptr = std::shared_ptr< PointCloudCPU >
 
using ConstPtr = std::shared_ptr< const PointCloudCPU >
 
- Public Types inherited from gtsam_points::PointCloud
using Ptr = std::shared_ptr< PointCloud >
 
using ConstPtr = std::shared_ptr< const PointCloud >
 
- Public Types inherited from gtsam_points::OffloadableGPU
using Ptr = std::shared_ptr< OffloadableGPU >
 
using ConstPtr = std::shared_ptr< const OffloadableGPU >
 

Public Member Functions

template<typename T , int D>
 PointCloudGPU (const Eigen::Matrix< T, D, 1 > *points, int num_points)
 
template<typename T , int D, typename Alloc >
 PointCloudGPU (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &points)
 
 PointCloudGPU (const PointCloudGPU &points)=delete
 
PointCloudGPUoperator= (PointCloudGPU const &)=delete
 
template<typename T >
void add_times (const T *times, int num_points, CUstream_st *stream=0)
 
template<typename T >
void add_times (const std::vector< T > &times, CUstream_st *stream=0)
 
template<typename T >
void add_times_gpu (const T *times, int num_points, CUstream_st *stream=0)
 
template<typename T >
void add_times_gpu (const std::vector< T > &times, CUstream_st *stream=0)
 
template<typename T , int D>
void add_points (const Eigen::Matrix< T, D, 1 > *points, int num_points, CUstream_st *stream=0)
 
template<typename T , int D, typename Alloc >
void add_points (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &points, CUstream_st *stream=0)
 
template<typename T , int D>
void add_points_gpu (const Eigen::Matrix< T, D, 1 > *points, int num_points, CUstream_st *stream=0)
 
template<typename T , int D, typename Alloc >
void add_points_gpu (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &points, CUstream_st *stream=0)
 
template<typename T , int D>
void add_normals (const Eigen::Matrix< T, D, 1 > *normals, int num_points, CUstream_st *stream=0)
 
template<typename T , int D, typename Alloc >
void add_normals (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &normals, CUstream_st *stream=0)
 
template<typename T , int D>
void add_normals_gpu (const Eigen::Matrix< T, D, 1 > *normals, int num_points, CUstream_st *stream=0)
 
template<typename T , int D, typename Alloc >
void add_normals_gpu (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &normals, CUstream_st *stream=0)
 
template<typename T , int D>
void add_covs (const Eigen::Matrix< T, D, D > *covs, int num_points, CUstream_st *stream=0)
 
template<typename T , int D, typename Alloc >
void add_covs (const std::vector< Eigen::Matrix< T, D, D >, Alloc > &covs, CUstream_st *stream=0)
 
template<typename T , int D>
void add_covs_gpu (const Eigen::Matrix< T, D, D > *covs, int num_points, CUstream_st *stream=0)
 
template<typename T , int D, typename Alloc >
void add_covs_gpu (const std::vector< Eigen::Matrix< T, D, D >, Alloc > &covs, CUstream_st *stream=0)
 
template<typename T >
void add_intensities (const T *intensities, int num_points, CUstream_st *stream=0)
 
template<typename T >
void add_intensities (const std::vector< T > &intensities, CUstream_st *stream=0)
 
template<typename T >
void add_intensities_gpu (const T *intensities, int num_points, CUstream_st *stream=0)
 
template<typename T >
void add_intensities_gpu (const std::vector< T > &intensities, CUstream_st *stream=0)
 
void download_points (CUstream_st *stream=0)
 
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::PointCloudCPU
template<typename T , int D>
 PointCloudCPU (const Eigen::Matrix< T, D, 1 > *points, int num_points)
 Constructor.
 
template<typename T , int D, typename Alloc >
 PointCloudCPU (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &points)
 Constructor.
 
 PointCloudCPU (const PointCloudCPU &points)=delete
 
PointCloudCPUoperator= (PointCloudCPU const &)=delete
 
template<typename T >
void add_times (const T *times, int num_points)
 
template<typename T >
void add_times (const std::vector< T > &times)
 
template<typename T , int D>
void add_points (const Eigen::Matrix< T, D, 1 > *points, int num_points)
 
template<typename T , int D, typename Alloc >
void add_points (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &points)
 
template<typename T , int D>
void add_normals (const Eigen::Matrix< T, D, 1 > *normals, int num_points)
 
template<typename T , int D, typename Alloc >
void add_normals (const std::vector< Eigen::Matrix< T, D, 1 >, Alloc > &normals)
 
template<typename T , int D>
void add_covs (const Eigen::Matrix< T, D, D > *covs, int num_points)
 
template<typename T , int D, typename Alloc >
void add_covs (const std::vector< Eigen::Matrix< T, D, D >, Alloc > &covs)
 
template<typename T >
void add_intensities (const T *intensities, int num_points)
 
template<typename T >
void add_intensities (const std::vector< T > &intensities)
 
template<typename T >
void add_aux_attribute (const std::string &attrib_name, const T *values, int num_points)
 
template<typename T , typename Alloc >
void add_aux_attribute (const std::string &attrib_name, const std::vector< T, Alloc > &values)
 
size_t memory_usage () const
 Memory usage in bytes.
 
- Public Member Functions inherited from gtsam_points::PointCloud
 PointCloud (const PointCloud &)=delete
 
PointCloudoperator= (PointCloud const &)=delete
 
size_t size () const
 Number of points.
 
bool has_times () const
 Check if the point cloud has per-point timestamps.
 
bool has_points () const
 Check if the point cloud has points.
 
bool has_normals () const
 Check if the point cloud has point normals.
 
bool has_covs () const
 Check if the point cloud has point covariances.
 
bool has_intensities () const
 Check if the point cloud has point intensities.
 
bool check_times () const
 Warn if the point cloud doesn't have times.
 
bool check_points () const
 Warn if the point cloud doesn't have points.
 
bool check_normals () const
 Warn if the point cloud doesn't have normals.
 
bool check_covs () const
 Warn if the point cloud doesn't have covs.
 
bool check_intensities () const
 Warn if the point cloud doesn't have intensities.
 
bool has_times_gpu () const
 Check if the point cloud has per-point timestamps on GPU.
 
bool has_points_gpu () const
 Check if the point cloud has points on GPU.
 
bool has_normals_gpu () const
 Check if the point cloud has point normals on GPU.
 
bool has_covs_gpu () const
 Check if the point cloud has point covariances on GPU.
 
bool has_intensities_gpu () const
 Check if the point cloud has point intensities on GPU.
 
bool check_times_gpu () const
 Warn if the point cloud doesn't have times on GPU.
 
bool check_points_gpu () const
 Warn if the point cloud doesn't have points on GPU.
 
bool check_normals_gpu () const
 Warn if the point cloud doesn't have normals on GPU.
 
bool check_covs_gpu () const
 Warn if the point cloud doesn't have covs on GPU.
 
bool check_intensities_gpu () const
 Warn if the point cloud doesn't have intensities on GPU.
 
template<typename T >
const T * aux_attribute (const std::string &attrib) const
 Get the pointer to an aux attribute.
 
void save (const std::string &path) const
 Save the point cloud data.
 
void save_compact (const std::string &path) const
 Save the point cloud data with a compact representation without unnecessary fields (e.g., the last element of homogeneous coordinates).
 
- 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 PointCloudGPU::Ptr clone (const PointCloud &frame, CUstream_st *stream=0)
 
- Static Public Member Functions inherited from gtsam_points::PointCloudCPU
static PointCloudCPU::Ptr clone (const PointCloud &points)
 Deep copy.
 
static PointCloudCPU::Ptr load (const std::string &path)
 
- Static Public Member Functions inherited from gtsam_points::OffloadableGPU
static std::uint64_t current_access_time ()
 Current global access time counter.
 

Additional Inherited Members

- Public Attributes inherited from gtsam_points::PointCloudCPU
std::vector< double > times_storage
 
std::vector< Eigen::Vector4d > points_storage
 
std::vector< Eigen::Vector4d > normals_storage
 
std::vector< Eigen::Matrix4d > covs_storage
 
std::vector< double > intensities_storage
 
std::unordered_map< std::string, std::shared_ptr< void > > aux_attributes_storage
 
- Public Attributes inherited from gtsam_points::PointCloud
size_t num_points
 Number of points.
 
double * times
 Per-point timestamp w.r.t. the first point (should be sorted)
 
Eigen::Vector4d * points
 Point coordinates (x, y, z, 1)
 
Eigen::Vector4d * normals
 Point normals (nx, ny, nz, 0)
 
Eigen::Matrix4d * covs
 Point covariances cov(3, 3) = 0.
 
double * intensities
 Point intensities.
 
std::unordered_map< std::string, std::pair< size_t, void * > > aux_attributes
 Aux attributes <attribute_name, pair<element_size, data_ptr>>
 
float * times_gpu
 Per-point timestamp on GPU.
 
Eigen::Vector3f * points_gpu
 Point coordinates on GPU.
 
Eigen::Vector3f * normals_gpu
 Point normals on GPU.
 
Eigen::Matrix3f * covs_gpu
 Point covariances on GPU.
 
float * intensities_gpu
 Point intensities on GPU.
 
- 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

Point cloud frame on GPU memory.

Member Function Documentation

◆ loaded_on_gpu()

bool gtsam_points::PointCloudGPU::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::PointCloudGPU::memory_usage_gpu ( ) const
overridevirtual

Memory usage in bytes on the GPU.

Reimplemented from gtsam_points::OffloadableGPU.

◆ offload_gpu()

bool gtsam_points::PointCloudGPU::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::PointCloudGPU::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.


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