faiss/faiss/index_factory.h
Matthijs Douze a0b50e669f Re-factor factory string parsing (#2134)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2134

The old parsing was very complex and grew out of hand.
this diff just uses regex parsing.

Reviewed By: wickedfoo

Differential Revision: D32759110

fbshipit-source-id: 243029bba8a7fe70c71323f5edc7e2ce4e669757
2021-12-07 04:35:57 -08:00

28 lines
666 B
C++

/**
* 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.
*/
#pragma once
#include <faiss/Index.h>
#include <faiss/IndexBinary.h>
namespace faiss {
/** Build and index with the sequence of processing steps described in
* the string. */
Index* index_factory(
int d,
const char* description,
MetricType metric = METRIC_L2);
/// set to > 0 to get more logs from index_factory
FAISS_API extern int index_factory_verbose;
IndexBinary* index_binary_factory(int d, const char* description);
} // namespace faiss