mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +08:00
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
/*******************************************************************************
|
|
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
|
|
* Unauthorized copying of this file, via any medium is strictly prohibited.
|
|
* Proprietary and confidential.
|
|
******************************************************************************/
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
#include "Status.h"
|
|
|
|
namespace zilliz {
|
|
namespace vecwise {
|
|
namespace engine {
|
|
|
|
template <typename Derived>
|
|
class ExecutionEngine {
|
|
public:
|
|
|
|
Status AddWithIds(const std::vector<float>& vectors,
|
|
const std::vector<long>& vector_ids);
|
|
|
|
Status AddWithIds(long n, const float *xdata, const long *xids);
|
|
|
|
size_t Count() const;
|
|
|
|
size_t Size() const;
|
|
|
|
size_t PhysicalSize() const;
|
|
|
|
Status Serialize();
|
|
|
|
Status Load();
|
|
|
|
Status Merge(const std::string& location);
|
|
|
|
Status Search(long n,
|
|
const float *data,
|
|
long k,
|
|
float *distances,
|
|
long *labels) const;
|
|
|
|
std::shared_ptr<Derived> BuildIndex(const std::string&);
|
|
|
|
Status Cache();
|
|
};
|
|
|
|
|
|
} // namespace engine
|
|
} // namespace vecwise
|
|
} // namespace zilliz
|