linbox
OpenCLEnviron Class Reference

Container for all pertenant information needed to use an OpenCL device, compile kernels for the device, track resource usage, and gain exclusive access to the device. More...

#include <opencl-environ.h>

Public Member Functions

 OpenCLEnviron (std::string platformName_, double platformVersion_, std::vector< std::string > platformExtensions_, cl_context context_, cl_device_id device_, pthread_mutex_t *deviceLock_, unsigned int IDnum_)
 
 ~OpenCLEnviron ()
 
std::string getPlatformName () const
 getPlatformName() returns string with platform name
 
double getPlatformVersion () const
 getPlatformVersion() returns double with platform version
 
const std::vector< std::string > & getPlatformExtensions () const
 getPlatformExtensions() returns a constant reference to the vector with the platform extensions supported by this environ
 
const std::vector< std::string > & getDeviceExtensions () const
 getDeviceExtensions() returns a constant reference to the vector with the device extensions supported by this environ
 
unsigned int getIDNum () const
 getIDNum() returns the unsigned int with the OpenCLEnviron ID number
 
cl_context getContext () const
 getContext() accessor for the context associated with environ
 
cl_device_id getDevice () const
 getDevice() accessor for the device associated with environ
 
cl_command_queue getCommandQueue () const
 getCommandQueue() accessor for thecommand queue associated with environ
 
cl_int getErrorCode () const
 getErrorCode() accessor for the error code associated with environ
 
void setErrorCode (cl_int err)
 setErrorCode() accessor for setting error code associated with environ
 
size_t getMemCapacity () const
 getMemCapacity() accessor for the memory capacity associated with environ
 
size_t getMaxBufferSize () const
 getMaxBufferSize() accessor for the maximum buffer size associated with environ
 
size_t getMemInUse () const
 getMemInUse() accessor for the memory currently in use by the environ
 
size_t getMemAvailable () const
 getMemAvailable() accessor for the memory available in the environ
 
void memAllocated (size_t alloc)
 memAllocated() setter for updating the memory levels
 
void memDeallocated (size_t dealloc)
 memDeallocated() setter for updating the memory levels
 
bool isCPU () const
 isCPU() accessor for the device type in the environ
 
bool isGPU () const
 isGPU() accessor for the device type in the environ
 
bool isAccelerator () const
 isAccelerator() accessor for the device type in the environ
 
bool isOtherDevice () const
 isOtherDevice() accessor for the device type in the environ
 
void acquireEnviron ()
 acquireEnviron() accessor for gaining exclusive access to the environ
 
void releaseEnviron ()
 releaseEnviron() accessor for releasing exclusive access to the environ
 
pthread_mutex_t * getDeviceLock ()
 getDeviceLock() accessor for underlying lock in the environ
 

Detailed Description

Container for all pertenant information needed to use an OpenCL device, compile kernels for the device, track resource usage, and gain exclusive access to the device.

Complies to the OpenCL 1.0 spec

Constructor & Destructor Documentation

◆ OpenCLEnviron()

OpenCLEnviron ( std::string platformName_,
double platformVersion_,
std::vector< std::string > platformExtensions_,
cl_context context_,
cl_device_id device_,
pthread_mutex_t * deviceLock_,
unsigned int IDnum_ )
inline

◆ ~OpenCLEnviron()

~OpenCLEnviron ( )
inline

Member Function Documentation

◆ getPlatformName()

std::string getPlatformName ( ) const
inline

getPlatformName() returns string with platform name

◆ getPlatformVersion()

double getPlatformVersion ( ) const
inline

getPlatformVersion() returns double with platform version

◆ getPlatformExtensions()

const std::vector< std::string > & getPlatformExtensions ( ) const
inline

getPlatformExtensions() returns a constant reference to the vector with the platform extensions supported by this environ

◆ getDeviceExtensions()

const std::vector< std::string > & getDeviceExtensions ( ) const
inline

getDeviceExtensions() returns a constant reference to the vector with the device extensions supported by this environ

◆ getIDNum()

unsigned int getIDNum ( ) const
inline

getIDNum() returns the unsigned int with the OpenCLEnviron ID number

◆ getContext()

cl_context getContext ( ) const
inline

getContext() accessor for the context associated with environ

◆ getDevice()

cl_device_id getDevice ( ) const
inline

getDevice() accessor for the device associated with environ

◆ getCommandQueue()

cl_command_queue getCommandQueue ( ) const
inline

getCommandQueue() accessor for thecommand queue associated with environ

◆ getErrorCode()

cl_int getErrorCode ( ) const
inline

getErrorCode() accessor for the error code associated with environ

◆ setErrorCode()

void setErrorCode ( cl_int err)
inline

setErrorCode() accessor for setting error code associated with environ

◆ getMemCapacity()

size_t getMemCapacity ( ) const
inline

getMemCapacity() accessor for the memory capacity associated with environ

◆ getMaxBufferSize()

size_t getMaxBufferSize ( ) const
inline

getMaxBufferSize() accessor for the maximum buffer size associated with environ

◆ getMemInUse()

size_t getMemInUse ( ) const
inline

getMemInUse() accessor for the memory currently in use by the environ

◆ getMemAvailable()

size_t getMemAvailable ( ) const
inline

getMemAvailable() accessor for the memory available in the environ

◆ memAllocated()

void memAllocated ( size_t alloc)
inline

memAllocated() setter for updating the memory levels

◆ memDeallocated()

void memDeallocated ( size_t dealloc)
inline

memDeallocated() setter for updating the memory levels

◆ isCPU()

bool isCPU ( ) const
inline

isCPU() accessor for the device type in the environ

◆ isGPU()

bool isGPU ( ) const
inline

isGPU() accessor for the device type in the environ

◆ isAccelerator()

bool isAccelerator ( ) const
inline

isAccelerator() accessor for the device type in the environ

◆ isOtherDevice()

bool isOtherDevice ( ) const
inline

isOtherDevice() accessor for the device type in the environ

◆ acquireEnviron()

void acquireEnviron ( )
inline

acquireEnviron() accessor for gaining exclusive access to the environ

◆ releaseEnviron()

void releaseEnviron ( )
inline

releaseEnviron() accessor for releasing exclusive access to the environ

◆ getDeviceLock()

pthread_mutex_t * getDeviceLock ( )
inline

getDeviceLock() accessor for underlying lock in the environ


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