HOPS
HOPS class reference
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
hops::MHO_OpenCLInterface Class Reference

#include <MHO_OpenCLInterface.hh>

Public Member Functions

cl::Context GetContext () const
 
cl::Device GetDevice () const
 
CL_VECTOR_TYPE< cl::Device > GetDevices () const
 
std::string GetErrorMessage (int code)
 
std::string GetKernelPath () const
 
unsigned int GetNumberOfDevices () const
 
cl::CommandQueue & GetQueue (int i=-1) const
 
void SetGPU (unsigned int i)
 
void SetKernelPath (std::string s)
 

Static Public Member Functions

static MHO_OpenCLInterfaceGetInstance ()
 

Protected Member Functions

 MHO_OpenCLInterface ()
 
virtual ~MHO_OpenCLInterface ()
 
void FillErrorCodeMaps ()
 
void InitializeOpenCL ()
 

Protected Attributes

unsigned int fCLDeviceID
 
cl::Context * fContext
 
CL_VECTOR_TYPE< cl::Device > fDevices
 
std::string fKernelPath
 
std::map< int, std::string > fOpenCLCode2ErrorMap
 
std::map< std::string, int > fOpenCLError2CodeMap
 
CL_VECTOR_TYPE< cl::Platform > fPlatforms
 
std::vector< cl::CommandQueue * > fQueues
 

Static Protected Attributes

static MHO_OpenCLInterfacefOpenCLInterface = 0
 

Constructor & Destructor Documentation

◆ MHO_OpenCLInterface()

hops::MHO_OpenCLInterface::MHO_OpenCLInterface ( )
protected

◆ ~MHO_OpenCLInterface()

hops::MHO_OpenCLInterface::~MHO_OpenCLInterface ( )
protectedvirtual

Member Function Documentation

◆ FillErrorCodeMaps()

void hops::MHO_OpenCLInterface::FillErrorCodeMaps ( )
protected

◆ GetContext()

cl::Context hops::MHO_OpenCLInterface::GetContext ( ) const
inline

◆ GetDevice()

cl::Device hops::MHO_OpenCLInterface::GetDevice ( ) const
inline

◆ GetDevices()

CL_VECTOR_TYPE< cl::Device > hops::MHO_OpenCLInterface::GetDevices ( ) const
inline

◆ GetErrorMessage()

std::string hops::MHO_OpenCLInterface::GetErrorMessage ( int  code)
inline

◆ GetInstance()

MHO_OpenCLInterface * hops::MHO_OpenCLInterface::GetInstance ( )
static

Interface to accessing MHO_OpenCLInterface.

◆ GetKernelPath()

std::string hops::MHO_OpenCLInterface::GetKernelPath ( ) const
inline

◆ GetNumberOfDevices()

unsigned int hops::MHO_OpenCLInterface::GetNumberOfDevices ( ) const
inline

◆ GetQueue()

cl::CommandQueue & hops::MHO_OpenCLInterface::GetQueue ( int  i = -1) const

◆ InitializeOpenCL()

void hops::MHO_OpenCLInterface::InitializeOpenCL ( )
protected

Queries the host for available OpenCL platforms, and constructs a Context.

◆ SetGPU()

void hops::MHO_OpenCLInterface::SetGPU ( unsigned int  i)

Selects a device for use in OpenCL calculations.

◆ SetKernelPath()

void hops::MHO_OpenCLInterface::SetKernelPath ( std::string  s)
inline

Member Data Documentation

◆ fCLDeviceID

unsigned int hops::MHO_OpenCLInterface::fCLDeviceID
protected

◆ fContext

cl::Context* hops::MHO_OpenCLInterface::fContext
protected

◆ fDevices

CL_VECTOR_TYPE< cl::Device > hops::MHO_OpenCLInterface::fDevices
protected

◆ fKernelPath

std::string hops::MHO_OpenCLInterface::fKernelPath
protected

◆ fOpenCLCode2ErrorMap

std::map< int, std::string > hops::MHO_OpenCLInterface::fOpenCLCode2ErrorMap
protected

◆ fOpenCLError2CodeMap

std::map< std::string, int > hops::MHO_OpenCLInterface::fOpenCLError2CodeMap
protected

◆ fOpenCLInterface

MHO_OpenCLInterface * hops::MHO_OpenCLInterface::fOpenCLInterface = 0
staticprotected

◆ fPlatforms

CL_VECTOR_TYPE< cl::Platform > hops::MHO_OpenCLInterface::fPlatforms
protected

◆ fQueues

std::vector< cl::CommandQueue* > hops::MHO_OpenCLInterface::fQueues
mutableprotected

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