C++ and C/Cuda C Programming

Fenrir190

Distinguished
Jun 9, 2011
9
0
18,510
Hello all, I started this topic to get a bit of advice as to how I should go about learning C then eventually Cuda C. Right now I have a pretty advanced knowledge of C++ and many people tell me for the most part that if you know C++ then C wouldn't take more than a day to learn. For the most part I feel I can agree since the only changes I've noticed were cout<< = printf(), cin>> = scanf(), no string type, no class type, etc. So I can pretty much assume the concepts I learned in C++ is the for C right? However I get to the root of the problem, I have to learn CUDA C for a research project. CUDA C looks the same as C code I'd write but when you get to the whole device and host kernels (CUDA's name for methods/functions apparently) portion my mind goes adrift. I understand how the GPU works and how CUDA C interacts with the GPU, but the code is kinda complex for whatever reason. I tried the NVIDIA site's guide but I don't find it all that helpful. I'm gonna do a bit of searching for resources and post any I find. If you know some please post them here.
 

Ijack

Distinguished
C++ is a superset of C, so it's more a question of what you need to forget rather than anything new to learn. The biggest difference is the lack of classes. It shouldn't be too difficult to go from one to the other.

As far as CUDA goes, you might want to look at this tutorial. It's in 20 parts, so is quite comprehensive.
 

Fenrir190

Distinguished
Jun 9, 2011
9
0
18,510


Sorry if I was late in replying to your post, I was drop dead tired after work. I'll definitely look into your recommendation. Thanks for your help.