As explained in the previous article (Game Development with Agile Method SCRUM), Scrum is a batch of methods and principles. They should be adapted by each team, depending on the constraints. Here are the basis to begin with.
For the first parallel program we will make a vector addition. This operation is the simpliest exemple for parallel programming.
Sample to get a device from predetermined informations.
Devices information is very important. You don’t know if your program will be launch on a PC with a CUDA compatible GPU.
So you have to get informations !
In this article we will see how to allocate memory for the GPU, how to use it and how to get a result from a CUDA function.
We recommand you 2 books to begin CUDA.
by Jason SANDERS and Edward KANDROT
forward by Jack DONGARRA
This book teach you CUDA by examples. You will begin with a “Hello World!”, continue with a swap, etc…
by David B. Kirk and Wen-mei W. HWU
This book teach you to think Parallel. It begin with the History of GPU Computing, it will introduce you the CUDA and OpenCL programming and continue with CUDA threads, etc…
In Explorer, goto %CUDA_PATH%extras\visual_studio_integration\.
Execute the file gpucomputing_intellisense.reg.
Intellisense works now on .cu/.cuh/.cl.
How to configure a Visual Studio 2008 Project for CUDA 3.2 ?
Follow those instructions.
/!\ Tested with Visual Studio 2008 Professional Edition SP1 and Visual Studio C++ Express 2008 /!\
- Download and install Visual Studio 2008 (http://www.microsoft.com/express/Downloads/, select tab Visual Studio 2008 Express)
- Download and install devdriver_3.2_OS-VERSION_general.exe (http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html)
- Download and install cudatoolkit 3.2 (http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html)