CUDA Understanding Can someone clear up some things.

I’ve only taken 1 class in C++ OOP and 1 in C, so my understanding is relatively basic. I mostly program in MATLAB and PHP/MySQL. I want to extend my knowledge of C/C++ and CUDA seems like a good place to play.

Now from my understanding CUDA is just an extension of C, so there’s a few extra commands/syntax compared to just regular C that are used to access the powerful processing power of a GPU (specific ones, of course).

Using these powerful processing features, one can write a program, which has to be highly parallel, to utilize both the GPU (Device) and the CPU (host). If you want to do some calculations using your CPU you could do it using regular C functions/commands, but if you want to do some hardcore parallel processing that can be done on the CUDA extension.

For output you can still use a regular command line window, like I’ve learned in my C/C++ classes. The whole reason that these are used in the first place is because you include stdio.h. If I wanted to make some graphs or draw some 3d objects I could use OpenGL or D3d.

Not related to CUDA directly, but additionally I could write a program that has standard windows (in Windows) using C/C++ and some Windows libraries instead of the stdio library? I’ve never used anything other than stdio so idk how to make windows yet, nor is there a need. Using that method you could create a GUI for your CUDA program, which would have to be highly parallel to really take advantage of having a GPU.

As a programmer CUDA is simply like a way to interface with the GPU using C/C++ code, and does not do any actual graphics, right?

And lastly, if I wanted to create graphs or plots is there any easy way to do it in C/C++ like there is in MATLAB? Or would I need to buy some graphing library? Is there a simple way to do that using OpenGL? ::confused::

I appreciate you taking the time to read this, thank you.


CUDA is just regular C with some extra keywords.
What I personally do is use CUDA from matlab with the CUDA cmex interface. You can download the matlab plugin from the CUDA website. That way I have the best of both worlds, the ease of use (visualisation) of matlab and the processing power of CUDA