2014-09-22 46 views
0

我在Windows上使用英特爾opencl SDK與英特爾高清顯卡。想編譯然後我的內核下線在主機代碼中使用:OpenCL:具有脫機編譯器的英特爾生成中間程序二進制文件

clCreateProgramFromBinary(…) 

link說:

OpenCL™ API Offline Compiler plug-in for Microsoft Visual Studio* IDE enables you to develop OpenCL applications with Visual Studio IDE. 

The plug-in supports the following features: 

New project templates 
New OpenCL file (*.cl) template 
Syntax highlighting 
Types and functions auto-completion 
Offline compilation and build of OpenCL kernels 
LLVM code view 
Assembly code view 
program IR generation 
Selection of target OpenCL device – CPU or Intel Graphics 

NOTE 

To work with the plug-in features, create an OpenCL project template \or convert an existing project into the OpenCL project. 

我想要使用此功能,所以我想知道我必須安裝?

根據上面的說明,我應該創建一個OpenCL項目模板。我該怎麼做呢?另外我們的意思是「將現有項目轉換成OpenCL項目」

回答

2

爲了使用該功能,您只需要在系統上安裝SDK。

要創建一個新的空OpenCL的項目模板:

  1. 轉到:文件>>項目...
  2. 查找的OpenCL組下模板\視覺C++部分並選擇用於Windows的空OpenCL項目
  3. 一旦項目創建,你可以添加新的OpenCL代碼文件(項目>添加新項...>的OpenCL>英特爾SDK針對OpenCL應用程序文件)或添加exisitin * .CL文件添加到項目
  4. 配置項目的選項生成二進制文件(說明書here):項目>屬性>英特爾SDK用於OpenCL應用>一般>生成二進制文件
  5. 無論何時您構建項目,OpenCL編譯器都會構建所有附加的.cl文件併爲其生成程序二進制文件。

要轉換現有的Visual Studio項目(指令here),請執行下列操作:

  1. 您要在Solution Explorer中轉換項目上單擊右鍵。
  2. 在項目菜單中單擊轉換爲項目針對OpenCL API
相關問題