Skip to content

Add PointIndexCodec, PointDataCodec and other Point changes - #2197

Merged
danrbailey merged 8 commits into
AcademySoftwareFoundation:feature/iofrom
danrbailey:io_point_codecs
May 15, 2026
Merged

Add PointIndexCodec, PointDataCodec and other Point changes#2197
danrbailey merged 8 commits into
AcademySoftwareFoundation:feature/iofrom
danrbailey:io_point_codecs

Conversation

@danrbailey

Copy link
Copy Markdown
Contributor

This adds the two codecs for handling point data - PointIndexCodec and PointDataCodec.

I have also addressed the feedback that was offered previously to rename MultiPass tag class to PointDataGridMultiPass and this now locks down the old multi-pass mechanism specific to only be usable by VDB Points.

Some other related changes include removing the out-of-core atomic in AttributeArray for ABI=14 and some minor re-organisation to be able to access the readCompressedValues()/writeCompressedValues() specializations from the new codec.

@danrbailey danrbailey added the io label Apr 22, 2026
@danrbailey
danrbailey force-pushed the io_point_codecs branch 2 times, most recently from 5897076 to 5122547 Compare April 25, 2026 06:44
@danrbailey
danrbailey changed the base branch from feature/io5 to feature/io1 May 13, 2026 01:15
@danrbailey
danrbailey force-pushed the io_point_codecs branch 4 times, most recently from a6ab398 to cc713c6 Compare May 14, 2026 01:42
Comment thread openvdb/openvdb/codecs/PointDataCodec.h Outdated
Comment thread openvdb/openvdb/codecs/PointDataCodec.h Outdated
Comment thread openvdb/openvdb/codecs/PointDataCodec.h Outdated
points::AttributeArray* array = attributeIndex < leaf->attributeSet().size() ?
&leaf->attributeArray(attributeIndex) : nullptr;
if (array) {
auto* pagedStream = getOrCreatePagedStream(pagedStreams, attributeIndex);

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.

You call this a lot in all these methods but it looks cache-able outside of the leaf loops?

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, it is. I'm not going to try and change this, because this existing pattern matches how things work in the old multi-pass tree I/O. I will focus more heavily on performance improvements for the new codecs.

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 don't quite follow if you mean that this code won't be used much going forward or that you'll fix it in a subsequent MR? Happy to defer to whatever you think is best, but I think think change would be good to action at some point

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.

I'm not sure if you're primarily suggesting this to improve the readability or maintenance of the code or because you see opportunities to improve performance.

When we introduce the new codecs, these older codecs will be used less and less as I expect that all new read and writes will go through the newer, more efficient codecs. I don't think we'll be able to completely eliminate these codecs for a long time (if ever), but I would prefer to prioritize spending time on improving the new codecs. And I will happily accept all performance-related feedback when I share the new codecs. :)

if (requiredPasses > maxRequiredPasses) {
maxRequiredPasses = requiredPasses;
}
}

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.

parallel reduce?

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.

Again, going to keep this as-is to match the existing tree I/O implementation. Optimization effort can focus on new codecs.

Comment thread openvdb/openvdb/codecs/PointDataCodec.h Outdated
Comment thread openvdb/openvdb/codecs/PointDataCodec.h
Comment thread openvdb/openvdb/codecs/PointIndexCodec.h Outdated
Comment thread openvdb/openvdb/codecs/PointIndexCodec.h
Comment thread openvdb/openvdb/codecs/TopologyCodec.h Outdated
Signed-off-by: Dan Bailey <danbailey@ilm.com>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
Signed-off-by: Dan Bailey <danbailey@ilm.com>
@danrbailey

Copy link
Copy Markdown
Contributor Author

@Idclip - I believe I've addressed all your feedback now. The primary goal here is to migrate the existing code off the tree/points API and into these codecs. As mentioned earlier, I'll try and further optimize performance in the new codecs.

Signed-off-by: Dan Bailey <danbailey@ilm.com>
@danrbailey
danrbailey changed the base branch from feature/io1 to feature/io May 15, 2026 16:45
@danrbailey
danrbailey merged commit 4076e47 into AcademySoftwareFoundation:feature/io May 15, 2026
84 checks passed
@danrbailey
danrbailey deleted the io_point_codecs branch May 15, 2026 19:53
@danrbailey danrbailey mentioned this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants