Faiss

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
GpuClonerOptions_c.cpp
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 #include "GpuClonerOptions_c.h"
13 #include "gpu/GpuClonerOptions.h"
14 #include "macros_impl.h"
15
16 using faiss::gpu::IndicesOptions;
17 using faiss::gpu::GpuClonerOptions;
18 using faiss::gpu::GpuMultipleClonerOptions;
19
20 int faiss_GpuClonerOptions_new(FaissGpuClonerOptions** p) {
21 try {
22 *p = reinterpret_cast<FaissGpuClonerOptions*>(new GpuClonerOptions());
23 } CATCH_AND_HANDLE
24 }
25
26 DEFINE_DESTRUCTOR(GpuClonerOptions)
27
28 DEFINE_GETTER(GpuClonerOptions, FaissIndicesOptions, indicesOptions)
29 DEFINE_GETTER(GpuClonerOptions, int, useFloat16CoarseQuantizer)
30 DEFINE_GETTER(GpuClonerOptions, int, useFloat16)
31 DEFINE_GETTER(GpuClonerOptions, int, usePrecomputed)
32 DEFINE_GETTER(GpuClonerOptions, long, reserveVecs)
33 DEFINE_GETTER(GpuClonerOptions, int, storeTransposed)
34 DEFINE_GETTER(GpuClonerOptions, int, verbose)
35 DEFINE_GETTER(GpuMultipleClonerOptions, int, shard)
36 DEFINE_GETTER(GpuMultipleClonerOptions, int, shard_type)
37
38 DEFINE_SETTER_STATIC(GpuClonerOptions, IndicesOptions, FaissIndicesOptions, indicesOptions)
39 DEFINE_SETTER_STATIC(GpuClonerOptions, bool, int, useFloat16CoarseQuantizer)
40 DEFINE_SETTER_STATIC(GpuClonerOptions, bool, int, useFloat16)
41 DEFINE_SETTER_STATIC(GpuClonerOptions, bool, int, usePrecomputed)
42 DEFINE_SETTER(GpuClonerOptions, long, reserveVecs)
43 DEFINE_SETTER_STATIC(GpuClonerOptions, bool, int, storeTransposed)
44 DEFINE_SETTER_STATIC(GpuClonerOptions, bool, int, verbose)
45 DEFINE_SETTER_STATIC(GpuMultipleClonerOptions, bool, int, shard)
46 DEFINE_SETTER(GpuMultipleClonerOptions, int, shard_type)
faiss::gpu::GpuClonerOptions
set some options on how to copy to GPU
Definition: GpuClonerOptions.h:16
faiss::gpu::GpuMultipleClonerOptions
Definition: GpuClonerOptions.h:43