Skip to content

Update hnswalg.h #324

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions hnswlib/hnswalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,9 @@ namespace hnswlib {
int *data = (int *) get_linklist0(current_node_id);
size_t size = getListCount((linklistsizeint*)data);
// bool cur_node_deleted = isMarkedDeleted(current_node_id);
if(collect_metrics){
if(collect_metrics)
metric_hops++;
metric_distance_computations+=size;
}


#ifdef USE_SSE
_mm_prefetch((char *) (visited_array + *(data + 1)), _MM_HINT_T0);
Expand All @@ -301,7 +300,8 @@ namespace hnswlib {
_MM_HINT_T0);////////////
#endif
if (!(visited_array[candidate_id] == visited_array_tag)) {

if(collect_metrics)metric_distance_computations++;

visited_array[candidate_id] = visited_array_tag;

char *currObj1 = (getDataByInternalId(candidate_id));
Expand Down