{"id":23447615,"url":"https://github.com/rugleb/cuda","last_synced_at":"2025-04-10T01:24:12.451Z","repository":{"id":96355401,"uuid":"159067470","full_name":"rugleb/cuda","owner":"rugleb","description":"A simple example of a program that uses parallel GPU computing on an NVIDIA graphics card using CUDA technology","archived":false,"fork":false,"pushed_at":"2019-05-27T19:30:09.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T16:49:23.101Z","etag":null,"topics":["cuda","gpu","nvidia"],"latest_commit_sha":null,"homepage":"https://github.com/rugleb/cuda","language":"Cuda","has_issues":true,"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/rugleb.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":"2018-11-25T19:38:30.000Z","updated_at":"2019-05-27T19:15:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"530a551b-6e43-4381-b704-9f92f020b15a","html_url":"https://github.com/rugleb/cuda","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugleb%2Fcuda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugleb%2Fcuda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugleb%2Fcuda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugleb%2Fcuda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rugleb","download_url":"https://codeload.github.com/rugleb/cuda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138834,"owners_count":21053966,"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","gpu","nvidia"],"created_at":"2024-12-23T21:18:26.370Z","updated_at":"2025-04-10T01:24:12.423Z","avatar_url":"https://github.com/rugleb.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/rugleb/cuda.svg?branch=master)](https://travis-ci.com/rugleb/cuda)\n[![Language](https://img.shields.io/badge/Lang-CUDA-green.svg)]()\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA simple program that uses parallel GPU computing on an NVIDIA video card using [CUDA](https://developer.nvidia.com/cuda-zone) technology.\n\nThe implemented program simulates the process of heat transfer along the entire length of the rod of a given size using an explicit [finite-difference scheme](https://en.wikipedia.org/wiki/Finite_difference_method).  \nThe longer the rod (array size) - the more calculations need to be done to achieve the result.\n\n## Requirements\n\n* Linux machine\n* [CMake 3.1 or later](https://cmake.org/download)\n* [CUDA Toolkit 9](https://developer.nvidia.com/cuda-90-download-archive)\n\n## Instructions\n\nCompilation:\n```bash\nnvcc main.cu\n```\n\nRunning:\n```bash\n[optirun] ./a.out [ARRAY SIZE] [CUDA THREADS NUMBER]\n```\n\n## Performance\n\nCPU: Core i7-6500U CPU @ 2.50GHz ×4  \nGPU: GeForce 940M\n\n```\ngleb@home: optirun ./a.out 10\n\u003e\u003e\u003e CPU time: 0.003 ms\n\u003e\u003e\u003e GPU time: 0.301 ms\n\u003e\u003e\u003e Rate: 0.010\n\ngleb@home: optirun ./a.out 1000\n\u003e\u003e\u003e CPU time: 0.282 ms\n\u003e\u003e\u003e GPU time: 0.284 ms\n\u003e\u003e\u003e Rate: 0.992\n\ngleb@home: optirun ./a.out 10000\n\u003e\u003e\u003e CPU time: 3.091 ms\n\u003e\u003e\u003e GPU time: 0.427 ms\n\u003e\u003e\u003e Rate: 7.233\n\ngleb@home: optirun ./a.out 100000\n\u003e\u003e\u003e CPU time: 29.232 ms\n\u003e\u003e\u003e GPU time: 1.904 ms\n\u003e\u003e\u003e Rate: 15.353\n```\n\nThe final graph of the dependence of the performance gain on the size of the array:  \n\n![](https://github.com/rugleb/cuda/blob/master/benchmark/chart.png?raw=true)\n\n## License\n\nThis repo is published under the MIT license, see [LICENSE](https://github.com/rugleb/cuda/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frugleb%2Fcuda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frugleb%2Fcuda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frugleb%2Fcuda/lists"}