Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fatlipp/cuda-tree
CUDA-based Tree builder
https://github.com/fatlipp/cuda-tree
algorithms cpp cuda octree quadtree tree
Last synced: 11 days ago
JSON representation
CUDA-based Tree builder
- Host: GitHub
- URL: https://github.com/fatlipp/cuda-tree
- Owner: fatlipp
- Created: 2024-03-18T23:09:52.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-05-12T15:02:12.000Z (9 months ago)
- Last Synced: 2024-11-20T11:38:36.710Z (2 months ago)
- Topics: algorithms, cpp, cuda, octree, quadtree, tree
- Language: C++
- Homepage:
- Size: 6.76 MB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## CUDA based Tree builder (QuadTree, Octree)
Octree | QuadTree
:------------------------------------------:|:---------------------------------------------:
![Octree](/assets/Octree1.png) | ![QuadTree](/assets/QuadTree.png)
![Octree](/assets/Skeleton.png) |Functionality
* CUDA tree builder
* CPU kNN, Radius Search
* 2d, 3d visualization (controls: WSAD R F, Mouse). Additional functionality for QuadTree - click on a Tree for kNN and RadiusSearch
* Random Points Generator
* Configuration file
* An obj file loaderSome implementation details:
[Medium](https://medium.com/@fatlip/cuda-quadtree-octree-72e65216866c)---
#### Build and Run
```
* mkdir build && cd build
* cmake .. `[-DCUDA_ARCH=SET_YOUR_ARCH]`
* make -j8
* `./cuda_tree_app_TYPE ./app/config/AppConfig.json`
* memory check: `compute-sanitizer --tool memcheck ./cuda_tree_app_TYPE ./app/config/AppConfig.json`
```
* cuda_tree_app_TYPE:
* cuda_tree_app_rng - to use random points
* cuda_tree_app_obj - to read .obj file from `model_path` (only vertices)#### Config
- `AppConfig.json` - contains general information (points count, pathes to Tree and Render config files)
- `TreeConfig.json`:
* type - 'Quad' or 'Oct'
* size - width, height, depth (if Octree)
* threadsPerBlock - min **128** for QuadTree and **256** for Octree **(1 warp for each leaf)**
- `RenderConfig.json` - all about rendering#### Requirements
* CUDA 11.8+
* C++ 17+
* OpenGL, GLFW
* nlohmann, tinyobjloader (included)#### Limitations
* Tested on up to 150 mln points
* Max *stable* depth: QuadTree = 7, Octree = 6
* I recommend to disable rendering (`AppConfig.json`) if more than 50 mln points are used#### Further development
1. CUDA based kNN, Radius Search
2. Refactoring, CPU, GPU optimization
3. OpenGL interop for faster visualization
4. Raycasting
5. KDTree---
#### Disclaimer
* Tested on Linux: Ubuntu 22.02, CUDA: 12.2, GPU: 3060 (laptop)
* Approach based on Nvidia's QuadTree sample (cdpQuadtree)