Raytrix Light Field SDK  4.0
Logo
Public Member Functions | List of all members
Rx::LFR::Net::CudaDevice Class Reference

Detailed Description

Provides methods for interacting with a certain CUDA device.

Inherits Rx::Net::NativeInterfaceWrapper< Rx::LFR::CCudaDevice, Rx::LFR::Net::Interfaces::ECudaDevice >.

Public Member Functions

 CudaDevice (const Rx::LFR::CCudaDevice &xNative)
 Constructor. More...
 
 ~CudaDevice ()
 Destructor. More...
 
void GetComputeCapability (RX_OUT unsigned% uMajor, RX_OUT unsigned% uMinor)
 Gets the compute capability of this CUDA device. The minimum compute capability is 2.0. More...
 
int GetDeviceID ()
 Gets the ID of this CUDA device. More...
 
virtual System::Object^  GetInterface (Rx::LFR::Net::Interfaces::ECudaDevice eData)
 Gets the interface. More...
 
IParameters< Rx::LFR::Net::Params::ECudaDevice >^ GetParams ()
 Gets the parameters access interface. More...
 
bool HasComputeCapability (unsigned uMajor, unsigned uMinor)
 Queries if this CUDA device supports the given compute capability. More...
 
bool Lock (int iTimeout)
 Locks this CUDA device. This waits until locked or until the timeout has been expired. More...
 
void MakeCurrent ()
 Makes this CUDA device current for the calling thread. More...
 
void QueryMemoryInfo (RX_OUT System::UInt64% nFree, RX_OUT System::UInt64% nTotal)
 Queries the free and the total amount of available device memory in bytes. More...
 
void Unlock ()
 Unlocks this CUDA device. Does nothing if not locked by the calling thread. More...
 

Constructor & Destructor Documentation

Rx::LFR::Net::CudaDevice::CudaDevice ( const Rx::LFR::CCudaDevice xNative)
inline

Constructor.

Wraps the given native instance instead of creating an own instance. The given native instance must be valid for the lifetime of this instance.

Parameters
xNative[in] The native instance to be wrapped by this class.
Rx::LFR::Net::CudaDevice::~CudaDevice ( )
inline

Destructor.

Member Function Documentation

void Rx::LFR::Net::CudaDevice::GetComputeCapability ( RX_OUT unsigned%  uMajor,
RX_OUT unsigned%  uMinor 
)
inline

Gets the compute capability of this CUDA device. The minimum compute capability is 2.0.

Parameters
uMajor[out] The major part of the compute capability version.
uMinor[out] The minor part of the compute capability version.
int Rx::LFR::Net::CudaDevice::GetDeviceID ( )
inline

Gets the ID of this CUDA device.

Returns
The internal CUDA device ID.

Gets the interface.

Returns
The interface.
IParameters<Rx::LFR::Net::Params::ECudaDevice> ^ Rx::LFR::Net::CudaDevice::GetParams ( )
inline

Gets the parameters access interface.

Returns
The parameters access interface.
bool Rx::LFR::Net::CudaDevice::HasComputeCapability ( unsigned  uMajor,
unsigned  uMinor 
)
inline

Queries if this CUDA device supports the given compute capability.

Parameters
uMajorThe major part of the compute capability version.
uMinorThe minor part of the compute capability version.
Returns
True if this CUDA device supports the given compute capability, false if not.
bool Rx::LFR::Net::CudaDevice::Lock ( int  iTimeout)
inline

Locks this CUDA device. This waits until locked or until the timeout has been expired.

Parameters
iTimeoutTimeout in milliseconds. -1 will wait infinetly.
Returns
True if it succeeds, false on timeout.
void Rx::LFR::Net::CudaDevice::MakeCurrent ( )
inline

Makes this CUDA device current for the calling thread.

void Rx::LFR::Net::CudaDevice::QueryMemoryInfo ( RX_OUT System::UInt64%  nFree,
RX_OUT System::UInt64%  nTotal 
)
inline

Queries the free and the total amount of available device memory in bytes.

Parameters
nFree[out] Free device memory in bytes.
nTotal[out] Total device memory in bytes.
void Rx::LFR::Net::CudaDevice::Unlock ( )
inline

Unlocks this CUDA device. Does nothing if not locked by the calling thread.