Commit 22c887a2 authored by Joseph Noir's avatar Joseph Noir

fixed error with opencl version 1.1

OpenCL version 1.1 does not include clRetainDevice and clReleaseDevice,
added dummy functions.
parent 44321969
......@@ -44,6 +44,9 @@ namespace cppa { namespace opencl {
std::string get_opencl_error(cl_int err);
cl_int clReleaseDeviceDummy (cl_device_id);
cl_int clRetainDeviceDummy (cl_device_id);
} } // namespace cppa::opencl
#endif // CPPA_OPENCL_GLOBAL_HPP
......@@ -112,9 +112,10 @@ class smart_ptr {
typedef smart_ptr<cl_mem,clRetainMemObject,clReleaseMemObject> mem_ptr;
typedef smart_ptr<cl_event,clRetainEvent,clReleaseEvent> event_ptr;
typedef smart_ptr<cl_kernel,clRetainKernel,clReleaseKernel> kernel_ptr;
typedef smart_ptr<cl_device_id,clRetainDevice,clReleaseDevice> device_ptr;
typedef smart_ptr<cl_context,clRetainContext,clReleaseContext> context_ptr;
typedef smart_ptr<cl_program,clRetainProgram,clReleaseProgram> program_ptr;
typedef smart_ptr<cl_device_id,clRetainDeviceDummy,clReleaseDeviceDummy>
device_ptr;
typedef smart_ptr<cl_command_queue,clRetainCommandQueue,clReleaseCommandQueue>
command_queue_ptr;
......
......@@ -132,4 +132,7 @@ std::string get_opencl_error(cl_int err) {
}
}
cl_int clReleaseDeviceDummy (cl_device_id) { return 0; }
cl_int clRetainDeviceDummy (cl_device_id) { return 0; }
} } // namespace cppa::opencl
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment