pax_global_header00006660000000000000000000000064144257303540014521gustar00rootroot0000000000000052 comment=32e05173d82a1a4f28bb7d9d59b17b122f315dd8 stdgpu/000077500000000000000000000000001442573035400123735ustar00rootroot00000000000000stdgpu/.clang-format000066400000000000000000000007701442573035400147520ustar00rootroot00000000000000--- Language: Cpp BasedOnStyle: Mozilla # Only modifications deviating from the base style are specified Standard: c++17 AccessModifierOffset: -4 AllowAllArgumentsOnNextLine: false AllowAllConstructorInitializersOnNextLine: false AlwaysBreakAfterReturnType: All BreakBeforeBraces: Allman ColumnLimit: 120 ContinuationIndentWidth: 8 FixNamespaceComments: true IndentPPDirectives: BeforeHash IndentWidth: 4 ReflowComments: true SpaceAfterTemplateKeyword: true SpaceInEmptyBlock: true ... stdgpu/.clang-tidy000066400000000000000000000016471442573035400144370ustar00rootroot00000000000000--- Checks: "-*,\ bugprone-*,\ -bugprone-easily-swappable-parameters,\ cert-*,\ -cert-dcl21-cpp,\ -cert-err58-cpp,\ concurrency-*,\ cppcoreguidelines-*,\ -cppcoreguidelines-avoid-c-arrays,\ -cppcoreguidelines-avoid-non-const-global-variables,\ -cppcoreguidelines-macro-usage,\ -cppcoreguidelines-owning-memory,\ -cppcoreguidelines-pro-bounds-pointer-arithmetic,\ -cppcoreguidelines-pro-type-const-cast,\ -cppcoreguidelines-pro-type-vararg,\ hicpp-*,\ -hicpp-avoid-c-arrays,\ -hicpp-vararg,\ -hicpp-use-auto,\ misc-*,\ -misc-const-correctness,\ modernize-*,\ -modernize-avoid-c-arrays,\ -modernize-use-auto,\ -modernize-use-nodiscard,\ -modernize-use-trailing-return-type,\ performance-*,\ portability-*,\ readability-*,\ -readability-avoid-const-params-in-decls,\ -readability-const-return-type,\ -readability-function-cognitive-complexity,\ -readability-identifier-length,\ " HeaderFilterRegex: 'src|benchmark/stdgpu|test/stdgpu' ... stdgpu/.github/000077500000000000000000000000001442573035400137335ustar00rootroot00000000000000stdgpu/.github/ISSUE_TEMPLATE/000077500000000000000000000000001442573035400161165ustar00rootroot00000000000000stdgpu/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000012631442573035400206120ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **Steps to reproduce** If possible, provide a *Minimal Reproducable Example*. Describe the steps to reproduce the bug. **Expected behavior** A clear and concise description of what you expected to happen. **Actual behavior** A clear and concise description of what actually happens. **System (please complete the following information):** - OS: [e.g. Ubuntu 18.04, Windows 10] - Compiler: [e.g. GCC 7, MSVC 19.2x (Visual Studio 2019)] - Backend: [e.g. CUDA, OpenMP] - Library version [e.g. 1.0.0, master] stdgpu/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000007321442573035400216450ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: '' labels: enhancement assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. stdgpu/.github/workflows/000077500000000000000000000000001442573035400157705ustar00rootroot00000000000000stdgpu/.github/workflows/analysis.yml000066400000000000000000000027261442573035400203450ustar00rootroot00000000000000name: Analysis OpenMP on: push: branches: - master pull_request: types: [opened, reopened, synchronize] jobs: Clang-Tidy: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Install clang-tidy shell: bash run: | bash scripts/utils/install_clang_tidy_ubuntu.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp_clang_tidy.sh - name: Build project shell: bash run: | bash scripts/build.sh Debug Cppcheck: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Install cppcheck shell: bash run: | bash scripts/utils/install_cppcheck_ubuntu.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp_cppcheck.sh - name: Build project shell: bash run: | bash scripts/build.sh Debug stdgpu/.github/workflows/coverage.yml000066400000000000000000000021061442573035400203050ustar00rootroot00000000000000name: Coverage OpenMP on: push: branches: - master pull_request: types: [opened, reopened, synchronize] jobs: Coverage: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Install lcov shell: bash run: | bash scripts/utils/install_lcov_ubuntu.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp_lcov.sh - name: Build project shell: bash run: | bash scripts/build.sh Debug - name: Run coverage shell: bash run: | bash scripts/ci/run_coverage.sh - name: Upload coverage report uses: codecov/codecov-action@v3 with: files: build/stdgpu_coverage.info fail_ci_if_error: true verbose: true stdgpu/.github/workflows/documentation.yml000066400000000000000000000021521442573035400213640ustar00rootroot00000000000000name: Documentation OpenMP on: push: branches: - master pull_request: types: [opened, reopened, synchronize] permissions: contents: write jobs: Doxygen: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Install doxygen dependencies shell: bash run: | bash scripts/utils/install_doxygen_dependencies_ubuntu.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp_documentation.sh - name: Build documentation shell: bash run: | bash scripts/utils/build_documentation.sh - name: Deploy documentation uses: JamesIves/github-pages-deploy-action@v4 with: folder: build/doc/html clean: true single-commit: true if: github.event_name != 'pull_request' stdgpu/.github/workflows/style.yml000066400000000000000000000015731442573035400176610ustar00rootroot00000000000000name: Code Style on: push: branches: - master pull_request: types: [opened, reopened, synchronize] jobs: Clang-Format: runs-on: ubuntu-20.04 # Keep Ubuntu 20.04 until raising the requirements to clang-format > 10 steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Install clang-format shell: bash run: | bash scripts/utils/install_clang_format_ubuntu2004.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp.sh - name: Check style shell: bash run: | bash scripts/utils/check_code_style.sh stdgpu/.github/workflows/ubuntu.yml000066400000000000000000000066241442573035400200450ustar00rootroot00000000000000name: Ubuntu OpenMP on: push: branches: - master pull_request: types: [opened, reopened, synchronize] jobs: Ubuntu-2004: runs-on: ubuntu-20.04 strategy: matrix: CXX: [g++, clang++] BuildType: [Debug, Release] SharedLibs: [ON, OFF] include: - CXX: g++ CC: gcc - CXX: clang++ CC: clang steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Set C/C++ compiler shell: bash run: | bash scripts/utils/set_cxx_compiler_ubuntu.sh ${{ matrix.CC }} ${{ matrix.CXX }} - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp.sh ${{ matrix.BuildType }} -DSTDGPU_BUILD_SHARED_LIBS=${{ matrix.SharedLibs }} - name: Build project shell: bash run: | bash scripts/build.sh ${{ matrix.BuildType }} - name: Run tests shell: bash run: | bash scripts/run_tests.sh ${{ matrix.BuildType }} - name: Verify headers shell: bash run: | bash scripts/utils/verify_headers.sh - name: Install project shell: bash run: | bash scripts/install.sh ${{ matrix.BuildType }} - name: Check linking to installed project shell: bash run: | bash scripts/ci/check_install_openmp.sh ${{ matrix.BuildType }} - name: Uninstall project shell: bash run: | bash scripts/uninstall.sh ${{ matrix.BuildType }} Ubuntu-2204: runs-on: ubuntu-22.04 strategy: matrix: CXX: [g++, clang++] BuildType: [Debug, Release] SharedLibs: [ON, OFF] include: - CXX: g++ CC: gcc - CXX: clang++ CC: clang steps: - uses: actions/checkout@v3 - name: Install OpenMP shell: bash run: | bash scripts/utils/install_openmp_ubuntu.sh - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Set C/C++ compiler shell: bash run: | bash scripts/utils/set_cxx_compiler_ubuntu.sh ${{ matrix.CC }} ${{ matrix.CXX }} - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp.sh ${{ matrix.BuildType }} -DSTDGPU_BUILD_SHARED_LIBS=${{ matrix.SharedLibs }} - name: Build project shell: bash run: | bash scripts/build.sh ${{ matrix.BuildType }} - name: Run tests shell: bash run: | bash scripts/run_tests.sh ${{ matrix.BuildType }} - name: Verify headers shell: bash run: | bash scripts/utils/verify_headers.sh - name: Install project shell: bash run: | bash scripts/install.sh ${{ matrix.BuildType }} - name: Check linking to installed project shell: bash run: | bash scripts/ci/check_install_openmp.sh ${{ matrix.BuildType }} - name: Uninstall project shell: bash run: | bash scripts/uninstall.sh ${{ matrix.BuildType }} stdgpu/.github/workflows/windows.yml000066400000000000000000000052571442573035400202160ustar00rootroot00000000000000name: Windows OpenMP on: push: branches: - master pull_request: types: [opened, reopened, synchronize] jobs: Windows-2019: runs-on: windows-2019 strategy: matrix: BuildType: [Debug, Release] SharedLibs: [ON, OFF] steps: - uses: actions/checkout@v3 - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp.sh ${{ matrix.BuildType }} -DSTDGPU_BUILD_SHARED_LIBS=${{ matrix.SharedLibs }} -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE - name: Build project shell: bash run: | bash scripts/build.sh ${{ matrix.BuildType }} - name: Run tests shell: bash run: | bash scripts/run_tests.sh ${{ matrix.BuildType }} - name: Verify headers shell: bash run: | bash scripts/utils/verify_headers.sh - name: Install project shell: bash run: | bash scripts/install.sh ${{ matrix.BuildType }} - name: Check linking to installed project shell: bash run: | bash scripts/ci/check_install_openmp.sh ${{ matrix.BuildType }} - name: Uninstall project shell: bash run: | bash scripts/uninstall.sh ${{ matrix.BuildType }} Windows-2022: runs-on: windows-2022 strategy: matrix: BuildType: [Debug, Release] SharedLibs: [ON, OFF] steps: - uses: actions/checkout@v3 - name: Download dependencies shell: bash run: | bash scripts/utils/download_dependencies.sh - name: Configure project shell: bash run: | bash scripts/ci/configure_openmp.sh ${{ matrix.BuildType }} -DSTDGPU_BUILD_SHARED_LIBS=${{ matrix.SharedLibs }} -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE - name: Build project shell: bash run: | bash scripts/build.sh ${{ matrix.BuildType }} - name: Run tests shell: bash run: | bash scripts/run_tests.sh ${{ matrix.BuildType }} - name: Verify headers shell: bash run: | bash scripts/utils/verify_headers.sh - name: Install project shell: bash run: | bash scripts/install.sh ${{ matrix.BuildType }} - name: Check linking to installed project shell: bash run: | bash scripts/ci/check_install_openmp.sh ${{ matrix.BuildType }} - name: Uninstall project shell: bash run: | bash scripts/uninstall.sh ${{ matrix.BuildType }} stdgpu/.gitignore000066400000000000000000000001361442573035400143630ustar00rootroot00000000000000# Build directories /bin/ /build/ /build_install_test/ /external/ # KDevelop *.kdev4 .kdev4/ stdgpu/CHANGELOG.md000066400000000000000000000425751442573035400142210ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [stdgpu 1.3.0](https://github.com/stotko/stdgpu/releases/tag/1.3.0) (2020-06-02) This release of *stdgpu* introduces a new *experimental* HIP backend adding support for AMD GPUs, significant improvements to the API documentation as well as many new code examples, the integration of clang-tidy and cppcheck in the CI, as well as a tremendous amount of warning fixes to enable clean builds at very high warning levels. **New Features & Enhancements** - General: Add experimental HIP backend [\#121](https://github.com/stotko/stdgpu/pull/121) [\#143](https://github.com/stotko/stdgpu/pull/143) - General: Add support for Compute Capability 3.0 in CUDA backend [\#153](https://github.com/stotko/stdgpu/pull/153) - General: Add clang-tidy support [\#129](https://github.com/stotko/stdgpu/pull/129) [\#138](https://github.com/stotko/stdgpu/pull/138) - General: Add cppcheck support [\#149](https://github.com/stotko/stdgpu/pull/149) - General: Add CI job for documentation creation [\#109](https://github.com/stotko/stdgpu/pull/109) - General: Deprecate misleading/obsolete cmake options [\#103](https://github.com/stotko/stdgpu/pull/103) - atomic: Make all operations follow sequentially consistent ordering [\#176](https://github.com/stotko/stdgpu/pull/176) - atomic: Add backend documentation of template parameter [\#177](https://github.com/stotko/stdgpu/pull/177) - atomic: Cleanup backend-specific internals of CUDA backend [\#152](https://github.com/stotko/stdgpu/pull/152) - bit: Add `ceil2` and `floor2` functions [\#105](https://github.com/stotko/stdgpu/pull/105) - bit: Rename functions to match most recent draft of C++20 [\#110](https://github.com/stotko/stdgpu/pull/110) - bitset: Remove dependency to cstdlib [\#145](https://github.com/stotko/stdgpu/pull/145) - cstddef: Hide initializers for clearer documentation [\#166](https://github.com/stotko/stdgpu/pull/166) - cstdlib: Deprecate `sizedivPow2` [\#161](https://github.com/stotko/stdgpu/pull/161) - limits: Add implementation for non-specialized template and documentation for every type [\#167](https://github.com/stotko/stdgpu/pull/167) - memory: Add `construct_at` function [\#95](https://github.com/stotko/stdgpu/pull/95) - memory: Cleanup global variables and simplify `allocate`/`deallocate` logic [\#104](https://github.com/stotko/stdgpu/pull/104) - memory: Improve `construct*` and `destroy*` unit tests [\#175](https://github.com/stotko/stdgpu/pull/175) - platform: Add automatic dispatching of backend-specific definitions [\#119](https://github.com/stotko/stdgpu/pull/119) - platform: Change detection of device code for OpenMP [\#174](https://github.com/stotko/stdgpu/pull/174) - ranges: Add `size()` and `empty()` functions as well as additional constructors [\#122](https://github.com/stotko/stdgpu/pull/122) - ranges: Add `index64_t` constructor and deprecate `index_t` version [\#102](https://github.com/stotko/stdgpu/pull/102) - unordered_map,unordered_set: Improve robustness of Fibonacci Hashing [\#111](https://github.com/stotko/stdgpu/pull/111) - README,doc: Significantly improve introduction, examples, and documentation [\#114](https://github.com/stotko/stdgpu/pull/114) [\#116](https://github.com/stotko/stdgpu/pull/116) [\#162](https://github.com/stotko/stdgpu/pull/162) [\#165](https://github.com/stotko/stdgpu/pull/165) [\#170](https://github.com/stotko/stdgpu/pull/170) [\#171](https://github.com/stotko/stdgpu/pull/171) [\#172](https://github.com/stotko/stdgpu/pull/172) [\#181](https://github.com/stotko/stdgpu/pull/181) - doc: Group all class and function definitions into modules [\#169](https://github.com/stotko/stdgpu/pull/169) - doc: Cleanup unnecessary documentation [\#168](https://github.com/stotko/stdgpu/pull/168) - examples: Add many new examples and improve existing ones [\#173](https://github.com/stotko/stdgpu/pull/173) - test: Disable unused GMock [\#160](https://github.com/stotko/stdgpu/pull/160) - cmake: Make installable package relocatable [\#180](https://github.com/stotko/stdgpu/pull/180) - cmake: Add option to treat warnings as errors [\#108](https://github.com/stotko/stdgpu/pull/108) - cmake: Generate compile flags more robustly [\#128](https://github.com/stotko/stdgpu/pull/128) - cmake: Simplify architecture flag generation in CUDA backend [\#154](https://github.com/stotko/stdgpu/pull/154) - cmake: Install backend-specific find modules in subdirectories [\#117](https://github.com/stotko/stdgpu/pull/117) - cmake: Update support for CMake 3.17+ [\#123](https://github.com/stotko/stdgpu/pull/123) **Bug Fixes** - General: Increase warning level and fix conversion and float-equal warnings [\#98](https://github.com/stotko/stdgpu/pull/98) - General: Increase MSVC warning level and fix related warnings [\#107](https://github.com/stotko/stdgpu/pull/107) [\#156](https://github.com/stotko/stdgpu/pull/156) - General: Fix Clang warnings [\#91](https://github.com/stotko/stdgpu/pull/91) [\#147](https://github.com/stotko/stdgpu/pull/147) - General: Fix format warnings [\#101](https://github.com/stotko/stdgpu/pull/101) - General: Fix sign-conversion warnings [\#100](https://github.com/stotko/stdgpu/pull/100) - General: Fix shadow warnings [\#90](https://github.com/stotko/stdgpu/pull/90) - General: Fix numerous clang-tidy warnings [\#130](https://github.com/stotko/stdgpu/pull/130) [\#131](https://github.com/stotko/stdgpu/pull/131) [\#132](https://github.com/stotko/stdgpu/pull/132) [\#133](https://github.com/stotko/stdgpu/pull/133) [\#134](https://github.com/stotko/stdgpu/pull/134) [\#135](https://github.com/stotko/stdgpu/pull/135) [\#136](https://github.com/stotko/stdgpu/pull/136) [\#137](https://github.com/stotko/stdgpu/pull/137) [\#140](https://github.com/stotko/stdgpu/pull/140) [\#141](https://github.com/stotko/stdgpu/pull/141) - examples: Pass containers by reference for OpenMP backend [\#182](https://github.com/stotko/stdgpu/pull/182) - src,test: Improve consistency and cleanup includes [\#118](https://github.com/stotko/stdgpu/pull/118) - test: Fix missing namespace for `uint8_t` [\#142](https://github.com/stotko/stdgpu/pull/142) - test: Pass containers by const reference to functors [\#158](https://github.com/stotko/stdgpu/pull/158) - test: Fix double-promotion warnings in backend code [\#151](https://github.com/stotko/stdgpu/pull/151) - test: Fix conversion warning and missing namespace [\#124](https://github.com/stotko/stdgpu/pull/124) - test: Fix missing include in device_info cpp files [\#120](https://github.com/stotko/stdgpu/pull/120) - bit: Fix potential negative bit shift in unit test [\#159](https://github.com/stotko/stdgpu/pull/159) - bit,bitset: Fix missing post-conditions and remove unnecessary dependency [\#112](https://github.com/stotko/stdgpu/pull/112) - bitset: Fix deprecated-copy warning [\#144](https://github.com/stotko/stdgpu/pull/144) - compiler: Fix NVCC detection [\#155](https://github.com/stotko/stdgpu/pull/155) - compiler,platform: Use unique numbers as internal macro definitions [\#139](https://github.com/stotko/stdgpu/pull/139) - contract: Enforce user semicolon for all possible expansions [\#148](https://github.com/stotko/stdgpu/pull/148) [\#150](https://github.com/stotko/stdgpu/pull/150) - limits: Suppress long double device code warning with MSVC [\#178](https://github.com/stotko/stdgpu/pull/178) - platform: Move `STDGPU_HAS_CXX_17` to compiler [\#146](https://github.com/stotko/stdgpu/pull/146) - ranges: Fix compilation with 64-bit index type [\#157](https://github.com/stotko/stdgpu/pull/157) - ranges: Fix compilation error with select functor [\#125](https://github.com/stotko/stdgpu/pull/125) - deque,vector: Fix overflow in test [\#99](https://github.com/stotko/stdgpu/pull/99) - doc: Fix several minor documentation bugs [\#164](https://github.com/stotko/stdgpu/pull/164) - scripts: Use released thrust version [\#126](https://github.com/stotko/stdgpu/pull/126) - cmake: Fix error with unspecified build type [\#179](https://github.com/stotko/stdgpu/pull/179) - cmake: Fix parsing of thrust version [\#163](https://github.com/stotko/stdgpu/pull/163) - cmake: Workaround bug in imported rocthrust target name [\#127](https://github.com/stotko/stdgpu/pull/127) - cmake: Properly handle CUDA toolkit dependency [\#96](https://github.com/stotko/stdgpu/pull/96) - cmake: Add missing dependency checks in package config [\#94](https://github.com/stotko/stdgpu/pull/94) - cmake: Fix selection of header files for installation [\#93](https://github.com/stotko/stdgpu/pull/93) - cmake: Fix inconsistent thrust detection across the backends [\#92](https://github.com/stotko/stdgpu/pull/92) - CI: Fix codecov task [\#113](https://github.com/stotko/stdgpu/pull/113) - CI: Fix potentially missing OpenMP runtime package [\#106](https://github.com/stotko/stdgpu/pull/106) **Deprecated Features** - bit: `ispow2()`, `log2pow2()`, `mod2()` - cstdlib: `sizedivPow2(std::size_t, std::size_t)`, `sizediv_t` - memory: `safe_pinned_host_allocator`, `default_allocator_traits` - mutex: `mutex_ref` - ranges: `device_range(T*, index_t)`, `host_range(T*, index_t)`, non-const `begin()` and `end()` member functions - unordered_map,unordered_set: `createDeviceObject(index_t, index_t)`, `excess_count()`, `total_count()` - CMake Configuration Options: `STDGPU_ENABLE_AUXILIARY_ARRAY_WARNING`, `STDGPU_ENABLE_MANAGED_ARRAY_WARNING`, `STDGPU_USE_FAST_DESTROY`, `STDGPU_USE_FIBONACCI_HASHING` ## [stdgpu 1.2.0](https://github.com/stotko/stdgpu/releases/tag/1.2.0) (2020-01-28) This version of *stdgpu* introduces a lightweight backend system including CUDA and OpenMP backends, the integration of Azure Pipelines CI as well as codecov CI, support for the Clang compiler, removal of unnecessary requirements to the container's value types, as well as significant improvements to the test coverage and the documentation. **New Features & Enhancements** - General: Add backend system [\#31](https://github.com/stotko/stdgpu/pull/31) - General: Add OpenMP backend [\#32](https://github.com/stotko/stdgpu/pull/32) [\#59](https://github.com/stotko/stdgpu/pull/59) - General: Add Azure Pipelines CI [\#34](https://github.com/stotko/stdgpu/pull/34) [\#37](https://github.com/stotko/stdgpu/pull/37) [\#41](https://github.com/stotko/stdgpu/pull/41) - General: Add code coverage report generation [\#65](https://github.com/stotko/stdgpu/pull/65) - General: Add codecov CI task [\#72](https://github.com/stotko/stdgpu/pull/72) - General: Add Clang support [\#40](https://github.com/stotko/stdgpu/pull/40) - General: Add changelog file [\#48](https://github.com/stotko/stdgpu/pull/48) - General: Add contributing file [\#49](https://github.com/stotko/stdgpu/pull/49) - General: Add issue templates [\#81](https://github.com/stotko/stdgpu/pull/81) - Container: Remove `DefaultConstructible` requirement from template type [\#58](https://github.com/stotko/stdgpu/pull/58) - Container: Add `get_allocator()` function [\#56](https://github.com/stotko/stdgpu/pull/56) - bitset: Add further missing member functions [\#53](https://github.com/stotko/stdgpu/pull/53) - deque: Add `at()`, `shrink_to_fit()` and remove `CopyAssignable` requirement from type `T` [\#45](https://github.com/stotko/stdgpu/pull/45) - memory: Add `safe_host_allocator` and deprecate `safe_pinned_host_allocator` [\#36](https://github.com/stotko/stdgpu/pull/36) - memory: Add and use `destroy*` functions [\#60](https://github.com/stotko/stdgpu/pull/60) - memory: Add `allocator_traits` and deprecate old specialized version [\#61](https://github.com/stotko/stdgpu/pull/61) [\#66](https://github.com/stotko/stdgpu/pull/66) - mutex: Add `mutex_array::reference` class and deprecate `mutex_ref` [\#55](https://github.com/stotko/stdgpu/pull/55) [\#63](https://github.com/stotko/stdgpu/pull/63) - unordered_map,unordered_set: Add single-parameter `createDeviceObject()` function [\#46](https://github.com/stotko/stdgpu/pull/46) [\#52](https://github.com/stotko/stdgpu/pull/52) - vector: Add `at()`, `shrink_to_fit()` and remove `CopyAssignable` requirement from type `T` [\#44](https://github.com/stotko/stdgpu/pull/44) - README: Improve consistency with doxygen version [\#42](https://github.com/stotko/stdgpu/pull/42) - README: Add badges [\#35](https://github.com/stotko/stdgpu/pull/35) [\#79](https://github.com/stotko/stdgpu/pull/79) [\#85](https://github.com/stotko/stdgpu/pull/85) [\#86](https://github.com/stotko/stdgpu/pull/86) - README,doc: Significantly improve description and readability [\#50](https://github.com/stotko/stdgpu/pull/50) - doc: Include config.h and cleanup macro definitions [\#47](https://github.com/stotko/stdgpu/pull/47) - scripts: Improve console output and internal structure [\#33](https://github.com/stotko/stdgpu/pull/33) - scripts: Port install script to native CMake install command-line interface [\#82](https://github.com/stotko/stdgpu/pull/82) - test: Adjust test array sizes and build flags [\#64](https://github.com/stotko/stdgpu/pull/64) - test: Explicitly instantiate templates [\#70](https://github.com/stotko/stdgpu/pull/70) - test: Also include deprecated functions into unit tests [\#80](https://github.com/stotko/stdgpu/pull/80) - test: Improve coverage of several (member) functions [\#74](https://github.com/stotko/stdgpu/pull/74) [\#75](https://github.com/stotko/stdgpu/pull/75) [\#76](https://github.com/stotko/stdgpu/pull/76) [\#77](https://github.com/stotko/stdgpu/pull/77) [\#78](https://github.com/stotko/stdgpu/pull/78) [\#84](https://github.com/stotko/stdgpu/pull/84) **Bug Fixes** - README: Fix alignment of title [\#43](https://github.com/stotko/stdgpu/pull/43) - atomic: Fix compare_exchange and add more operators as well as tests [\#83](https://github.com/stotko/stdgpu/pull/83) - cmake: Fix minimum required version [\#71](https://github.com/stotko/stdgpu/pull/71) - deque: Fix compilation error when calling `device_range()` [\#67](https://github.com/stotko/stdgpu/pull/67) - unordered_base: Fix compilation errors with CUDA backend [\#69](https://github.com/stotko/stdgpu/pull/69) - unordered_map,unordered_set: Fix delegate calls to unordered_base [\#68](https://github.com/stotko/stdgpu/pull/68) - vector: Disallow non-defined bool specialization [\#57](https://github.com/stotko/stdgpu/pull/57) **Deprecated Features** - memory: `safe_pinned_host_allocator`, `default_allocator_traits` - mutex: `mutex_ref` - unordered_map,unordered_set: `createDeviceObject(index_t, index_t)`, `excess_count()`, `total_count()` ## [stdgpu 1.1.0](https://github.com/stotko/stdgpu/releases/tag/1.1.0) (2019-11-22) After a stabilization and cleanup phase, the next version of *stdgpu* is available. **New Features & Enhancements** - cmake: Improve compute capability detection [\#8](https://github.com/stotko/stdgpu/pull/8) [\#28](https://github.com/stotko/stdgpu/pull/28) - cmake: Add option `STDGPU_BUILD_SHARED_LIBS` to build the project as a shared library [\#14](https://github.com/stotko/stdgpu/pull/14) - unordered_map,unordered_set: Improve reliability [\#25](https://github.com/stotko/stdgpu/pull/25) - platform: Add `STDGPU_DEVICE_ONLY` annotation macro [\#7](https://github.com/stotko/stdgpu/pull/7) - test: Upgrade googletest to 1.10.0 [\#6](https://github.com/stotko/stdgpu/pull/6) - Refactor internal code structure and move platform-specific code to a dedicated CUDA backend [\#1](https://github.com/stotko/stdgpu/pull/1) [\#2](https://github.com/stotko/stdgpu/pull/2) [\#4](https://github.com/stotko/stdgpu/pull/4) [\#5](https://github.com/stotko/stdgpu/pull/5) [\#9](https://github.com/stotko/stdgpu/pull/9) [\#10](https://github.com/stotko/stdgpu/pull/10) [\#11](https://github.com/stotko/stdgpu/pull/11) [\#16](https://github.com/stotko/stdgpu/pull/16) [\#19](https://github.com/stotko/stdgpu/pull/19) [\#23](https://github.com/stotko/stdgpu/pull/23) [\#24](https://github.com/stotko/stdgpu/pull/24) [\#27](https://github.com/stotko/stdgpu/pull/27) **Bug Fixes** - atomic: Fix missing template type names in the function definitions [\#30](https://github.com/stotko/stdgpu/pull/30) - atomic: Fix bit shift in unit test [\#18](https://github.com/stotko/stdgpu/pull/18) - cmake: Workaround unspecified CUDA directories on Windows [\#15](https://github.com/stotko/stdgpu/pull/15) - cmake,src: Handle format warnings [\#29](https://github.com/stotko/stdgpu/pull/29) - deque,unordered_map,unordered_set,vector: Fix missing typename [\#17](https://github.com/stotko/stdgpu/pull/17) - deque,vector: Remove unreliable validity check in unit test [\#20](https://github.com/stotko/stdgpu/pull/20) - memory: Workaround possible compilation failures [\#26](https://github.com/stotko/stdgpu/pull/26) - mutex: Fix typo in test name [\#21](https://github.com/stotko/stdgpu/pull/21) - unordered_map,unordered_set: Workaround while loop timeouts [\#3](https://github.com/stotko/stdgpu/pull/3) - unordered_map,unordered_set: Fix corner case in bucket computation [\#22](https://github.com/stotko/stdgpu/pull/22) ## [stdgpu 1.0.0](https://github.com/stotko/stdgpu/releases/tag/1.0.0) (2019-08-19) This is the first public version of *stdgpu*, an open-source C++ library providing generic STL-like GPU data structures for fast and reliable data management. The main components of the library are: - **Core**: A collection of core features including configuration and platform management, a simple contract interface as well as a robust memory and iterator concept. - **Container**: A set of robust containers for GPU programming with an STL-like design consisting of sequential and hash-based data structures. - **Utilities**: A variety of utility functions supporting the container component and general GPU programming. stdgpu/CMakeLists.txt000066400000000000000000000205051442573035400151350ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.18...3.26) message(STATUS "Configuring with CMake ${CMAKE_VERSION}") project(stdgpu VERSION 1.3.0 DESCRIPTION "Efficient STL-like Data Structures on the GPU" LANGUAGES CXX) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(STDGPU_SETUP_COMPILER_FLAGS_DEFAULT ON) else() set(STDGPU_SETUP_COMPILER_FLAGS_DEFAULT OFF) endif() option(STDGPU_BUILD_SHARED_LIBS "Builds the project as a shared library, if set to ON, or as a static library, if set to OFF, default: BUILD_SHARED_LIBS" ${BUILD_SHARED_LIBS}) option(STDGPU_SETUP_COMPILER_FLAGS "Constructs the compiler flags, default: ON if standalone, OFF if included via add_subdirectory" ${STDGPU_SETUP_COMPILER_FLAGS_DEFAULT}) option(STDGPU_COMPILE_WARNING_AS_ERROR "Treats compiler warnings as errors, default: OFF" OFF) option(STDGPU_BUILD_EXAMPLES "Build the examples, default: ON" ON) option(STDGPU_BUILD_BENCHMARKS "Build the benchmarks, default: ON" ON) option(STDGPU_BUILD_TESTS "Build the unit tests, default: ON" ON) option(STDGPU_BUILD_TEST_COVERAGE "Build a test coverage report, default: OFF" OFF) option(STDGPU_ANALYZE_WITH_CLANG_TIDY "Analyzes the code with clang-tidy, default: OFF" OFF) option(STDGPU_ANALYZE_WITH_CPPCHECK "Analyzes the code with cppcheck, default: OFF" OFF) set(STDGPU_BACKEND_CUDA "STDGPU_BACKEND_CUDA") set(STDGPU_BACKEND_OPENMP "STDGPU_BACKEND_OPENMP") set(STDGPU_BACKEND_HIP "STDGPU_BACKEND_HIP") list(APPEND STDGPU_BACKEND_OPTIONS ${STDGPU_BACKEND_CUDA} ${STDGPU_BACKEND_OPENMP} ${STDGPU_BACKEND_HIP}) # STDGPU_BACKEND set(STDGPU_BACKEND ${STDGPU_BACKEND_CUDA} CACHE STRING "Device system backend, default: STDGPU_BACKEND_CUDA") if(NOT STDGPU_BACKEND IN_LIST STDGPU_BACKEND_OPTIONS) message(FATAL_ERROR "STDGPU_BACKEND is set to \"${STDGPU_BACKEND}\", but must be one of \"${STDGPU_BACKEND_OPTIONS}\"") endif() # STDGPU_BACKEND_DIRECTORY set(STDGPU_BACKEND_DIRECTORY ${STDGPU_BACKEND}) string(REGEX REPLACE "^STDGPU_BACKEND_" "" STDGPU_BACKEND_DIRECTORY ${STDGPU_BACKEND_DIRECTORY}) string(TOLOWER ${STDGPU_BACKEND_DIRECTORY} STDGPU_BACKEND_DIRECTORY) # STDGPU_BACKEND_NAMESPACE set(STDGPU_BACKEND_NAMESPACE ${STDGPU_BACKEND_DIRECTORY}) # STDGPU_BACKEND_MACRO_NAMESPACE set(STDGPU_BACKEND_MACRO_NAMESPACE ${STDGPU_BACKEND_NAMESPACE}) string(TOUPPER ${STDGPU_BACKEND_MACRO_NAMESPACE} STDGPU_BACKEND_MACRO_NAMESPACE) # Enable backend-specific languages if(STDGPU_BACKEND STREQUAL STDGPU_BACKEND_CUDA) if(DEFINED CMAKE_CUDA_ARCHITECTURES) set(STDGPU_CUDA_ARCHITECTURE_FLAGS_USER ${CMAKE_CUDA_ARCHITECTURES}) endif() enable_language(CUDA) elseif(STDGPU_BACKEND STREQUAL STDGPU_BACKEND_HIP) cmake_minimum_required(VERSION 3.21.3...3.26) if(DEFINED CMAKE_HIP_ARCHITECTURES) set(STDGPU_HIP_ARCHITECTURE_FLAGS_USER ${CMAKE_HIP_ARCHITECTURES}) endif() enable_language(HIP) endif() # Backend-specific modules have higher priority than generic modules list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/${STDGPU_BACKEND_DIRECTORY}") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") if(STDGPU_SETUP_COMPILER_FLAGS) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/${STDGPU_BACKEND_DIRECTORY}/set_device_flags.cmake") stdgpu_set_device_flags(STDGPU_DEVICE_FLAGS) stdgpu_set_test_device_flags(STDGPU_TEST_DEVICE_FLAGS) message(STATUS "Created device flags : ${STDGPU_DEVICE_FLAGS}") message(STATUS "Created test device flags : ${STDGPU_TEST_DEVICE_FLAGS}") if(STDGPU_BACKEND STREQUAL STDGPU_BACKEND_CUDA) if(STDGPU_CUDA_ARCHITECTURE_FLAGS_USER) # CMAKE_CUDA_ARCHITECTURES already set by the user message(STATUS "Detected user-provided CCs : ${STDGPU_CUDA_ARCHITECTURE_FLAGS_USER}") else() stdgpu_cuda_set_architecture_flags(STDGPU_CUDA_ARCHITECTURE_FLAGS) if(STDGPU_CUDA_ARCHITECTURE_FLAGS) set(CMAKE_CUDA_ARCHITECTURES ${STDGPU_CUDA_ARCHITECTURE_FLAGS}) else() message(WARNING "Falling back to default CCs : ${CMAKE_CUDA_ARCHITECTURES}") endif() endif() # Workaround for bug in libstdc++ (see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4442#note_737136) if(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") message(STATUS "Building with disabled CXX extensions") set(CMAKE_CXX_EXTENSIONS OFF) endif() elseif(STDGPU_BACKEND STREQUAL STDGPU_BACKEND_HIP) if(STDGPU_HIP_ARCHITECTURE_FLAGS_USER) # CMAKE_HIP_ARCHITECTURES already set by the user message(STATUS "Detected user-provided CCs : ${STDGPU_HIP_ARCHITECTURE_FLAGS_USER}") else() # NOTE : Architectures could be detected via the "gcnArchName" property message(WARNING "Falling back to default CCs : ${CMAKE_HIP_ARCHITECTURES}") endif() endif() include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/set_host_flags.cmake") stdgpu_set_host_flags(STDGPU_HOST_FLAGS) stdgpu_set_test_host_flags(STDGPU_TEST_HOST_FLAGS) message(STATUS "Created host flags : ${STDGPU_HOST_FLAGS}") message(STATUS "Created test host flags : ${STDGPU_TEST_HOST_FLAGS}") endif() if(STDGPU_BUILD_TESTS AND STDGPU_BUILD_TEST_COVERAGE) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/code_coverage.cmake") append_coverage_compiler_flags() set(COVERAGE_EXCLUDES '*CMake*' '*build/*' '*benchmark/*' '*examples/*' '*external/*' '*test/*' '/usr/*') endif() if(STDGPU_ANALYZE_WITH_CLANG_TIDY) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup_clang_tidy.cmake") stdgpu_setup_clang_tidy(STDGPU_PROPERTY_CLANG_TIDY) endif() if(STDGPU_ANALYZE_WITH_CPPCHECK) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup_cppcheck.cmake") stdgpu_setup_cppcheck(STDGPU_PROPERTY_CPPCHECK) endif() option(STDGPU_ALLOW_NEWER_CLANG_FORMAT_VERSIONS "CAUTION: Allows finding newer versions of clang-format which may produce different results (WILL BE REJECTED), default: OFF" OFF) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup_clang_format.cmake") stdgpu_setup_clang_format() # Setup output directory set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") # Setup install paths include(GNUInstallDirs) set(STDGPU_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) set(STDGPU_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) set(STDGPU_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) set(STDGPU_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/stdgpu") set(STDGPU_DOC_INSTALL_DIR "${CMAKE_INSTALL_DOCDIR}/stdgpu") # External dependencies directory set(STDGPU_EXTERNAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external") add_subdirectory(src) add_subdirectory(doc) # Install exported targets and cmake files install(EXPORT stdgpu-targets NAMESPACE stdgpu:: DESTINATION "${STDGPU_CMAKE_INSTALL_DIR}" COMPONENT stdgpu) include(CMakePackageConfigHelpers) configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/stdgpu-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/stdgpu-config.cmake" INSTALL_DESTINATION ${STDGPU_CMAKE_INSTALL_DIR} PATH_VARS STDGPU_INCLUDE_INSTALL_DIR) write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/stdgpu-config-version.cmake" VERSION ${stdgpu_VERSION} COMPATIBILITY SameMajorVersion) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/stdgpu-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/stdgpu-config-version.cmake" DESTINATION "${STDGPU_CMAKE_INSTALL_DIR}" COMPONENT stdgpu) include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/add_uninstall_target.cmake") if(STDGPU_BUILD_EXAMPLES) enable_testing() add_subdirectory(examples) endif() if(STDGPU_BUILD_BENCHMARKS) add_subdirectory(benchmark) endif() if(STDGPU_BUILD_TESTS) enable_testing() add_subdirectory(test) if(STDGPU_BUILD_TEST_COVERAGE) setup_target_for_coverage(NAME stdgpu_coverage EXECUTABLE ${CMAKE_COMMAND} -E chdir .. sh scripts/run_tests.sh ${CMAKE_BUILD_TYPE} DEPENDENCIES teststdgpu) endif() endif() include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/config_summary.cmake") stdgpu_print_configuration_summary() stdgpu/CONTRIBUTING.md000066400000000000000000000047361442573035400146360ustar00rootroot00000000000000# Contributing Thank you for taking the time to contribute to the project. The following set of guidelines will help you with your contribution and explain the review process. ## Reporting Bugs / Proposing New Features If you discover a bug or want to propose a new feature or enhancement to the code or documentation, please check whether the problem has already been reported in the [Issues](https://github.com/stotko/stdgpu/issues). If not, open a new issue and state the problem. Please provide a clear summary of the problem, what behavior you have expected and what behavior you have actually observed. If possible, create a *Minimal Reproducable Example* that demonstrates the problem. ## Submitting Changes We also highly welcome code contributions via pull requests. Note that your changes - after acceptance - will be offered under the **Apache 2.0** license. For more information, see the [LICENSE](https://github.com/stotko/stdgpu/blob/master/LICENSE). To create and submit your changes, follow the standard *Fork & Pull Request Workflow*: 1. Fork the project and switch to a new suitably named branch. 2. Follow the coding style guidelines. See the [STYLE GUIDE](https://github.com/stotko/stdgpu/blob/master/STYLE_GUIDE.md) for details. 3. Create one or more commits that reflect the changes you have made. Each commit should be self-contained, atomic and buildable. Therefore, split multiple features into different commits and include fixups in the related commit instead of creating a new one. If you add new functionality, please also add related tests. 4. Test the changes on your local machine. For this, the provided scripts will help you to build the code and run the unit tests. See the [README](https://github.com/stotko/stdgpu/blob/master/README.md) for details. 5. Push the branch to your fork. 6. Open a new pull request and summarize the problem and your solution. If there is a related issue, please mention it too. Once you have submitted the pull request, your changes will be reviewed. You will receive feedback in two different forms: 1. **Automatic review**. Each pull request will be automatically tested using *Continuous Integration* tools. If a test fails, take a look at the error and fix the problem. 2. **Manual human review**. In addition, your code will be manually reviewed by the project maintainers. Incorporate their feedback to improve the quality of your contribution. After the review is complete and all tests pass, your pull request will be accepted and merged. stdgpu/LICENSE000066400000000000000000000236761442573035400134160ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS stdgpu/README.md000066400000000000000000000375741442573035400136720ustar00rootroot00000000000000

