opencl的主机是什么? [英] What is a host in opencl?

查看:91
本文介绍了opencl的主机是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在开始学习openCL.我现在正在上教程,但我真的无法把握这个主意是有人可以解释.谢谢

I have started now to learn openCL. I am doing the tutorial now but I can't really grasp the idea is of host could someone explain.Thank you

推荐答案

OpenCL是一个旨在支持大规模并行处理的系统,例如现代图形芯片(GPU)可以执行的处理.在OpenCL范例中,主机程序"是外部控制逻辑,用于执行基于GPU的应用程序的配置.该主机程序通常将在通用CPU(例如大多数台式机中与x86兼容的主处理器)上运行. OpenCL程序还包含一个或多个内核"函数,这些函数旨在在GPU上并行执行.

OpenCL is a system designed to support massively parallel processing such as can be performed by modern graphics chips (GPUs). In the OpenCL paradigm, a "host program" is the outer control logic that performs the configuration for a GPU-based application. This host program normally would run on a general purpose CPU (such as the x86-compatible main processor in most desktop PCs). An OpenCL program also contains one or more "kernel" functions that are designed for parallel execution on the GPU.

配置完所有缓冲区和内核后,主机程序将调用类似的

Once all of the buffers and kernels are configured, the host program will call something like

EnqueueNDRangeKernel()

这将开始在GPU上执行内核.

which will begin execution of the kernel on the GPU.

根据您的目标平台,情况可能会有所不同.例如,OpenCL并不特别要求存在GPU.相反,In可以在运行主机程序的同一CPU上将内核作为多个线程执行.

Depending on your target platform, things could be a little different. For example, OpenCL does not specifically require the existence of a GPU. In can instead execute the kernel as multiple threads on the same CPU that runs the host program.

OpenCL术语摘要:

Summary of OpenCL nomenclature:

  • Host -用于配置内核执行的主CPU
  • 设备-包含将执行内核(GPU)的处理单元的组件
  • Host - the main CPU used to configure kernel execution
  • Device - the component which contains the processing units that will execute the kernel (the GPU)

这篇关于opencl的主机是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