ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::core::cuda Namespace Reference

Functions

int DeviceCount ()
 
bool IsAvailable ()
 
void ReleaseCache ()
 Releases CUDA memory manager cache. This is typically used for debugging. More...
 
void Synchronize ()
 
void Synchronize (const Device &device)
 
void AssertCUDADeviceAvailable (int device_id)
 
void AssertCUDADeviceAvailable (const Device &device)
 
bool SupportsMemoryPools (const Device &device)
 

Function Documentation

◆ AssertCUDADeviceAvailable() [1/2]

void cloudViewer::core::cuda::AssertCUDADeviceAvailable ( const Device &  device)

Checks if the CUDA device-ID is available and throws error if not. The CUDA device-ID must be between 0 to device count - 1.

Parameters
deviceThe device to be checked.

References AssertCUDADeviceAvailable(), cloudViewer::core::Device::GetID(), cloudViewer::core::Device::IsCUDA(), LogError, and cloudViewer::core::Device::ToString().

◆ AssertCUDADeviceAvailable() [2/2]

void cloudViewer::core::cuda::AssertCUDADeviceAvailable ( int  device_id)

Checks if the CUDA device-ID is available and throws error if not. The CUDA device-ID must be between 0 to device count - 1.

Parameters
device_idThe cuda device id to be checked.

References DeviceCount(), and LogError.

Referenced by AssertCUDADeviceAvailable().

◆ DeviceCount()

int cloudViewer::core::cuda::DeviceCount ( )

Returns the number of available CUDA devices. Returns 0 if CloudViewer is not compiled with CUDA support.

References CLOUDVIEWER_CUDA_CHECK.

Referenced by AssertCUDADeviceAvailable(), cloudViewer_core_cuda_device_count(), cloudViewer::core::Device::GetAvailableCUDADevices(), IsAvailable(), and Synchronize().

◆ IsAvailable()

bool cloudViewer::core::cuda::IsAvailable ( )

Returns true if CloudViewer is compiled with CUDA support and at least one compatible CUDA device is detected.

References DeviceCount().

◆ ReleaseCache()

void cloudViewer::core::cuda::ReleaseCache ( )

Releases CUDA memory manager cache. This is typically used for debugging.

References LogWarning, and cloudViewer::core::MemoryManagerCached::ReleaseCache().

◆ SupportsMemoryPools()

bool cloudViewer::core::cuda::SupportsMemoryPools ( const Device &  device)

Checks if the CUDA device support Memory Pools used by the Stream Ordered Memory Allocator, see https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY__POOLS.html

Parameters
deviceThe device to be checked.

References CLOUDVIEWER_CUDA_CHECK, cloudViewer::core::Device::GetID(), and cloudViewer::core::Device::IsCUDA().

◆ Synchronize() [1/2]

void cloudViewer::core::cuda::Synchronize ( )

Calls cudaDeviceSynchronize() for all CUDA devices. If CloudViewer is not compiled with CUDA this function has no effect.

References cloudViewer::core::Device::CUDA, and DeviceCount().

Referenced by cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::Allocate(), cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >::Allocate(), cloudViewer::t::pipelines::registration::BenchmarkDopplerICP(), cloudViewer::t::pipelines::registration::BenchmarkICP(), cloudViewer::core::BinaryEW(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::BucketSizes(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::Clear(), cloudViewer::t::pipelines::registration::ComputeFPFHFeature(), cloudViewer::t::pipelines::odometry::ComputeOdometryResultPointToPlane(), cloudViewer::core::SlabNodeManager::CountSlabsPerSuperblock(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::Erase(), cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >::Erase(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingHybridSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingKNNSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingRadiusSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateCovariancesUsingHybridSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateCovariancesUsingKNNSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateCovariancesUsingRadiusSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateNormalsFromCovariancesCPU(), cloudViewer::t::geometry::kernel::voxel_grid::EstimateRangeCPU(), cloudViewer::t::geometry::kernel::voxel_grid::ExtractPointCloudCPU(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::Find(), cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >::Find(), cloudViewer::core::Free(), cloudViewer::t::geometry::FromLegacyPointCloud(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::GetActiveIndices(), cloudViewer::core::HashClearInt(), cloudViewer::core::HashClearInt3(), cloudViewer::core::HashEraseInt(), cloudViewer::core::HashEraseInt3(), cloudViewer::core::HashFindInt(), cloudViewer::core::HashFindInt3(), cloudViewer::core::HashInsertInt(), cloudViewer::core::HashInsertInt3(), cloudViewer::core::HashReserveInt(), cloudViewer::core::HashReserveInt3(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::Insert(), cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >::Insert(), cloudViewer::t::geometry::kernel::voxel_grid::IntegrateCPU(), cloudViewer::core::Malloc(), cloudViewer::core::MatmulAB(), cloudViewer::t::geometry::kernel::voxel_grid::RayCastCPU(), cloudViewer::core::Reduction(), cloudViewer::core::SlabNodeManager::Reset(), cloudViewer::t::pipelines::odometry::RGBDOdometryMultiScale(), cloudViewer::t::geometry::SelectByIndex(), cloudViewer::core::CUDAHashBackendBufferAccessor::Setup(), cloudViewer::t::geometry::ToLegacyPointCloud(), cloudViewer::t::geometry::Transform(), cloudViewer::core::UnaryEW(), cloudViewer::t::geometry::UniformDownSample(), cloudViewer::t::geometry::VoxelDownSample(), and cloudViewer::core::Zeros().

◆ Synchronize() [2/2]

void cloudViewer::core::cuda::Synchronize ( const Device &  device)

Calls cudaDeviceSynchronize() for the specified device. If CloudViewer is not compiled with CUDA or if device is not a CUDA device, this function has no effect.

Parameters
deviceThe device to be synchronized.

References CLOUDVIEWER_CUDA_CHECK, and cloudViewer::core::Device::IsCUDA().