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

Support io direct read cross blocks #60

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Support io direct read cross blocks #60

merged 1 commit into from
Oct 15, 2024

Conversation

LHT129
Copy link
Collaborator

@LHT129 LHT129 commented Oct 11, 2024

issue #40

GetCodesById(uint64_t id, bool& need_release) const override;

bool
GetCodesById(uint8_t* codes, uint64_t id) const override;
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment on lines 157 to 158
if (check_valid_offset(size + offset)) {
if (check_in_one_block(offset, size + offset)) {
Copy link
Collaborator

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)

Copy link
Collaborator Author

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

@LHT129 LHT129 force-pushed the cross_block_read branch 3 times, most recently from aa9bf1d to 4890963 Compare October 14, 2024 06:30
Copy link
Collaborator

@jiaweizone jiaweizone left a 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 {
Copy link
Collaborator

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

Copy link
Collaborator

@wxyucs wxyucs left a comment

Choose a reason for hiding this comment

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

lgtm

@LHT129 LHT129 merged commit 20ed4f0 into main Oct 15, 2024
2 checks passed
@LHT129 LHT129 deleted the cross_block_read branch October 15, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants