Direct Question: Is it possible to enable syntax highlighting for CUDA 4.0 in Visual Studio 2010, and if so, how does one do it?
Background: I tried to follow this guide, got IntelliSense working, but ran into a problem. Apparently CUDA 4 does not create a "C:\Users\\AppData\Local\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0" directory and I have been unable to find any other files on my computer pertaining to CUDA syntax highlighting under Visual Studio. If anyone knows how to enable syntax highlighting or where to find the NVIDIA-provided keyword list, I would be very grateful. One solution I can think of would be to install CUDA 3.2 and use its "usertype.dat" file, but my one concern is that it would highlight deprecated keywords. If that's the case and the only way to enable syntax highlighting, I suppose I'll just wait for the official CUDA 4 release. Once again, thanks! : )
See this blog post I wrote on adding this for CUDA 3.2. I'm now using 4.0 RC and I don't think anything has changed in these steps although you're right about the usertype.dat file. You could manually edit this to add/remove new keywords.
http://www.ademiller.com/blogs/tech/2010/10/visual-studio-2010-adding-intellisense-support-for-cuda-c/
For CUDA 5 I found the "usertype.dat" in
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\doc\syntax_highlighting\visual_studio_8
Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With