Skip to content

Commit

Permalink
clear future after wait (#386)
Browse files Browse the repository at this point in the history
Signed-off-by: xianliang <[email protected]>
  • Loading branch information
foxspy committed Feb 18, 2024
1 parent c55d0d6 commit 3d7ac59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions thirdparty/DiskANN/src/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,7 @@ namespace diskann {
}
}
knowhere::WaitAllSuccess(futures);
futures.clear();

diff = std::chrono::high_resolution_clock::now() - s;
inter_time += diff.count();
Expand Down
1 change: 1 addition & 0 deletions thirdparty/DiskANN/src/partition_and_pq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ int generate_pq_data_from_pivots(const std::string data_file,
}));
}
knowhere::WaitAllSuccess(futures);
futures.clear();

if (num_centers > 256) {
compressed_file_writer.write(
Expand Down

0 comments on commit 3d7ac59

Please sign in to comment.