2017-02-22 23:26:44 +01:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
2017-07-30 00:18:45 -07:00
|
|
|
* This source code is licensed under the BSD+Patents license found in the
|
2017-02-22 23:26:44 +01:00
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace faiss { namespace gpu {
|
|
|
|
|
|
|
|
/// Utility function to translate (list id, offset) to a user index on
|
|
|
|
/// the CPU. In a cpp in order to use OpenMP.
|
|
|
|
void ivfOffsetToUserIndex(
|
|
|
|
long* indices,
|
|
|
|
int numLists,
|
|
|
|
int queries,
|
|
|
|
int k,
|
|
|
|
const std::vector<std::vector<long>>& listOffsetToUserIndex);
|
|
|
|
|
|
|
|
} } // namespace
|