I’ve read the Programming Guide, I’ve searched the forums and found many scattered bits of info, but I’d like to see a step-by-step introduction to programming in CUDA in Windows XP for a complete Newbie.
Let’s say I’ve just bought a new GF8xxx card, installed a proper driver, installed CUDA Toolkit 1.1, SDK 1.1 and MS Visual Studio 2005. I’ve checked that the applications in “(…)\NVIDIA CUDA SDK\bin\win32\Release” work (oooh, look at them balls bouncing in particles.exe).
Now what do I need to do to write my own “hello world” or “2.5+2.5=5.0” program?
I know I can copy the template project and modify it but that won’t make me understand what’s happening or how the nvcc compiler works within Visual Studio. I’d like to know how I should configure the environment and how to set up my projects so I can start from scratch instead of copying the template.
first step for me was to compile the SDK examples, and then to understand how the reduction was working. After that I copied a template and started to edit away until I had a program that did what I needed. But I would advise you to start by understanding the simple examples, it is much more interesting how to program parallel, than how to make nvcc work in visual studio if you ask me.
I’ve managed to compile the SDK projects but I haven’t yet looked much into them. I’ll do that in a few days when I have time. Is editing the template regarded as a more or less standard way of making CUDA software?
I would like to say that a good way to start would be to look at the examples and try to figure out if and how your problem can be reduced to one of the examples…(well at least that’s how I did mine).
You could always start afresh with the template project but if you’re working with OpenGL or DirectX then by all means use simpleGL or simpleD3D, they have the groundwork done on which you can base your solution.
I’ve been writing a series of tutorials on parallel programming at llpanorama.wordpress.com. I’ve just started writing a section on CUDA. These may help you as they appear, but I expect you’ll progress more rapidly by going through the examples in the CUDA SDK.
Also, for people who just want CUDA-enable their MATLAB code with minimal code rewrite (all you need to do is cast your matrices to ‘gsingle’ data type), AccelerEyes just released Jacket: A GPU Engine for MATLAB.