Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NanoVDB v32.7.0#1807

Merged
apradhana merged 8 commits into
AcademySoftwareFoundation:masterAcademySoftwareFoundation/openvdb:masterfrom
kmuseth:feature/nanovdb_v32.7kmuseth/openvdb:feature/nanovdb_v32.7Copy head branch name to clipboard
Jul 16, 2024
Merged

NanoVDB v32.7.0#1807
apradhana merged 8 commits into
AcademySoftwareFoundation:masterAcademySoftwareFoundation/openvdb:masterfrom
kmuseth:feature/nanovdb_v32.7kmuseth/openvdb:feature/nanovdb_v32.7Copy head branch name to clipboard

Conversation

@kmuseth

@kmuseth kmuseth commented May 8, 2024

Copy link
Copy Markdown
Contributor

Introducing NanoVDB v32.7.0, which is a major refactoring of v32.6, primarily related to the introduction of new namespaces and an accompanying restructuring of the directory layout of header files. This will likely require changes to client code! To this end I have included a shell script (cmd/updateFiles.sh) that will scan files and make (most) of the required changes.

The motivation for there these changes is twofold: First we want to use the same practice in terms of name spaces as OpenVDB and second the old version (32.6) was getting cluttered and messy. Specifically the main changes are:

  1. Virtually everything in NanoVDB is no using nanovdb as a namespace
  2. Additionally the following nested namespaces are introduced: math, tools, cuda, io
  3. these namespaces are reflected in matching restructures in the directories of header files as well as names of functions, kernels and a classes.

Here are some examples of changes:

nanovdb::CpuTimer -> nanovdb::util::Timer
nanovdb::GpuTimer -> nanovdb::util::cuda::Timer
nanovdb::gridStats -> nanovdb::tools::gridStats
nanovdb::Coord -> nanovdb::math::Coord

Signed-off-by: Ken Museth <ken.museth@gmail.com>
kmuseth added 2 commits May 7, 2024 21:58
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
@kmuseth kmuseth changed the title initial commit of NanoVDB v32.7.0 NanoVDB v32.7.0 May 10, 2024
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Comment thread doc/nanovdb/SourceTree.md Outdated
* [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).
* [util/Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/Ray.h) Ray class.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be math/Ray.h and https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/Ray.h.

Comment thread doc/nanovdb/SourceTree.md Outdated
* [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).
* [util/Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/Ray.h) Ray class.
* [util/HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/HDDA.h) HDDA related.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be math.HDDA.h and https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/HDDA.h.

Comment thread doc/nanovdb/SourceTree.md Outdated
* [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).
* [util/Ray.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/Ray.h) Ray class.
* [util/HDDA.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/HDDA.h) HDDA related.
* [util/SampleFromVoxels.h](https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/util/SampleFromVoxels.h) interpolation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be math/SampleFromVoxels.h and https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/math/SampleFromVoxels.h.

Comment thread doc/nanovdb/SourceTree.md
│ └── validate
│ └── nanovdb_validate.cc
├── CNanoVDB.h
├── cuda

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good call.

Comment thread doc/nanovdb/SourceTree.md
│ ├── codingstyle.txt
│ └── doxygen-config
├── examples
│ ├── benchmark

Copy link
Copy Markdown
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.

@@ -0,0 +1,100 @@
#!/bin/bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably need a similar file that runs on Windows.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes good idea but I have no idea how to do scripting with string replacements in Windows

Signed-off-by: Ken Museth <ken.museth@gmail.com>
Comment thread nanovdb/nanovdb/NanoVDB.h
Comment thread nanovdb/nanovdb/cuda/DeviceBuffer.h Outdated
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Comment thread nanovdb/nanovdb/NanoVDB.h
/// @details This function allows for generic programming by converting GridData
/// to a NanoGrid of the type encoded in GridData::mGridType.
template<typename OpT, typename GridDataT, typename... ArgsT>
auto callNanoGrid(GridDataT *gridData, ArgsT&&... args)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it make sense to change the name of this function from callNanoGrid to processTypedGrid? The argument for changing the name to processTypedGrid is that it provides a similar functionality as the one in openvdb, cf. this documentation. The argument against changing the name is because it expects a different 'signature' on the operator that a user needs to pass.

@apradhana apradhana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved!

@kmuseth

kmuseth commented Jul 10, 2024

Copy link
Copy Markdown
Contributor Author

@apradhana - so other than the fact that the CI is broken you're fine if I merge this into master?

@apradhana

Copy link
Copy Markdown
Contributor

Hi, @kmuseth, yes, you can merge it to master. These are my reasons:

  • As for the CI concerns: (1) I tested building and running the unit tests locally on my Linux and Windows machine, (2) I tested running your PR with a limited CI on my fork to see that the nanovdb-lite and Windows-dynamic CI were passing, (3) I'm working on top of the CI fixes that @Idclip has been working on (PR-1837) to fix the CI issues [see this PR]. As far as I can tell, the problems are not in your PR, but either in the CI runner or in CentOS 7.
  • As far as this PR is concerned: the biggest change introduced in this PR is the major restructuring of the APIs to make it conform better with OpenVDB. You bumped the NanoVDB minor version for that and we added updateFiles.sh and updateFiles.py to aid developers make the necessary changes. That should cover all use cases. This also allows fVDB to use the NanoVDB version in the main repository, which should help us to discover any bug we may have missed.

One thing to note after this change is that we need to keep in mind that Util.h should always be at the bottom of the NanoVDB dependency tree, followed by Math.h, followed by NanoVDB.h.

@apradhana

Copy link
Copy Markdown
Contributor

For completeness, I tested the NanoVDB version that comes from this PR along with the CI work that is currently in progress here and it shows that the failing CIs are the windows-static builds.
nanovdb_ci

@Idclip

Idclip commented Jul 10, 2024

Copy link
Copy Markdown
Contributor

Maybe fix the CI first if you're doing that anyway

NanoVDB 32.7.

Signed-off-by: apradhana <andre.pradhana@gmail.com>
@kmuseth
kmuseth force-pushed the feature/nanovdb_v32.7 branch from 94da828 to 569eda1 Compare July 16, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.