gtsam_points
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
gtsam_points::OffloadableGPU Class Referenceabstract

An interface class for offloading data from GPU to CPU. More...

#include <offloadable.hpp>

Inheritance diagram for gtsam_points::OffloadableGPU:
Inheritance graph
[legend]

Public Types

using Ptr = std::shared_ptr< OffloadableGPU >
 
using ConstPtr = std::shared_ptr< const OffloadableGPU >
 

Public Member Functions

std::uint64_t last_accessed_time () const
 Time of the last access to this object.
 
virtual size_t memory_usage_gpu () const
 Memory usage in bytes on the GPU.
 
virtual bool loaded_on_gpu () const =0
 Check if the data is loaded on the GPU.
 
virtual bool touch (CUstream_st *stream=0)
 Reload data from CPU to GPU (if necessary) and update the last access time.
 
virtual bool offload_gpu (CUstream_st *stream=0)=0
 Offload data from GPU to CPU.
 
virtual bool reload_gpu (CUstream_st *stream=0)=0
 Reload data from CPU to GPU.
 

Static Public Member Functions

static std::uint64_t current_access_time ()
 Current global access time counter.
 

Protected Attributes

std::uint64_t last_access
 Last access time of this object.
 

Static Protected Attributes

static std::atomic_uint64_t access_counter
 Global counter for the last access time.
 

Detailed Description

An interface class for offloading data from GPU to CPU.

Member Function Documentation

◆ loaded_on_gpu()

virtual bool gtsam_points::OffloadableGPU::loaded_on_gpu ( ) const
pure virtual

Check if the data is loaded on the GPU.

Implemented in gtsam_points::GaussianVoxelMapGPU, and gtsam_points::PointCloudGPU.

◆ memory_usage_gpu()

virtual size_t gtsam_points::OffloadableGPU::memory_usage_gpu ( ) const
inlinevirtual

Memory usage in bytes on the GPU.

Reimplemented in gtsam_points::GaussianVoxelMapGPU, and gtsam_points::PointCloudGPU.

◆ offload_gpu()

virtual bool gtsam_points::OffloadableGPU::offload_gpu ( CUstream_st *  stream = 0)
pure virtual

Offload data from GPU to CPU.

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

Implemented in gtsam_points::GaussianVoxelMapGPU, and gtsam_points::PointCloudGPU.

◆ reload_gpu()

virtual bool gtsam_points::OffloadableGPU::reload_gpu ( CUstream_st *  stream = 0)
pure virtual

Reload data from CPU to GPU.

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

Implemented in gtsam_points::GaussianVoxelMapGPU, and gtsam_points::PointCloudGPU.

◆ touch()

virtual bool gtsam_points::OffloadableGPU::touch ( CUstream_st *  stream = 0)
virtual

Reload data from CPU to GPU (if necessary) and update the last access time.

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

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