summaryrefslogtreecommitdiff
path: root/src/cl_command_queue.h
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2015-11-19 02:03:25 +0800
committerYang Rong <rong.r.yang@intel.com>2015-12-09 11:27:48 +0800
commite2c46c88bd5bbd9f5762ba7ad3eaf00257ad114f (patch)
tree54a9ae522998cfd8161be0b27e0cdaed4c1cf526 /src/cl_command_queue.h
parentd10f16e746f0c3cdc90ac25a0c4ed5869e90ddca (diff)
make Beignet as intermedia layer of CMRT
CMRT is C for Media Runtime on Intel GPU, see https://github.com/01org/cmrt. There is a request to make Beignet as intermedia layer of CMRT, in other words, application programer write OpenCL APIs to execute the CM kernel on GPU, the following shows the key code, and please refer to the next patch of unit test for detail. prog = clCreateProgramWithBinary("cm kernel"); clBuildProgram(prog); kernel = clCreateKernel(prog, "kernel name"); image = clCreateImage(); clSetKernelArg(kernel, image); clEnqueueNDRangeKernel(kernel); Inside Beignet, once cm kernel is invoked, the following relative APIs will be directly passed to CMRT library (libcmrt.so) which is loaded via dlopen only when necessary. Since we use this simple method to keep the code clean, OpenCL spec is not strictly followed, and cl_event is not supported for this case. v2: add comments about the cm queue in fuction cmrt_enqueue Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/cl_command_queue.h')
-rw-r--r--src/cl_command_queue.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cl_command_queue.h b/src/cl_command_queue.h
index 2cd67397..d1b8c446 100644
--- a/src/cl_command_queue.h
+++ b/src/cl_command_queue.h
@@ -44,6 +44,8 @@ struct _cl_command_queue {
cl_command_queue prev, next; /* We chain the command queues together */
void *thread_data; /* Used to store thread context data */
cl_mem perf; /* Where to put the perf counters */
+
+ void* cmrt_event; /* the latest CmEvent* of the command queue */
};
/* The macro to get the thread specified gpgpu struct. */