..

opencl开始前的几个疑问

OpenCL是干什么的 1

OpenCL is a new, powerful toolset for building parallel programs to run on highperformance processors. With OpenCL, you don’t have to learn device-specific languages; you can write your code once and run it on any OpenCL-compliant hardware.


有什么特点

  • portability
  • standardized vector processing
  • parallel programming

基本概念有哪些

  • Platform
  • Device
  • Host
  • Context
  • Kernel
  • Command queue

image


进一步补充

OpenCL code consists of two parts:

  • code that runs on the host and
  • code that runs on one or more devices.

Host code is written in regular C or C++ and is responsible for creating the data structures that manage the host-device communication. The host selects functions, called kernels, to be placed in command queues and sent to the devices. Kernel code, unlike host code, uses the high-performance capabilities defined in the OpenCL standard.


Boost.compute 又是什么 2

Boost.Compute is a GPU/parallel-computing library for C++ based on OpenCL.
The core library is a thin C++ wrapper over the OpenCL API and provides access to compute devices, contexts, command queues and memory buffers.


系列说明

图片和部分概念参考了[OpenCL-In-Action]这本书。3
之后的相关文章及代码主要是使用 boost.compute 来进行的,会涉及一些 lowapi。