GCVL
Multi-platform (Windows, Unix and Mac OS) C++/OpenCL/CUDA library with several Computer Vision algorithms.
OpenCL_device Class Reference

#include <oclutils.h>

List of all members.

Public Member Functions

 OpenCL_device ()
 Default constructor.
 ~OpenCL_device ()
 Class destructor.
void Destructor ()
 Function in charge of releasing context and unlocking devices.
const OpenCL_platform * Get_Parent_Platform ()
 Obtains the parent platform.
std::string Get_Name () const
 Obtains the device name.
cl_uint Get_Compute_Units () const
 Obtains the number of compute units of the device.
int Get_ID () const
 Obtains the device id.
cl_device_id & Get_Device ()
 Obtains the OpenCL device id.
cl_context & Get_Context ()
 Obtains the OpenCL context of the device.
bool Is_In_Use ()
 Lets the user know if the device is in use.
bool Is_Lockable ()
 Checks if device is lockable.
void Set_Lockable (const bool _is_lockable)
 Sets device locking capabilities.
void Set_Information (const int _id, cl_device_id _device, const int platform_id_offset, const std::string &platform_name, const bool _device_is_gpu, const OpenCL_platform *const _parent_platform)
 Function that sets the device information parameters.
cl_int Set_Context ()
 Set a context on the OpenCL device.
void Print () const
 Prints information about the device.
void Lock ()
 Locks the device for use.
void Unlock ()
 Unlocks the device.
bool operator< (const OpenCL_device &b) const
 Comparation operator overloaded for device list sorting.

Public Attributes

const OpenCL_platform * parent_platform

Constructor & Destructor Documentation

Default constructor.

Class destructor.

See also:
Destructor()

Member Function Documentation

Function in charge of releasing context and unlocking devices.

See also:
~OpenCL_device()
cl_uint OpenCL_device::Get_Compute_Units ( ) const [inline]

Obtains the number of compute units of the device.

Returns:
compute units available.
cl_context& OpenCL_device::Get_Context ( ) [inline]

Obtains the OpenCL context of the device.

Returns:
OpenCL device context.
cl_device_id& OpenCL_device::Get_Device ( ) [inline]

Obtains the OpenCL device id.

Returns:
OpenCL device id.
int OpenCL_device::Get_ID ( ) const [inline]

Obtains the device id.

Returns:
device id.
std::string OpenCL_device::Get_Name ( ) const [inline]

Obtains the device name.

Returns:
device name.

Obtains the parent platform.

Returns:
parent platform.
bool OpenCL_device::Is_In_Use ( ) [inline]

Lets the user know if the device is in use.

Returns:
device usage.
bool OpenCL_device::Is_Lockable ( ) [inline]

Checks if device is lockable.

Returns:
device locking flag.

Locks the device for use.

bool OpenCL_device::operator< ( const OpenCL_device &  other) const

Comparation operator overloaded for device list sorting.

Parameters:
otherother device object for comparison.
Returns:
true if the device is not in use and has a higher number of compute units.
void OpenCL_device::Print ( ) const

Prints information about the device.

Set a context on the OpenCL device.

Returns:
OpenCL error code or success.
void OpenCL_device::Set_Information ( const int  _id,
cl_device_id  _device,
const int  platform_id_offset,
const std::string &  platform_name,
const bool  _device_is_gpu,
const OpenCL_platform *const  _parent_platform 
)

Function that sets the device information parameters.

Parameters:
_idid of the device.
_deviceOpenCL device id.
platform_id_offsetplatform id offset.
platform_nameplatform name.
_device_is_gpuflag that clarifies if the device is a GPU or CPU.
_parent_platformassociated platform to the device.
void OpenCL_device::Set_Lockable ( const bool  _is_lockable) [inline]

Sets device locking capabilities.

Unlocks the device.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Defines