ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
AthCUDA::Info Class Reference

Class providing information about the CUDA devices at runtime. More...

#include <Info.h>

Collaboration diagram for AthCUDA::Info:

Public Member Functions

int nDevices () const
 Get the number of available devices. More...
 
const std::vector< std::string > & names () const
 Get the names of all of the devices. More...
 
const std::vector< int > & maxThreadsPerBlock () const
 Get the maximum number of threads per execution block on all devices. More...
 
const std::vector< bool > & concurrentKernels () const
 Get the multi-kernel capabilities of all devices. More...
 
const std::vector< std::size_t > & totalMemory () const
 Get the total amount of memory for all devices. More...
 
void print () const
 Print the properties of all detected devices. More...
 

Static Public Member Functions

static const Infoinstance ()
 Singleton accessor function. More...
 

Private Member Functions

 Info ()
 The constructor is private to implement the singleton behaviour. More...
 

Private Attributes

int m_nDevices = 0
 The number of CUDA devices available at runtime. More...
 
std::vector< std::string > m_names
 The names of all available devices. More...
 
std::vector< int > m_maxThreadsPerBlock
 The maximum number of threads per block for each available device. More...
 
std::vector< bool > m_concurrentKernels
 The multi-kernel capabilities of all devices. More...
 
std::vector< std::size_t > m_totalMemory
 The total amount of memory for all devices. More...
 

Detailed Description

Class providing information about the CUDA devices at runtime.

This is meant to be most useful when we build the code with CUDA available, but then try to execute the code on a machine that has no GPUs.

Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h

Definition at line 24 of file Info.h.

Constructor & Destructor Documentation

◆ Info()

AthCUDA::Info::Info ( )
private

The constructor is private to implement the singleton behaviour.

Member Function Documentation

◆ concurrentKernels()

const std::vector< bool >& AthCUDA::Info::concurrentKernels ( ) const

Get the multi-kernel capabilities of all devices.

◆ instance()

static const Info& AthCUDA::Info::instance ( )
static

Singleton accessor function.

◆ maxThreadsPerBlock()

const std::vector< int >& AthCUDA::Info::maxThreadsPerBlock ( ) const

Get the maximum number of threads per execution block on all devices.

◆ names()

const std::vector< std::string >& AthCUDA::Info::names ( ) const

Get the names of all of the devices.

◆ nDevices()

int AthCUDA::Info::nDevices ( ) const

Get the number of available devices.

◆ print()

void AthCUDA::Info::print ( ) const

Print the properties of all detected devices.

◆ totalMemory()

const std::vector< std::size_t >& AthCUDA::Info::totalMemory ( ) const

Get the total amount of memory for all devices.

Member Data Documentation

◆ m_concurrentKernels

std::vector< bool > AthCUDA::Info::m_concurrentKernels
private

The multi-kernel capabilities of all devices.

Definition at line 56 of file Info.h.

◆ m_maxThreadsPerBlock

std::vector< int > AthCUDA::Info::m_maxThreadsPerBlock
private

The maximum number of threads per block for each available device.

Definition at line 54 of file Info.h.

◆ m_names

std::vector< std::string > AthCUDA::Info::m_names
private

The names of all available devices.

Definition at line 52 of file Info.h.

◆ m_nDevices

int AthCUDA::Info::m_nDevices = 0
private

The number of CUDA devices available at runtime.

Definition at line 50 of file Info.h.

◆ m_totalMemory

std::vector< std::size_t > AthCUDA::Info::m_totalMemory
private

The total amount of memory for all devices.

Definition at line 58 of file Info.h.


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