Open3D (C++ API)  0.17.0
Functions
open3d::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)
 

Function Documentation

◆ AssertCUDADeviceAvailable() [1/2]

void open3d::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.

◆ AssertCUDADeviceAvailable() [2/2]

void open3d::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.

◆ DeviceCount()

int open3d::core::cuda::DeviceCount ( )

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

◆ IsAvailable()

bool open3d::core::cuda::IsAvailable ( )

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

◆ ReleaseCache()

void open3d::core::cuda::ReleaseCache ( )

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

◆ Synchronize() [1/2]

void open3d::core::cuda::Synchronize ( )

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

◆ Synchronize() [2/2]

void open3d::core::cuda::Synchronize ( const Device device)

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

Parameters
deviceThe device to be synchronized.