Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
API: New copy / view semantics using Copy-on-Write #46958
API: New copy / view semantics using Copy-on-Write #46958
Changes from 33 commits
ea0bff8
74981f9
36faac9
ffa24a4
8c00bbd
af5a02c
a64f310
e6c0baa
977cbb8
cc367f5
53a8273
d3d26f4
5360e57
e431bc4
a2d8fde
81f6eae
b2a1428
4b1ccf6
40f2b24
9339f15
358deaf
085d15b
377f789
7dcefe8
773f03f
bfc2117
89c4fff
b2e56ea
fdeb154
c521161
fb297df
9ab9df5
14f753e
f7389b1
764838f
efde1bf
3d1377b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any particular reason to make the reference to the blk instead of its array blk.values? will that make a difference in the cases where blk.values is re-set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I don't remember if there was a specific technical reason to do so, but I think it seemed the easier option (since this is all handled at the BlockManager level). When keeping those references / when checking for references, it would otherwise be an additional level of indirection to check the blk.values instead of blk itself.
I suppose this would generally be the same, but indeed except in places where
blk.values
is re-set in place. I actually added one such case in this PR inBlock.set_values
(which is called inBlockManager.iset
). In that case I should probably rather copy the Block and replace the block in the BM with the copied block, instead of copying the values in the existing block.Do you know of other places where we currently we re-set blk.values?