Provides methods for interacting with a certain CUDA device.
Inherits Rx::LFR::CParametersPimpl< CCudaDevice_Impl, Params::ECudaDevice::ID, Interfaces::ECudaDevice::ID >.
Public Types | |
typedef Interfaces::ECudaDevice::ID | EnumInterfaceType |
typedef Params::ECudaDevice::ID | EnumType |
The type of the parameter enum. Is used by managed wrapper classes. More... | |
Public Member Functions | |
CCudaDevice (CCudaDevice_Impl *pxImpl) | |
Constructor. Only for internal purposes. More... | |
CCudaDevice (CCudaDevice &&xCudaDevice) | |
Move constructor. More... | |
~CCudaDevice () | |
Destructor. More... | |
void | GetComputeCapability (unsigned &uMajor, unsigned &uMinor) const |
Gets the compute capability of this CUDA device. The minimum compute capability is 3.0. More... | |
int | GetDeviceID () const |
Gets the ID of this CUDA device. More... | |
CCudaDevice_Impl & | GetImpl () |
Gets the non constant implementation. More... | |
const CCudaDevice_Impl & | GetImpl () const |
Gets the constant implementation. More... | |
void * | GetInterface (Interfaces::ECudaDevice::ID eInterface) |
Gets the interface defined by the given interface ID. More... | |
const void * | GetInterface (Interfaces::ECudaDevice::ID eInterface) const |
Gets the interface defined by the given interface ID. More... | |
TInterface * | GetInterface (Interfaces::ECudaDevice::ID eInterface) |
Gets the interface defined by the given interface ID. More... | |
const TInterface * | GetInterface (Interfaces::ECudaDevice::ID eInterface) const |
Gets the interface defined by the given interface ID. More... | |
CParameters< Params::ECudaDevice::ID > & | GetParams () |
const CParameters< Params::ECudaDevice::ID > & | GetParams () const |
bool | HasComputeCapability (unsigned uMajor, unsigned uMinor) const |
Queries if this CUDA device supports the given compute capability. More... | |
bool | HasInterface (Interfaces::ECudaDevice::ID eInterface) |
Queries if this object has the given interface. More... | |
bool | Lock (int iTimeout=-1) const |
Locks this CUDA device. This waits until locked or until the timeout has been expired. More... | |
void | MakeCurrent () const |
Makes this CUDA device current for the calling thread. More... | |
CCudaDevice & | operator= (CCudaDevice &&xCudaDevice) |
Move assignment operator. More... | |
void | QueryMemoryInfo (size_t &nFree, size_t &nTotal) const |
Queries the free and the total amount of available device memory in bytes. More... | |
void | Unlock () const |
Unlocks this CUDA device. Does nothing if not locked by the calling thread. More... | |
|
inherited |
|
inherited |
The type of the parameter enum. Is used by managed wrapper classes.
Rx::LFR::CCudaDevice::CCudaDevice | ( | CCudaDevice_Impl * | pxImpl | ) |
Constructor. Only for internal purposes.
pxImpl | [out] The implementation class. |
Rx::LFR::CCudaDevice::CCudaDevice | ( | CCudaDevice && | xCudaDevice | ) |
Move constructor.
xCudaDevice | [in,out] The cuda device instance. |
Rx::LFR::CCudaDevice::~CCudaDevice | ( | ) |
Destructor.
void Rx::LFR::CCudaDevice::GetComputeCapability | ( | unsigned & | uMajor, |
unsigned & | uMinor | ||
) | const |
Gets the compute capability of this CUDA device. The minimum compute capability is 3.0.
uMajor | [out] The major part of the compute capability version. |
uMinor | [out] The minor part of the compute capability version. |
int Rx::LFR::CCudaDevice::GetDeviceID | ( | ) | const |
Gets the ID of this CUDA device.
|
inlineinherited |
Gets the non constant implementation.
|
inlineinherited |
Gets the constant implementation.
|
inherited |
Gets the interface defined by the given interface ID.
eInterface | The interface ID. |
|
inherited |
Gets the interface defined by the given interface ID.
eInterface | The interface ID. |
|
inlineinherited |
Gets the interface defined by the given interface ID.
TInterface | The interface type. |
eInterface | The interface. |
|
inlineinherited |
Gets the interface defined by the given interface ID.
TInterface | The interface type. |
eInterface | The interface ID. |
|
inherited |
|
inherited |
bool Rx::LFR::CCudaDevice::HasComputeCapability | ( | unsigned | uMajor, |
unsigned | uMinor | ||
) | const |
Queries if this CUDA device supports the given compute capability.
uMajor | The major part of the compute capability version. |
uMinor | The minor part of the compute capability version. |
|
inlineinherited |
Queries if this object has the given interface.
eInterface | The interface to query. |
bool Rx::LFR::CCudaDevice::Lock | ( | int | iTimeout = -1 | ) | const |
Locks this CUDA device. This waits until locked or until the timeout has been expired.
iTimeout | (optional) Timeout in milliseconds. -1 will wait infinetly. |
void Rx::LFR::CCudaDevice::MakeCurrent | ( | ) | const |
Makes this CUDA device current for the calling thread.
CCudaDevice& Rx::LFR::CCudaDevice::operator= | ( | CCudaDevice && | xCudaDevice | ) |
Move assignment operator.
xCudaDevice | [in,out] The cuda device instance. |
void Rx::LFR::CCudaDevice::QueryMemoryInfo | ( | size_t & | nFree, |
size_t & | nTotal | ||
) | const |
Queries the free and the total amount of available device memory in bytes.
nFree | [out] Free device memory in bytes. |
nTotal | [out] Total device memory in bytes. |
void Rx::LFR::CCudaDevice::Unlock | ( | ) | const |
Unlocks this CUDA device. Does nothing if not locked by the calling thread.