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

Commit

Permalink
Fix data conversion method in generate_pq_data_from_pivots() function
Browse files Browse the repository at this point in the history
Signed-off-by: cqy123456 <[email protected]>
  • Loading branch information
cqy123456 authored and liliu-z committed May 5, 2023
1 parent 642f802 commit 5ffb6f2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions thirdparty/DiskANN/src/partition_and_pq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,12 @@ int generate_pq_data_from_pivots(const std::string data_file,
#pragma omp parallel for firstprivate(block_data_tmp) schedule(static, 8192)
for (uint64_t p = 0; p < cur_blk_size; p++) {
for (uint64_t d = 0; d < dim; d++) {
block_data_float[p * dim + d] -= centroid[d];
}
for (uint64_t d = 0; d < dim; d++) {
auto rearrange_d = rearrangement[d];
block_data_tmp[d] =
block_data_float[p * dim + rearrangement[d]];
block_data_float[p * dim + rearrange_d] - centroid[rearrange_d];
}
for (uint64_t d = 0; d < dim; d++) {
block_data_float[d] = block_data_tmp[d];
block_data_float[p * dim + d] = block_data_tmp[d];
}
}

Expand Down

0 comments on commit 5ffb6f2

Please sign in to comment.