为OpenCL设置VisualStudio

为OpenCL设置VisualStudio

本文介绍了为OpenCL设置VisualStudio 2010的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置VisualStuio 2010处理* .cl文件的正确方法是什么?我在工具/文本编辑器/文件扩展名下添加了* .cl,并将usertype.dat复制到了common7/ide文件夹中,但是VS强调了float4或cross等关键字.

what is the right way to setup VisualStuio 2010 for working with *.cl files? I have added *.cl under Tool/Text editor/File extensions and copied usertype.dat into the common7/ide folder, but VS underlines keywords like float4 or cross.

是否有必要在注册表中添加一些密钥,或者有人可以提出教程?

Is it necessary to add some key in registry or can somebody propose a tutorial?

先谢谢了.

PS我已经问过类似的问题老一个问题,但是现在我正在寻找明确的vs2010解决方案.不错,但是确实让我不安,无法执行编程任务.

PSi have already asked similar question old one question, but now i am looking explicit for a solution with vs2010. It is not bad, but really nerves and deflects me from programming tasks.

推荐答案

语法颜色的提示,如本文,usertype.dat应该与devenv.exe位于同一目录(c:\程序文件\ Microsoft Visual Studio 10.0 \ Common7 \ IDE(默认安装).以我为例,VS2010安装在D驱动器上,然后将其与devenv.exe配合即可.

A hint for syntax color, as pointed in this article, the usertype.dat should be placed in the same directory that devenv.exe (c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE for default intall.). In my case, VS2010 was installed on D drive and placing it with devenv.exe do the trick.

但是我的.cl文件中仍然存在诸如__kernel这样的opencl关键字的错误标记(编译可以)

But i still have error marks in my .cl files for opencl keywords like __kernel (compiling is OK)

这篇关于为OpenCL设置VisualStudio 2010的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 11:01