{"id":31505726,"url":"https://github.com/dmitryyurov/bitonic-cuda","last_synced_at":"2025-10-02T20:17:23.274Z","repository":{"id":309779273,"uuid":"1034560211","full_name":"DmitryYurov/bitonic-cuda","owner":"DmitryYurov","description":"An implementation of bitonic search on CUDA","archived":false,"fork":false,"pushed_at":"2025-08-31T20:23:33.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T21:25:57.769Z","etag":null,"topics":["cuda","gpu-programming","sorting-algorithms"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DmitryYurov.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-08T15:32:02.000Z","updated_at":"2025-08-31T20:23:36.000Z","dependencies_parsed_at":"2025-08-13T20:41:50.838Z","dependency_job_id":"6daee12c-2509-41dd-9720-a69b53b7ffd7","html_url":"https://github.com/DmitryYurov/bitonic-cuda","commit_stats":null,"previous_names":["dmitryyurov/cuda-sandbox","dmitryyurov/bitonic-cuda"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/DmitryYurov/bitonic-cuda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryYurov%2Fbitonic-cuda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryYurov%2Fbitonic-cuda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryYurov%2Fbitonic-cuda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryYurov%2Fbitonic-cuda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DmitryYurov","download_url":"https://codeload.github.com/DmitryYurov/bitonic-cuda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryYurov%2Fbitonic-cuda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278063839,"owners_count":25923745,"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","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cuda","gpu-programming","sorting-algorithms"],"created_at":"2025-10-02T20:17:18.734Z","updated_at":"2025-10-02T20:17:23.265Z","avatar_url":"https://github.com/DmitryYurov.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Ubuntu 24.04](https://github.com/DmitryYurov/bitonic-cuda/actions/workflows/cmake-single-platform.yml/badge.svg)](https://github.com/DmitryYurov/bitonic-cuda/actions/workflows/cmake-single-platform.yml)\n\n# Bitonic Sort\n\nThis project implements the [bitonic sorting algorithm](https://en.wikipedia.org/wiki/Bitonic_sorter) using CUDA.\nBitonic sort is a sorting algorithm particularly well-suited for parallel implementation.\n\n## What does this project do?\n\nThe `main` function initializes a CUDA device and executes the bitonic sort algorithm on it.\nAdditionally, it verifies the correctness of the results by comparing them with `std::sort`,\nand prints the execution times for both bitonic sort and `std::sort`.\n\nThe algorithm sorts a given array of integers in ascending order in two main stages:\n\n1. Initial sorting using shared memory within each thread block\n2. Merging sorted sequences using global memory operations (for the arrays which do not fit in shared memory)\n\nInput array size must always be a power of 2 (a limitation of the algorithm).\n\n## Project structure\n\n1. `include` - header files. Currently, only `bitonic.cuh` is provided, which contains the declarations of the bitonic sort\n               wrapper as well as some helper functions.\n2. `src` - source files. `bitonic.cu` contains the implementation of the bitonic sort, while `main.cu` contains\n           all the utilities necessary for running the sample program.\n\nAll the source files and headers are thoroughly documented. Please refer to the built-in documentation in case you want\nto investigate the implementation details.\n\n## Requirements\n\n- CMake 3.26 or higher\n- CUDA-capable GPU\n- CUDA Toolkit\n\n## Building\n\n```bash\nmkdir build \ncd ./build\ncmake -S .. -B .\ncmake --build .\n```\n\n## Running\n\nIf run without arguments, the program will compare the results of bitonic sort with `std::sort` for a number of\narray sizes (from `256` to `256 * 2^18`):\n\n```bash\ncd ./build\n./bitonic_sort\n```\n\nAn example output for NVIDIA GeForce GTX 1660 Ti and Intel Core i7-9750H CPU is shown below:\n\n```\nNVIDIA GeForce GTX 1660 Ti\nDevice capability: 7.5\nData size  | GPU time   | CPU time\n       1 kB     0.25 ms     0.01 ms\n       2 kB     0.17 ms     0.02 ms\n       4 kB     0.16 ms     0.04 ms\n       8 kB     0.20 ms     0.08 ms\n      16 kB     0.22 ms     0.17 ms\n      32 kB     0.26 ms     0.36 ms\n      64 kB     0.29 ms     0.78 ms\n     128 kB     0.43 ms     1.69 ms\n     256 kB     0.87 ms     3.64 ms\n     512 kB     0.82 ms     7.81 ms\n    1024 kB     1.43 ms    16.56 ms\n    2048 kB     3.50 ms    35.39 ms\n    4096 kB     7.00 ms    74.67 ms\n    8192 kB    14.81 ms   157.83 ms\n   16384 kB    32.00 ms   326.89 ms\n   32768 kB    69.85 ms   693.16 ms\n   65536 kB   152.75 ms  1422.30 ms\n  131072 kB   282.02 ms  3052.01 ms\n  262144 kB   748.82 ms  6356.76 ms\n```\n\nA user can also specify the size of the array to sort:\n\n```bash\ncd ./build\n./bitonic_sort 1024\n```\n\nIn this case, the program will execute the sorting and comparison for a single array with the specified number of\nelements:\n\n```\nNVIDIA GeForce GTX 1660 Ti\nDevice capability: 7.5\nData size  | GPU time   | CPU time\n       4 kB     0.23 ms     0.04 ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitryyurov%2Fbitonic-cuda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitryyurov%2Fbitonic-cuda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitryyurov%2Fbitonic-cuda/lists"}