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

Replace deleted elements at addition #418

Merged
merged 28 commits into from
Jan 12, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix compile issues
  • Loading branch information
Dmitry Yashunin committed Dec 18, 2022
commit 61ad82570d2c935d40c027dfbf1f91a8ebafccd5
7 changes: 5 additions & 2 deletions examples/multiThread_replace_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ int main() {

hnswlib::L2Space space(d);

float batch1[d * max_elements];
float* batch1 = new float[d * max_elements];
for (int i = 0; i < d * max_elements; i++) {
batch1[i] = distrib_real(rng);
}
float batch2[d * num_elements];
float* batch2 = new float[d * num_elements];
for (int i = 0; i < d * num_elements; i++) {
batch2[i] = distrib_real(rng);
}
Expand Down Expand Up @@ -114,5 +114,8 @@ int main() {
}

std::cout << "Finish" << std::endl;

delete[] batch1;
delete[] batch2;
return 0;
}