Platform interface.
More...
#include <cl.hpp>
List of all members.
Detailed Description
Platform interface.
Definition at line 1396 of file cl.hpp.
Constructor & Destructor Documentation
Definition at line 1401 of file cl.hpp.
: detail::Wrapper<cl_type>() { }
Definition at line 1403 of file cl.hpp.
: detail::Wrapper<cl_type>(platform) { }
Definition at line 1405 of file cl.hpp.
: detail::Wrapper<cl_type>(platform) { }
Member Function Documentation
Definition at line 1534 of file cl.hpp.
{
cl_uint n = 0;
cl_int err = ::clGetPlatformIDs(0, NULL, &n);
if (err != CL_SUCCESS) {
return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
}
cl_platform_id* ids = (cl_platform_id*) alloca(
n * sizeof(cl_platform_id));
err = ::clGetPlatformIDs(n, ids, NULL);
if (err != CL_SUCCESS) {
return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
}
platforms->assign(&ids[0], &ids[n]);
return CL_SUCCESS;
}
Definition at line 1554 of file cl.hpp.
{
cl_uint n = 0;
cl_int err = ::clGetPlatformIDs(0, NULL, &n);
if (err != CL_SUCCESS) {
return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
}
cl_platform_id* ids = (cl_platform_id*) alloca(
n * sizeof(cl_platform_id));
err = ::clGetPlatformIDs(n, ids, NULL);
if (err != CL_SUCCESS) {
return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
}
*platform = ids[0];
return CL_SUCCESS;
}
Definition at line 1574 of file cl.hpp.
{
Platform platform;
cl_uint n = 0;
cl_int err = ::clGetPlatformIDs(0, NULL, &n);
if (err != CL_SUCCESS) {
detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
if (errResult != NULL) {
*errResult = err;
}
}
cl_platform_id* ids = (cl_platform_id*) alloca(
n * sizeof(cl_platform_id));
err = ::clGetPlatformIDs(n, ids, NULL);
if (err != CL_SUCCESS) {
detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
}
if (errResult != NULL) {
*errResult = err;
}
return ids[0];
}
Definition at line 1441 of file cl.hpp.
{
cl_uint n = 0;
cl_int err = ::clGetDeviceIDs(object_, type, 0, NULL, &n);
if (err != CL_SUCCESS) {
return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
}
cl_device_id* ids = (cl_device_id*) alloca(n * sizeof(cl_device_id));
err = ::clGetDeviceIDs(object_, type, n, ids, NULL);
if (err != CL_SUCCESS) {
return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
}
devices->assign(&ids[0], &ids[n]);
return CL_SUCCESS;
}
Definition at line 1430 of file cl.hpp.
{
typename detail::param_traits<
detail::cl_platform_info, name>::param_type param;
cl_int result = getInfo(name, ¶m);
if (err != NULL) {
*err = result;
}
return param;
}
Platform& cl::Platform::operator= |
( |
const cl_platform_id & |
rhs | ) |
[inline] |
The documentation for this class was generated from the following file: