首页  >  文章  >  数据库  >  OpenCL 1.0 Specification阅读笔记(2)

OpenCL 1.0 Specification阅读笔记(2)

WBOY
WBOY原创
2016-06-07 15:20:411235浏览

5. The OpenCL Runtime OpenCL objects: memory objects, program objects, kernel objects, command-queues, others? 5.1 Command Queues use context to create memory, program, kernel objects, and operations on these objects are performed using a

5. The OpenCL Runtime

 

OpenCL objects: memory objects, program objects, kernel objects, command-queues, others?

 

5.1 Command Queues

 

use context to create memory, program, kernel objects, and operations on these objects are performed using a *command-queue*.

 

One application can have multiple command-queues to queue indepedent commands without requiring synchronization, but if objects are shared, i.e., across multiple command-queues, the application needs synchronization.

 

clCreateCommandQueue

 

注意:参数cl_command_queue_properties:

(1) cl_queue_out_of_order_exec_mode_enable:queue中的command顺序执行还是乱序执行,顺序执行在command queue中隐式加入同步命令

(2) cl_queue_profiling_enable: profiling of commands

 

clRetainCommandQueue: increments the command_queue reference count

clReleaseCommandQueue: decrements the command_queue reference count

clGetCommandQueueInfo: query info about a command_queue

clSetCommandQueueProperty: change command_queue properties,很明显在属性变化时有一个Flush的动作,expensive

 

这一节最后提到Device Lost的情况,操作系统会通知驱动,Spec说可以通过创建Context时注册的回调函数来记录。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn