VS2008 + CUDA + Intellisense! Fully functional!

I’ve just figured out how to enable Visual Studio’s Intellisense for .cu files. I’ve read some topics but none of them offered a clear and functional method. Then I decided to have a try on my own, and…here it is!

Assumes that you have just installed VS2008, NVIDIA GPU Computing Toolkit and NVIDIA GPU Computing SDK and no further tweaks have been made.

First, install and config Visual Assist X:

Install Visual Assist X.

Then open visual studio. Go for Visual Assist X Options → Projects → C\C++ Directories, choose “Custom” in the Platform droplist, then click the “New” button(the one that looks like a new folder button), type in your CUDA Toolkit’s Include path (and mine is “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include;”, don’t forget to add a “;”!), press “OK” and restart your IDE.

Second, Visual Studio configuration.

a) Open the CUDA SDK folder (like “NVIDIA GPU Computing SDK 3.2\C\doc\syntax_highlighting\visual_studio_8”) and do what the readme.txt tells you to do.

B) Open the visual studio preferences or options dialog (sorry I’m not using an English version of VS so I’m not sure how it should be called…), go to Text Editor → File Extensions and add “cu” extension WITH “Microsoft Visual C++” option to the right!!! Don’t choose the default VB option! Then press “OK” and restart the IDE.

Then open your CUDA project, and you will see that all CUDA-specific keywords (global,cudaMalloc,etc)are highlighted and also available in the Intellisense droplist!

Maybe there’s still bugs in it because I have tried many different methods and my VS settings is in a whole mess… and sorry for that!

…and thanks to the authors of the following topics, they really helped.

http://forums.nvidia.com/index.php?showtop…hl=intellisense

http://forums.nvidia.com/index.php?showtop…hl=intellisense

http://forums.nvidia.com/index.php?showtop…hl=intellisense

Any questions or suggestions please reply the topic or contact me through barius.cn@gmail.com
config02.jpg

I’ve just figured out how to enable Visual Studio’s Intellisense for .cu files. I’ve read some topics but none of them offered a clear and functional method. Then I decided to have a try on my own, and…here it is!

Assumes that you have just installed VS2008, NVIDIA GPU Computing Toolkit and NVIDIA GPU Computing SDK and no further tweaks have been made.

First, install and config Visual Assist X:

Install Visual Assist X.

Then open visual studio. Go for Visual Assist X Options → Projects → C\C++ Directories, choose “Custom” in the Platform droplist, then click the “New” button(the one that looks like a new folder button), type in your CUDA Toolkit’s Include path (and mine is “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include;”, don’t forget to add a “;”!), press “OK” and restart your IDE.

Second, Visual Studio configuration.

a) Open the CUDA SDK folder (like “NVIDIA GPU Computing SDK 3.2\C\doc\syntax_highlighting\visual_studio_8”) and do what the readme.txt tells you to do.

B) Open the visual studio preferences or options dialog (sorry I’m not using an English version of VS so I’m not sure how it should be called…), go to Text Editor → File Extensions and add “cu” extension WITH “Microsoft Visual C++” option to the right!!! Don’t choose the default VB option! Then press “OK” and restart the IDE.

Then open your CUDA project, and you will see that all CUDA-specific keywords (global,cudaMalloc,etc)are highlighted and also available in the Intellisense droplist!

Maybe there’s still bugs in it because I have tried many different methods and my VS settings is in a whole mess… and sorry for that!

…and thanks to the authors of the following topics, they really helped.

http://forums.nvidia.com/index.php?showtop…hl=intellisense

http://forums.nvidia.com/index.php?showtop…hl=intellisense

http://forums.nvidia.com/index.php?showtop…hl=intellisense

Any questions or suggestions please reply the topic or contact me through barius.cn@gmail.com