Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
RemapIndices.h
1 /**
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the CC-by-NC license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 // Copyright 2004-present Facebook. All Rights Reserved.
10 
11 #pragma once
12 
13 #include <vector>
14 
15 namespace faiss { namespace gpu {
16 
17 /// Utility function to translate (list id, offset) to a user index on
18 /// the CPU. In a cpp in order to use OpenMP.
19 void ivfOffsetToUserIndex(
20  long* indices,
21  int numLists,
22  int queries,
23  int k,
24  const std::vector<std::vector<long>>& listOffsetToUserIndex);
25 
26 } } // namespace