Device interface for cl_device_id. More...
#include <cl.hpp>
Public Member Functions | |
Device () | |
Device (const Device &device) | |
Device (const cl_device_id &device) | |
Device & | operator= (const Device &rhs) |
Device & | operator= (const cl_device_id &rhs) |
template<typename T > | |
cl_int | getInfo (cl_device_info name, T *param) const |
template<cl_int name> | |
detail::param_traits < detail::cl_device_info, name > ::param_type | getInfo (cl_int *err=NULL) const |
Static Public Member Functions | |
static Device | getDefault (cl_int *err=NULL) |
cl::Device::Device | ( | ) | [inline] |
cl::Device::Device | ( | const Device & | device | ) | [inline] |
cl::Device::Device | ( | const cl_device_id & | device | ) | [inline] |
Device cl::Device::getDefault | ( | cl_int * | err = NULL | ) | [inline, static] |
Definition at line 1795 of file cl.hpp.
{ cl_int error; Device device; Context context = Context::getDefault(&error); detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); if (error != CL_SUCCESS) { if (err != NULL) { *err = error; } } else { device = context.getInfo<CL_CONTEXT_DEVICES>()[0]; if (err != NULL) { *err = CL_SUCCESS; } } return device; }
cl_int cl::Device::getInfo | ( | cl_device_info | name, |
T * | param | ||
) | const [inline] |
Definition at line 1339 of file cl.hpp.
{ return detail::errHandler( detail::getInfo(&::clGetDeviceInfo, object_, name, param), __GET_DEVICE_INFO_ERR); }
detail::param_traits<detail::cl_device_info, name>::param_type cl::Device::getInfo | ( | cl_int * | err = NULL | ) | const [inline] |
Definition at line 1324 of file cl.hpp.
{ if (this != &rhs) { detail::Wrapper<cl_type>::operator=(rhs); } return *this; }
Device& cl::Device::operator= | ( | const cl_device_id & | rhs | ) | [inline] |
Reimplemented from cl::detail::Wrapper< cl_device_id >.
Definition at line 1332 of file cl.hpp.
{ detail::Wrapper<cl_type>::operator=(rhs); return *this; }