5.8. Program Objects
5.8. 程序对象
An OpenCL program consists of a set of kernels that are identified as functions declared with the __kernel
qualifier in the program source. OpenCL programs may also contain auxiliary functions and constant data that can be used by kernel functions. The program executable can be generated online or offline by the OpenCL compiler for the appropriate target device(s).
OpenCL程序由一组内核组成,这些内核被标识为程序源代码中用__kernel限定符声明的函数。OpenCL程序还可能包含辅助函数和内核函数可以使用的常量数据。可执行程序可以由OpenCL编译器为相应的目标设备在线或离线生成。
A program object encapsulates the following information:
程序对象封装了以下信息:
-
An associated context.
-
关联的上下文。
-
A program source or binary.
-
程序源代码或二进制文件。
-
The latest successfully built program executable, library or compiled binary, the list of devices for which the program executable, library or compiled binary is built, the build options used and a build log.
-
最新成功构建的程序可执行文件、库或编译二进制文件,构建程序可执行程序、库或汇编二进制文件的设备列表,使用的构建选项和构建日志。
-
The number of kernel objects currently attached.
-
当前附加的内核对象的数量。