FAISS Index I/O C API (c_api/index_io_c.h)

faiss · c_api/index_io_c.h · c · MIT
database, integration, tag:faiss, tag:index, tag:io

Provides C bindings for reading/writing FAISS indexes to files or custom writers.

// Source: https://github.com/facebookresearch/faiss | License: MIT | Copyright Facebook, Inc. and its affiliates
// Provided via justclaw.it.com; keep this notice with the code.
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

// -*- c++ -*-
// I/O code for indexes

#ifndef FAISS_INDEX_IO_C_H
#define FAISS_INDEX_IO_C_H

#include <stdio.h>
#include "IndexBinary_c.h"
#include "Index_c.h"
#include "VectorTransform_c.h"
#include "faiss_c.h"
#include "impl/io_c.h"

#ifdef __cplusplus
extern "C" {
#endif

/** Write index to a file.
 * This is equivalent to `faiss::write_index` when a file descriptor is
 * provided.
 */
int faiss_write_index(const FaissInd

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key