stdgpu: Efficient STL-like Data Structures on the GPU

Features | Examples | Documentation | Building | Integration | Contributing | License | Contact

## Features stdgpu is an open-source library providing several generic GPU data structures for fast and reliable data management. Multiple platforms such as **CUDA**, **OpenMP**, and **HIP** are supported allowing you to rapidly write highly complex **agnostic** and **native** algorithms that look like sequential CPU code but are executed in parallel on the GPU. - **Productivity**. Previous libraries such as thrust, VexCL, ArrayFire or Boost.Compute focus on the fast and efficient implementation of various algorithms for contiguously stored data to enhance productivity. 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. - **Interoperability**. Instead of providing yet another ecosystem, stdgpu is designed to be a *lightweight container library*. Therefore, a core feature of stdgpu is its interoperability with previous established frameworks, i.e. the thrust library, to enable a *seamless integration* into new as well as existing projects. - **Maintainability**. Following the trend in recent C++ standards of providing functionality for safer and more reliable programming, the philosophy of stdgpu is to provide *clean and familiar functions* with strong guarantees that encourage users to write *more robust code* while giving them full control to achieve a high performance. At its heart, stdgpu offers the following GPU data structures and containers:
atomic & atomic_ref
Atomic primitive types and references
bitset
Space-efficient bit array
deque
Dynamically sized double-ended queue
queue & stack
Container adapters
unordered_map & unordered_set
Hashed collection of unique keys and key-value pairs
vector
Dynamically sized contiguous array
In addition, stdgpu also provides commonly required functionality in [`algorithm`](https://stotko.github.io/stdgpu/algorithm_8h.html), [`bit`](https://stotko.github.io/stdgpu/bit_8h.html), [`contract`](https://stotko.github.io/stdgpu/contract_8h.html), [`cstddef`](https://stotko.github.io/stdgpu/cstddef_8h.html), [`functional`](https://stotko.github.io/stdgpu/functional_8h.html), [`iterator`](https://stotko.github.io/stdgpu/iterator_8h.html), [`limits`](https://stotko.github.io/stdgpu/limits_8h.html), [`memory`](https://stotko.github.io/stdgpu/memory_8h.html), [`mutex`](https://stotko.github.io/stdgpu/mutex_8cuh.html), [`ranges`](https://stotko.github.io/stdgpu/ranges_8h.html), [`utility`](https://stotko.github.io/stdgpu/utility_8h.html) to complement the GPU data structures and to increase their usability and interoperability. ## Examples In 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. For 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. **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: ```cpp #include // stdgpu::index_t #include // stdgpu::make_device #include // stdgpu::unordered_set class stream_set { public: void add_blocks(const short3* blocks, const stdgpu::index_t n) { set.insert(stdgpu::make_device(blocks), stdgpu::make_device(blocks + n)); } // Further functions private: stdgpu::unordered_set set; // Further members }; ``` **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: ```cpp #include // stdgpu::index_t #include // stdgpu::unordered_map #include // stdgpu::unordered_set __global__ void compute_update_set(const short3* blocks, const stdgpu::index_t n, const stdgpu::unordered_map tsdf_block_map, stdgpu::unordered_set mc_update_set) { // Global thread index stdgpu::index_t i = blockIdx.x * blockDim.x + threadIdx.x; if (i >= n) return; short3 b_i = blocks[i]; // Neighboring candidate blocks for the update short3 mc_blocks[8] = { short3(b_i.x - 0, b_i.y - 0, b_i.z - 0), short3(b_i.x - 1, b_i.y - 0, b_i.z - 0), short3(b_i.x - 0, b_i.y - 1, b_i.z - 0), short3(b_i.x - 0, b_i.y - 0, b_i.z - 1), short3(b_i.x - 1, b_i.y - 1, b_i.z - 0), short3(b_i.x - 1, b_i.y - 0, b_i.z - 1), short3(b_i.x - 0, b_i.y - 1, b_i.z - 1), short3(b_i.x - 1, b_i.y - 1, b_i.z - 1), }; for (stdgpu::index_t j = 0; j < 8; ++j) { // Only consider existing neighbors if (tsdf_block_map.contains(mc_blocks[j])) { mc_update_set.insert(mc_blocks[j]); } } } ``` More examples can be found in the [`examples`](https://github.com/stotko/stdgpu/tree/master/examples) directory. ## Documentation A comprehensive introduction into the design and API of stdgpu can be found here: - [stdgpu API documentation](https://stotko.github.io/stdgpu) - [thrust algorithms documentation](https://thrust.github.io/doc/group__algorithms.html) - [Research paper](https://www.researchgate.net/publication/335233070_stdgpu_Efficient_STL-like_Data_Structures_on_the_GPU) Since a core feature and design goal of stdgpu is its **interoperability** with thrust, it offers **full support for all thrust algorithms** instead of reinventing the wheel. More information about the design can be found in the related [research paper](https://www.researchgate.net/publication/335233070_stdgpu_Efficient_STL-like_Data_Structures_on_the_GPU). ## Building Before building the library, please make sure that all required tools and dependencies are installed on your system. Newer versions are supported as well. **Required** - C++17 compiler - GCC 9 - (Ubuntu 20.04/22.04) `sudo apt install g++` - Clang 10 - (Ubuntu 20.04/22.04) `sudo apt install clang` - MSVC 19.20 - (Windows) Visual Studio 2019 https://visualstudio.microsoft.com/downloads/ - CMake 3.18 - (Ubuntu 20.04) https://apt.kitware.com - (Ubuntu 22.04) `sudo apt install cmake` - (Windows) https://cmake.org/download - thrust 1.9.9 - (Ubuntu/Windows) https://github.com/NVIDIA/thrust - May already be installed by backend dependencies **Required for CUDA backend** - CUDA compiler - NVCC - Already included in CUDA Toolkit - Clang 10 - (Ubuntu 20.04/22.04) `sudo apt install clang` - CUDA Toolkit 11.0 - (Ubuntu/Windows) https://developer.nvidia.com/cuda-downloads - Includes thrust **Required for OpenMP backend** - OpenMP 2.0 - GCC 9 - (Ubuntu 20.04/22.04) Already installed - Clang 10 - (Ubuntu 20.04/22.04) `sudo apt install libomp-dev` - MSVC 19.20 - (Windows) Already installed **Required for HIP backend (experimental)** - ROCm 5.1 - (Ubuntu) https://github.com/RadeonOpenCompute/ROCm - Includes thrust - CMake 3.21.3 - (Ubuntu 20.04) https://apt.kitware.com - (Ubuntu 22.04) `sudo apt install cmake` - (Windows) https://cmake.org/download - Required for first-class HIP language support The library can be built as every other project which makes use of the CMake build system. In addition, we also provide cross-platform scripts to make the build process more convenient. Since these scripts depend on the selected build type, there are scripts for both `debug` and `release` builds. Command | Effect --- | --- `bash scripts/setup.sh []` | Performs a full clean build of the project. Removes old build, configures the project (build path: `./build`, default build type: `Release`), builds the project, and runs the unit tests. `bash scripts/build.sh []` | (Re-)Builds the project. Requires that the project is set up (default build type: `Release`). `bash scripts/run_tests.sh []` | Runs the unit tests. Requires that the project is built (default build type: `Release`). `bash scripts/install.sh []` | Installs the project to the configured install path (default install dir: `./bin`, default build type: `Release`). `bash scripts/uninstall.sh []` | Uninstalls the project from the configured install path (default build type: `Release`). ## Integration In the following, we show some examples on how the library can be integrated into and used in a project. **CMake Integration**. To use the library in your project, you can either install it externally first and then include it using `find_package`: ```cmake find_package(stdgpu 1.0.0 REQUIRED) add_library(foo ...) target_link_libraries(foo PUBLIC stdgpu::stdgpu) ``` Or you can embed it into your project and build it from a subdirectory: ```cmake # Exclude the examples from the build set(STDGPU_BUILD_EXAMPLES OFF CACHE INTERNAL "") # Exclude the benchmarks from the build set(STDGPU_BUILD_BENCHMARKS OFF CACHE INTERNAL "") # Exclude the tests from the build set(STDGPU_BUILD_TESTS OFF CACHE INTERNAL "") add_subdirectory(stdgpu) add_library(foo ...) target_link_libraries(foo PUBLIC stdgpu::stdgpu) ``` **CMake Options**. To configure the library, two sets of options are provided. The following build options control the build process: Build Option | Effect | Default --- | --- | --- `STDGPU_BACKEND` | Device system backend | `STDGPU_BACKEND_CUDA` `STDGPU_BUILD_SHARED_LIBS` | Builds the project as a shared library, if set to `ON`, or as a static library, if set to `OFF` | `BUILD_SHARED_LIBS` `STDGPU_SETUP_COMPILER_FLAGS` | Constructs the compiler flags | `ON` if standalone, `OFF` if included via `add_subdirectory` `STDGPU_COMPILE_WARNING_AS_ERROR` | Treats compiler warnings as errors | `OFF` `STDGPU_BUILD_EXAMPLES` | Build the examples | `ON` `STDGPU_BUILD_BENCHMARKS` | Build the benchmarks | `ON` `STDGPU_BUILD_TESTS` | Build the unit tests | `ON` `STDGPU_BUILD_TEST_COVERAGE` | Build a test coverage report | `OFF` `STDGPU_ANALYZE_WITH_CLANG_TIDY` | Analyzes the code with clang-tidy | `OFF` `STDGPU_ANALYZE_WITH_CPPCHECK` | Analyzes the code with cppcheck | `OFF` In addition, the implementation of some functionality can be controlled via configuration options: Configuration Option | Effect | Default --- | --- | --- `STDGPU_ENABLE_CONTRACT_CHECKS` | Enable contract checks | `OFF` if `CMAKE_BUILD_TYPE` equals `Release` or `MinSizeRel`, `ON` otherwise `STDGPU_USE_32_BIT_INDEX` | Use 32-bit instead of 64-bit signed integer for `index_t` | `ON` ## Contributing For detailed information on how to contribute, see [`CONTRIBUTING`](https://github.com/stotko/stdgpu/blob/master/CONTRIBUTING.md). ## License Distributed under the Apache 2.0 License. See [`LICENSE`](https://github.com/stotko/stdgpu/blob/master/LICENSE) for more information. If you use stdgpu in one of your projects, please cite the following publications: [**stdgpu: Efficient STL-like Data Structures on the GPU**](https://www.researchgate.net/publication/335233070_stdgpu_Efficient_STL-like_Data_Structures_on_the_GPU) ``` @UNPUBLISHED{stotko2019stdgpu, author = {Stotko, P.}, title = {{stdgpu: Efficient STL-like Data Structures on the GPU}}, year = {2019}, month = aug, note = {arXiv:1908.05936}, url = {https://arxiv.org/abs/1908.05936} } ``` [**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) ``` @article{stotko2019slamcast, author = {Stotko, P. and Krumpen, S. and Hullin, M. B. and Weinmann, M. and Klein, R.}, title = {{SLAMCast: Large-Scale, Real-Time 3D Reconstruction and Streaming for Immersive Multi-Client Live Telepresence}}, journal = {IEEE Transactions on Visualization and Computer Graphics}, volume = {25}, number = {5}, pages = {2102--2112}, year = {2019}, month = may } ``` ## Contact Patrick Stotko - [stotko@cs.uni-bonn.de](mailto:stotko@cs.uni-bonn.de) stdgpu/STYLE_GUIDE.md000066400000000000000000000016241442573035400145350ustar00rootroot00000000000000# Style Guide The following set of guidelines will help you to make your changes conformant with our coding style. ## Coding Style We use **C++17** throughout the project. Functionality from more recent C++ standards may break compatibility with some of the supported compilers and will be rejected. The source code is formatted according to a modified version of the Mozilla style guide that is specified in `.clang-format` and enforced by version **10** of `clang-format`. In order to automatically apply these rules to the source code, we provide the CMake targets `check_code_style` and `apply_code_style` as well as respective helper scripts: - `scripts/utils/check_code_style.sh` - `scripts/utils/apply_code_style.sh` Note that other versions of `clang-format`, including more recent ones, may produce slightly different results which will also be considered non-conforming and, consequently, rejected. stdgpu/benchmark/000077500000000000000000000000001442573035400143255ustar00rootroot00000000000000stdgpu/benchmark/CMakeLists.txt000066400000000000000000000017211442573035400170660ustar00rootroot00000000000000include(FetchContent) FetchContent_Declare( benchmark PREFIX benchmark URL https://github.com/google/benchmark/archive/refs/tags/v1.7.1.tar.gz URL_HASH SHA256=6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7 DOWNLOAD_DIR "${STDGPU_EXTERNAL_DIR}/benchmark" ) set(BENCHMARK_ENABLE_TESTING OFF CACHE INTERNAL "") set(BENCHMARK_ENABLE_WERROR OFF CACHE INTERNAL "") set(BENCHMARK_ENABLE_INSTALL OFF CACHE INTERNAL "") set(BENCHMARK_ENABLE_DOXYGEN OFF CACHE INTERNAL "") set(BENCHMARK_INSTALL_DOCS OFF CACHE INTERNAL "") FetchContent_MakeAvailable(benchmark) # Suppress clang-tidy errors on benchmark by treating it as a system library # Use SYSTEM in FetchContent_Declare for CMake 3.25+ instead when it becomes available get_target_property(benchmark_INCLUDE_DIRS benchmark INTERFACE_INCLUDE_DIRECTORIES) set_target_properties(benchmark PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${benchmark_INCLUDE_DIRS}") add_subdirectory(stdgpu) stdgpu/benchmark/benchmark_utils.h000066400000000000000000000031251442573035400176510ustar00rootroot00000000000000/* * Copyright 2019 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef BENCHMARK_UTILS_H #define BENCHMARK_UTILS_H #include #include #include #include #include #include namespace benchmark_utils { /** * \brief Returns a seed chosen "truly" at random * \return The randomly chosen seed */ inline std::size_t random_seed() { try { std::random_device rd("/dev/urandom"); // rd.entropy() != 0.0 if (std::abs(rd.entropy()) >= std::numeric_limits::min()) { return rd(); } throw std::runtime_error("Entropy is 0.0"); } // For some reason, the following code fails to compile with NVCC+MSVC using the CUDA backend: // [[maybe_unused]] const std::exception& e // Thus, use the version below to fix unused parameter warnings catch (const std::exception&) { } return static_cast(std::chrono::system_clock::now().time_since_epoch().count()); } } // namespace benchmark_utils #endif // BENCHMARK_UTILS_H stdgpu/benchmark/stdgpu/000077500000000000000000000000001442573035400156335ustar00rootroot00000000000000stdgpu/benchmark/stdgpu/CMakeLists.txt000066400000000000000000000020011442573035400203640ustar00rootroot00000000000000 add_executable(benchmarkstdgpu main.cpp) add_subdirectory(${STDGPU_BACKEND_DIRECTORY}) target_include_directories(benchmarkstdgpu PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..") target_compile_options(benchmarkstdgpu PRIVATE ${STDGPU_DEVICE_FLAGS} ${STDGPU_HOST_FLAGS} ${STDGPU_TEST_DEVICE_FLAGS} ${STDGPU_TEST_HOST_FLAGS}) target_link_libraries(benchmarkstdgpu PRIVATE stdgpu::stdgpu benchmark::benchmark) set_target_properties(benchmarkstdgpu PROPERTIES CXX_CLANG_TIDY "${STDGPU_PROPERTY_CLANG_TIDY}") set_target_properties(benchmarkstdgpu PROPERTIES CXX_CPPCHECK "${STDGPU_PROPERTY_CPPCHECK}") if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) set_target_properties(benchmarkstdgpu PROPERTIES COMPILE_WARNING_AS_ERROR "${STDGPU_COMPILE_WARNING_AS_ERROR}") endif() stdgpu/benchmark/stdgpu/bitset.inc000066400000000000000000000111101442573035400176120ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include void stdgpu_bitset_set(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); bitset.reset(); for (auto _ : state) { bitset.set(); state.PauseTiming(); bitset.reset(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } void stdgpu_bitset_reset(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); bitset.set(); for (auto _ : state) { bitset.reset(); state.PauseTiming(); bitset.set(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } void stdgpu_bitset_flip(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); bitset.set(); for (auto _ : state) { bitset.flip(); state.PauseTiming(); bitset.set(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } void stdgpu_bitset_count(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); benchmark::DoNotOptimize(bitset.count()); for (auto _ : state) { state.PauseTiming(); bitset.set(); state.ResumeTiming(); benchmark::DoNotOptimize(bitset.count()); state.PauseTiming(); bitset.reset(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } void stdgpu_bitset_all(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); benchmark::DoNotOptimize(bitset.all()); for (auto _ : state) { state.PauseTiming(); bitset.set(); state.ResumeTiming(); benchmark::DoNotOptimize(bitset.all()); state.PauseTiming(); bitset.reset(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } void stdgpu_bitset_any(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); benchmark::DoNotOptimize(bitset.any()); for (auto _ : state) { state.PauseTiming(); bitset.set(); state.ResumeTiming(); benchmark::DoNotOptimize(bitset.any()); state.PauseTiming(); bitset.reset(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } void stdgpu_bitset_none(benchmark::State& state, const stdgpu::index_t bitset_size) { stdgpu::bitset<> bitset = stdgpu::bitset<>::createDeviceObject(bitset_size); benchmark::DoNotOptimize(bitset.none()); for (auto _ : state) { state.PauseTiming(); bitset.set(); state.ResumeTiming(); benchmark::DoNotOptimize(bitset.none()); state.PauseTiming(); bitset.reset(); state.ResumeTiming(); } stdgpu::bitset<>::destroyDeviceObject(bitset); } #define STDGPU_REGISTER_BENCHMARK(function) \ BENCHMARK_CAPTURE(function, 1000, 1000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 1000000, 1000000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 1000000000, 1000000000)->Unit(benchmark::kMillisecond); STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_set) STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_reset) STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_flip) STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_count) STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_all) STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_any) STDGPU_REGISTER_BENCHMARK(stdgpu_bitset_none) stdgpu/benchmark/stdgpu/cuda/000077500000000000000000000000001442573035400165475ustar00rootroot00000000000000stdgpu/benchmark/stdgpu/cuda/CMakeLists.txt000066400000000000000000000004641442573035400213130ustar00rootroot00000000000000 target_sources(benchmarkstdgpu PRIVATE bitset.cu deque.cu mutex.cu unordered_map.cu unordered_set.cu vector.cu) stdgpu/benchmark/stdgpu/cuda/bitset.cu000066400000000000000000000011731442573035400203740ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/cuda/deque.cu000066400000000000000000000011721442573035400202040ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/cuda/mutex.cu000066400000000000000000000011721442573035400202430ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/cuda/unordered_map.cu000066400000000000000000000012021442573035400217170ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/cuda/unordered_set.cu000066400000000000000000000012021442573035400217350ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/cuda/vector.cu000066400000000000000000000011731442573035400204040ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/deque.inc000066400000000000000000000161421442573035400174350ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include #include #include #include #include namespace { int* create_values(const stdgpu::index_t N) { // Generate true random numbers size_t seed = benchmark_utils::random_seed(); std::default_random_engine rng(static_cast(seed)); std::uniform_int_distribution dist(std::numeric_limits::lowest(), std::numeric_limits::max()); int* host_values = createHostArray(N); std::generate(host_values, host_values + N, [&dist, &rng]() { return dist(rng); }); int* values = copyCreateHost2DeviceArray(host_values, N); destroyHostArray(host_values); return values; } template class push_back_deque { public: push_back_deque(const stdgpu::deque& pool, T* values) : _pool(pool) , _values(values) { } STDGPU_DEVICE_ONLY void operator()(const stdgpu::index_t i) { _pool.push_back(_values[i]); } private: stdgpu::deque _pool; T* _values; }; template class push_front_deque { public: push_front_deque(const stdgpu::deque& pool, T* values) : _pool(pool) , _values(values) { } STDGPU_DEVICE_ONLY void operator()(const stdgpu::index_t i) { _pool.push_front(_values[i]); } private: stdgpu::deque _pool; T* _values; }; template class pop_back_deque { public: explicit pop_back_deque(const stdgpu::deque& pool) : _pool(pool) { } STDGPU_DEVICE_ONLY void operator()([[maybe_unused]] const stdgpu::index_t i) { _pool.pop_back(); } private: stdgpu::deque _pool; }; template class pop_front_deque { public: explicit pop_front_deque(const stdgpu::deque& pool) : _pool(pool) { } STDGPU_DEVICE_ONLY void operator()([[maybe_unused]] const stdgpu::index_t i) { _pool.pop_front(); } private: stdgpu::deque _pool; }; } // namespace void stdgpu_deque_push_back(benchmark::State& state, const stdgpu::index_t deque_size) { stdgpu::deque d = stdgpu::deque::createDeviceObject(deque_size); int* values = create_values(deque_size); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); d.clear(); for (auto _ : state) { stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); state.PauseTiming(); d.clear(); state.ResumeTiming(); } stdgpu::deque::destroyDeviceObject(d); destroyDeviceArray(values); } void stdgpu_deque_push_front(benchmark::State& state, const stdgpu::index_t deque_size) { stdgpu::deque d = stdgpu::deque::createDeviceObject(deque_size); int* values = create_values(deque_size); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_front_deque(d, values)); d.clear(); for (auto _ : state) { stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_front_deque(d, values)); state.PauseTiming(); d.clear(); state.ResumeTiming(); } stdgpu::deque::destroyDeviceObject(d); destroyDeviceArray(values); } void stdgpu_deque_pop_back(benchmark::State& state, const stdgpu::index_t deque_size) { stdgpu::deque d = stdgpu::deque::createDeviceObject(deque_size); int* values = create_values(deque_size); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); for (auto _ : state) { stdgpu::for_each_index(stdgpu::execution::device, deque_size, pop_back_deque(d)); state.PauseTiming(); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); state.ResumeTiming(); } stdgpu::deque::destroyDeviceObject(d); destroyDeviceArray(values); } void stdgpu_deque_pop_front(benchmark::State& state, const stdgpu::index_t deque_size) { stdgpu::deque d = stdgpu::deque::createDeviceObject(deque_size); int* values = create_values(deque_size); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); for (auto _ : state) { stdgpu::for_each_index(stdgpu::execution::device, deque_size, pop_front_deque(d)); state.PauseTiming(); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); state.ResumeTiming(); } stdgpu::deque::destroyDeviceObject(d); destroyDeviceArray(values); } void stdgpu_deque_clear(benchmark::State& state, const stdgpu::index_t deque_size) { stdgpu::deque d = stdgpu::deque::createDeviceObject(deque_size); int* values = create_values(deque_size); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); for (auto _ : state) { d.clear(); state.PauseTiming(); stdgpu::for_each_index(stdgpu::execution::device, deque_size, push_back_deque(d, values)); state.ResumeTiming(); } stdgpu::deque::destroyDeviceObject(d); destroyDeviceArray(values); } void stdgpu_deque_valid(benchmark::State& state, const stdgpu::index_t deque_size) { stdgpu::deque d = stdgpu::deque::createDeviceObject(deque_size); benchmark::DoNotOptimize(d.valid()); for (auto _ : state) { benchmark::DoNotOptimize(d.valid()); } stdgpu::deque::destroyDeviceObject(d); } #define STDGPU_REGISTER_BENCHMARK(function) \ BENCHMARK_CAPTURE(function, 1000, 1000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 100000, 100000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 10000000, 10000000)->Unit(benchmark::kMillisecond); STDGPU_REGISTER_BENCHMARK(stdgpu_deque_push_back) STDGPU_REGISTER_BENCHMARK(stdgpu_deque_push_front) STDGPU_REGISTER_BENCHMARK(stdgpu_deque_pop_back) STDGPU_REGISTER_BENCHMARK(stdgpu_deque_pop_front) // clear is significantly faster than non-measured push_back #if STDGPU_BACKEND != STDGPU_BACKEND_OPENMP STDGPU_REGISTER_BENCHMARK(stdgpu_deque_clear) #endif STDGPU_REGISTER_BENCHMARK(stdgpu_deque_valid) stdgpu/benchmark/stdgpu/hip/000077500000000000000000000000001442573035400164135ustar00rootroot00000000000000stdgpu/benchmark/stdgpu/hip/CMakeLists.txt000066400000000000000000000004721442573035400211560ustar00rootroot00000000000000 target_sources(benchmarkstdgpu PRIVATE bitset.hip deque.hip mutex.hip unordered_map.hip unordered_set.hip vector.hip) stdgpu/benchmark/stdgpu/hip/bitset.hip000066400000000000000000000011731442573035400204110ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/hip/deque.hip000066400000000000000000000011721442573035400202210ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/hip/mutex.hip000066400000000000000000000011721442573035400202600ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/hip/unordered_map.hip000066400000000000000000000012021442573035400217340ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/hip/unordered_set.hip000066400000000000000000000012021442573035400217520ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/hip/vector.hip000066400000000000000000000011731442573035400204210ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/main.cpp000066400000000000000000000070011442573035400172610ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include #include #include #include int main(int argc, char* argv[]) { // Print header std::string project_name = "stdgpu"; std::string project_version = STDGPU_VERSION_STRING; const int title_total_width = 57; int title_size = static_cast(project_name.size()) + static_cast(project_version.size()) + 1; int title_space_left = std::max(1, (title_total_width - title_size) / 2); int title_space_right = std::max(1, title_total_width - title_size - title_space_left); std::string title = project_name + " " + project_version; printf("+---------------------------------------------------------+\n"); printf("| |\n"); printf("|%*s%*s%*s|\n", title_space_left, " ", title_size, title.c_str(), title_space_right, " "); printf("| |\n"); printf("+---------------------------------------------------------+\n"); printf("\n"); stdgpu::print_device_information(); ::benchmark::Initialize(&argc, argv); ::benchmark::RunSpecifiedBenchmarks(); ::benchmark::Shutdown(); // Print footer printf("\n"); printf("+---------------------------------------------------------+\n"); printf("| Memory Usage : #Created / #Destroyed (#Leaks) |\n"); printf("| Device %6" STDGPU_PRIINDEX64 " / %6" STDGPU_PRIINDEX64 " (%6" STDGPU_PRIINDEX64 ") |\n", stdgpu::get_allocation_count(stdgpu::dynamic_memory_type::device), stdgpu::get_deallocation_count(stdgpu::dynamic_memory_type::device), stdgpu::get_allocation_count(stdgpu::dynamic_memory_type::device) - stdgpu::get_deallocation_count(stdgpu::dynamic_memory_type::device)); printf("| Host %6" STDGPU_PRIINDEX64 " / %6" STDGPU_PRIINDEX64 " (%6" STDGPU_PRIINDEX64 ") |\n", stdgpu::get_allocation_count(stdgpu::dynamic_memory_type::host), stdgpu::get_deallocation_count(stdgpu::dynamic_memory_type::host), stdgpu::get_allocation_count(stdgpu::dynamic_memory_type::host) - stdgpu::get_deallocation_count(stdgpu::dynamic_memory_type::host)); printf("| Managed %6" STDGPU_PRIINDEX64 " / %6" STDGPU_PRIINDEX64 " (%6" STDGPU_PRIINDEX64 ") |\n", stdgpu::get_allocation_count(stdgpu::dynamic_memory_type::managed), stdgpu::get_deallocation_count(stdgpu::dynamic_memory_type::managed), stdgpu::get_allocation_count(stdgpu::dynamic_memory_type::managed) - stdgpu::get_deallocation_count(stdgpu::dynamic_memory_type::managed)); printf("+---------------------------------------------------------+\n"); return EXIT_SUCCESS; } stdgpu/benchmark/stdgpu/mutex.inc000066400000000000000000000027711442573035400174770ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include void stdgpu_mutex_valid(benchmark::State& state, const stdgpu::index_t locks_size) { stdgpu::mutex_array<> locks = stdgpu::mutex_array<>::createDeviceObject(locks_size); benchmark::DoNotOptimize(locks.valid()); for (auto _ : state) { benchmark::DoNotOptimize(locks.valid()); } stdgpu::mutex_array<>::destroyDeviceObject(locks); } #define STDGPU_REGISTER_BENCHMARK(function) \ BENCHMARK_CAPTURE(function, 1000, 1000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 100000, 100000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 10000000, 10000000)->Unit(benchmark::kMillisecond); STDGPU_REGISTER_BENCHMARK(stdgpu_mutex_valid) stdgpu/benchmark/stdgpu/openmp/000077500000000000000000000000001442573035400171315ustar00rootroot00000000000000stdgpu/benchmark/stdgpu/openmp/CMakeLists.txt000066400000000000000000000004721442573035400216740ustar00rootroot00000000000000 target_sources(benchmarkstdgpu PRIVATE bitset.cpp deque.cpp mutex.cpp unordered_map.cpp unordered_set.cpp vector.cpp) stdgpu/benchmark/stdgpu/openmp/bitset.cpp000066400000000000000000000011731442573035400211310ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/openmp/deque.cpp000066400000000000000000000011721442573035400207410ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/openmp/mutex.cpp000066400000000000000000000011721442573035400210000ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/openmp/unordered_map.cpp000066400000000000000000000012021442573035400224540ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/openmp/unordered_set.cpp000066400000000000000000000012021442573035400224720ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/openmp/vector.cpp000066400000000000000000000011731442573035400211410ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include stdgpu/benchmark/stdgpu/unordered_datastructure.inc000066400000000000000000000210521442573035400232670ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS #error "Class name for benchmark not specified!" #endif #ifndef STDGPU_UNORDERED_DATASTRUCTURE_TYPE #error "Data structure type not specified!" #endif #ifndef STDGPU_UNORDERED_DATASTRUCTURE_KEY2VALUE #error "Key to Value conversion not specified!" #endif #ifndef STDGPU_UNORDERED_DATASTRUCTURE_VALUE2KEY #error "Value to Key conversion not specified!" #endif #include #include #include #include #include #include #include #include #include // convenience wrapper to improve readability using benchmark_unordered_datastructure = STDGPU_UNORDERED_DATASTRUCTURE_TYPE; namespace { class Key2ValueFunctor { public: Key2ValueFunctor(benchmark_unordered_datastructure::key_type* keys, benchmark_unordered_datastructure::value_type* values) : _keys(keys) , _values(values) { } STDGPU_HOST_DEVICE void operator()(const stdgpu::index_t i) { stdgpu::construct_at(&(_values[i]), STDGPU_UNORDERED_DATASTRUCTURE_KEY2VALUE(_keys[i])); } private: benchmark_unordered_datastructure::key_type* _keys; benchmark_unordered_datastructure::value_type* _values; }; benchmark_unordered_datastructure::value_type* create_values(const stdgpu::index_t N) { // Generate true random numbers size_t seed = benchmark_utils::random_seed(); std::default_random_engine rng(static_cast(seed)); std::uniform_int_distribution dist(std::numeric_limits::lowest(), std::numeric_limits::max()); benchmark_unordered_datastructure::key_type* host_keys = createHostArray(N); std::generate(host_keys, host_keys + N, [&dist, &rng]() { return benchmark_unordered_datastructure::key_type(dist(rng), dist(rng), dist(rng)); }); benchmark_unordered_datastructure::key_type* keys = copyCreateHost2DeviceArray(host_keys, N); destroyHostArray(host_keys); benchmark_unordered_datastructure::value_type* values = createDeviceArray(N); stdgpu::for_each_index(stdgpu::execution::device, N, Key2ValueFunctor(keys, values)); destroyDeviceArray(keys); return values; } class Value2KeyFunctor { public: Value2KeyFunctor(benchmark_unordered_datastructure::key_type* keys, benchmark_unordered_datastructure::value_type* values) : _keys(keys) , _values(values) { } STDGPU_HOST_DEVICE void operator()(const stdgpu::index_t i) const { _keys[i] = STDGPU_UNORDERED_DATASTRUCTURE_VALUE2KEY(_values[i]); } private: benchmark_unordered_datastructure::key_type* _keys; benchmark_unordered_datastructure::value_type* _values; }; benchmark_unordered_datastructure::key_type* extract_keys(benchmark_unordered_datastructure::value_type* values, const stdgpu::index_t N) { benchmark_unordered_datastructure::key_type* keys = createDeviceArray(N); stdgpu::for_each_index(stdgpu::execution::device, N, Value2KeyFunctor(keys, values)); return keys; } } // namespace void STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _insert)(benchmark::State& state, const stdgpu::index_t unordered_size) { // Use larger container to avoid unlikely but possible overflow of excess list benchmark_unordered_datastructure u = benchmark_unordered_datastructure::createDeviceObject(2 * unordered_size); benchmark_unordered_datastructure::value_type* values = create_values(unordered_size); u.insert(stdgpu::device_begin(values), stdgpu::device_end(values)); u.clear(); for (auto _ : state) { u.insert(stdgpu::device_begin(values), stdgpu::device_end(values)); state.PauseTiming(); u.clear(); state.ResumeTiming(); } benchmark_unordered_datastructure::destroyDeviceObject(u); destroyDeviceArray(values); } void STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _erase)(benchmark::State& state, const stdgpu::index_t unordered_size) { // Use larger container to avoid unlikely but possible overflow of excess list benchmark_unordered_datastructure u = benchmark_unordered_datastructure::createDeviceObject(2 * unordered_size); benchmark_unordered_datastructure::value_type* values = create_values(unordered_size); benchmark_unordered_datastructure::key_type* keys = extract_keys(values, unordered_size); u.insert(stdgpu::device_begin(values), stdgpu::device_end(values)); for (auto _ : state) { u.erase(stdgpu::device_begin(keys), stdgpu::device_end(keys)); state.PauseTiming(); u.insert(stdgpu::device_begin(values), stdgpu::device_end(values)); state.ResumeTiming(); } benchmark_unordered_datastructure::destroyDeviceObject(u); destroyDeviceArray(values); destroyDeviceArray(keys); } void STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _clear)(benchmark::State& state, const stdgpu::index_t unordered_size) { // Use larger container to avoid unlikely but possible overflow of excess list benchmark_unordered_datastructure u = benchmark_unordered_datastructure::createDeviceObject(2 * unordered_size); benchmark_unordered_datastructure::value_type* values = create_values(unordered_size); u.insert(stdgpu::device_begin(values), stdgpu::device_end(values)); for (auto _ : state) { u.clear(); state.PauseTiming(); u.insert(stdgpu::device_begin(values), stdgpu::device_end(values)); state.ResumeTiming(); } benchmark_unordered_datastructure::destroyDeviceObject(u); destroyDeviceArray(values); } void STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _valid)(benchmark::State& state, const stdgpu::index_t vector_size) { benchmark_unordered_datastructure u = benchmark_unordered_datastructure::createDeviceObject(vector_size); benchmark::DoNotOptimize(u.valid()); for (auto _ : state) { benchmark::DoNotOptimize(u.valid()); } benchmark_unordered_datastructure::destroyDeviceObject(u); } #define STDGPU_REGISTER_BENCHMARK(function) \ BENCHMARK_CAPTURE(function, 1000, 1000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 100000, 100000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 10000000, 10000000)->Unit(benchmark::kMillisecond); STDGPU_REGISTER_BENCHMARK(STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _insert)) STDGPU_REGISTER_BENCHMARK(STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _erase)) // clear is significantly faster than non-measured insert #if STDGPU_BACKEND != STDGPU_BACKEND_OPENMP STDGPU_REGISTER_BENCHMARK(STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _clear)) #endif STDGPU_REGISTER_BENCHMARK(STDGPU_DETAIL_CAT2(STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS, _valid)) stdgpu/benchmark/stdgpu/unordered_map.inc000066400000000000000000000060341442573035400211550ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include struct dummy { // no data in dummy }; struct vec3int16 { vec3int16() = default; STDGPU_HOST_DEVICE vec3int16(const std::int16_t new_x, const std::int16_t new_y, const std::int16_t new_z) : x(new_x) , y(new_y) , z(new_z) { } std::int16_t x = 0; // NOLINT(misc-non-private-member-variables-in-classes) std::int16_t y = 0; // NOLINT(misc-non-private-member-variables-in-classes) std::int16_t z = 0; // NOLINT(misc-non-private-member-variables-in-classes) }; inline STDGPU_HOST_DEVICE bool operator==(const vec3int16& lhs, const vec3int16& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z; } struct less { inline STDGPU_HOST_DEVICE bool operator()(const vec3int16& lhs, const vec3int16& rhs) const { if (lhs.x < rhs.x) { return true; } if (lhs.x > rhs.x) { return false; } if (lhs.y < rhs.y) { return true; } if (lhs.y > rhs.y) { return false; } if (lhs.z < rhs.z) { return true; } if (lhs.z > rhs.z) { return false; } return true; } }; struct vec_hash { inline STDGPU_HOST_DEVICE std::size_t operator()(const vec3int16& key) const { const std::size_t prime_x = static_cast(73856093U); const std::size_t prime_y = static_cast(19349669U); const std::size_t prime_z = static_cast(83492791U); return (static_cast(key.x) * prime_x) ^ (static_cast(key.y) * prime_y) ^ (static_cast(key.z) * prime_z); } }; inline STDGPU_HOST_DEVICE stdgpu::unordered_map::value_type key_to_value(const vec3int16& key) { return { key, dummy() }; } inline STDGPU_HOST_DEVICE vec3int16 value_to_key(const stdgpu::unordered_map::value_type& value) { return value.first; } #define STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS stdgpu_unordered_map #define STDGPU_UNORDERED_DATASTRUCTURE_TYPE stdgpu::unordered_map #define STDGPU_UNORDERED_DATASTRUCTURE_KEY2VALUE key_to_value #define STDGPU_UNORDERED_DATASTRUCTURE_VALUE2KEY value_to_key #include "unordered_datastructure.inc" stdgpu/benchmark/stdgpu/unordered_set.inc000066400000000000000000000056151442573035400211770ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include struct vec3int16 { vec3int16() = default; STDGPU_HOST_DEVICE vec3int16(const std::int16_t new_x, const std::int16_t new_y, const std::int16_t new_z) : x(new_x) , y(new_y) , z(new_z) { } std::int16_t x = 0; // NOLINT(misc-non-private-member-variables-in-classes) std::int16_t y = 0; // NOLINT(misc-non-private-member-variables-in-classes) std::int16_t z = 0; // NOLINT(misc-non-private-member-variables-in-classes) }; inline STDGPU_HOST_DEVICE bool operator==(const vec3int16& lhs, const vec3int16& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z; } struct less { inline STDGPU_HOST_DEVICE bool operator()(const vec3int16& lhs, const vec3int16& rhs) const { if (lhs.x < rhs.x) { return true; } if (lhs.x > rhs.x) { return false; } if (lhs.y < rhs.y) { return true; } if (lhs.y > rhs.y) { return false; } if (lhs.z < rhs.z) { return true; } if (lhs.z > rhs.z) { return false; } return true; } }; struct vec_hash { using is_transparent = void; inline STDGPU_HOST_DEVICE std::size_t operator()(const vec3int16& key) const { const std::size_t prime_x = static_cast(73856093U); const std::size_t prime_y = static_cast(19349669U); const std::size_t prime_z = static_cast(83492791U); return (static_cast(key.x) * prime_x) ^ (static_cast(key.y) * prime_y) ^ (static_cast(key.z) * prime_z); } }; inline STDGPU_HOST_DEVICE vec3int16 key_to_value(const vec3int16& key) { return key; } inline STDGPU_HOST_DEVICE vec3int16 value_to_key(const vec3int16& key) { return key; } #define STDGPU_UNORDERED_DATASTRUCTURE_BENCHMARK_CLASS stdgpu_unordered_set #define STDGPU_UNORDERED_DATASTRUCTURE_TYPE stdgpu::unordered_set #define STDGPU_UNORDERED_DATASTRUCTURE_KEY2VALUE key_to_value #define STDGPU_UNORDERED_DATASTRUCTURE_VALUE2KEY value_to_key #include "unordered_datastructure.inc" stdgpu/benchmark/stdgpu/vector.inc000066400000000000000000000145501442573035400176350ustar00rootroot00000000000000/* * Copyright 2022 Patrick Stotko * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include #include #include #include #include namespace { int* create_values(const stdgpu::index_t N) { // Generate true random numbers size_t seed = benchmark_utils::random_seed(); std::default_random_engine rng(static_cast(seed)); std::uniform_int_distribution dist(std::numeric_limits::lowest(), std::numeric_limits::max()); int* host_values = createHostArray(N); std::generate(host_values, host_values + N, [&dist, &rng]() { return dist(rng); }); int* values = copyCreateHost2DeviceArray(host_values, N); destroyHostArray(host_values); return values; } template class push_back_vector { public: push_back_vector(const stdgpu::vector& pool, T* values) : _pool(pool) , _values(values) { } STDGPU_DEVICE_ONLY void operator()(const stdgpu::index_t i) { _pool.push_back(_values[i]); } private: stdgpu::vector _pool; T* _values; }; template class pop_back_vector { public: explicit pop_back_vector(const stdgpu::vector& pool) : _pool(pool) { } STDGPU_DEVICE_ONLY void operator()([[maybe_unused]] const stdgpu::index_t i) { _pool.pop_back(); } private: stdgpu::vector _pool; }; } // namespace void stdgpu_vector_insert(benchmark::State& state, const stdgpu::index_t vector_size) { stdgpu::vector v = stdgpu::vector::createDeviceObject(vector_size); int* values = create_values(vector_size); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); v.clear(); for (auto _ : state) { v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); state.PauseTiming(); v.clear(); state.ResumeTiming(); } stdgpu::vector::destroyDeviceObject(v); destroyDeviceArray(values); } void stdgpu_vector_erase(benchmark::State& state, const stdgpu::index_t vector_size) { stdgpu::vector v = stdgpu::vector::createDeviceObject(vector_size); int* values = create_values(vector_size); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); for (auto _ : state) { v.erase(v.device_begin(), v.device_end()); state.PauseTiming(); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); state.ResumeTiming(); } stdgpu::vector::destroyDeviceObject(v); destroyDeviceArray(values); } void stdgpu_vector_push_back(benchmark::State& state, const stdgpu::index_t vector_size) { stdgpu::vector v = stdgpu::vector::createDeviceObject(vector_size); int* values = create_values(vector_size); stdgpu::for_each_index(stdgpu::execution::device, vector_size, push_back_vector(v, values)); v.clear(); for (auto _ : state) { stdgpu::for_each_index(stdgpu::execution::device, vector_size, push_back_vector(v, values)); state.PauseTiming(); v.clear(); state.ResumeTiming(); } stdgpu::vector::destroyDeviceObject(v); destroyDeviceArray(values); } void stdgpu_vector_pop_back(benchmark::State& state, const stdgpu::index_t vector_size) { stdgpu::vector v = stdgpu::vector::createDeviceObject(vector_size); int* values = create_values(vector_size); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); for (auto _ : state) { stdgpu::for_each_index(stdgpu::execution::device, vector_size, pop_back_vector(v)); state.PauseTiming(); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); state.ResumeTiming(); } stdgpu::vector::destroyDeviceObject(v); destroyDeviceArray(values); } void stdgpu_vector_clear(benchmark::State& state, const stdgpu::index_t vector_size) { stdgpu::vector v = stdgpu::vector::createDeviceObject(vector_size); int* values = create_values(vector_size); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); for (auto _ : state) { v.clear(); state.PauseTiming(); v.insert(v.device_end(), stdgpu::device_begin(values), stdgpu::device_end(values)); state.ResumeTiming(); } stdgpu::vector::destroyDeviceObject(v); destroyDeviceArray(values); } void stdgpu_vector_valid(benchmark::State& state, const stdgpu::index_t vector_size) { stdgpu::vector v = stdgpu::vector::createDeviceObject(vector_size); benchmark::DoNotOptimize(v.valid()); for (auto _ : state) { benchmark::DoNotOptimize(v.valid()); } stdgpu::vector::destroyDeviceObject(v); } #define STDGPU_REGISTER_BENCHMARK(function) \ BENCHMARK_CAPTURE(function, 1000, 1000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 100000, 100000)->Unit(benchmark::kMillisecond); \ BENCHMARK_CAPTURE(function, 10000000, 10000000)->Unit(benchmark::kMillisecond); STDGPU_REGISTER_BENCHMARK(stdgpu_vector_insert) STDGPU_REGISTER_BENCHMARK(stdgpu_vector_erase) STDGPU_REGISTER_BENCHMARK(stdgpu_vector_push_back) STDGPU_REGISTER_BENCHMARK(stdgpu_vector_pop_back) // clear is significantly faster than non-measured insert #if STDGPU_BACKEND != STDGPU_BACKEND_OPENMP STDGPU_REGISTER_BENCHMARK(stdgpu_vector_clear) #endif STDGPU_REGISTER_BENCHMARK(stdgpu_vector_valid) stdgpu/cmake/000077500000000000000000000000001442573035400134535ustar00rootroot00000000000000stdgpu/cmake/FindClangFormat.cmake000066400000000000000000000016731442573035400174620ustar00rootroot00000000000000 find_program(CLANG_FORMAT_EXECUTABLE NAMES "clang-format-10" # Prefer exact version "clang-format") if(CLANG_FORMAT_EXECUTABLE) execute_process(COMMAND "${CLANG_FORMAT_EXECUTABLE}" "--version" OUTPUT_VARIABLE CLANG_FORMAT_VERSION_TEXT) string(REGEX MATCH "clang-format version ([^\n]*)" CLANG_FORMAT_VERSION_TEXT_CUT "${CLANG_FORMAT_VERSION_TEXT}") set(CLANG_FORMAT_VERSION "${CMAKE_MATCH_1}") unset(CLANG_FORMAT_VERSION_TEXT_CUT) unset(CLANG_FORMAT_VERSION_TEXT) endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ClangFormat REQUIRED_VARS CLANG_FORMAT_EXECUTABLE VERSION_VAR CLANG_FORMAT_VERSION) if(ClangFormat_FOUND) add_executable(ClangFormat::ClangFormat IMPORTED) set_target_properties(ClangFormat::ClangFormat PROPERTIES IMPORTED_LOCATION "${CLANG_FORMAT_EXECUTABLE}") endif() stdgpu/cmake/FindClangTidy.cmake000066400000000000000000000015271442573035400171410ustar00rootroot00000000000000 find_program(CLANG_TIDY_EXECUTABLE NAMES "clang-tidy") if(CLANG_TIDY_EXECUTABLE) execute_process(COMMAND "${CLANG_TIDY_EXECUTABLE}" "--version" OUTPUT_VARIABLE CLANG_TIDY_VERSION_TEXT) string(REGEX MATCH "LLVM version ([^\n]*)" CLANG_TIDY_VERSION_TEXT_CUT "${CLANG_TIDY_VERSION_TEXT}") set(CLANG_TIDY_VERSION "${CMAKE_MATCH_1}") unset(CLANG_TIDY_VERSION_TEXT_CUT) unset(CLANG_TIDY_VERSION_TEXT) endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ClangTidy REQUIRED_VARS CLANG_TIDY_EXECUTABLE VERSION_VAR CLANG_TIDY_VERSION) if(ClangTidy_FOUND) add_executable(ClangTidy::ClangTidy IMPORTED) set_target_properties(ClangTidy::ClangTidy PROPERTIES IMPORTED_LOCATION "${CLANG_TIDY_EXECUTABLE}") endif() stdgpu/cmake/FindCppcheck.cmake000066400000000000000000000014641442573035400170030ustar00rootroot00000000000000 find_program(CPPCHECK_EXECUTABLE NAMES "cppcheck") if(CPPCHECK_EXECUTABLE) execute_process(COMMAND "${CPPCHECK_EXECUTABLE}" "--version" OUTPUT_VARIABLE CPPCHECK_VERSION_TEXT) string(REGEX MATCH "^Cppcheck ([^\n]*)" CPPCHECK_VERSION_TEXT_CUT "${CPPCHECK_VERSION_TEXT}") set(CPPCHECK_VERSION "${CMAKE_MATCH_1}") unset(CPPCHECK_VERSION_TEXT_CUT) unset(CPPCHECK_VERSION_TEXT) endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Cppcheck REQUIRED_VARS CPPCHECK_EXECUTABLE VERSION_VAR CPPCHECK_VERSION) if(Cppcheck_FOUND) add_executable(Cppcheck::Cppcheck IMPORTED) set_target_properties(Cppcheck::Cppcheck PROPERTIES IMPORTED_LOCATION "${CPPCHECK_EXECUTABLE}") endif() stdgpu/cmake/Findthrust.cmake000066400000000000000000000027421442573035400166140ustar00rootroot00000000000000include("${CMAKE_CURRENT_LIST_DIR}/${STDGPU_BACKEND_DIRECTORY}/determine_thrust_paths.cmake") stdgpu_determine_thrust_paths(STDGPU_THRUST_PATHS) find_path(THRUST_INCLUDE_DIR HINTS ${STDGPU_THRUST_PATHS} NAMES "thrust/version.h") if(THRUST_INCLUDE_DIR) file(STRINGS "${THRUST_INCLUDE_DIR}/thrust/version.h" THRUST_VERSION_STRING REGEX "#define THRUST_VERSION[ \t]+([0-9x]+)") string(REGEX REPLACE "#define THRUST_VERSION[ \t]+" "" THRUST_VERSION_STRING ${THRUST_VERSION_STRING}) math(EXPR THRUST_VERSION_MAJOR "${THRUST_VERSION_STRING} / 100000") math(EXPR THRUST_VERSION_MINOR "(${THRUST_VERSION_STRING} / 100) % 1000") math(EXPR THRUST_VERSION_PATCH "${THRUST_VERSION_STRING} % 100") unset(THRUST_VERSION_STRING) set(THRUST_VERSION "${THRUST_VERSION_MAJOR}.${THRUST_VERSION_MINOR}.${THRUST_VERSION_PATCH}") endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(thrust REQUIRED_VARS THRUST_INCLUDE_DIR VERSION_VAR THRUST_VERSION) if(thrust_FOUND) add_library(thrust::thrust INTERFACE IMPORTED) set_target_properties(thrust::thrust PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${THRUST_INCLUDE_DIR}") mark_as_advanced(THRUST_INCLUDE_DIR THRUST_VERSION THRUST_VERSION_MAJOR THRUST_VERSION_MINOR THRUST_VERSION_PATCH) endif() stdgpu/cmake/add_uninstall_target.cmake000066400000000000000000000006331442573035400206460ustar00rootroot00000000000000# https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake # uninstall target if(NOT TARGET uninstall) configure_file( "${CMAKE_CURRENT_LIST_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) endif() stdgpu/cmake/cmake_uninstall.cmake.in000066400000000000000000000016621442573035400202400ustar00rootroot00000000000000# https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") endif() file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) string(REGEX REPLACE "\n" ";" files "${files}") foreach(file ${files}) message(STATUS "Uninstalling $ENV{DESTDIR}${file}") if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") exec_program( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) if(NOT "${rm_retval}" STREQUAL 0) message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") endif() else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") message(STATUS "File $ENV{DESTDIR}${file} does not exist.") endif() endforeach() stdgpu/cmake/code_coverage.cmake000066400000000000000000000226511442573035400172500ustar00rootroot00000000000000# Copyright (c) 2012 - 2017, Lars Bilke # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # 3. Neither the name of the copyright holder nor the names of its contributors # may be used to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # CHANGES: # # 2012-01-31, Lars Bilke # - Enable Code Coverage # # 2013-09-17, Joakim Söderberg # - Added support for Clang. # - Some additional usage instructions. # # 2016-02-03, Lars Bilke # - Refactored functions to use named parameters # # 2017-06-02, Lars Bilke # - Merged with modified version from github.com/ufz/ogs # # # USAGE: # # 1. Copy this file into your cmake modules path. # # 2. Add the following line to your CMakeLists.txt: # include(CodeCoverage) # # 3. Append necessary compiler flags: # APPEND_COVERAGE_COMPILER_FLAGS() # # 4. If you need to exclude additional directories from the report, specify them # using the COVERAGE_EXCLUDES variable before calling SETUP_TARGET_FOR_COVERAGE. # Example: # set(COVERAGE_EXCLUDES 'dir1/*' 'dir2/*') # # 5. Use the functions described below to create a custom make target which # runs your test executable and produces a code coverage report. # # 6. Build a Debug build: # cmake -DCMAKE_BUILD_TYPE=Debug .. # make # make my_coverage_target # include(CMakeParseArguments) # Check prereqs find_program( GCOV_PATH gcov ) find_program( LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl) find_program( GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat ) find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test) find_program( SIMPLE_PYTHON_EXECUTABLE python ) if(NOT GCOV_PATH) message(FATAL_ERROR "gcov not found! Aborting...") endif() # NOT GCOV_PATH if("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang") if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3) message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...") endif() elseif(NOT CMAKE_COMPILER_IS_GNUCXX) message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...") endif() set(COVERAGE_COMPILER_FLAGS "-g -O0 --coverage -fprofile-arcs -ftest-coverage" CACHE INTERNAL "") set(CMAKE_CXX_FLAGS_COVERAGE ${COVERAGE_COMPILER_FLAGS} CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE ) set(CMAKE_C_FLAGS_COVERAGE ${COVERAGE_COMPILER_FLAGS} CACHE STRING "Flags used by the C compiler during coverage builds." FORCE ) set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "" CACHE STRING "Flags used for linking binaries during coverage builds." FORCE ) set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "" CACHE STRING "Flags used by the shared libraries linker during coverage builds." FORCE ) mark_as_advanced( CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_COVERAGE CMAKE_SHARED_LINKER_FLAGS_COVERAGE ) if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading") endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug" if(CMAKE_C_COMPILER_ID STREQUAL "GNU") link_libraries(gcov) else() set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") endif() # Defines a target for running and collection code coverage information # Builds dependencies, runs the given executable and outputs reports. # NOTE! The executable should always have a ZERO as exit code otherwise # the coverage generation will not complete. # # SETUP_TARGET_FOR_COVERAGE( # NAME testrunner_coverage # New target name # EXECUTABLE testrunner -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR # DEPENDENCIES testrunner # Dependencies to build first # ) function(SETUP_TARGET_FOR_COVERAGE) set(options NONE) set(oneValueArgs NAME) set(multiValueArgs EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES) cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT LCOV_PATH) message(FATAL_ERROR "lcov not found! Aborting...") endif() # NOT LCOV_PATH if(NOT GENHTML_PATH) message(FATAL_ERROR "genhtml not found! Aborting...") endif() # NOT GENHTML_PATH # Setup target add_custom_target(${Coverage_NAME} # Cleanup lcov COMMAND ${LCOV_PATH} --directory . --zerocounters # Create baseline to make sure untouched files show up in the report COMMAND ${LCOV_PATH} -c -i -d . -o ${Coverage_NAME}.base # Run tests COMMAND ${Coverage_EXECUTABLE} # Capturing lcov counters and generating report COMMAND ${LCOV_PATH} --directory . --capture --output-file ${Coverage_NAME}.info # add baseline counters COMMAND ${LCOV_PATH} -a ${Coverage_NAME}.base -a ${Coverage_NAME}.info --output-file ${Coverage_NAME}.total COMMAND ${LCOV_PATH} --remove ${Coverage_NAME}.total ${COVERAGE_EXCLUDES} --output-file ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned COMMAND ${GENHTML_PATH} -o ${Coverage_NAME} ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned # Modification: Keep cleaned version COMMAND ${CMAKE_COMMAND} -E remove ${Coverage_NAME}.base ${Coverage_NAME}.total ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info COMMAND ${CMAKE_COMMAND} -E rename ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info WORKING_DIRECTORY ${PROJECT_BINARY_DIR} DEPENDS ${Coverage_DEPENDENCIES} COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report." ) # Show where to find the lcov info report add_custom_command(TARGET ${Coverage_NAME} POST_BUILD COMMAND ; COMMENT "Lcov code coverage info report saved in ${Coverage_NAME}.info." ) # Show info where to find the report add_custom_command(TARGET ${Coverage_NAME} POST_BUILD COMMAND ; COMMENT "Open ./${Coverage_NAME}/index.html in your browser to view the coverage report." ) endfunction() # SETUP_TARGET_FOR_COVERAGE # Defines a target for running and collection code coverage information # Builds dependencies, runs the given executable and outputs reports. # NOTE! The executable should always have a ZERO as exit code otherwise # the coverage generation will not complete. # # SETUP_TARGET_FOR_COVERAGE_COBERTURA( # NAME ctest_coverage # New target name # EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR # DEPENDENCIES executable_target # Dependencies to build first # ) function(SETUP_TARGET_FOR_COVERAGE_COBERTURA) set(options NONE) set(oneValueArgs NAME) set(multiValueArgs EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES) cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT SIMPLE_PYTHON_EXECUTABLE) message(FATAL_ERROR "python not found! Aborting...") endif() # NOT SIMPLE_PYTHON_EXECUTABLE if(NOT GCOVR_PATH) message(FATAL_ERROR "gcovr not found! Aborting...") endif() # NOT GCOVR_PATH # Combine excludes to several -e arguments set(COBERTURA_EXCLUDES "") foreach(EXCLUDE ${COVERAGE_EXCLUDES}) set(COBERTURA_EXCLUDES "-e ${EXCLUDE} ${COBERTURA_EXCLUDES}") endforeach() add_custom_target(${Coverage_NAME} # Run tests ${Coverage_EXECUTABLE} # Running gcovr COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} ${COBERTURA_EXCLUDES} -o ${Coverage_NAME}.xml WORKING_DIRECTORY ${PROJECT_BINARY_DIR} DEPENDS ${Coverage_DEPENDENCIES} COMMENT "Running gcovr to produce Cobertura code coverage report." ) # Show info where to find the report add_custom_command(TARGET ${Coverage_NAME} POST_BUILD COMMAND ; COMMENT "Cobertura code coverage report saved in ${Coverage_NAME}.xml." ) endfunction() # SETUP_TARGET_FOR_COVERAGE_COBERTURA function(APPEND_COVERAGE_COMPILER_FLAGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE) message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}") endfunction() # APPEND_COVERAGE_COMPILER_FLAGS stdgpu/cmake/config_summary.cmake000066400000000000000000000047211442573035400175030ustar00rootroot00000000000000function(stdgpu_print_configuration_summary) message(STATUS "") message(STATUS "************************ stdgpu Configuration Summary *************************") message(STATUS "") message(STATUS "General:") message(STATUS " Version : ${stdgpu_VERSION}") message(STATUS " System : ${CMAKE_SYSTEM_NAME}") message(STATUS " Build type : ${CMAKE_BUILD_TYPE}") message(STATUS "") message(STATUS "Build:") message(STATUS " STDGPU_BACKEND : ${STDGPU_BACKEND}") message(STATUS " STDGPU_BUILD_SHARED_LIBS : ${STDGPU_BUILD_SHARED_LIBS}") message(STATUS " STDGPU_SETUP_COMPILER_FLAGS : ${STDGPU_SETUP_COMPILER_FLAGS}") message(STATUS " STDGPU_COMPILE_WARNING_AS_ERROR : ${STDGPU_COMPILE_WARNING_AS_ERROR}") message(STATUS " STDGPU_ANALYZE_WITH_CLANG_TIDY : ${STDGPU_ANALYZE_WITH_CLANG_TIDY}") message(STATUS " STDGPU_ANALYZE_WITH_CPPCHECK : ${STDGPU_ANALYZE_WITH_CPPCHECK}") message(STATUS "") message(STATUS "Configuration:") message(STATUS " STDGPU_ENABLE_CONTRACT_CHECKS : ${STDGPU_ENABLE_CONTRACT_CHECKS}") message(STATUS " STDGPU_USE_32_BIT_INDEX : ${STDGPU_USE_32_BIT_INDEX}") message(STATUS "") message(STATUS "Examples:") message(STATUS " STDGPU_BUILD_EXAMPLES : ${STDGPU_BUILD_EXAMPLES}") message(STATUS "") message(STATUS "Benchmarks:") message(STATUS " STDGPU_BUILD_BENCHMARKS : ${STDGPU_BUILD_BENCHMARKS}") message(STATUS "") message(STATUS "Tests:") message(STATUS " STDGPU_BUILD_TESTS : ${STDGPU_BUILD_TESTS}") message(STATUS " STDGPU_BUILD_TEST_COVERAGE : ${STDGPU_BUILD_TEST_COVERAGE}") if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) if(DEFINED CMAKE_VERIFY_INTERFACE_HEADER_SETS) message(STATUS " CMAKE_VERIFY_INTERFACE_HEADER_SETS : ${CMAKE_VERIFY_INTERFACE_HEADER_SETS}") else() message(STATUS " CMAKE_VERIFY_INTERFACE_HEADER_SETS : (-> OFF)") endif() endif() message(STATUS "") message(STATUS "") message(STATUS "*******************************************************************************") message(STATUS "") endfunction() stdgpu/cmake/cuda/000077500000000000000000000000001442573035400143675ustar00rootroot00000000000000stdgpu/cmake/cuda/check_compute_capability.cmake000066400000000000000000000033111442573035400224010ustar00rootroot00000000000000# Check for GPUs present and their compute capability # based on http://stackoverflow.com/questions/2285185/easiest-way-to-test-for-existence-of-cuda-capable-gpu-from-cmake/2297877#2297877 (Christopher Bruns) set(STDGPU_CUDA_COMPUTE_CAPABILITIES_SOURCE "${CMAKE_CURRENT_LIST_DIR}/compute_capability.cpp") message(STATUS "Detecting CCs of GPUs : ${STDGPU_CUDA_COMPUTE_CAPABILITIES_SOURCE}") find_package(CUDAToolkit REQUIRED QUIET MODULE) try_run(STDGPU_RUN_RESULT_VAR STDGPU_COMPILE_RESULT_VAR ${CMAKE_BINARY_DIR} ${STDGPU_CUDA_COMPUTE_CAPABILITIES_SOURCE} LINK_LIBRARIES CUDA::cudart COMPILE_OUTPUT_VARIABLE STDGPU_COMPILE_OUTPUT_VAR RUN_OUTPUT_VARIABLE STDGPU_RUN_OUTPUT_VAR) # COMPILE_RESULT_VAR is TRUE when compile succeeds # RUN_RESULT_VAR is zero when a GPU is found if(STDGPU_COMPILE_RESULT_VAR AND NOT STDGPU_RUN_RESULT_VAR) message(STATUS "Detecting CCs of GPUs : ${STDGPU_CUDA_COMPUTE_CAPABILITIES_SOURCE} - Success (found CCs : ${STDGPU_RUN_OUTPUT_VAR})") set(STDGPU_CUDA_HAVE_GPUS TRUE CACHE BOOL "Whether CUDA-capable GPUs are present") set(STDGPU_CUDA_COMPUTE_CAPABILITIES ${STDGPU_RUN_OUTPUT_VAR} CACHE STRING "Compute capabilities of CUDA-capable GPUs") mark_as_advanced(STDGPU_CUDA_COMPUTE_CAPABILITIES) elseif(NOT STDGPU_COMPILE_RESULT_VAR) message(STATUS "Detecting CCs of GPUs : ${STDGPU_CUDA_COMPUTE_CAPABILITIES_SOURCE} - Failed to compile") set(STDGPU_CUDA_HAVE_GPUS FALSE CACHE BOOL "Whether CUDA-capable GPUs are present") else() message(STATUS "Detecting CCs of GPUs : ${STDGPU_CUDA_COMPUTE_CAPABILITIES_SOURCE} - No CUDA-capable GPU found") set(STDGPU_CUDA_HAVE_GPUS FALSE CACHE BOOL "Whether CUDA-capable GPUs are present") endif() stdgpu/cmake/cuda/compute_capability.cpp000066400000000000000000000030641442573035400207530ustar00rootroot00000000000000// Check for GPUs present and their compute capability // based on http://stackoverflow.com/questions/2285185/easiest-way-to-test-for-existence-of-cuda-capable-gpu-from-cmake/2297877#2297877 (Christopher Bruns) #include #include #include #include #include int main() { int deviceCount; std::set computeCapabilities; struct cudaDeviceProp properties; cudaError_t cudaResultCode = cudaGetDeviceCount(&deviceCount); if (cudaResultCode != cudaSuccess) { deviceCount = 0; } /* machines with no GPUs can still report one emulation device */ for (int device = 0; device < deviceCount; ++device) { cudaDeviceProp currentProperties; cudaGetDeviceProperties(¤tProperties, device); /* 9999 means emulation only */ if (currentProperties.major != 9999) { std::stringstream ss; ss << currentProperties.major; ss << currentProperties.minor; computeCapabilities.insert(ss.str()); } } /* don't just return the number of gpus, because other runtime cuda errors can also yield non-zero return values */ for (std::set::const_iterator it = computeCapabilities.begin(); it != computeCapabilities.end(); ++it) { // Add a semicolon if we have already printed some output. if(it != computeCapabilities.begin()) std::cout << ';'; std::cout << *it; } return computeCapabilities.size() == 0; /* 0 devices -> failure */ } stdgpu/cmake/cuda/determine_thrust_paths.cmake000066400000000000000000000006061442573035400221570ustar00rootroot00000000000000function(stdgpu_determine_thrust_paths STDGPU_OUTPUT_THRUST_PATHS) # Clear list before appending flags unset(${STDGPU_OUTPUT_THRUST_PATHS}) find_package(CUDAToolkit QUIET) set(${STDGPU_OUTPUT_THRUST_PATHS} "${CUDAToolkit_INCLUDE_DIRS}") # Make output variable visible set(${STDGPU_OUTPUT_THRUST_PATHS} ${${STDGPU_OUTPUT_THRUST_PATHS}} PARENT_SCOPE) endfunction() stdgpu/cmake/cuda/set_device_flags.cmake000066400000000000000000000062311442573035400206610ustar00rootroot00000000000000function(stdgpu_set_device_flags STDGPU_OUTPUT_DEVICE_FLAGS) # Clear list before appending flags unset(${STDGPU_OUTPUT_DEVICE_FLAGS}) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wall") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wextra") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wshadow") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wsign-compare") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wconversion") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wfloat-equal") if(STDGPU_COMPILE_WARNING_AS_ERROR AND CMAKE_VERSION VERSION_LESS 3.24) list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Werror") endif() if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") message(STATUS "Appended optimization flag (-O3,/O2) implicitly") endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "/W2") # or /W3 or /W4 depending on how useful this is if(STDGPU_COMPILE_WARNING_AS_ERROR AND CMAKE_VERSION VERSION_LESS 3.24) list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "/WX") endif() #list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "/O2") endif() if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") string(REPLACE ";" "," ${STDGPU_OUTPUT_DEVICE_FLAGS} "${${STDGPU_OUTPUT_DEVICE_FLAGS}}") set(${STDGPU_OUTPUT_DEVICE_FLAGS} "-Xcompiler=${${STDGPU_OUTPUT_DEVICE_FLAGS}}") elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") # Directly pass flags to CUDA-Clang # Workaround to suppress ptxas warnings in thrust (see https://github.com/NVIDIA/thrust/issues/1327) set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcuda-ptxas --disable-warnings" PARENT_SCOPE) endif() set(${STDGPU_OUTPUT_DEVICE_FLAGS} "$<$:${${STDGPU_OUTPUT_DEVICE_FLAGS}}>") # Make output variable visible set(${STDGPU_OUTPUT_DEVICE_FLAGS} ${${STDGPU_OUTPUT_DEVICE_FLAGS}} PARENT_SCOPE) endfunction() # Auxiliary compiler flags for tests to be used with target_compile_options function(stdgpu_set_test_device_flags STDGPU_OUTPUT_DEVICE_TEST_FLAGS) if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") set(${STDGPU_OUTPUT_DEVICE_TEST_FLAGS} "$<$:-Wno-deprecated-declarations>") endif() # Make output variable visible set(${STDGPU_OUTPUT_DEVICE_TEST_FLAGS} ${${STDGPU_OUTPUT_DEVICE_TEST_FLAGS}} PARENT_SCOPE) endfunction() function(stdgpu_cuda_set_architecture_flags STDGPU_OUTPUT_ARCHITECTURE_FLAGS) # Clear list before appending flags unset(${STDGPU_OUTPUT_ARCHITECTURE_FLAGS}) include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/check_compute_capability.cmake") foreach(STDGPU_CUDA_CC IN LISTS STDGPU_CUDA_COMPUTE_CAPABILITIES) list(APPEND ${STDGPU_OUTPUT_ARCHITECTURE_FLAGS} ${STDGPU_CUDA_CC}) message(STATUS "Enabled compilation for CC ${STDGPU_CUDA_CC}") endforeach() # Make output variable visible set(${STDGPU_OUTPUT_ARCHITECTURE_FLAGS} ${${STDGPU_OUTPUT_ARCHITECTURE_FLAGS}} PARENT_SCOPE) endfunction() stdgpu/cmake/hip/000077500000000000000000000000001442573035400142335ustar00rootroot00000000000000stdgpu/cmake/hip/determine_thrust_paths.cmake000066400000000000000000000010751442573035400220240ustar00rootroot00000000000000function(stdgpu_determine_thrust_paths STDGPU_OUTPUT_THRUST_PATHS) # Clear list before appending flags unset(${STDGPU_OUTPUT_THRUST_PATHS}) if(DEFINED ROCM_PATH) set(STDGPU_ROCM_PATH "${ROCM_PATH}") elseif(DEFINED ENV{ROCM_PATH}) set(STDGPU_ROCM_PATH "$ENV{ROCM_PATH}") else() set(STDGPU_ROCM_PATH "/opt/rocm") endif() set(${STDGPU_OUTPUT_THRUST_PATHS} "${STDGPU_ROCM_PATH}/include") # Make output variable visible set(${STDGPU_OUTPUT_THRUST_PATHS} ${${STDGPU_OUTPUT_THRUST_PATHS}} PARENT_SCOPE) endfunction() stdgpu/cmake/hip/set_device_flags.cmake000066400000000000000000000031521442573035400205240ustar00rootroot00000000000000function(stdgpu_set_device_flags STDGPU_OUTPUT_DEVICE_FLAGS) # Clear list before appending flags unset(${STDGPU_OUTPUT_DEVICE_FLAGS}) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wall") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wextra") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wshadow") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wsign-compare") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wconversion") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wfloat-equal") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wundef") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wdouble-promotion") if(STDGPU_COMPILE_WARNING_AS_ERROR AND CMAKE_VERSION VERSION_LESS 3.24) list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Werror") endif() if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-O3") endif() endif() if(CMAKE_HIP_COMPILER_ID STREQUAL "Clang") list(APPEND ${STDGPU_OUTPUT_DEVICE_FLAGS} "-Wno-pass-failed") endif() set(${STDGPU_OUTPUT_DEVICE_FLAGS} "$<$:${${STDGPU_OUTPUT_DEVICE_FLAGS}}>") # Make output variable visible set(${STDGPU_OUTPUT_DEVICE_FLAGS} ${${STDGPU_OUTPUT_DEVICE_FLAGS}} PARENT_SCOPE) endfunction() # Auxiliary compiler flags for tests to be used with target_compile_options function(stdgpu_set_test_device_flags STDGPU_OUTPUT_DEVICE_TEST_FLAGS) # No flags required endfunction() stdgpu/cmake/openmp/000077500000000000000000000000001442573035400147515ustar00rootroot00000000000000stdgpu/cmake/openmp/determine_thrust_paths.cmake000066400000000000000000000007761442573035400225510ustar00rootroot00000000000000function(stdgpu_determine_thrust_paths STDGPU_OUTPUT_THRUST_PATHS) # Clear list before appending flags unset(${STDGPU_OUTPUT_THRUST_PATHS}) find_package(CUDAToolkit QUIET) if(CUDAToolkit_FOUND) list(APPEND ${STDGPU_OUTPUT_THRUST_PATHS} "${CUDAToolkit_INCLUDE_DIRS}") endif() list(APPEND "/usr/include") list(APPEND "/usr/local/include") # Make output variable visible set(${STDGPU_OUTPUT_THRUST_PATHS} ${${STDGPU_OUTPUT_THRUST_PATHS}} PARENT_SCOPE) endfunction() stdgpu/cmake/openmp/set_device_flags.cmake000066400000000000000000000004361442573035400212440ustar00rootroot00000000000000function(stdgpu_set_device_flags STDGPU_OUTPUT_DEVICE_FLAGS) # No flags required endfunction() # Auxiliary compiler flags for tests to be used with target_compile_options function(stdgpu_set_test_device_flags STDGPU_OUTPUT_DEVICE_TEST_FLAGS) # No flags required endfunction() stdgpu/cmake/set_host_flags.cmake000066400000000000000000000044441442573035400174670ustar00rootroot00000000000000function(stdgpu_set_host_flags STDGPU_OUTPUT_HOST_FLAGS) # Clear list before appending flags unset(${STDGPU_OUTPUT_HOST_FLAGS}) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wall") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-pedantic") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wextra") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wshadow") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wsign-compare") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wconversion") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wfloat-equal") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wundef") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Wdouble-promotion") if(STDGPU_COMPILE_WARNING_AS_ERROR AND CMAKE_VERSION VERSION_LESS 3.24) list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-Werror") endif() if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "-O3") endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "/W2") # or /W3 or /W4 depending on how useful this is if(STDGPU_COMPILE_WARNING_AS_ERROR AND CMAKE_VERSION VERSION_LESS 3.24) list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "/WX") endif() #list(APPEND ${STDGPU_OUTPUT_HOST_FLAGS} "/O2") endif() set(${STDGPU_OUTPUT_HOST_FLAGS} "$<$:${${STDGPU_OUTPUT_HOST_FLAGS}}>") # Make output variable visible set(${STDGPU_OUTPUT_HOST_FLAGS} ${${STDGPU_OUTPUT_HOST_FLAGS}} PARENT_SCOPE) endfunction() # Auxiliary compiler flags for tests to be used with target_compile_options function(stdgpu_set_test_host_flags STDGPU_OUTPUT_HOST_TEST_FLAGS) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(${STDGPU_OUTPUT_HOST_TEST_FLAGS} "$<$:-Wno-deprecated-declarations>") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(${STDGPU_OUTPUT_HOST_TEST_FLAGS} "$<$:/wd4996>") endif() # Make output variable visible set(${STDGPU_OUTPUT_HOST_TEST_FLAGS} ${${STDGPU_OUTPUT_HOST_TEST_FLAGS}} PARENT_SCOPE) endfunction() stdgpu/cmake/setup_clang_format.cmake000066400000000000000000000045051442573035400203350ustar00rootroot00000000000000function(stdgpu_setup_clang_format) if(STDGPU_ALLOW_NEWER_CLANG_FORMAT_VERSIONS) find_package(ClangFormat 10) else() find_package(ClangFormat 10 EXACT) endif() if (NOT ClangFormat_FOUND) return() endif() foreach(FILE_EXT IN ITEMS ".h" ".cuh" ".cpp" ".cu" ".hip" ".inc") foreach(FILE_DIR IN ITEMS "src/stdgpu" "examples" "benchmark/stdgpu" "test/stdgpu" "test/install_test") file(GLOB_RECURSE SOURCE_FILES_PART LIST_DIRECTORIES FALSE "${FILE_DIR}/*${FILE_EXT}") list(APPEND SOURCE_FILES ${SOURCE_FILES_PART}) endforeach() # Collect remaining files in test file(GLOB SOURCE_FILES_PART LIST_DIRECTORIES FALSE "test/test_*${FILE_EXT}") list(APPEND SOURCE_FILES ${SOURCE_FILES_PART}) endforeach() list(SORT SOURCE_FILES) foreach(FILE IN LISTS SOURCE_FILES) file(RELATIVE_PATH FILE_REL_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${FILE}") if(STDGPU_COMPILE_WARNING_AS_ERROR) set(STDGPU_CLANG_FORMAT_ERROR_FLAG "--Werror") endif() # Output file will not be generated by clang-format, so the command is always run set(DUMMY_CHECK_FILE "${CMAKE_CURRENT_BINARY_DIR}/${FILE_REL_PATH}.check") add_custom_command(OUTPUT "${DUMMY_CHECK_FILE}" COMMAND ClangFormat::ClangFormat "--style=file" "--dry-run" ${STDGPU_CLANG_FORMAT_ERROR_FLAG} "${FILE}" COMMENT "Checking code style of ${FILE_REL_PATH}" VERBATIM) list(APPEND ALL_DUMMY_CHECK_FILES "${DUMMY_CHECK_FILE}") # Output file will not be generated by clang-format, so the command is always run set(DUMMY_FORMATTED_FILE "${CMAKE_CURRENT_BINARY_DIR}/${FILE_REL_PATH}.formatted") add_custom_command(OUTPUT "${DUMMY_FORMATTED_FILE}" COMMAND ClangFormat::ClangFormat "--style=file" "-i" "${FILE}" COMMENT "Applying code style for ${FILE_REL_PATH}" VERBATIM) list(APPEND ALL_DUMMY_FORMATTED_FILES "${DUMMY_FORMATTED_FILE}") endforeach() add_custom_target(check_code_style DEPENDS "${ALL_DUMMY_CHECK_FILES}") add_custom_target(apply_code_style DEPENDS "${ALL_DUMMY_FORMATTED_FILES}") endfunction() stdgpu/cmake/setup_clang_tidy.cmake000066400000000000000000000013211442573035400200070ustar00rootroot00000000000000function(stdgpu_setup_clang_tidy STDGPU_OUTPUT_PROPERTY_CLANG_TIDY) find_package(ClangTidy REQUIRED) set(${STDGPU_OUTPUT_PROPERTY_CLANG_TIDY} "${CLANG_TIDY_EXECUTABLE}") if(NOT DEFINED STDGPU_COMPILE_WARNING_AS_ERROR) message(FATAL_ERROR "STDGPU_COMPILE_WARNING_AS_ERROR not defined.") endif() # Explicitly set the C++ standard list(APPEND ${STDGPU_OUTPUT_PROPERTY_CLANG_TIDY} "-extra-arg=-std=c++17") if(STDGPU_COMPILE_WARNING_AS_ERROR) list(APPEND ${STDGPU_OUTPUT_PROPERTY_CLANG_TIDY} "-warnings-as-errors=*") endif() # Make output variable visible set(${STDGPU_OUTPUT_PROPERTY_CLANG_TIDY} ${${STDGPU_OUTPUT_PROPERTY_CLANG_TIDY}} PARENT_SCOPE) endfunction() stdgpu/cmake/setup_cppcheck.cmake000066400000000000000000000013031442573035400174520ustar00rootroot00000000000000function(stdgpu_setup_cppcheck STDGPU_OUTPUT_PROPERTY_CPPCHECK) find_package(Cppcheck REQUIRED) # Do not enable noisy "style" checks set(${STDGPU_OUTPUT_PROPERTY_CPPCHECK} "${CPPCHECK_EXECUTABLE}" "--enable=warning,performance,portability" "--force" "--inline-suppr" "--quiet") if(NOT DEFINED STDGPU_COMPILE_WARNING_AS_ERROR) message(FATAL_ERROR "STDGPU_COMPILE_WARNING_AS_ERROR not defined.") endif() if(STDGPU_COMPILE_WARNING_AS_ERROR) list(APPEND ${STDGPU_OUTPUT_PROPERTY_CPPCHECK} "--error-exitcode=1") endif() # Make output variable visible set(${STDGPU_OUTPUT_PROPERTY_CPPCHECK} ${${STDGPU_OUTPUT_PROPERTY_CPPCHECK}} PARENT_SCOPE) endfunction() stdgpu/cmake/stdgpu-config.cmake.in000066400000000000000000000004351442573035400176350ustar00rootroot00000000000000@PACKAGE_INIT@ include("${CMAKE_CURRENT_LIST_DIR}/stdgpu-dependencies.cmake") include("${CMAKE_CURRENT_LIST_DIR}/stdgpu-targets.cmake") set_and_check(stdgpu_INCLUDE_DIRS "@PACKAGE_STDGPU_INCLUDE_INSTALL_DIR@") set(stdgpu_LIBRARIES stdgpu::stdgpu) check_required_components(stdgpu) stdgpu/cmake/stdgpu-dependencies.cmake.in000066400000000000000000000006741442573035400210230ustar00rootroot00000000000000include(CMakeFindDependencyMacro) set(STDGPU_BACKEND_DIRECTORY "@STDGPU_BACKEND_DIRECTORY@") # Backend-specific modules have higher priority than generic modules list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/${STDGPU_BACKEND_DIRECTORY}") @STDGPU_DEPENDENCIES_INIT@ @STDGPU_DEPENDENCIES_BACKEND_INIT@ list(POP_FRONT CMAKE_MODULE_PATH) list(POP_FRONT CMAKE_MODULE_PATH) stdgpu/doc/000077500000000000000000000000001442573035400131405ustar00rootroot00000000000000stdgpu/doc/CMakeLists.txt000066400000000000000000000043661442573035400157110ustar00rootroot00000000000000 find_package(Doxygen 1.9.6 EXACT QUIET) if(NOT Doxygen_FOUND) include(ExternalProject) ExternalProject_Add( doxygen PREFIX doxygen URL https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_9_6.zip URL_HASH SHA256=28ab2c5d2ba1d3ed56c538125f1cad7ca8a09992e8b3892e9533736268ff6426 DOWNLOAD_DIR "${STDGPU_EXTERNAL_DIR}/doxygen" UPDATE_COMMAND "" INSTALL_COMMAND "" CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release EXCLUDE_FROM_ALL TRUE ) ExternalProject_Get_Property(doxygen BINARY_DIR) add_executable(Doxygen::doxygen IMPORTED) set_target_properties(Doxygen::doxygen PROPERTIES IMPORTED_LOCATION "${BINARY_DIR}/bin/doxygen") add_dependencies(Doxygen::doxygen doxygen) endif() include(FetchContent) FetchContent_Declare( doxygen-awesome-css PREFIX doxygen-awesome-css URL https://github.com/jothepro/doxygen-awesome-css/archive/refs/tags/v2.2.0.zip URL_HASH SHA256=2cff61a38694895259f5fdd04599c08d86cf9fd2dafc9950bf47af09af52e227 DOWNLOAD_DIR "${STDGPU_EXTERNAL_DIR}/doxygen-awesome-css" ) FetchContent_GetProperties(doxygen-awesome-css) if(NOT doxygen-awesome-css_POPULATED) FetchContent_Populate(doxygen-awesome-css) endif() set(STDGPU_DOXYGEN_AWESOME_CSS_DIR ${doxygen-awesome-css_SOURCE_DIR}) # Check include path set(STDGPU_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../src") get_filename_component(STDGPU_INCLUDE_DIR ${STDGPU_INCLUDE_DIR} ABSOLUTE) if(STDGPU_COMPILE_WARNING_AS_ERROR) set(STDGPU_DOXYGEN_WARN_AS_ERROR YES) else() set(STDGPU_DOXYGEN_WARN_AS_ERROR NO) endif() set(STDGPU_DOXYFILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in") set(STDGPU_DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") set(STDGPU_DOC_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}") configure_file(${STDGPU_DOXYFILE_IN} ${STDGPU_DOXYFILE} @ONLY) add_custom_target(stdgpu_doc COMMAND Doxygen::doxygen ${STDGPU_DOXYFILE} WORKING_DIRECTORY ${STDGPU_DOC_BUILD_DIR} COMMENT "Generating stdgpu API documentation with Doxygen" VERBATIM) #install(DIRECTORY "${STDGPU_DOC_BUILD_DIR}/doxygen-html/" # DESTINATION ${STDGPU_DOC_INSTALL_DIR} # COMPONENT stdgpu) stdgpu/doc/Doxyfile.in000066400000000000000000003545131442573035400152660ustar00rootroot00000000000000# Doxyfile 1.9.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). # # Note: # # Use doxygen to compare the used configuration file with the template # configuration file: # doxygen -x [configFile] # Use doxygen to compare the used configuration file with the template # configuration file without replacing the environment variables or CMake type # replacement variables: # doxygen -x_noenv [configFile] #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = stdgpu # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = Latest # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = @stdgpu_DESCRIPTION@ # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/stdgpu_logo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 # sub-directories (in 2 levels) under the output directory of each output format # and will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to # control the number of sub-directories. # The default value is: NO. CREATE_SUBDIRS = NO # Controls the number of sub-directories that will be created when # CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every # level increment doubles the number of directories, resulting in 4096 # directories at level 8 which is the default and also the maximum value. The # sub-directories are organized in 2 levels, the first level always has a fixed # number of 16 directories. # Minimum value: 0, maximum value: 8, default value: 8. # This tag requires that the tag CREATE_SUBDIRS is set to YES. CREATE_SUBDIRS_LEVEL = 8 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, # Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English # (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, # Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with # English messages), Korean, Korean-en (Korean with English messages), Latvian, # Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, # Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, # Swedish, Turkish, Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = NO # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = @STDGPU_INCLUDE_DIR@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = @STDGPU_INCLUDE_DIR@ # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # By default Python docstrings are displayed as preformatted text and doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the # doxygen's special commands can be used and the contents of the docstring # documentation blocks is shown as doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = YES # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". Note that you cannot put \n's in the value part of an alias # to insert newlines (in the resulting output). You can put ^^ in the value part # of an alias to insert a newline as if a physical newline was in the original # file. When you need a literal { or } or , in the value part of an alias you # have to escape them by means of a backslash (\), this can lead to conflicts # with the commands \{ and \} for these it is advised to use the version @{ and # @} or use a double escape (\\{ and \\}) ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, # VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = cuh=C++ \ in=C++ \ no_extension=C++ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = YES # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, # which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. NUM_PROC_THREADS = 1 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If this flag is set to YES, the name of an unnamed parameter in a declaration # will be determined by the corresponding definition. By default unnamed # parameters remain unnamed in the output. # The default value is: YES. RESOLVE_UNNAMED_PARAMS = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # will also hide undocumented C++ concepts if enabled. This option has no effect # if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = YES # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # With the correct setting of option CASE_SENSE_NAMES doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that # are not case sensitive the option should be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. # Possible values are: SYSTEM, NO and YES. # The default value is: SYSTEM. CASE_SENSE_NAMES = SYSTEM # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= YES # If the SHOW_HEADERFILE tag is set to YES then the documentation for a class # will show which file needs to be included to use the class. # The default value is: YES. SHOW_HEADERFILE = YES # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = NO # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = YES # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 0 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. See also section "Changing the # layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = @CMAKE_CURRENT_SOURCE_DIR@/DoxygenLayout.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as documenting some parameters in # a documented function twice, or documenting parameters that don't exist or # using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete # function parameter documentation. If set to NO, doxygen will accept that some # parameters have no documentation without warning. # The default value is: YES. WARN_IF_INCOMPLETE_DOC = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong parameter # documentation, but not about the absence of documentation. If EXTRACT_ALL is # set to YES then this flag will automatically be disabled. See also # WARN_IF_INCOMPLETE_DOC # The default value is: NO. WARN_NO_PARAMDOC = YES # If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about # undocumented enumeration values. If set to NO, doxygen will accept # undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: NO. WARN_IF_UNDOC_ENUM_VAL = YES # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS # then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but # at the end of the doxygen process doxygen will return with a non-zero status. # Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. WARN_AS_ERROR = @STDGPU_DOXYGEN_WARN_AS_ERROR@ # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # See also: WARN_LINE_FORMAT # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # In the $text part of the WARN_FORMAT command it is possible that a reference # to a more specific place is given. To make it easier to jump to this place # (outside of doxygen) the user can define a custom "cut" / "paste" string. # Example: # WARN_LINE_FORMAT = "'vi $file +$line'" # See also: WARN_FORMAT # The default value is: at line $line of file $file. WARN_LINE_FORMAT = "at line $line of file $file" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). In case the file specified cannot be opened for writing the # warning and error messages are written to standard error. When as file - is # specified the warning and error messages are written to standard output # (stdout). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @STDGPU_INCLUDE_DIR@/stdgpu \ @CMAKE_CURRENT_SOURCE_DIR@/stdgpu # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. # See also: INPUT_FILE_ENCODING # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # This tag can be used to specify the character encoding of the source files # that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify # character encoding on a per file pattern basis. Doxygen will compare the file # name with each pattern and apply the encoding instead of the default # INPUT_ENCODING) if there is a match. The character encodings are a list of the # form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding # "INPUT_ENCODING" for further information on supported encodings. INPUT_FILE_ENCODING = # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, # *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C # comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, # *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.doxy \ *.md \ *.cuh \ *.h \ *.hpp \ *_fwd \ *.h.in # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = */impl/* \ */cuda/* \ */openmp/* \ */hip/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # ANamespace::AClass, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = detail # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that doxygen will use the data processed and written to standard output # for further processing, therefore nothing else, like debug statements or used # commands (so in case of a Windows batch file always use @echo OFF), should be # written to standard output. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = # The Fortran standard specifies that for fixed formatted Fortran code all # characters from position 72 are to be considered as comment. A common # extension is to allow longer lines before the automatic comment starts. The # setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can # be processed before the automatic comment starts. # Minimum value: 7, maximum value: 10000, default value: 72. FORTRAN_COMMENT_AFTER = 72 #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) # that should be ignored while generating the index headers. The IGNORE_PREFIX # tag works for classes, function and member names. The entity will be placed in # the alphabetical list under the first letter of the entity name that remains # after removing the prefix. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/header.html # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). # Note: Since the styling of scrollbars can currently not be overruled in # Webkit/Chromium, the styling will be left out of the default doxygen.css if # one or more extra stylesheets have been specified. So if scrollbar # customization is desired it has to be added explicitly. For an example see the # documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = @STDGPU_DOXYGEN_AWESOME_CSS_DIR@/doxygen-awesome.css \ @STDGPU_DOXYGEN_AWESOME_CSS_DIR@/doxygen-awesome-sidebar-only.css \ @STDGPU_DOXYGEN_AWESOME_CSS_DIR@/doxygen-awesome-sidebar-only-darkmode-toggle.css \ @STDGPU_DOXYGEN_AWESOME_CSS_DIR@/doxygen-awesome-fragment-copy-button.js \ @STDGPU_DOXYGEN_AWESOME_CSS_DIR@/doxygen-awesome-paragraph-link.js \ @CMAKE_CURRENT_SOURCE_DIR@/custom.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = @STDGPU_DOXYGEN_AWESOME_CSS_DIR@/doxygen-awesome-darkmode-toggle.js \ @CMAKE_CURRENT_SOURCE_DIR@/stdgpu_logo.ico # The HTML_COLORSTYLE tag can be used to specify if the generated HTML output # should be rendered with a dark or light theme. # Possible values are: LIGHT always generate light mode output, DARK always # generate dark mode output, AUTO_LIGHT automatically set the mode according to # the user preference, use light mode if no preference is set (the default), # AUTO_DARK automatically set the mode according to the user preference, use # dark mode if no preference is set and TOGGLE allow to user to switch between # light and dark mode via a button. # The default value is: AUTO_LIGHT. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE = LIGHT # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have JavaScript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To # create a documentation set, doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag determines the URL of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDURL = # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # on Windows. In the beginning of 2021 Microsoft took the original page, with # a.o. the download links, offline the HTML help workshop was already many years # in maintenance mode). You can download the HTML help workshop from the web # archives at Installation executable (see: # http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo # ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path # including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine tune the look of the index (see "Fine-tuning the output"). As an # example, the default style sheet generated by doxygen has an example that # shows how to put an image at the root of the tree instead of the PROJECT_NAME. # Since the tree basically has the same information as the tab index, you could # consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = YES # When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the # FULL_SIDEBAR option determines if the side bar is limited to only the treeview # area (value NO) or if it should extend to the full height of the window (value # YES). Setting this to YES gives a layout similar to # https://docs.readthedocs.io with more room for contents, but less room for the # project logo, title, and description. If either GENERATE_TREEVIEW or # DISABLE_INDEX is set to NO, this option has no effect. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. FULL_SIDEBAR = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email # addresses. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. OBFUSCATE_EMAILS = YES # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. # Possible values are: png (the default) and svg (looks nicer but requires the # pdf2svg or inkscape tool). # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FORMULA_FORMAT = png # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # With MATHJAX_VERSION it is possible to specify the MathJax version to be used. # Note that the different versions of MathJax have different requirements with # regards to the different settings, so it is possible that also other MathJax # settings have to be changed when switching between the different MathJax # versions. # Possible values are: MathJax_2 and MathJax_3. # The default value is: MathJax_2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_VERSION = MathJax_2 # When MathJax is enabled you can set the default output format to be used for # the MathJax output. For more details about the output format see MathJax # version 2 (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 # (see: # http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best # compatibility. This is the name for Mathjax version 2, for MathJax version 3 # this will be translated into chtml), NativeMML (i.e. MathML. Only supported # for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This # is the name for Mathjax version 3, for MathJax version 2 this will be # translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. The default value is: # - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 # - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # for MathJax version 2 (see # https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # For example for MathJax version 3 (see # http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): # MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /