-
Notifications
You must be signed in to change notification settings - Fork 178
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
Sparse global order reader: getting rid of the result cell slab copy. #2411
Sparse global order reader: getting rid of the result cell slab copy. #2411
Conversation
This pull request has been linked to Clubhouse Story #8332: Read refactor: create basic sparse global order reader.. |
to_copy.emplace_back(tile, it->start_, num_cells); | ||
copy_end_.first++; | ||
copy_end_.second = it->start_ + num_cells; | ||
break; |
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.
Why is this here?
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.
The previous code checked num_cells in the while condition to break when there is no more room to copy, which wasn't accurate since is could also go below 0. I removed the num_cells condition and added the break.
// Count number of elements actually copied. | ||
uint64_t cells_copied = 0; | ||
for (auto rcs : copied) { | ||
cells_copied += rcs.length_; | ||
for (uint64_t i = 0; i < copy_end_.first - 1; i++) { |
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.
Is copy_end_.first - 1
correct or should it be copy_end_.first
?
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.
This line is correct because of cells_copied += copy_end_.second; below the for loop.
This gets rid of the need for a copy of the result cell slabs by keeping and index of where to end the copy operations in ReaderBase. Also noticed the context caches were only used to store cell slab partitions so moved the code to generate those to simple functions. --- TYPE: IMPROVEMENT DESC: Sparse global order reader: no more result cell slab copy.
c9670cc
to
cbc7c13
Compare
This gets rid of the need for a copy of the result cell slabs by keeping
and index of where to end the copy operations in ReaderBase.
Also noticed the context caches were only used to store cell slab
partitions so moved the code to generate those to simple functions.
TYPE: IMPROVEMENT
DESC: Sparse global order reader: no more result cell slab copy.