CUDA Programming

[CUDA Programming Information and Resources]

Creating a CUDA Visual Studio solution

Please ensure that the setup described on the left has been completed before proceeding.

1.       Start up Visual Studio.


2.       Go to File --> New --> Project…


3.       You will be greeted with the New Project window. On the Project Types pane, expand the Visual C++ tree, and select CUDA32 or CUDA64, depending on your system. On the Templates pane, select CUDAWinApp. Give it a name, location and solution name. Press OK.


4.       You will be greeted by CUDA Windows Application Wizard. At this point, you are not required to further configure the project, so just press Finish.



5.       This will create a skeleton project with very basic CUDA functionality. The solution explorer should resemble this screen:


6.       To compile this program, click on Build --> Build Solution. Running using the Debug configuration via Debug --> Start Without Debugging should yield the following prompt:


7.       You are now home-free to begin programming. Note that you can build your program on top of this skeleton, or on top of the official NVIDIA SDK examples. NVIDIA also provides their own template project, found in the following directory:

C:\Program Files (x86)\NVIDIA Corporation\NVIDIA CUDA SDK\projects\template\


8.       The SDK examples provide a great wealth of information on various topics. NVIDIA provides Visual Studio projects for each one, allowing you to see the source, compile it, and run it. They can be found here:

C:\Program Files (x86)\NVIDIA Corporation\NVIDIA CUDA SDK\projects\


Alternatively, you can explore them using the NVIDIA CUDA SDK Browser, via the Start menu:

Start --> All Programs --> NVIDIA Corporation --> NVIDIA CUDA SDK --> NVIDIA CUDA SDK Browser