{"id":13644839,"url":"https://github.com/stotko/stdgpu","last_synced_at":"2025-05-14T19:06:47.189Z","repository":{"id":36697248,"uuid":"202712923","full_name":"stotko/stdgpu","owner":"stotko","description":"stdgpu: Efficient STL-like Data Structures on the GPU","archived":false,"fork":false,"pushed_at":"2025-02-10T13:26:02.000Z","size":5106,"stargazers_count":1207,"open_issues_count":11,"forks_count":88,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-06T09:04:08.022Z","etag":null,"topics":["cpp","cpp17","cpp20","cuda","data-structures","gpgpu","gpu","gpu-acceleration","gpu-computing","hip","modern-cpp","openmp","rocm","stl","stl-containers","stl-like"],"latest_commit_sha":null,"homepage":"https://stotko.github.io/stdgpu/","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/stotko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-08-16T11:04:33.000Z","updated_at":"2025-03-28T07:33:32.000Z","dependencies_parsed_at":"2024-02-11T13:26:29.934Z","dependency_job_id":"2f1961c9-240b-4176-834c-20c169213b54","html_url":"https://github.com/stotko/stdgpu","commit_stats":{"total_commits":566,"total_committers":7,"mean_commits":80.85714285714286,"dds":"0.010600706713780883","last_synced_commit":"2588168d226bd17229dbf58d821549580791089d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stotko%2Fstdgpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stotko%2Fstdgpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stotko%2Fstdgpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stotko%2Fstdgpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stotko","download_url":"https://codeload.github.com/stotko/stdgpu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717240,"owners_count":21150387,"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":["cpp","cpp17","cpp20","cuda","data-structures","gpgpu","gpu","gpu-acceleration","gpu-computing","hip","modern-cpp","openmp","rocm","stl","stl-containers","stl-like"],"created_at":"2024-08-02T01:02:15.147Z","updated_at":"2025-04-13T12:46:21.249Z","avatar_url":"https://github.com/stotko.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"./docs/_static/stdgpu_logo.png\" width=\"500\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003estdgpu: Efficient STL-like Data Structures on the GPU\u003c/h1\u003e\n\n\u003c!-- start badges --\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/stotko/stdgpu/actions/workflows/tests.yml\" alt=\"Tests OpenMP\"\u003e\n    \u003cimg src=\"https://github.com/stotko/stdgpu/actions/workflows/tests.yml/badge.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/stotko/stdgpu/actions/workflows/lint.yml\" alt=\"Lint OpenMP\"\u003e\n    \u003cimg src=\"https://github.com/stotko/stdgpu/actions/workflows/lint.yml/badge.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/stotko/stdgpu\" alt=\"Code Coverage\"\u003e\n  \u003cimg src=\"https://codecov.io/gh/stotko/stdgpu/branch/master/graph/badge.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://bestpractices.coreinfrastructure.org/projects/3645\" alt=\"Best Practices\"\u003e\n    \u003cimg src=\"https://bestpractices.coreinfrastructure.org/projects/3645/badge\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://stotko.github.io/stdgpu\" alt=\"Documentation\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-Latest-green.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/stotko/stdgpu/blob/master/LICENSE\" alt=\"License\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/stotko/stdgpu\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- end badges --\u003e\n\n\u003cb\u003e\n\u003cp align=\"center\"\u003e\n\u003ca style=\"font-weight:bold\" href=\"#features\"\u003eFeatures\u003c/a\u003e |\n\u003ca style=\"font-weight:bold\" href=\"#examples\"\u003eExamples\u003c/a\u003e |\n\u003ca style=\"font-weight:bold\" href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e |\n\u003ca style=\"font-weight:bold\" href=\"#contributing\"\u003eContributing\u003c/a\u003e |\n\u003ca style=\"font-weight:bold\" href=\"#license\"\u003eLicense\u003c/a\u003e |\n\u003ca style=\"font-weight:bold\" href=\"#contact\"\u003eContact\u003c/a\u003e\n\u003c/p\u003e\n\u003c/b\u003e\n\n\n## Features\n\nstdgpu is an open-source library providing **generic GPU data structures** for fast and reliable data management.\n\n- Lightweight C++17 library with minimal dependencies\n- **CUDA**, **OpenMP**, and **HIP (experimental)** backends\n- Familiar STL-like GPU containers\n- High-level, *agnostic* container functions like `insert(begin, end)`, to write shared C++ code\n- Low-level, *native* container functions like `find(key)`, to write custom CUDA kernels, etc.\n- Interoperability with [thrust](https://github.com/NVIDIA/thrust) GPU algorithms\n\nInstead of providing yet another ecosystem, stdgpu is designed to be a *lightweight container library*. Previous libraries such as thrust, VexCL, ArrayFire or Boost.Compute focus on the fast and efficient implementation of various algorithms and only operate on contiguously stored data. stdgpu follows an *orthogonal approach* and focuses on *fast and reliable data management* to enable the rapid development of more general and flexible GPU algorithms just like their CPU counterparts.\n\nAt its heart, stdgpu offers the following GPU data structures and containers:\n\n\u003ctable\u003e\n\u003ctr align=\"center\"\u003e\n\u003ctd\u003e\u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1atomic.html\"\u003e\u003ccode\u003eatomic\u003c/code\u003e\u003c/a\u003e \u0026amp; \u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1atomic__ref.html\"\u003e\u003ccode\u003eatomic_ref\u003c/code\u003e\u003c/a\u003e\u003cbr\u003eAtomic primitive types and references\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1bitset.html\"\u003e\u003ccode\u003ebitset\u003c/code\u003e\u003c/a\u003e\u003cbr\u003eSpace-efficient bit array\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1deque.html\"\u003e\u003ccode\u003edeque\u003c/code\u003e\u003c/a\u003e\u003cbr\u003eDynamically sized double-ended queue\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\"\u003e\n\u003ctd\u003e\u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1queue.html\"\u003e\u003ccode\u003equeue\u003c/code\u003e\u003c/a\u003e \u0026amp; \u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1stack.html\"\u003e\u003ccode\u003estack\u003c/code\u003e\u003c/a\u003e\u003cbr\u003eContainer adapters\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1unordered__map.html\"\u003e\u003ccode\u003eunordered_map\u003c/code\u003e\u003c/a\u003e \u0026amp; \u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1unordered__set.html\"\u003e\u003ccode\u003eunordered_set\u003c/code\u003e\u003c/a\u003e\u003cbr\u003eHashed collection of unique keys and key-value pairs\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://stotko.github.io/stdgpu/doxygen/classstdgpu_1_1vector.html\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/a\u003e\u003cbr\u003eDynamically sized contiguous array\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nIn addition, stdgpu also provides further commonly used helper functionality in [`algorithm`](https://stotko.github.io/stdgpu/doxygen/group__algorithm.html), [`bit`](https://stotko.github.io/stdgpu/doxygen/group__bit.html), [`contract`](https://stotko.github.io/stdgpu/doxygen/group__contract.html), [`cstddef`](https://stotko.github.io/stdgpu/doxygen/group__cstddef.html), [`execution`](https://stotko.github.io/stdgpu/doxygen/group__execution.html), [`functional`](https://stotko.github.io/stdgpu/doxygen/group__functional.html), [`iterator`](https://stotko.github.io/stdgpu/doxygen/group__iterator.html), [`limits`](https://stotko.github.io/stdgpu/doxygen/group__limits.html), [`memory`](https://stotko.github.io/stdgpu/doxygen/group__memory.html), [`mutex`](https://stotko.github.io/stdgpu/doxygen/group__mutex.html), [`numeric`](https://stotko.github.io/stdgpu/doxygen/group__numeric.html), [`ranges`](https://stotko.github.io/stdgpu/doxygen/group__ranges.html), [`type_traits`](https://stotko.github.io/stdgpu/doxygen/group__type__traits.html), [`utility`](https://stotko.github.io/stdgpu/doxygen/group__utility.html).\n\n\n## Examples\n\n\u003c!-- start examples --\u003e\n\nIn order to reliably perform complex tasks on the GPU, stdgpu offers flexible interfaces that can be used in both **agnostic code**, e.g. via the algorithms provided by thrust, as well as in **native code**, e.g. in custom CUDA kernels.\n\nFor instance, stdgpu is extensively used in [SLAMCast](https://www.researchgate.net/publication/331303359_SLAMCast_Large-Scale_Real-Time_3D_Reconstruction_and_Streaming_for_Immersive_Multi-Client_Live_Telepresence), a scalable live telepresence system, to implement real-time, large-scale 3D scene reconstruction as well as real-time 3D data streaming between a server and an arbitrary number of remote clients.\n\n**Agnostic code**. In the context of [SLAMCast](https://www.researchgate.net/publication/331303359_SLAMCast_Large-Scale_Real-Time_3D_Reconstruction_and_Streaming_for_Immersive_Multi-Client_Live_Telepresence), a simple task is the integration of a range of updated blocks into the duplicate-free set of queued blocks for data streaming which can be expressed very conveniently:\n\n```cpp\n#include \u003cstdgpu/cstddef.h\u003e             // stdgpu::index_t\n#include \u003cstdgpu/iterator.h\u003e            // stdgpu::make_device\n#include \u003cstdgpu/unordered_set.cuh\u003e     // stdgpu::unordered_set\n\nclass stream_set\n{\npublic:\n    void\n    add_blocks(const short3* blocks,\n               const stdgpu::index_t n)\n    {\n        set.insert(stdgpu::make_device(blocks),\n                   stdgpu::make_device(blocks + n));\n    }\n\n    // Further functions\n\nprivate:\n    stdgpu::unordered_set\u003cshort3\u003e set;\n    // Further members\n};\n```\n\n**Native code**. More complex operations such as the creation of the duplicate-free set of updated blocks or other algorithms can be implemented natively, e.g. in custom CUDA kernels with stdgpu's CUDA backend enabled:\n\n```cpp\n#include \u003cstdgpu/cstddef.h\u003e             // stdgpu::index_t\n#include \u003cstdgpu/unordered_map.cuh\u003e     // stdgpu::unordered_map\n#include \u003cstdgpu/unordered_set.cuh\u003e     // stdgpu::unordered_set\n\n__global__ void\ncompute_update_set(const short3* blocks,\n                   const stdgpu::index_t n,\n                   const stdgpu::unordered_map\u003cshort3, voxel*\u003e tsdf_block_map,\n                   stdgpu::unordered_set\u003cshort3\u003e mc_update_set)\n{\n    // Global thread index\n    stdgpu::index_t i = blockIdx.x * blockDim.x + threadIdx.x;\n    if (i \u003e= n) return;\n\n    short3 b_i = blocks[i];\n\n    // Neighboring candidate blocks for the update\n    short3 mc_blocks[8]\n    = {\n        short3(b_i.x - 0, b_i.y - 0, b_i.z - 0),\n        short3(b_i.x - 1, b_i.y - 0, b_i.z - 0),\n        short3(b_i.x - 0, b_i.y - 1, b_i.z - 0),\n        short3(b_i.x - 0, b_i.y - 0, b_i.z - 1),\n        short3(b_i.x - 1, b_i.y - 1, b_i.z - 0),\n        short3(b_i.x - 1, b_i.y - 0, b_i.z - 1),\n        short3(b_i.x - 0, b_i.y - 1, b_i.z - 1),\n        short3(b_i.x - 1, b_i.y - 1, b_i.z - 1),\n    };\n\n    for (stdgpu::index_t j = 0; j \u003c 8; ++j)\n    {\n        // Only consider existing neighbors\n        if (tsdf_block_map.contains(mc_blocks[j]))\n        {\n            mc_update_set.insert(mc_blocks[j]);\n        }\n    }\n}\n```\n\nMore examples can be found in the [`examples`](https://github.com/stotko/stdgpu/tree/master/examples) directory.\n\n\u003c!-- end examples --\u003e\n\n\n## Getting Started\n\nstdgpu requires a **C++17 compiler** as well as minimal backend dependencies and can be easily built and integrated into your project via **CMake**:\n\n- [Building From Source](https://stotko.github.io/stdgpu/getting_started/building_from_source.html)\n- [Integrating Into Your Project](https://stotko.github.io/stdgpu/getting_started/integrating_into_your_project.html)\n\nMore guidelines as well as a comprehensive introduction into the design and API of stdgpu can be found in the [documentation](https://stotko.github.io/stdgpu).\n\n\n## Contributing\n\nFor detailed information on how to contribute, see the [Contributing](https://stotko.github.io/stdgpu/development/contributing.html) section in the documentation.\n\n\n## License\n\nDistributed under the Apache 2.0 License. See [`LICENSE`](https://github.com/stotko/stdgpu/blob/master/LICENSE) for more information.\n\n\u003c!-- start citation --\u003e\n\nIf you use stdgpu in one of your projects, please cite the following publications:\n\n[**stdgpu: Efficient STL-like Data Structures on the GPU**](https://www.researchgate.net/publication/335233070_stdgpu_Efficient_STL-like_Data_Structures_on_the_GPU)\n\n```bib\n@UNPUBLISHED{stotko2019stdgpu,\n    author = {Stotko, P.},\n     title = {{stdgpu: Efficient STL-like Data Structures on the GPU}},\n      year = {2019},\n     month = aug,\n      note = {arXiv:1908.05936},\n       url = {https://arxiv.org/abs/1908.05936}\n}\n```\n\n[**SLAMCast: Large-Scale, Real-Time 3D Reconstruction and Streaming for Immersive Multi-Client Live Telepresence**](https://www.researchgate.net/publication/331303359_SLAMCast_Large-Scale_Real-Time_3D_Reconstruction_and_Streaming_for_Immersive_Multi-Client_Live_Telepresence)\n\n```bib\n@article{stotko2019slamcast,\n    author = {Stotko, P. and Krumpen, S. and Hullin, M. B. and Weinmann, M. and Klein, R.},\n     title = {{SLAMCast: Large-Scale, Real-Time 3D Reconstruction and Streaming for Immersive Multi-Client Live Telepresence}},\n   journal = {IEEE Transactions on Visualization and Computer Graphics},\n    volume = {25},\n    number = {5},\n     pages = {2102--2112},\n      year = {2019},\n     month = may\n}\n```\n\n\u003c!-- end citation --\u003e\n\n\n## Contact\n\nPatrick Stotko - [stotko@cs.uni-bonn.de](mailto:stotko@cs.uni-bonn.de)\n","funding_links":[],"categories":["Concurrency","C++","Graphics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstotko%2Fstdgpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstotko%2Fstdgpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstotko%2Fstdgpu/lists"}