opencl(四)----创建命令队列
创建命令队列
参考:https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clCreateCommandQueue.html
//创建命令队列 cl_command_queue clCreateCommandQueue( cl_context context, //上下文 cl_device_id device, //设备 cl_command_queue_properties properties, //命令队列属性 cl_int *errcode_ret //错误代码 )
Command-Queue Properties | Description |
---|---|
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE |
使能性能分析事件 |
CL_QUEUE_PROFILING_ENABLE |
使能命令队列的乱序执行 |
将内核执行命令入列
参考:https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clEnqueueTask.html
cl_int clEnqueueTask ( cl_command_queue command_queue, //命令队列 cl_kernel kernel, //核 cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event )