Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Fix large degree error (#489)
Browse files Browse the repository at this point in the history
Signed-off-by: liliu-z <[email protected]>

Signed-off-by: liliu-z <[email protected]>
  • Loading branch information
liliu-z authored Sep 29, 2022
1 parent 67e56c1 commit 1704863
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thirdparty/DiskANN/src/aux_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ namespace diskann {

if (long_node) {
for (_u64 node_id = 0; node_id < npts_64; ++node_id) {
memset(sector_buf.get(), 0, sector_buf_size);
memset(sector_buf.get(), 0, sector_buf_size);
char *nnbrs = sector_buf.get() + ndims_64 * sizeof(T);
char *nhood_buf =
sector_buf.get() + (ndims_64 * sizeof(T)) + sizeof(unsigned);
Expand All @@ -816,7 +816,7 @@ namespace diskann {
assert(*nnbrs <= width_u32);

// read node's nhood
vamana_reader.read(nhood_buf, (*nnbrs) * sizeof(unsigned));
vamana_reader.read(nhood_buf, *((unsigned *)nnbrs) * sizeof(unsigned));

// write coords of node first
base_reader.read((char *) sector_buf.get(), sizeof(T) * ndims_64);
Expand Down Expand Up @@ -851,7 +851,7 @@ namespace diskann {
assert(*nnbrs <= width_u32);

// read node's nhood
vamana_reader.read(nhood_buf, (*nnbrs) * sizeof(unsigned));
vamana_reader.read(nhood_buf, *((unsigned *)nnbrs) * sizeof(unsigned));

// write coords of node first
base_reader.read(sector_node_buf, sizeof(T) * ndims_64);
Expand Down

0 comments on commit 1704863

Please sign in to comment.