>  기사  >  데이터 베이스  >  OpenCL 1.0 Specification阅读笔记(2)

OpenCL 1.0 Specification阅读笔记(2)

WBOY
WBOY원래의
2016-06-07 15:20:411239검색

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으로 문의하세요.