Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmelville committed Jan 4, 2019
1 parent 7d15111 commit 9736e22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inst/include/hnswalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ namespace hnswlib {
std::default_random_engine level_generator_;

inline labeltype getExternalLabel(tableint internal_id) const {
return *((labeltype *) (data_level0_memory_ + internal_id * size_data_per_element_ + label_offset_));
labeltype return_label;
memcpy(&return_label,(data_level0_memory_ + internal_id * size_data_per_element_ + label_offset_), sizeof(labeltype));
return return_label;
}

inline labeltype *getExternalLabeLp(tableint internal_id) const {
Expand Down

0 comments on commit 9736e22

Please sign in to comment.