OpenCL™规范 3.2.5.内核类别

3.2.5. Categories of Kernels
3.2.5.内核类别

The OpenCL execution model supports three types of kernels:

OpenCL执行模型支持三种类型的内核:

  • OpenCL kernels are managed by the OpenCL API as kernel objects associated with kernel functions within program objects. OpenCL program objects are created and built using OpenCL APIs. The OpenCL API includes functions to query the kernel languages and and intermediate languages that may be used to create OpenCL program objects for a device.

  • OpenCL内核由OpenCL API作为与程序对象中的内核函数相关联的内核对象进行管理。OpenCL程序对象是使用OpenCLAPI创建和构建的。OpenCL API包括查询内核语言和可用于为设备创建OpenCL程序对象的中间语言的函数。

  • Native kernels are accessed through a host function pointer. Native kernels are queued for execution along with OpenCL kernels on a device and share memory objects with OpenCL kernels. For example, these native kernels could be functions defined in application code or exported from a library. The ability to execute native kernels is optional within OpenCL and the semantics of native kernels are implementation-defined. The OpenCL API includes functions to query capabilities of a device to determine if this capability is supported.

  • 通过主机函数指针访问本机内核。本机内核与设备上的OpenCL内核一起排队等待执行,并与OpenCL内核共享内存对象。例如,这些原生内核可以是应用程序代码中定义的函数,也可以是从库中导出的函数。在OpenCL中,执行本地内核的能力是可选的,并且本地内核的语义是由实现定义的。OpenCL API包括查询设备功能以确定是否支持该功能的功能。

  • Built-in kernels are tied to particular device and are not built at runtime from source code in a program object. The common use of built in kernels is to expose fixed-function hardware or firmware associated with a particular OpenCL device or custom device. The semantics of a built-in kernel may be defined outside of OpenCL and hence are implementation defined. Note: Built-in kernels are missing before version 1.2.

  • ​内置内核绑定到特定的设备,并且不是在运行时从程序对象中的源代码构建的。内置内核的常见用途是公开与特定OpenCL设备或自定义设备相关的固定功能硬件或固件。内置内核的语义可以在OpenCL之外定义,因此是实现定义的。注意:1.2版本之前缺少内置内核。

All three types of kernels are manipulated through the OpenCL command queues and must conform to the synchronization points defined in the OpenCL execution model.

所有三种类型的内核都是通过OpenCL命令队列进行操作的,并且必须符合OpenCL执行模型中定义的同步点。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值