Provides L2 and inner-product similarity calculators for FAISS vector search.
// 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.
*/
#pragma once
#include <faiss/impl/ScalarQuantizer.h>
#include <faiss/impl/simdlib/simdlib_dispatch.h>
#include <faiss/utils/simd_levels.h>
namespace faiss {
namespace scalar_quantizer {
/*******************************************************************
* Similarity: gets vector components and computes a similarity wrt. a
* query vector stored in the object. The data fields just encapsulate
* an accumulator.
*/
templ
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key