Openholo  v5.0
Open Source Digital Holographic Library
cudaWrapper Class Reference

#include <cudaWrapper.h>

Public Types

enum  DEVICE_INFO : int {
  DEVICE_NAME = 0, GLOBAL_MEMORY = 1, CONSTANT_MEMORY = 2, MANAGED_MEMORY = 3,
  MP_COUNT = 4, TOTAL_MP_COUNT = 5, MAX_THREADS_PER_MP = 6, WARP_SIZE = 7,
  BLOCK_PER_MP = 8, SHARED_MEMORY_PER_MP = 9, SHARED_MEMORY_PER_BLOCK = 10, MAX_THREADS_PER_BLOCK = 11,
  MAX_THREADS_DIMENSION = 12, MAX_GRID_SIZE = 13
}
 

Public Member Functions

cudaDeviceProp * getDeviceProps (int idx)
 
void setCurThreads (int thread)
 
int getCurThreads ()
 
int getMaxThreads (int idx)
 
int getWarpSize (int idx)
 
void printMemoryInfo (int idx)
 
int getCurrentGPU ()
 
int getNumGPU ()
 
void setWorkload (int size)
 
int getWorkload (int idx)
 
int getActiveGPUs ()
 
bool setActiveGPUs (int gpus)
 

Static Public Member Functions

static cudaWrappergetInstance ()
 
static void releaseInstance ()
 

Detailed Description

Definition at line 14 of file cudaWrapper.h.

Member Enumeration Documentation

◆ DEVICE_INFO

Enumerator
DEVICE_NAME 
GLOBAL_MEMORY 
CONSTANT_MEMORY 
MANAGED_MEMORY 
MP_COUNT 
TOTAL_MP_COUNT 
MAX_THREADS_PER_MP 
WARP_SIZE 
BLOCK_PER_MP 
SHARED_MEMORY_PER_MP 
SHARED_MEMORY_PER_BLOCK 
MAX_THREADS_PER_BLOCK 
MAX_THREADS_DIMENSION 
MAX_GRID_SIZE 

Definition at line 17 of file cudaWrapper.h.

Member Function Documentation

◆ getActiveGPUs()

int cudaWrapper::getActiveGPUs ( )
inline

Definition at line 79 of file cudaWrapper.h.

◆ getCurrentGPU()

int cudaWrapper::getCurrentGPU ( )
inline

Definition at line 73 of file cudaWrapper.h.

◆ getCurThreads()

int cudaWrapper::getCurThreads ( )
inline

Definition at line 69 of file cudaWrapper.h.

◆ getDeviceProps()

cudaDeviceProp* cudaWrapper::getDeviceProps ( int  idx)
inline

Definition at line 67 of file cudaWrapper.h.

◆ getInstance()

static cudaWrapper* cudaWrapper::getInstance ( )
inlinestatic

Definition at line 50 of file cudaWrapper.h.

◆ getMaxThreads()

int cudaWrapper::getMaxThreads ( int  idx)
inline

Definition at line 70 of file cudaWrapper.h.

◆ getNumGPU()

int cudaWrapper::getNumGPU ( )
inline

Definition at line 74 of file cudaWrapper.h.

◆ getWarpSize()

int cudaWrapper::getWarpSize ( int  idx)
inline

Definition at line 71 of file cudaWrapper.h.

◆ getWorkload()

int cudaWrapper::getWorkload ( int  idx)
inline

Definition at line 77 of file cudaWrapper.h.

◆ printMemoryInfo()

void cudaWrapper::printMemoryInfo ( int  idx)

Definition at line 106 of file cudaWrapper.cpp.

◆ releaseInstance()

static void cudaWrapper::releaseInstance ( )
inlinestatic

Definition at line 61 of file cudaWrapper.h.

◆ setActiveGPUs()

bool cudaWrapper::setActiveGPUs ( int  gpus)
inline

Definition at line 80 of file cudaWrapper.h.

◆ setCurThreads()

void cudaWrapper::setCurThreads ( int  thread)
inline

Definition at line 68 of file cudaWrapper.h.

◆ setWorkload()

void cudaWrapper::setWorkload ( int  size)

Definition at line 156 of file cudaWrapper.cpp.


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