This is the code for "An introduction to GPU Programming with CUDA" by Siraj Raval on Youtube
This weeks challenge is to create a simple C++ program that you can parallelize using CUDA. Document it's speed before and after using CUDA to demonstrate that you were able to optimize your code via the GPU. Here are some examples of algorithms you can parallelize. Bonus points if you parallelize a simple neural network. Good luck!
This is the code for this video on Youtube by Siraj Raval. This is an introduction to parallel programming on the GPU by using Nvidia's CUDA toolkit. We're going to add two arrays together, and parallelize that process using CUDA (an extension of C).
Run the following command to compile
nvcc add.cu -o add_cuda
This command to execute
./add_cuda
And this command to profile (clock) it
nvprof ./add_cuda
The credits for this code go to Nvidia. I've merely created a wrapper to get people started.