Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NanoVDB v32.7.0 #1807

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 52 additions & 23 deletions doc/nanovdb/SourceTree.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* [NanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/NanoVDB.h) C++11 implementation of the core data structure and its access methods.
* [CNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/CNanoVDB.h) Incomplete but useable C99 implementation of the core data structure and its access methods. Designed in particular for use in OpenCL kernels. Note that this relies on zero-sized arrays for the _reserved padding, so will not work on all compilers (with MSVC being a particular example)
* [PNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/PNanoVDB.h) C99 implementation of the core data structure and its access methods. More complete coverage than CNanoVDB. This version is pointer-less and supports virtually all graphics APIs.
* [util/GridHandle.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/GridHandle.h) defines a handler for the memory allocated to a NanoVDB grid.
* [util/IO.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/IO.h) implements I/O support.
* [util/OpenToNanoVDB.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/OpenToNanoVDB.h) defines the converter from OpenVDB to NanoVDB and obviously depends on the OpenVDB library (as the only header file).
* [Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/Ray.h) Ray class.
* [HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/HDDA.h) HDDA related.
* [SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/SampleFromVoxels.h) interpolation.
* [GridHandle.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/GridHandle.h) defines a handler for the memory allocated to a NanoVDB grid.
* [io/IO.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/io/IO.h) implements I/O support.
* [tools/CreateNanoGrid.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/tools/CreateNanoGrid.h) defines the converter from OpenVDB to NanoVDB and obviously depends on the OpenVDB library (as the only header file).
* [math/Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/Ray.h) Ray class.
* [math/HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/HDDA.h) HDDA related.
* [math/SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/SampleFromVoxels.h) interpolation.

```bash
foo@bar:~$ tree
Expand All @@ -22,25 +22,19 @@ foo@bar:~$ tree
│ │ └── nanovdb_convert.cc
│ ├── print
│ │ └── nanovdb_print.cc
│ ├── updateFiles.sh
│ └── validate
│ └── nanovdb_validate.cc
├── CNanoVDB.h
├── cuda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call.

│ ├── DeviceBuffer.h
│ ├── GridHandle.cuh
│ └── NodeManager.cuh
├── docs
│ ├── CMakeLists.txt
│ ├── codingstyle.txt
│ └── doxygen-config
├── examples
│ ├── benchmark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot that we took away the benchmarks.

│ │ ├── BenchKernels_dense.cu
│ │ ├── BenchKernels_nano.cu
│ │ ├── Benchmark_dense.cu
│ │ ├── Benchmark_nano.cu
│ │ ├── Camera.h
│ │ ├── CMakeLists.txt
│ │ ├── DenseGrid.h
│ │ ├── Image.h
│ │ ├── TestBenchmark.cc
│ │ └── TestBenchmark.cu
│ ├── CMakeLists.txt
│ ├── ex_bump_pool_buffer
│ │ └── bump_pool_buffer.cc
Expand All @@ -50,7 +44,7 @@ foo@bar:~$ tree
│ │ ├── nanovdb.cu
│ │ └── openvdb.cc
│ ├── ex_index_grid_cuda
│ │ ├── index_grid_cuda.cu
│ │ ├── index_grid_cuda.cc
│ │ └── index_grid_cuda_kernel.cu
│ ├── ex_make_custom_nanovdb
│ │ └── make_custom_nanovdb.cc
Expand All @@ -66,6 +60,7 @@ foo@bar:~$ tree
│ ├── ex_map_pool_buffer
│ │ └── map_pool_buffer.cc
│ ├── ex_modify_nanovdb_thrust
│ │ ├── modify_nanovdb_thrust.cc
│ │ └── modify_nanovdb_thrust.cu
│ ├── ex_nodemanager_cuda
│ │ ├── nodemanager_cuda.cc
Expand Down Expand Up @@ -103,9 +98,38 @@ foo@bar:~$ tree
│ │ └── VoxToNanoVDB.h
│ └── ex_write_nanovdb_grids
│ └── write_nanovdb_grids.cc
├── GridHandle.h
├── HostBuffer.h
├── io
│ └── IO.h
├── math
│ ├── CSampleFromVoxels.h
│ ├── DitherLUT.h
│ ├── HDDA.h
│ ├── Math.h
│ ├── Ray.h
│ ├── SampleFromVoxels.h
│ └── Stencils.h
├── NanoVDB.h
├── NodeManager.h
├── PNanoVDB.h
├── Readme.md
├── tools
│ ├── CreateNanoGrid.h
│ ├── CreatePrimitives.h
│ ├── cuda
│ │ ├── AddBlindData.cuh
│ │ ├── GridChecksum.cuh
│ │ ├── GridStats.cuh
│ │ ├── GridValidator.cuh
│ │ ├── IndexToGrid.cuh
│ │ ├── PointsToGrid.cuh
│ │ └── SignedFloodFill.cuh
│ ├── GridBuilder.h
│ ├── GridChecksum.h
│ ├── GridStats.h
│ ├── GridValidator.h
│ └── NanoToOpenVDB.h
├── unittest
│ ├── CMakeLists.txt
│ ├── pnanovdb_validate_strides.h
Expand All @@ -115,21 +139,25 @@ foo@bar:~$ tree
└── util
├── CpuTimer.h
├── CreateNanoGrid.h
├── CSampleFromVoxels.h
├── cuda
│ ├── CudaAddBlindData.cuh
│ ├── CudaDeviceBuffer.h
│ ├── CudaGridChecksum.cuh
│ ├── CudaGridHandle.cuh
│ ├── CudaGridStats.cuh
│ ├── CudaGridValidator.cuh
│ ├── CudaIndexToGrid.cuh
│ ├── CudaNodeManager.cuh
│ ├── CudaPointsToGrid.cuh
│ ├── CudaSignedFloodFill.cuh
│ ├── CudaUtils.h
│ └── GpuTimer.cuh
│ ├── GpuTimer.h
│ ├── Timer.h
│ └── Util.h
├── DitherLUT.h
├── ForEach.h
├── GridBuilder.h
├── GridChecksum.h
├── GridHandle.h
├── GridStats.h
├── GridValidator.h
├── HDDA.h
Expand All @@ -145,5 +173,6 @@ foo@bar:~$ tree
├── Ray.h
├── Reduce.h
├── SampleFromVoxels.h
└── Stencils.h
```
├── Stencils.h
├── Timer.h
└── Util.h
105 changes: 86 additions & 19 deletions nanovdb/nanovdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,31 +160,66 @@ endif()
# NanoVDB header files
set(NANOVDB_INCLUDE_FILES
CNanoVDB.h
GridHandle.h
HostBuffer.h
NanoVDB.h
NodeManager.h
PNanoVDB.h
)

