Skip to content

Educational CUDA C/C++ programming repository with commented examples on GPU parallel computing, matrix operations, and performance profiling. Requires a CUDA-enabled NVIDIA GPU.

License

Notifications You must be signed in to change notification settings

david-palma/cuda-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

CUDA C/C++ programming

This repository is meant to provide open source resources for educational purposes about CUDA C/C++ programming, which is the C/C++ interface to the CUDA parallel computing platform. In CUDA, the host refers to the CPU and its memory, while the device refers to the GPU and its memory. Code run on the host can manage memory on both the host and device, and also launches kernels which are functions executed on the device by many GPU threads in parallel.

NOTE: it is assumed that you have access to a computer with a CUDA-enabled NVIDIA GPU.

List of the exercises

Here you can find the solutions for different simple exercises about GPU programming in CUDA C/C++. The source code is well commented and easy to follow, though a minimum knowledge of parallel architectures is recommended.

Compiling and running the code

The CUDA C/C++ compiler nvcc is part of the NVIDIA CUDA Toolkit which is used to separate source code into host and device components. Then, you can compile the code with nvcc.

NOTE: to find out how long the kernel takes to run or to check the memory usage, you can type nvprof ./<binary> or cuda-memcheck ./<binary> on the command line, respectively.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Educational CUDA C/C++ programming repository with commented examples on GPU parallel computing, matrix operations, and performance profiling. Requires a CUDA-enabled NVIDIA GPU.

Topics

Resources

License

Stars

Watchers

Forks

Languages