utils/distances_c.h

faiss · c_api/utils/distances_c.h · c · MIT
ai, tag:knn-classified

C header exposing optimized distance and norm functions for FAISS.

// 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 -*-

#ifndef FAISS_DISTANCES_C_H
#define FAISS_DISTANCES_C_H

#include <stdint.h>
#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif

/*********************************************************
 * Optimized distance/norm/inner prod computations
 *********************************************************/

/// Compute pairwise distances between sets of vectors
void faiss_pairwise_L2sqr(
        int64_t d,
      

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

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

Get a free API key