{"id":15491771,"url":"https://github.com/tristanpenman/cuda-examples","last_synced_at":"2025-04-10T19:11:40.170Z","repository":{"id":74415912,"uuid":"213611695","full_name":"tristanpenman/cuda-examples","owner":"tristanpenman","description":"A collection of CUDA example code","archived":false,"fork":false,"pushed_at":"2023-03-30T00:42:34.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T10:23:43.206Z","etag":null,"topics":["cuda"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tristanpenman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-08T10:19:03.000Z","updated_at":"2024-03-25T16:00:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"3cf6831e-f631-42e3-934c-843ce05f2ed0","html_url":"https://github.com/tristanpenman/cuda-examples","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"08def88ad22cc87e8242b9c26241fa2c60c42779"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fcuda-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fcuda-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fcuda-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristanpenman%2Fcuda-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tristanpenman","download_url":"https://codeload.github.com/tristanpenman/cuda-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279737,"owners_count":21077408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cuda"],"created_at":"2024-10-02T07:56:17.884Z","updated_at":"2025-04-10T19:11:40.165Z","avatar_url":"https://github.com/tristanpenman.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUDA Examples\n\nThis repo contains a collection of CUDA examples that were first used for a talk at the Melbourne C++ Meetup.\n\n## Listing\n\n1. [00-hello-world.cu](00-hello-world.cu) - Vector addition on a CPU; the hello world of the parallel computing\n2. [01-cuda-hello-world.cu](01-cuda-hello-world.cu) - Vector addition using CUDA\n3. [02-cuda-hello-world-faster.cu](02-cuda-hello-world-faster.cu) - Vector addition using CUDA, with a CPU bottleneck removed\n4. [03-templates-device-ptr.cu](03-templates-device-ptr.cu) - Using C++ templates to make device pointers safer\n5. [04-templates-device-mem.cu](04-templates-device-mem.cu) - More templates, allowing for scoped device memory\n6. [05-thrust-rand-vectors.cu](05-thrust-rand-vectors.cu) - Using Thrust to add up random numbers\n\n## Compiling\n\nAll examples can be compiled with `nvcc`. Only `02-cuda-hello-world-faster.cu` requires an additional compiler option `--expt-relaxed-constexpr` (at least, when compiled on Linux).\n\nA Makefile has been included, so all examples can built using `make`.\n\n## Credits\n\nThese are all based on examples found in the wild. 03 and 04, in particular, are based on code from Michael Gopshtein's CppCon talk, [CUDA Kernels in C++](https://www.youtube.com/watch?v=HIJTRrm9nzY). And examples 01 and 02 are based on the Vector Addition sample code included in the CUDA Toolkit.\n\n## License\n\nThis source code has been released into the public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftristanpenman%2Fcuda-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftristanpenman%2Fcuda-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftristanpenman%2Fcuda-examples/lists"}