From 5ba6a5d2c2c78e41f0046e77f2245217c2586b87 Mon Sep 17 00:00:00 2001 From: NingyuanChen Date: Mon, 6 Mar 2023 14:29:18 -0800 Subject: [PATCH] Fix BANN build failure after adding streamingDiskANN. (#257) * Fix BANN build failure after adding streamingDiskANN. * Throw exception when calling load_pq_centroid_bin if EXEC_ENV_OLS is defined. * Fix Variable name. * Remove commented line. --- src/index.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.cpp b/src/index.cpp index bfb5a70f3..22f6c8ab0 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1424,7 +1424,12 @@ namespace diskann { copy_aligned_data_from_file<_u8>(pq_compressed_file.c_str(), _pq_data, file_num_points, _num_pq_chunks, _num_pq_chunks); +#ifdef EXEC_ENV_OLS + throw ANNException("load_pq_centroid_bin should not be called when EXEC_ENV_OLS is defined.", + -1, __FUNCSIG__, __FILE__, __LINE__); +#else _pq_table.load_pq_centroid_bin(pq_pivots_file.c_str(), _num_pq_chunks); +#endif } copy_aligned_data_from_file(filename, _data, file_num_points, file_dim,