-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support io direct read cross blocks #60
Conversation
799babe
to
5ccf4a8
Compare
src/data_cell/flatten_datacell.h
Outdated
GetCodesById(uint64_t id, bool& need_release) const override; | ||
|
||
bool | ||
GetCodesById(uint8_t* codes, uint64_t id) const override; |
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.
Adjust the params sequence: Input before output
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.
done
if (check_valid_offset(size + offset)) { | ||
if (check_in_one_block(offset, size + offset)) { |
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.
unify name style: checkValidOffset / checkInOneBlock (like memory_io.h:112)
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.
we use under line style for private function. the memory_io.h will be fixed by other pull request
aa9bf1d
to
4890963
Compare
Signed-off-by: LHT129 <[email protected]>
4890963
to
f3bc4c3
Compare
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.
LGTM
} | ||
|
||
template <typename QuantTmpl, typename IOTmpl> | ||
const uint8_t* | ||
FlattenDataCell<QuantTmpl, IOTmpl>::GetCodesById(uint64_t id) const { | ||
return io_->Read(code_size_, id * code_size_); | ||
FlattenDataCell<QuantTmpl, IOTmpl>::GetCodesById(uint64_t id, bool& need_release) const { |
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.
add TODO to simplify memory management
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.
lgtm
issue #40