Improvements to NanoVDB#2108
Conversation
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
| - Added Mat classes and other math types to NanoVDB | ||
| - Improvements to mGPU grid building and introduction of a separate test executable for mGPU tests | ||
| - Major rewrite of nanovdb::NanoToOpenVDB, which now allows nanovdb::IndexGrids and blind (or side-car) data to be converted into an openvdb grid. | ||
| - Added stand-alone function nanovd::writeUncompressedGrid that allows nanovdb::IndexGrids and blind (or side-car) data to be written directly to a stream. |
|
|
||
| if constexpr(!BuildTraits<NanoBuildT>::is_special) { | ||
| const auto* src = trait::mapPtr(srcLeaf->data()->mValues);// doesn't work for compressed data, bool or ValueMask | ||
| for (auto *dst = dstLeaf->buffer().data(), *end = dst + 512; dst != end; dst += 4, src += 4) { |
There was a problem hiding this comment.
Is this loop needed? It seems like this could be a memcpy or std::copy.
There was a problem hiding this comment.
looking at the documentation for std::copy it looks like it performs a pretty naive for-loop without loop-un-rolling. So, I'm convinced it will actually outperform my code ...
There was a problem hiding this comment.
switched to std::copy but kept the old implementation just in case it was in fact faster
| if constexpr(!BuildTraits<NanoValueT>::is_special) { | ||
| if constexpr(util::is_same_v<NanoIndexT, ValueIndex>) { | ||
| const auto* src = trait::mapPtr(sideCar + srcLeaf->data()->mOffset); | ||
| for (auto *dst = dstLeaf->buffer().data(), *end = dst + 512; dst != end; dst += 4, src += 4) { |
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Andrew Reidmeyer <areidmeyer@nvidia.com>
Signed-off-by: Ken Museth <ken.museth@gmail.com>
matthewdcong
left a comment
There was a problem hiding this comment.
Looks good, thanks for the changes.
Signed-off-by: Ken <ken.museth@gmail.com>
sifakis
left a comment
There was a problem hiding this comment.
Looks great, just minor and highly optional comments
| Improvements: | ||
| - Added nanovdb/tools/cuda/DilateGrid.cuh, which performs topology dilation on the GPU. | ||
| - Added nanovdb/tools/cuda/MergeGrids.cuh, which merges the topology of two grids on the GPU. | ||
| - Added nanovdb/tools/cuda/CoarsenGrid.cuh, which performs topological coarsening of grids on the GPU. |
There was a problem hiding this comment.
(Optional) Additional features to mention, if useful:
- Added nanovdb/tools/cuda/PruneGrid.cuh which prunes the topology of a grid using a sidecar mask on the GPU.
- Added nanovdb/util/cuda/Injection.cuh which facilitates sidecar data copying - on the GPU - in the overlap of two grids with different topology.
| } else { | ||
| const auto* src = trait::mapPtr(sideCar); | ||
| auto *dst = dstLeaf->buffer().data(); | ||
| for (int i = 0; i < 512; i += 4) { |
There was a problem hiding this comment.
Somewhat related to @matthewdcong 's comment above ... a possible optimization might be
auto offset = srcLeaf->firstOffset();
for (int w = 0; w < 8; ++w) {
auto word = srcLeaf->valueMask().words()[w];
for (int bit = 0; bit < 64; ++bit, word >>= 1) *dst++ = src[(word&0x1UL)?offset++:0];
}
in order to avoid calls to popCnt; although those might vectorize on AVX512.
At any rate, this is not essential as leaf node allocation is likely the key contributor to runtime in this tool
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
Signed-off-by: Ken <ken.museth@gmail.com>
| - Major rewrite of nanovdb::NanoToOpenVDB, which now allows nanovdb::IndexGrids and blind (or sidecar) data to be converted into an openvdb grid. | ||
|
|
||
| Improvements: | ||
| - Improvements to mGPU grid building and introduction of a separate test executable for mGPU tests |
There was a problem hiding this comment.
(Optional). Consider mentioning:
- Added support for
LevelSet,FogVolume, andStaggeredgrid semantic. AddedtoGridClassandtoSemanticto map Grid Blind data semantic to Grid class and vice versa.
apradhana
left a comment
There was a problem hiding this comment.
One nitpick comment regarding the Change Notes. Looks good to me!
Signed-off-by: Ken <ken.museth@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.