Skip to content

Commit

Permalink
neighbor buffer parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipBAdams committed May 17, 2023
1 parent 60568f5 commit c72d7fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pq_flash_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,11 +1602,11 @@ std::vector<std::uint64_t> PQFlashIndex<T, LabelT>::get_neighbors(std::uint64_t
#endif

char *node_buf = OFFSET_TO_NODE(buf, VID);
char *node_coords = OFFSET_TO_NODE_NHOOD(node_buf);
std::uint64_t nnbrs = (std::uint64_t)(*node_buf);
std::uint32_t *nbr_buf = OFFSET_TO_NODE_NHOOD(node_buf);
std::uint64_t nnbrs = (std::uint64_t)(*nbr_buf);

std::vector<std::uint64_t> out(nnbrs);
std::uint32_t *nbrs = (std::uint32_t *)(node_buf + sizeof(nnbrs));
std::uint32_t *nbrs = (std::uint32_t *)(nbr_buf + 1);
for (size_t i = 0; i < nnbrs; i++)
{
out[i] = nbrs[i];
Expand Down

0 comments on commit c72d7fb

Please sign in to comment.