Sign in with
Sign up | Sign in
Your question

C++ and C/Cuda C Programming

Tags:
  • Programming
  • Apps
Last response: in Apps General Discussion
Share
June 28, 2011 6:47:48 PM

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.

More about : cuda programming

a b L Programming
June 28, 2011 7:01:23 PM

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.
m
0
l
June 28, 2011 9:39:39 PM

Ijack said:
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.


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.
m
0
l
!