mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
* Pass compilation in current state * Fix formatting and add missing parts * Define DistanceComputer * Add documentation to name changed on DistanceComputer::operator()() * Apply suggestions from code review Changes in docs Co-Authored-By: Eduardo Pinho <enet4mikeenet@gmail.com> * Updated MetricType
23 lines
617 B
C++
23 lines
617 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.
|
|
*/
|
|
|
|
// Copyright 2004-present Facebook. All Rights Reserved
|
|
// -*- c++ -*-
|
|
// I/O code for indexes
|
|
|
|
#include "clone_index_c.h"
|
|
#include "clone_index.h"
|
|
#include "macros_impl.h"
|
|
|
|
using faiss::Index;
|
|
|
|
int faiss_clone_index (const FaissIndex *idx, FaissIndex **p_out) {
|
|
try {
|
|
auto out = faiss::clone_index(reinterpret_cast<const Index*>(idx));
|
|
*p_out = reinterpret_cast<FaissIndex*>(out);
|
|
} CATCH_AND_HANDLE
|
|
} |