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

use safe allocator in hnsw implementation #31

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

wxyucs
Copy link
Collaborator

@wxyucs wxyucs commented Sep 18, 2024

No description provided.

Signed-off-by: wxy407827 <wxy407827@antgroup.com>
@wxyucs wxyucs requested review from jiaweizone and inabao September 18, 2024 13:19
@wxyucs wxyucs self-assigned this Sep 18, 2024
@@ -77,7 +77,7 @@ HNSW::HNSW(std::shared_ptr<hnswlib::SpaceInterface> space_interface,
alg_hnsw =
std::make_shared<hnswlib::HierarchicalNSW>(space.get(),
DEFAULT_MAX_ELEMENT,
allocator,
allocator_,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, missing in last commit

@@ -77,6 +77,7 @@ class HNSW : public Index {
Allocator* allocator = nullptr);

virtual ~HNSW() {
alg_hnsw = nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

alg_hnsw -> alg_hnsw_

Copy link
Collaborator

Choose a reason for hiding this comment

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

alg_hnsw -> alg_hnsw_

will change in next PR

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

@@ -77,6 +77,7 @@ class HNSW : public Index {
Allocator* allocator = nullptr);

virtual ~HNSW() {
alg_hnsw = nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

alg_hnsw -> alg_hnsw_

will change in next PR

@wxyucs wxyucs merged commit 95734cc into main Sep 18, 2024
2 checks passed
@wxyucs wxyucs deleted the use_safe_allocator_in_hnsw_impl branch September 18, 2024 15:51
wxyucs added a commit that referenced this pull request Sep 18, 2024
Signed-off-by: wxy407827 <wxy407827@antgroup.com>
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