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

Change G3VectorInt to wrap vector<int64_t> #42

Merged
merged 3 commits into from
Nov 16, 2020
Merged

Conversation

mhasself
Copy link
Member

This allows G3VectorInt to properly store any valid G3Int, which was
not previously the case. The G3Vector serialization for int64_t has
been specialized and split (load/save) and is implemented in
G3Vector.cxx.

The unnecessary complication I have added is some basic
compression-on-serialization, where a vector that can be safely
represented as int8/16/32/64 will be stored as that.

Includes a new test and a new "portability" test.

This allows G3VectorInt to properly store any valid G3Int, which was
not previously the case.  The G3Vector serialization for int64_t has
been specialized and split (load/save) and is implemented in
G3Vector.cxx

This passes all core tests, which includes loading v1 vectors.
Updates portability.py to include v2, at least for LE.  New test
"vecint.py" to confirm full range support and compression work.
Copy link
Member

@nwhitehorn nwhitehorn left a comment

Choose a reason for hiding this comment

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

This looks great to me! Thanks a bunch for doing it. I don't have any comments or complaints about the patch. Feel free to merge once Sasha gives her OK as well.

From the SPT side, the only obvious negative impact to me is that this will increase RAM usage for pixel indices when using our old, deprecated map binner. But not by a huge amount and the map binner in question is one we are actively trying to remove, so that doesn't seem like a huge problem.

core/tests/vecint.py Outdated Show resolved Hide resolved
@nwhitehorn nwhitehorn merged commit 6c1382a into master Nov 16, 2020
@nwhitehorn nwhitehorn deleted the g3-vector-int64 branch November 16, 2020 19:18
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.

3 participants