3. The OpenCL Architecture
3.OpenCL体系结构
OpenCL is an open industry standard for programming a heterogeneous collection of CPUs, GPUs and other discrete computing devices organized into a single platform. It is more than a language. OpenCL is a framework for parallel programming and includes a language, API, libraries and a runtime system to support software development. Using OpenCL, for example, a programmer can write general purpose programs that execute on GPUs without the need to map their algorithms onto a 3D graphics API such as OpenGL or DirectX.
OpenCL是一个开放的行业标准,用于对组织到单个平台中的CPU、GPU和其他离散计算设备的异构集合进行编程。它不仅仅是一种语言。OpenCL是一个用于并行编程的框架,包括一种语言、API、库和一个支持软件开发的运行时系统。例如,使用OpenCL,程序员可以编写在GPU上执行的通用程序,而无需将其算法映射到3D图形API(如OpenGL或DirectX)上。
The target of OpenCL is expert programmers wanting to write portable yet efficient code. This includes library writers, middleware vendors, and performance oriented application programmers. Therefore OpenCL provides a low-level hardware abstraction plus a framework to support programming and many details of the underlying hardware are exposed.
OpenCL的目标是希望编写可移植但高效的代码的专业程序员。这包括库编写者、中间件供应商和面向性能的应用程序程序员。因此,OpenCL提供了一个底层硬件抽象和一个支持编程的框架,并公开了底层硬件的许多细节。
To describe the core ideas behind OpenCL, we will use a hierarchy of models:
为了描述OpenCL背后的核心思想,我们将使用模型的层次结构:
-
Platform Model
-
平台模型
-
Memory Model
-
内存模型
-
Execution Model
-
执行模型
-
Programming Model
-
编程模型