Faiss

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
GpuAutoTune_c.h
1 /**
2 * Copyright (c) 2015-present, Facebook, Inc.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD+Patents 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 // -*- c -*-
11
12 #ifndef FAISS_GPU_AUTO_TUNE_C_H
13 #define FAISS_GPU_AUTO_TUNE_C_H
14
15 #include "faiss_c.h"
16 #include "GpuClonerOptions_c.h"
17 #include "GpuResources_c.h"
18 #include "GpuIndex_c.h"
19 #include "Index_c.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 /// converts any GPU index inside gpu_index to a CPU index
26 int faiss_index_gpu_to_cpu(const FaissIndex* gpu_index, FaissIndex** p_out);
27
28 /// converts any CPU index that can be converted to GPU
29 int faiss_index_cpu_to_gpu(
30 FaissGpuResources* resources, int device,
31 const FaissIndex *index, FaissGpuIndex** p_out);
32
33 /// converts any CPU index that can be converted to GPU
34 int faiss_index_cpu_to_gpu_with_options(
35 FaissGpuResources* resources, int device,
36 const FaissIndex *index, const FaissGpuClonerOptions* options,
37 FaissGpuIndex** p_out);
38
39 /// parameter space and setters for GPU indexes
40 FAISS_DECLARE_CLASS_INHERITED(GpuParameterSpace, ParameterSpace)
41
42 #ifdef __cplusplus
43 }
44 #endif
45 #endif