mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
Suppress unused static constexpr variable warnings (#5087)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5087 Fix 2 `clang-diagnostic-unused-const-variable` lint warnings by adding `[[maybe_unused]]` to `static constexpr int impl` in `IndexIVFPQFastScan.cpp` and `IndexIVFRaBitQFastScan.cpp`. The variable serves as documentation about the search implementation being used, so it is kept rather than removed. Reviewed By: mnorris11 Differential Revision: D100575853 fbshipit-source-id: 1c42958b1de1b663dc8f2eadfff345d27583b8a2
This commit is contained in:
committed by
meta-codesync[bot]
parent
48d2b0c946
commit
7cc63422d7
@@ -319,7 +319,8 @@ namespace {
|
||||
|
||||
struct IVFPQFastScanScanner : InvertedListScanner {
|
||||
using InvertedListScanner::scan_codes;
|
||||
static constexpr int impl = 10; // based on search_implem_10
|
||||
[[maybe_unused]] static constexpr int impl =
|
||||
10; // based on search_implem_10
|
||||
static constexpr size_t nq = 1; // 1 query at a time.
|
||||
const IndexIVFPQFastScan& index;
|
||||
AlignedTable<uint8_t> dis_tables;
|
||||
|
||||
@@ -573,7 +573,7 @@ namespace {
|
||||
/// Provides IVF scanner interface using FastScan's SIMD batch processing.
|
||||
struct IVFRaBitQFastScanScanner : InvertedListScanner {
|
||||
using InvertedListScanner::scan_codes;
|
||||
static constexpr int impl = 10;
|
||||
[[maybe_unused]] static constexpr int impl = 10;
|
||||
static constexpr size_t nq = 1;
|
||||
|
||||
const IndexIVFRaBitQFastScan& index;
|
||||
|
||||
Reference in New Issue
Block a user