OpenMPCD
Public Member Functions | Static Public Member Functions | List of all members
OpenMPCD::CUDA::Device Class Reference

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...
 

Detailed Description

Class representing a CUDA Device.

Definition at line 21 of file Device.hpp.

Constructor & Destructor Documentation

◆ Device()

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.

Member Function Documentation

◆ getDeviceCount()

unsigned int OpenMPCD::CUDA::Device::getDeviceCount ( )
static

Returns the number of CUDA Devices available.

Definition at line 24 of file Device.cpp.

◆ getPCIAddressString()

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.

◆ getPCIBusID()

unsigned int OpenMPCD::CUDA::Device::getPCIBusID ( ) const

Returns the PCI Bus ID of this Device.

Definition at line 42 of file Device.cpp.

◆ getPCIDomainID()

unsigned int OpenMPCD::CUDA::Device::getPCIDomainID ( ) const

Returns the PCI Domain ID of this Device.

Definition at line 35 of file Device.cpp.

◆ getPCISlotID()

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.

◆ getStackSizePerThread()

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.

◆ setStackSizePerThread()

void OpenMPCD::CUDA::Device::setStackSizePerThread ( const std::size_t  value) const

Sets the stack size, in bytes, per Device thread.

Exceptions
OpenMPCD::ExceptionThrows if an error occurred.
OpenMPCD::InvalidArgumentExceptionIf OPENMPCD_DEBUG is defined, throws if value == 0.
Parameters
[in]valueThe new stack size, which must be positive.

Definition at line 75 of file Device.cpp.


The documentation for this class was generated from the following files: