OpenMPCD
|
Class representing a CUDA Device. More...
#include <Device.hpp>
Public Member Functions | |
Device () | |
Represents the CUDA Device active at the moment of this instance's construction on the current thread. More... | |
unsigned int | getPCIDomainID () const |
Returns the PCI Domain ID of this Device. More... | |
unsigned int | getPCIBusID () const |
Returns the PCI Bus ID of this Device. More... | |
unsigned int | getPCISlotID () const |
Returns the PCI Slot ID (also known as PCI Device ID) of this Device. More... | |
const std::string | getPCIAddressString () const |
Returns a string representing the PCI address. More... | |
std::size_t | getStackSizePerThread () const |
Returns the stack size, in bytes, per Device thread. More... | |
void | setStackSizePerThread (const std::size_t value) const |
Sets the stack size, in bytes, per Device thread. More... | |
Static Public Member Functions | |
static unsigned int | getDeviceCount () |
Returns the number of CUDA Devices available. More... | |
Class representing a CUDA Device.
Definition at line 21 of file Device.hpp.
OpenMPCD::CUDA::Device::Device | ( | ) |
Represents the CUDA Device active at the moment of this instance's construction on the current thread.
Definition at line 15 of file Device.cpp.
|
static |
Returns the number of CUDA Devices available.
Definition at line 24 of file Device.cpp.
const std::string OpenMPCD::CUDA::Device::getPCIAddressString | ( | ) | const |
Returns a string representing the PCI address.
The returned value is formatted as DDDD:BB:SS
, where DDDD
is the four-digit hexademical (lowercase) representation of the value returned by getPCIDomainID
, BB
is two hexademical (lowercase) digits corresponding to the return value of getPCIBusID
, and SS
likewise for getPCISlotID
.
Definition at line 56 of file Device.cpp.
unsigned int OpenMPCD::CUDA::Device::getPCIBusID | ( | ) | const |
Returns the PCI Bus ID of this Device.
Definition at line 42 of file Device.cpp.
unsigned int OpenMPCD::CUDA::Device::getPCIDomainID | ( | ) | const |
Returns the PCI Domain ID of this Device.
Definition at line 35 of file Device.cpp.
unsigned int OpenMPCD::CUDA::Device::getPCISlotID | ( | ) | const |
Returns the PCI Slot ID (also known as PCI Device ID) of this Device.
Definition at line 49 of file Device.cpp.
std::size_t OpenMPCD::CUDA::Device::getStackSizePerThread | ( | ) | const |
Returns the stack size, in bytes, per Device thread.
Definition at line 67 of file Device.cpp.
void OpenMPCD::CUDA::Device::setStackSizePerThread | ( | const std::size_t | value | ) | const |
Sets the stack size, in bytes, per Device thread.
OpenMPCD::Exception | Throws if an error occurred. |
OpenMPCD::InvalidArgumentException | If OPENMPCD_DEBUG is defined, throws if value == 0 . |
[in] | value | The new stack size, which must be positive. |
Definition at line 75 of file Device.cpp.