{"id":22363562,"url":"https://github.com/david-palma/cuda-programming","last_synced_at":"2026-04-25T16:33:50.994Z","repository":{"id":169979775,"uuid":"187492887","full_name":"david-palma/cuda-programming","owner":"david-palma","description":"Educational CUDA C/C++ programming repository with commented examples on GPU parallel computing, matrix operations, and performance profiling. Requires a CUDA-enabled NVIDIA GPU.","archived":false,"fork":false,"pushed_at":"2024-11-15T16:17:19.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T15:18:42.519Z","etag":null,"topics":["c-cpp","cpp","cuda","cuda-toolkit","education","gpu","gpu-programming","kernel","matrix-operations","nvcc","nvidia","parallel-computing","parallel-programming","practice","profiling","threads"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/david-palma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-19T15:15:01.000Z","updated_at":"2024-12-30T23:28:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d11850c-d1d7-4b74-b480-2126e834f21e","html_url":"https://github.com/david-palma/cuda-programming","commit_stats":null,"previous_names":["david-palma/cuda-programming"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/david-palma/cuda-programming","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcuda-programming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcuda-programming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcuda-programming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcuda-programming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-palma","download_url":"https://codeload.github.com/david-palma/cuda-programming/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcuda-programming/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32269459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-cpp","cpp","cuda","cuda-toolkit","education","gpu","gpu-programming","kernel","matrix-operations","nvcc","nvidia","parallel-computing","parallel-programming","practice","profiling","threads"],"created_at":"2024-12-04T17:15:35.343Z","updated_at":"2026-04-25T16:33:50.978Z","avatar_url":"https://github.com/david-palma.png","language":"Cuda","readme":"# CUDA C/C++ programming\n\nThis 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.\nIn CUDA, the host refers to the CPU and its memory, while the device refers to the GPU and its memory.\nCode 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.\n\n**NOTE**: it is assumed that you have access to a computer with a CUDA-enabled NVIDIA GPU.\n\n## List of the exercises\n\nHere you can find the solutions for different simple exercises about GPU programming in CUDA C/C++.\nThe source code is well commented and easy to follow, though a minimum knowledge of parallel architectures is recommended.\n\n- [exercise 00](./exercises/ex00.cu): hello, world!\n- [exercise 01](./exercises/ex01.cu): print devices properties\n- [exercise 02](./exercises/ex02.cu): addition\n- [exercise 03](./exercises/ex03.cu): vector addition using parallel blocks\n- [exercise 04](./exercises/ex04.cu): vector addition using parallel threads\n- [exercise 05](./exercises/ex05.cu): vector addition combining blocks and threads\n- [exercise 06](./exercises/ex06.cu): single-precision A\\*X Plus Y\n- [exercise 07](./exercises/ex07.cu): time, bandwidth, and throughput computation (single-precision A\\*X Plus Y)\n- [exercise 08](./exercises/ex08.cu): multiplication of square matrices\n- [exercise 09](./exercises/ex09.cu): transpose of a square matrix\n- [exercise 10](./exercises/ex10.cu): dot product using shared memory\n- [exercise 11](./exercises/ex11.cu): prefix sum (exclusive scan) using shared memory\n\n## Compiling and running the code\n\nThe 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`.\n\n**NOTE**: to find out how long the kernel takes to run or to check the memory usage, you can type `nvprof ./\u003cbinary\u003e` or `cuda-memcheck ./\u003cbinary\u003e` on the command line, respectively.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-palma%2Fcuda-programming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-palma%2Fcuda-programming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-palma%2Fcuda-programming/lists"}