{"id":19660729,"url":"https://github.com/gunrock/essentials-cpp","last_synced_at":"2025-07-24T08:38:22.330Z","repository":{"id":74528709,"uuid":"470333560","full_name":"gunrock/essentials-cpp","owner":"gunrock","description":"Single-Source Shortest Path (SSSP) implementation in modern C++ for 2022 IPDPS workshop on Graphs, Architectures, Programming, and Learning (GrAPL 2022) submission.","archived":false,"fork":false,"pushed_at":"2022-03-31T23:53:25.000Z","size":69,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-28T20:46:18.190Z","etag":null,"topics":["cpp20","graph-algorithms","parallel-programming","single-source-shortest-path"],"latest_commit_sha":null,"homepage":"https://escholarship.org/uc/item/2p19z28q","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gunrock.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}},"created_at":"2022-03-15T21:13:05.000Z","updated_at":"2025-03-30T00:49:08.000Z","dependencies_parsed_at":"2023-02-23T22:30:15.760Z","dependency_job_id":null,"html_url":"https://github.com/gunrock/essentials-cpp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gunrock/essentials-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fessentials-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fessentials-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fessentials-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fessentials-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunrock","download_url":"https://codeload.github.com/gunrock/essentials-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fessentials-cpp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266815216,"owners_count":23988562,"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-07-24T02:00:09.469Z","response_time":99,"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":["cpp20","graph-algorithms","parallel-programming","single-source-shortest-path"],"created_at":"2024-11-11T16:05:14.196Z","updated_at":"2025-07-24T08:38:21.250Z","avatar_url":"https://github.com/gunrock.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Essentials of Parallel Graph Analytics\nSingle-Source Shortest Path (SSSP) implementation in modern C++ for 2022 IPDPS workshop on Graphs, Architectures, Programming, and Learning (GrAPL 2022) submission. For a more complete implementation of the ideas presented in the paper, please refer to the on-going work of graph analytics on GPUs at [gunrock/essentials](https://github.com/gunrock/essentials).\n\n| System  | Version                                                                                                                                                       | Status                                                                                                                                                   |\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Ubuntu  | [Ubuntu 20.04](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)        | [![Ubuntu](https://github.com/neoblizz/sssp/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/neoblizz/sssp/actions/workflows/ubuntu.yml)    |\n| Windows | [Windows Server 2019](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) | [![Windows](https://github.com/neoblizz/sssp/actions/workflows/windows.yml/badge.svg)](https://github.com/neoblizz/sssp/actions/workflows/windows.yml) |\n\n## Dependencies\n- `C++20` for linux (requires `gcc/g++-11` or higher), `C++23` for windows.\n- `cmake` version `3.22.2`.\n- `tbb` library for execution policies (automatically fetched using `cmake`).\n\n## Implementation Detail\nThis code base makes use of modern C++ features such as `ranges`, `execution_policy`, and lambda expressions to implement the essential components for parallel graph analytics. We focus on a simple implementation of Single-Source Shortest Path (SSSP), but the concepts can easily be extended to support other graph algorithms such as Breadth-First Search with minor changes to the lambda expression during traversal.\n\n### SSSP Traversal Condition\n```cpp\n[\u0026](vertex_t const\u0026 src,    // source\n    vertex_t const\u0026 dst,    // destination\n    edge_t const\u0026 edge,     // edge\n    weight_t const\u0026 weight  // weight\n   ) {\n     weight_t new_d = distances[src] + weight;\n     weight_t curr_d = atomic::min(\u0026distances[dst], new_d, m_locks[dst]);\n     return new_d \u003c curr_d;\n};\n```\n\n### BFS Traversal Condition\n```cpp\n[\u0026](vertex_t const\u0026 src,    // source\n    vertex_t const\u0026 dst,    // destination\n    edge_t const\u0026 edge,     // edge\n    weight_t const\u0026 weight  // weight\n   ) {\n     // If the neighbor is not visited, update the distance. Returning false\n     // here means that the neighbor is not added to the output frontier, and\n     // instead an invalid vertex is added in its place. These invalides (-1 in\n     // most cases) can be removed using a filter operator or uniquify.\n     if (distances[dst] != std::numeric_limits\u003cvertex_t\u003e::max())\n       return false;\n     else\n       return (atomic::cas(\n                   \u0026distances[dst], std::numeric_limits\u003cvertex_t\u003e::max(),\n                   iteration + 1) == std::numeric_limits\u003cvertex_t\u003e::max(), m_locks[dst]);\n};\n```\n\n## Quick Start Guide\nBefore building this project, make sure your system/compiler supports **C++20** and **cmake**.\n\n```bash\ngit clone https://github.com/gunrock/essentials-cpp.git\ncd essentials-cpp\nmkdir build \u0026\u0026 cd build\ncmake .. \nmake\nbin/sssp ../datasets/chesapeake/chesapeake.mtx\n```\n\n## How to Cite\nThank you for citing our work.\n```tex\n@InProceedings{   Osama:2022:EOP,\n  author        = {Muhammad Osama and Serban D. Porumbescu and John D.\n                  Owens},\n  title         = {Essentials of Parallel Graph Analytics},\n  booktitle     = {Proceedings of the Workshop on Graphs, Architectures,\n                  Programming, and Learning},\n  year          = 2022,\n  series        = {GrAPL 2022},\n  month         = may\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunrock%2Fessentials-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunrock%2Fessentials-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunrock%2Fessentials-cpp/lists"}