From aa6e33a39ee1b00ee9e68e2aa82880b5638e928e Mon Sep 17 00:00:00 2001 From: Huisheng Liu Date: Wed, 4 Oct 2023 11:35:49 -0700 Subject: [PATCH] add check for .enc extension to support encryption (#467) * add check for .enc extension to support encryption * check rotation_matrix file in file blobs --- src/pq.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pq.cpp b/src/pq.cpp index 86c68ce0a..c59fc2dce 100644 --- a/src/pq.cpp +++ b/src/pq.cpp @@ -133,11 +133,13 @@ void FixedChunkPQTable::load_pq_centroid_bin(const char *pq_table_file, size_t n diskann::cout << "Loaded PQ Pivots: #ctrs: " << NUM_PQ_CENTROIDS << ", #dims: " << this->ndims << ", #chunks: " << this->n_chunks << std::endl; - if (file_exists(rotmat_file)) - { #ifdef EXEC_ENV_OLS + if (files.fileExists(rotmat_file)) + { diskann::load_bin(files, rotmat_file, (float *&)rotmat_tr, nr, nc); #else + if (file_exists(rotmat_file)) + { diskann::load_bin(rotmat_file, rotmat_tr, nr, nc); #endif if (nr != this->ndims || nc != this->ndims)