-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move static functions to header file (#3757)
Summary: Pull Request resolved: #3757 In the telemetry wrapper, we need to wrap read_index to return wrapped index structs. D61049751 This read_index wrapper calls several static functions. These are not callable outside a C++ file. Thus this diff changes them to non static and declares them in the header file. Then the wrapper is able to call them. Differential Revision: D61282004
- Loading branch information
1 parent
c0b32d2
commit ed8d52a
Showing
2 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// Utils for index_read | ||
|
||
#ifndef FAISS_INDEX_READ_UTILS_H | ||
#define FAISS_INDEX_READ_UTILS_H | ||
|
||
#include <faiss/IndexIVF.h> | ||
#include <faiss/impl/io.h> | ||
|
||
#pragma once | ||
|
||
namespace faiss { | ||
|
||
void read_index_header(Index* idx, IOReader* f); | ||
void read_direct_map(DirectMap* dm, IOReader* f); | ||
void read_ivf_header( | ||
IndexIVF* ivf, | ||
IOReader* f, | ||
std::vector<std::vector<idx_t>>* ids = nullptr); | ||
void read_InvertedLists(IndexIVF* ivf, IOReader* f, int io_flags); | ||
|
||
} // namespace faiss | ||
|
||
#endif |