Commit f75f328b authored by Joseph Noir's avatar Joseph Noir

Added smart pointer for opencl types

Uses clRetainX and clReleaseX provided by OpenCL.
parent 0daa2a3f
...@@ -110,7 +110,8 @@ class smart_ptr { ...@@ -110,7 +110,8 @@ class smart_ptr {
}; };
typedef smart_ptr<cl_mem,clRetainMemObject,clReleaseMemObject> mem_ptr; typedef smart_ptr<cl_mem,clRetainMemObject,clReleaseMemObject> mem_ptr;
typedef smart_ptr<cl_kernel,clRetainKernel,clReleaseKernel> kernel_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_device_id,clRetainDevice,clReleaseDevice> device_ptr;
typedef smart_ptr<cl_context,clRetainContext,clReleaseContext> context_ptr; typedef smart_ptr<cl_context,clRetainContext,clReleaseContext> context_ptr;
typedef smart_ptr<cl_program,clRetainProgram,clReleaseProgram> program_ptr; typedef smart_ptr<cl_program,clRetainProgram,clReleaseProgram> program_ptr;
......
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