opencl(4)命令队列

1:创建命令队列

cl_command _queue  clCreateCommandQueue(

cl_context context,             //上下文

cl_device_id device,             //设备

cl_command_queue_properties properties,   //队列属性

cl_int errcode_ret            //错误代码

)

队列属性:

CL_QUEUE_OUT_OF_OEDER_EXEC_MODE_ENABEL  使能性能分析事件

CL_QUEUE_PROFIELING_ENABEL           使能乱序排序

2:使内核执行命令入队

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            //保存内核执行命令的事件

)

原文地址:https://www.cnblogs.com/pengtangtang/p/PengTangTang_OpenCL_numberthree.html