|
GCVL
Multi-platform (Windows, Unix and Mac OS) C++/OpenCL/CUDA library with several Computer Vision algorithms.
|
#include <oclutils.h>
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 |
Default constructor.
Class destructor.
| void OpenCL_device::Destructor | ( | ) |
Function in charge of releasing context and unlocking devices.
| cl_uint OpenCL_device::Get_Compute_Units | ( | ) | const [inline] |
Obtains the number of compute units of the device.
| cl_context& OpenCL_device::Get_Context | ( | ) | [inline] |
Obtains the OpenCL context of the device.
| cl_device_id& OpenCL_device::Get_Device | ( | ) | [inline] |
Obtains the OpenCL device id.
| int OpenCL_device::Get_ID | ( | ) | const [inline] |
Obtains the device id.
| std::string OpenCL_device::Get_Name | ( | ) | const [inline] |
Obtains the device name.
| const OpenCL_platform* OpenCL_device::Get_Parent_Platform | ( | ) | [inline] |
Obtains the parent platform.
| bool OpenCL_device::Is_In_Use | ( | ) | [inline] |
Lets the user know if the device is in use.
| bool OpenCL_device::Is_Lockable | ( | ) | [inline] |
Checks if device is lockable.
| void OpenCL_device::Lock | ( | ) |
Locks the device for use.
| bool OpenCL_device::operator< | ( | const OpenCL_device & | other | ) | const |
Comparation operator overloaded for device list sorting.
| other | other device object for comparison. |
| void OpenCL_device::Print | ( | ) | const |
Prints information about the device.
| cl_int OpenCL_device::Set_Context | ( | ) |
Set a context on the OpenCL device.
| 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.
| _id | id of the device. |
| _device | OpenCL device id. |
| platform_id_offset | platform id offset. |
| platform_name | platform name. |
| _device_is_gpu | flag that clarifies if the device is a GPU or CPU. |
| _parent_platform | associated platform to the device. |
| void OpenCL_device::Set_Lockable | ( | const bool | _is_lockable | ) | [inline] |
Sets device locking capabilities.
| void OpenCL_device::Unlock | ( | ) |
Unlocks the device.