Can I enable syntax highlighting for CUDA 4.0 in Visual Studio 2010?

Direct question . Is it possible to enable syntax highlighting for CUDA 4.0 in Visual Studio 2010, and if so, how to do it?

Background : I tried to follow this guide by getting IntelliSense, but ran into a problem. Apparently, CUDA 4 does not create the directory "C: \ Users \\ AppData \ Local \ NVIDIA Corporation \ NVIDIA GPU Computing SDK 4.0", and I could not find other files on my computer related to CUDA syntax highlighting in Visual Studio. If anyone knows how to turn on syntax highlighting or where to find the list of keywords provided by NVIDIA, I would be very grateful. One solution I can think of is to install CUDA 3.2 and use its usertype.dat file, but my only problem is that it will highlight outdated keywords. If this is the case and the only way to turn on syntax highlighting, I suppose I'll just wait for the official release of CUDA 4. Thanks again! :)

+6
source share
2 answers

See this blog post. I wrote about this for CUDA 3.2. Now I am using 4.0 RC, and I don’t think that nothing has changed in these steps, although you are correct in the usertype.dat file. You can manually change this to add / remove new keywords.

http://www.ademiller.com/blogs/tech/2010/10/visual-studio-2010-adding-intellisense-support-for-cuda-c/

+6
source

For CUDA 5, I found "usertype.dat" in

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\doc\syntax_highlighting\visual_studio_8 

Thanks.

+4
source

Source: https://habr.com/ru/post/885767/


All Articles