File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -592,7 +592,6 @@ namespace hnswlib {
592
592
writeBinaryPOD (output, offsetLevel0_);
593
593
writeBinaryPOD (output, max_elements_);
594
594
writeBinaryPOD (output, cur_element_count);
595
- writeBinaryPOD (output, num_deleted_);
596
595
writeBinaryPOD (output, size_data_per_element_);
597
596
writeBinaryPOD (output, label_offset_);
598
597
writeBinaryPOD (output, offsetData_);
@@ -630,7 +629,6 @@ namespace hnswlib {
630
629
readBinaryPOD (input, offsetLevel0_);
631
630
readBinaryPOD (input, max_elements_);
632
631
readBinaryPOD (input, cur_element_count);
633
- readBinaryPOD (input, num_deleted_);
634
632
635
633
size_t max_elements = max_elements_i;
636
634
if (max_elements < cur_element_count)
@@ -717,6 +715,11 @@ namespace hnswlib {
717
715
}
718
716
}
719
717
718
+ for (size_t i = 0 ; i < cur_element_count; i++) {
719
+ if (isMarkedDeleted (i))
720
+ num_deleted_ += 1 ;
721
+ }
722
+
720
723
input.close ();
721
724
722
725
return ;
You can’t perform that action at this time.
0 commit comments