# NanoVDB cuda header files
set(NANOVDB_INCLUDE_CUDA_FILES
cuda/DeviceBuffer.h
cuda/GridHandle.cuh
cuda/NodeManager.cuh
)

# NanoVDB io header files
set(NANOVDB_INCLUDE_IO_FILES
io/IO.h
)

# NanoVDB math header files
set(NANOVDB_INCLUDE_MATH_FILES
math/CSampleFromVoxels.h
math/DitherLUT.h
math/HDDA.h
math/Math.h
math/Ray.h
math/SampleFromVoxels.h
math/Stencils.h
)

# NanoVDB tools header files
set(NANOVDB_INCLUDE_TOOLS_FILES
tools/CreateNanoGrid.h
tools/CreatePrimitives.h
tools/GridBuilder.h
tools/GridChecksum.h
tools/GridStats.h
tools/GridValidator.h
tools/NanoToOpenVDB.h
)

# NanoVDB tools/cuda header files
set(NANOVDB_INCLUDE_TOOLS_CUDA_FILES
tools/cuda/AddBlindData.cuh
tools/cuda/GridChecksum.cuh
tools/cuda/GridStats.cuh
tools/cuda/GridValidator.cuh
tools/cuda/IndexToGrid.cuh
tools/cuda/PointsToGrid.cuh
tools/cuda/SignedFloodFill.cuh
)

