diff --git a/demos/demo_imi_pq.cpp b/demos/demo_imi_pq.cpp index a2af65e792..4fab0778d8 100644 --- a/demos/demo_imi_pq.cpp +++ b/demos/demo_imi_pq.cpp @@ -77,7 +77,6 @@ int main() { // the coarse quantizer should not be dealloced before the index // 4 = nb of bytes per code (d must be a multiple of this) // 8 = nb of bits per sub-code (almost always 8) - faiss::MetricType metric = faiss::METRIC_L2; // can be METRIC_INNER_PRODUCT faiss::IndexIVFPQ index( &coarse_quantizer, d, ncentroids, bytes_per_code, 8); index.quantizer_trains_alone = true; diff --git a/faiss/IndexIVF.cpp b/faiss/IndexIVF.cpp index 95d3bc9e68..548aaa4cc7 100644 --- a/faiss/IndexIVF.cpp +++ b/faiss/IndexIVF.cpp @@ -444,7 +444,7 @@ void IndexIVF::search_preassigned( max_codes = unlimited_list_size; } - bool do_parallel = omp_get_max_threads() >= 2 && + [[maybe_unused]] bool do_parallel = omp_get_max_threads() >= 2 && (pmode == 0 ? false : pmode == 3 ? n > 1 : pmode == 1 ? nprobe > 1 @@ -784,7 +784,7 @@ void IndexIVF::range_search_preassigned( int pmode = this->parallel_mode & ~PARALLEL_MODE_NO_HEAP_INIT; // don't start parallel section if single query - bool do_parallel = omp_get_max_threads() >= 2 && + [[maybe_unused]] bool do_parallel = omp_get_max_threads() >= 2 && (pmode == 3 ? false : pmode == 0 ? nx > 1 : pmode == 1 ? nprobe > 1 diff --git a/faiss/utils/distances.cpp b/faiss/utils/distances.cpp index 82bc164ae1..74b56bcc87 100644 --- a/faiss/utils/distances.cpp +++ b/faiss/utils/distances.cpp @@ -141,7 +141,7 @@ void exhaustive_inner_product_seq( const IDSelector* sel = nullptr) { using SingleResultHandler = typename BlockResultHandler::SingleResultHandler; - int nt = std::min(int(nx), omp_get_max_threads()); + [[maybe_unused]] int nt = std::min(int(nx), omp_get_max_threads()); FAISS_ASSERT(use_sel == (sel != nullptr)); @@ -178,7 +178,7 @@ void exhaustive_L2sqr_seq( const IDSelector* sel = nullptr) { using SingleResultHandler = typename BlockResultHandler::SingleResultHandler; - int nt = std::min(int(nx), omp_get_max_threads()); + [[maybe_unused]] int nt = std::min(int(nx), omp_get_max_threads()); FAISS_ASSERT(use_sel == (sel != nullptr));