# NanoVDB util header files
set(NANOVDB_INCLUDE_UTILFILES
set(NANOVDB_INCLUDE_UTIL_FILES
util/CpuTimer.h
util/CreateNanoGrid.h
util/CSampleFromVoxels.h
util/cuda/CudaAddBlindData.cuh
util/cuda/CudaDeviceBuffer.h
util/cuda/CudaGridChecksum.cuh
util/cuda/CudaGridHandle.cuh
util/cuda/CudaGridStats.cuh
util/cuda/CudaIndexToGrid.cuh
util/cuda/CudaNodeManager.cuh
util/cuda/CudaPointsToGrid.cuh
util/cuda/CudaSignedFloodFill.cuh
util/cuda/CudaUtils.h
util/cuda/GpuTimer.h
util/DitherLUT.h
util/ForEach.h
util/GridBuilder.h
util/GridChecksum.h
util/GridHandle.h
util/GridStats.h
util/GridValidator.h
util/HDDA.h
Expand All @@ -201,6 +236,26 @@ set(NANOVDB_INCLUDE_UTILFILES
util/Reduce.h
util/SampleFromVoxels.h
util/Stencils.h
util/Timer.h
util/Util.h
)

# NanoVDB util/cuda header files
set(NANOVDB_INCLUDE_UTIL_CUDA_FILES
util/cuda/CudaAddBlindData.cuh
util/cuda/CudaGridHandle.cuh
util/cuda/CudaIndexToGrid.cuh
util/cuda/CudaSignedFloodFill.cuh
util/cuda/Timer.h
util/cuda/CudaDeviceBuffer.h
util/cuda/CudaGridStats.cuh
util/cuda/CudaNodeManager.cuh
util/cuda/CudaUtils.h
util/cuda/Util.h
util/cuda/CudaGridChecksum.cuh
util/cuda/CudaGridValidator.cuh
util/cuda/CudaPointsToGrid.cuh
util/cuda/GpuTimer.h
)

add_library(nanovdb INTERFACE)
Expand Down Expand Up @@ -266,11 +321,23 @@ if(TARGET Threads::Threads)
target_link_libraries(nanovdb INTERFACE Threads::Threads)
endif()

set(NANOVDB_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/nanovdb)
set(NANOVDB_INSTALL_UTILDIR ${NANOVDB_INSTALL_INCLUDEDIR}/util)

install(FILES ${NANOVDB_INCLUDE_FILES} DESTINATION ${NANOVDB_INSTALL_INCLUDEDIR})
install(FILES ${NANOVDB_INCLUDE_UTILFILES} DESTINATION ${NANOVDB_INSTALL_UTILDIR})
set(NANOVDB_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/nanovdb)
set(NANOVDB_INSTALL_CUDA_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/cuda)
set(NANOVDB_INSTALL_IO_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/io)
set(NANOVDB_INSTALL_MATH_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/math)
set(NANOVDB_INSTALL_TOOLS_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/tools)
set(NANOVDB_INSTALL_TOOLS_CUDA_DIR ${NANOVDB_INSTALL_TOOLS_DIR}/cuda)
set(NANOVDB_INSTALL_UTIL_DIR ${NANOVDB_INSTALL_INCLUDE_DIR}/util)
set(NANOVDB_INSTALL_UTIL_CUDA_DIR ${NANOVDB_INSTALL_UTIL_DIR}/cuda)

install(FILES ${NANOVDB_INCLUDE_FILES} DESTINATION ${NANOVDB_INSTALL_INCLUDE_DIR})
install(FILES ${NANOVDB_INCLUDE_CUDA_FILES} DESTINATION ${NANOVDB_INSTALL_CUDA_DIR})
install(FILES ${NANOVDB_INCLUDE_IO_FILES} DESTINATION ${NANOVDB_INSTALL_IO_DIR})
install(FILES ${NANOVDB_INCLUDE_MATH_FILES} DESTINATION ${NANOVDB_INSTALL_MATH_DIR})
install(FILES ${NANOVDB_INCLUDE_TOOLS_FILES} DESTINATION ${NANOVDB_INSTALL_TOOLS_DIR})
install(FILES ${NANOVDB_INCLUDE_TOOLS_CUDA_FILES} DESTINATION ${NANOVDB_INSTALL_TOOLS_CUDA_DIR})
install(FILES ${NANOVDB_INCLUDE_UTIL_FILES} DESTINATION ${NANOVDB_INSTALL_UTIL_DIR})
install(FILES ${NANOVDB_INCLUDE_UTIL_CUDA_FILES} DESTINATION ${NANOVDB_INSTALL_UTIL_CUDA_DIR})

###############################################################################
# Options
Expand Down
Loading
Loading