feat: support core cpp sdk (#30)

* support core cpp sdk

* fix

* fix

* fix

* fix cr
This commit is contained in:
feihongxu0824 2026-01-26 20:01:44 +08:00 committed by GitHub
parent 5e2492b2cb
commit 0ebf5621a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
398 changed files with 1303 additions and 1166 deletions

View File

@ -1,3 +1,89 @@
#include <cstdlib>
#include <iostream>
#include <zvec/core/interface/index.h>
#include <zvec/core/interface/index_factory.h>
#include <zvec/core/interface/index_param.h>
#include <zvec/core/interface/index_param_builders.h>
using namespace zvec::core_interface;
constexpr uint32_t kDimension = 64;
const std::string index_name{"test.index"};
Index::Pointer create_index(const BaseIndexParam::Pointer &param,
int doc_num = 10) {
auto index = IndexFactory::CreateAndInitIndex(*param);
if (!index) {
std::cout << "Failed to create index." << std::endl;
return nullptr;
}
int ret = index->Open(
index_name, StorageOptions{StorageOptions::StorageType::kMMAP, true});
if (ret != 0) {
std::cout << "Failed to open index." << std::endl;
return nullptr;
}
for (int i = 0; i < doc_num; ++i) {
std::vector<float> vector(kDimension, i / 10.0f + 0.1f);
VectorData vector_data;
vector_data.vector = DenseVector{vector.data()};
ret = index->Add(vector_data, i);
if (ret != 0) {
std::cout << "Failed to add to index." << std::endl;
return nullptr;
}
}
ret = index->Train();
if (ret != 0) {
std::cout << "Failed to train index." << std::endl;
return nullptr;
}
return index;
}
int main() {
char cmd_buf[100];
snprintf(cmd_buf, 100, "rm -f %s", index_name.c_str());
system(cmd_buf);
auto param = HNSWIndexParamBuilder()
.WithMetricType(MetricType::kInnerProduct)
.WithDataType(DataType::DT_FP32)
.WithDimension(kDimension)
.WithIsSparse(false)
.Build();
auto index = create_index(param, 1);
std::cout << "index stats: " << index->GetDocCount() << std::endl;
// query
auto query_param = HNSWQueryParamBuilder()
.with_topk(10)
.with_fetch_vector(true)
.with_ef_search(20)
.build();
SearchResult result;
VectorData query;
std::vector<float> vector(kDimension, 0.1f);
query.vector = DenseVector{vector.data()};
int ret = index->Search(query, query_param, &result);
if (ret != 0) {
std::cout << "Failed to search index." << std::endl;
return -1;
}
std::cout << "query results: " << result.doc_list_.size() << std::endl;
if (result.doc_list_.size() == 0) {
std::cout << "No results found." << std::endl;
return -1;
}
std::cout << "key: " << result.doc_list_[0].key()
<< ", score: " << result.doc_list_[0].score() << std::endl;
return 0;
}

View File

@ -15,7 +15,7 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -17,8 +17,8 @@
#include <cmath>
#include <cstring>
#include <numeric>
#include <stdexcept>
#include <ailego/math/normalizer.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -16,7 +16,7 @@
#include <limits>
#include <vector>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -17,7 +17,6 @@
#include <cmath>
#include <numeric>
#include <random>
#include <ailego/container/heap.h>
#include <ailego/container/vector_array.h>
#include <ailego/math/euclidean_distance_matrix.h>
#include <ailego/math/hamming_distance_matrix.h>
@ -25,8 +24,10 @@
#include <ailego/math/norm2_matrix.h>
#include <ailego/math/normalizer.h>
#include <ailego/utility/matrix_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/container/heap.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/float_helper.h>
#include <zvec/ailego/utility/type_helper.h>
#include "lloyd_cluster.h"
namespace zvec {

View File

@ -17,8 +17,8 @@
#include <algorithm>
#include <random>
#include <ailego/parallel/lock.h>
#include <ailego/parallel/thread_pool.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/parallel/thread_pool.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec {
namespace ailego {

View File

@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "buffer_manager.h"
#include <atomic>
#include <mutex>
#include <ailego/logger/logger.h>
#include <ailego/pattern/defer.h>
#include <arrow/io/api.h>
#include <parquet/arrow/reader.h>
#include "ailego/internal/platform.h"
#include <zvec/ailego/buffer/buffer_manager.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/logger/logger.h>
#ifdef __clang__
#pragma clang diagnostic push

View File

@ -17,6 +17,7 @@
#include <algorithm>
#include <vector>
#include <ailego/utility/bitset_helper.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -15,8 +15,8 @@
#pragma once
#include <cmath>
#include <ailego/internal/platform.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec {
namespace ailego {

View File

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "params.h"
#include <cstring>
#include <ailego/encoding/json.h>
#include "ailego/logger/logger.h"
#include <zvec/ailego/container/params.h>
#include <zvec/ailego/encoding/json.h>
#include <zvec/ailego/logger/logger.h>
//! Global environ variable
extern char **environ;

View File

@ -14,8 +14,8 @@
#pragma once
#include "ailego/internal/platform.h"
#include "vector.h"
#include <zvec/ailego/container/vector.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "mod_json.h"
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zvec/ailego/encoding/json/mod_json.h>
#ifndef MOD_JSON_TOKEN_DEFOPTS
#define MOD_JSON_TOKEN_DEFOPTS 0 /* default options of token */

View File

@ -12,8 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "crc32c.h"
#include <ailego/internal/cpu_features.h>
#include <zvec/ailego/hash/crc32c.h>
#include <zvec/ailego/internal/platform.h>
#if !defined(__SSE4_2__) && !defined(__ARM_FEATURE_CRC32)
/**

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "file.h"
#include "ailego/internal/platform.h"
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/io/file.h>
#if !defined(_WIN64) && !defined(_WIN32)
#include <sys/mman.h>
#include <sys/stat.h>

View File

@ -14,7 +14,7 @@
#pragma once
#include "file.h"
#include <zvec/ailego/io/file.h>
namespace zvec {
namespace ailego {

View File

@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "logger.h"
#include <iostream>
#include <sstream>
#include <thread>
#include <ailego/io/file.h>
#include <ailego/utility/time_helper.h>
#include <zvec/ailego/io/file.h>
#include <zvec/ailego/logger/logger.h>
#include <zvec/ailego/utility/time_helper.h>
namespace zvec {
namespace ailego {

View File

@ -14,13 +14,9 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include "distance_utility.h"
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
#include "inner_product_matrix.h"
#include "norm2_matrix.h"
namespace zvec {
namespace ailego {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
#include "matrix_define.i"
#include <iostream>
#if !defined(__AVX__)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
#include "matrix_define.i"
#if !defined(__AVX__)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
#include "matrix_define.i"
#if defined(__AVX__) && defined(__GNUC__)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
#include "matrix_define.i"
#if defined(__AVX__)

View File

@ -14,7 +14,7 @@
#pragma once
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -14,9 +14,9 @@
#pragma once
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
#include "distance_utility.h"
namespace zvec {

View File

@ -13,6 +13,8 @@
// limitations under the License.
#include "hamming_distance_matrix.h"
#include <arrow/util/future.h>
#include <zvec/ailego/internal/platform.h>
#include "distance_matrix_popcnt.i"
namespace zvec {

View File

@ -15,8 +15,8 @@
#pragma once
#include <cmath>
#include <ailego/internal/platform.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec {
namespace ailego {

View File

@ -17,9 +17,9 @@
#include <cmath>
#include <string>
#include <vector>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
#include "distance_utility.h"
namespace zvec {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -14,10 +14,10 @@
#pragma once
#include <ailego/internal/platform.h>
#include <ailego/math/norm2_matrix.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
#include "distance_utility.h"
namespace zvec {

View File

@ -14,10 +14,9 @@
#pragma once
#include <cmath>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec {
namespace ailego {

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <zvec/ailego/internal/platform.h>
#include "norm1_matrix.h"
#include "norm_matrix_fp16.i"

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <zvec/ailego/internal/platform.h>
#include "norm1_matrix.h"
#include "norm_matrix_fp32.i"

View File

@ -15,9 +15,9 @@
#pragma once
#include <cmath>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec {
namespace ailego {

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <zvec/ailego/internal/platform.h>
#include "norm2_matrix.h"
#include "norm_matrix_fp16.i"

View File

@ -16,9 +16,9 @@
#include <vector>
#include <ailego/internal/cpu_features.h>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
#include "inner_product_distance_batch.h"
namespace zvec::ailego::DistanceBatch {

View File

@ -14,7 +14,7 @@
#pragma once
#include <ailego/math/distance_matrix.h>
#include "ailego/math/distance_matrix.h"
#include "cosine_distance_batch.h"
#include "inner_product_distance_batch.h"
#include "utils.h"

View File

@ -16,9 +16,9 @@
#include <vector>
#include <ailego/internal/cpu_features.h>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
#include "inner_product_distance_batch_impl.h"
#include "inner_product_distance_batch_impl_fp16.h"
#include "inner_product_distance_batch_impl_int8.h"

View File

@ -15,10 +15,10 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <ailego/math/inner_product_matrix.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec::ailego::DistanceBatch {

View File

@ -15,10 +15,10 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <ailego/math/matrix_utility.i>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec::ailego::DistanceBatch {

View File

@ -15,9 +15,9 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <ailego/utility/math_helper.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec::ailego::DistanceBatch {

View File

@ -14,9 +14,6 @@
#pragma once
#include <type_traits>
#include <ailego/math/distance_matrix.h>
namespace zvec::ailego::DistanceBatch {
typedef void (*DistanceBatchQueryPreprocessFunc)(void *query, size_t dim);

View File

@ -20,8 +20,8 @@
#if __cplusplus >= 201703L
#include <shared_mutex>
#endif
#include <ailego/internal/platform.h>
#include <ailego/pattern/defer.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -18,7 +18,7 @@
#include <condition_variable>
#include <mutex>
#include <type_traits>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "thread_pool.h"
#include <zvec/ailego/parallel/thread_pool.h>
#if (defined(__linux) || defined(__linux__)) && !defined(__ANDROID__)
#include <pthread.h>

View File

@ -14,7 +14,7 @@
#pragma once
#include "closure.h"
#include <zvec/ailego/pattern/closure.h>
namespace zvec {
namespace ailego {

View File

@ -15,7 +15,7 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {

View File

@ -13,6 +13,7 @@
// limitations under the License.
#include "bitset_helper.h"
#include <zvec/ailego/internal/platform.h>
#ifndef __SSE4_2__
#define bitset_popcount32 ailego_popcount32

View File

@ -15,7 +15,7 @@
#pragma once
#include <vector>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {

View File

@ -16,8 +16,8 @@
#include <fstream>
#include <iostream>
#include <thread>
#include <zvec/ailego/utility/file_helper.h>
#include <zvec/ailego/utility/string_helper.h>
#include "file_helper.h"
namespace zvec {
namespace ailego {

View File

@ -15,7 +15,7 @@
#pragma once
#include <string>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "file_helper.h"
#include <zvec/ailego/utility/file_helper.h>
#if defined(_WIN32) || defined(_WIN64)
#include <Windows.h>

View File

@ -13,7 +13,7 @@
// limitations under the License.
#include <ailego/internal/cpu_features.h>
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/float_helper.h>
// #if defined(__F16C__) && defined(__AVX__)

View File

@ -14,7 +14,7 @@
#pragma once
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -16,10 +16,8 @@
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <thread>
#include <zvec/ailego/utility/file_helper.h>
#include <zvec/ailego/utility/string_helper.h>
#include "file_helper.h"
#if defined(_WIN64) || defined(_WIN32)
#include <Windows.h>

View File

@ -14,7 +14,7 @@
#pragma once
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -14,7 +14,7 @@
#pragma once
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
namespace zvec {
namespace ailego {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "time_helper.h"
#include <zvec/ailego/utility/time_helper.h>
#if defined(_WIN64) || defined(_WIN32)
#include <Windows.h>

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ailego/internal/platform.h"
#include <zvec/ailego/internal/platform.h>
#ifndef AILEGO_VERSION_TO_STRING_
#define AILEGO_VERSION_TO_STRING_(x) #x

View File

@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/container/reservoir.h>
#include <ailego/utility/time_helper.h>
#include <zvec/ailego/utility/float_helper.h>
#include "framework/index_cluster.h"
#include "framework/index_error.h"
#include "framework/index_factory.h"
#include <zvec/ailego/utility/time_helper.h>
#include <zvec/core/framework/index_cluster.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include "cluster_params.h"
#include "linear_seeker.h"
#include "vector_mean.h"

View File

@ -13,9 +13,9 @@
// limitations under the License.
#include <ailego/algorithm/kmeans.h>
#include <ailego/container/reservoir.h>
#include "framework/index_cluster.h"
#include "framework/index_error.h"
#include "framework/index_factory.h"
#include <zvec/core/framework/index_cluster.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include "cluster_params.h"
namespace zvec {

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "framework/index_framework.h"
#include <zvec/core/framework/index_framework.h>
namespace zvec {
namespace core {

View File

@ -11,10 +11,10 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <ailego/container/params.h>
#include "framework/index_cluster.h"
#include "framework/index_error.h"
#include "framework/index_factory.h"
#include <zvec/ailego/container/params.h>
#include <zvec/core/framework/index_cluster.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include "cluster_params.h"
namespace zvec {

View File

@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "stratified_cluster_trainer.h"
#include <ailego/utility/time_helper.h>
#include <zvec/ailego/utility/string_helper.h>
#include "framework/index_error.h"
#include "framework/index_factory.h"
#include "framework/index_helper.h"
#include <zvec/ailego/utility/time_helper.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include <zvec/core/framework/index_helper.h>
#include "cluster_params.h"
namespace zvec {

View File

@ -13,8 +13,8 @@
// limitations under the License.
#pragma once
#include "framework/index_cluster.h"
#include "framework/index_trainer.h"
#include <zvec/core/framework/index_cluster.h>
#include <zvec/core/framework/index_trainer.h>
namespace zvec {
namespace core {

View File

@ -17,9 +17,9 @@
#include <cstring>
#include <type_traits>
#include <vector>
#include <ailego/container/vector.h>
#include <ailego/utility/type_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/float_helper.h>
#include <zvec/ailego/utility/type_helper.h>
namespace zvec {
namespace core {

View File

@ -13,8 +13,8 @@
// limitations under the License.
#pragma once
#include <framework/index_builder.h>
#include <framework/index_helper.h>
#include <zvec/core/framework/index_builder.h>
#include <zvec/core/framework/index_helper.h>
#include "flat_utility.h"
namespace zvec {

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "flat_searcher.h"
#include <framework/index_helper.h>
#include <framework/index_searcher.h>
#include <zvec/core/framework/index_helper.h>
#include <zvec/core/framework/index_searcher.h>
#include "flat_distance_matrix.h"
#include "flat_searcher_context.h"
#include "flat_searcher_provider.h"

View File

@ -13,8 +13,8 @@
// limitations under the License.
#pragma once
#include <ailego/container/params.h>
#include "framework/index_searcher.h"
#include <zvec/ailego/container/params.h>
#include <zvec/core/framework/index_searcher.h>
#include "flat_distance_matrix.h"
#include "flat_index_format.h"

View File

@ -14,8 +14,8 @@
#pragma once
#include <framework/index_document.h>
#include <framework/index_error.h>
#include <zvec/core/framework/index_document.h>
#include <zvec/core/framework/index_error.h>
#include "flat_index_format.h"
#include "flat_searcher.h"
#include "flat_utility.h"

View File

@ -13,7 +13,7 @@
// limitations under the License.
#include "flat_streamer.h"
#include <framework/index_factory.h>
#include <zvec/core/framework/index_factory.h>
#include "flat_streamer_context.h"
#include "flat_streamer_dumper.h"
#include "flat_streamer_provider.h"

View File

@ -15,7 +15,7 @@
#pragma once
#include <ailego/parallel/lock.h>
#include <framework/index_streamer.h>
#include <zvec/core/framework/index_streamer.h>
#include "flat_streamer_entity.h"
#include "flat_utility.h"

View File

@ -14,7 +14,7 @@
#include "flat_streamer_entity.h"
#include <cstdint>
#include "framework/index_error.h"
#include <zvec/core/framework/index_error.h>
#include "flat_utility.h"
namespace zvec {

View File

@ -17,10 +17,10 @@
#include <unordered_map>
#include <ailego/parallel/lock.h>
#include <ailego/utility/memory_helper.h>
#include <framework/index_context.h>
#include <framework/index_framework.h>
#include <framework/index_streamer.h>
#include <zvec/ailego/utility/string_helper.h>
#include <zvec/core/framework/index_context.h>
#include <zvec/core/framework/index_framework.h>
#include <zvec/core/framework/index_streamer.h>
#include "flat_index_format.h"
#include "flat_utility.h"

View File

@ -15,11 +15,11 @@
#include <mutex>
#include <ailego/utility/matrix_helper.h>
#include <ailego/utility/time_helper.h>
#include "framework/index_error.h"
#include "framework/index_factory.h"
#include "framework/index_meta.h"
#include "framework/index_metric.h"
#include <zvec/ailego/utility/time_helper.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include <zvec/core/framework/index_meta.h>
#include <zvec/core/framework/index_metric.h>
namespace zvec {
namespace core {

View File

@ -16,10 +16,10 @@
#include <cstddef>
#include <cstdint>
#include <utility>
#include <ailego/utility/time_helper.h>
#include <framework/index_error.h>
#include <framework/index_logger.h>
#include <utility/sparse_utility.h>
#include <zvec/ailego/utility/time_helper.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_logger.h>
#include "flat_sparse_index_format.h"
#include "flat_sparse_utility.h"

View File

@ -15,11 +15,11 @@
#pragma once
#include <cstdint>
#include <ailego/parallel/thread_pool.h>
#include <framework/index_builder.h>
#include <framework/index_dumper.h>
#include <framework/index_framework.h>
#include <framework/index_holder.h>
#include <zvec/ailego/parallel/thread_pool.h>
#include <zvec/core/framework/index_builder.h>
#include <zvec/core/framework/index_dumper.h>
#include <zvec/core/framework/index_framework.h>
#include <zvec/core/framework/index_holder.h>
namespace zvec {
namespace core {

View File

@ -15,9 +15,9 @@
#pragma once
#include <cstdint>
#include <framework/index_context.h>
#include <framework/index_document.h>
#include <utility/sparse_utility.h>
#include <zvec/core/framework/index_context.h>
#include <zvec/core/framework/index_document.h>
#include "flat_sparse_entity.h"
#include "flat_sparse_searcher.h"
#include "flat_sparse_streamer.h"

View File

@ -15,7 +15,7 @@
#pragma once
#include <unordered_map>
#include <framework/index_framework.h>
#include <zvec/core/framework/index_framework.h>
#include "flat_sparse_index_format.h"
namespace zvec {

View File

@ -14,7 +14,7 @@
#pragma once
#include <framework/index_framework.h>
#include <zvec/core/framework/index_framework.h>
namespace zvec {
namespace core {

View File

@ -15,9 +15,9 @@
#pragma once
#include <string>
#include <framework/index_meta.h>
#include <utility/sparse_utility.h>
#include "framework/index_logger.h"
#include <zvec/core/framework/index_logger.h>
#include <zvec/core/framework/index_meta.h>
#include "flat_sparse_streamer_entity.h"
namespace zvec {

View File

@ -13,8 +13,8 @@
// limitations under the License.
#include "flat_sparse_searcher.h"
#include <framework/index_error.h>
#include <utility/sparse_utility.h>
#include <zvec/core/framework/index_error.h>
#include "flat_sparse_context.h"
#include "flat_sparse_provider.h"
#include "flat_sparse_search.h"

View File

@ -13,8 +13,8 @@
// limitations under the License.
#include "flat_sparse_searcher_entity.h"
#include <framework/index_helper.h>
#include <framework/index_logger.h>
#include <zvec/core/framework/index_helper.h>
#include <zvec/core/framework/index_logger.h>
#include "flat_sparse_utility.h"
namespace zvec {

View File

@ -14,7 +14,7 @@
#pragma once
#include <framework/index_framework.h>
#include <zvec/core/framework/index_framework.h>
#include "flat_sparse_entity.h"
#include "flat_sparse_index_format.h"

View File

@ -14,10 +14,10 @@
#include "flat_sparse_streamer.h"
#include <cstdint>
#include <framework/index_factory.h>
#include <utility/sparse_utility.h>
#include "framework/index_error.h"
#include "framework/index_meta.h"
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include <zvec/core/framework/index_meta.h>
#include "flat_sparse_context.h"
#include "flat_sparse_provider.h"
#include "flat_sparse_search.h"

View File

@ -15,7 +15,7 @@
#pragma once
#include <ailego/parallel/lock.h>
#include <framework/index_streamer.h>
#include <zvec/core/framework/index_streamer.h>
#include "flat_sparse_streamer_entity.h"
namespace zvec {

View File

@ -16,11 +16,11 @@
#include <cstdint>
#include <memory>
#include <utility>
#include <ailego/internal/platform.h>
#include <ailego/utility/memory_helper.h>
#include "ailego/utility/time_helper.h"
#include "framework/index_error.h"
#include "framework/index_logger.h"
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/time_helper.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_logger.h>
#include "flat_sparse_index_format.h"
#include "flat_sparse_utility.h"

View File

@ -20,11 +20,11 @@
#include <string>
#include <vector>
#include <ailego/parallel/lock.h>
#include <framework/index_dumper.h>
#include <framework/index_meta.h>
#include <framework/index_storage.h>
#include <framework/index_streamer.h>
#include <zvec/ailego/utility/string_helper.h>
#include <zvec/core/framework/index_dumper.h>
#include <zvec/core/framework/index_meta.h>
#include <zvec/core/framework/index_storage.h>
#include <zvec/core/framework/index_streamer.h>
#include "flat_sparse_entity.h"
#include "flat_sparse_index_format.h"
#include "flat_sparse_utility.h"

View File

@ -15,9 +15,9 @@
#include <iostream>
#include <thread>
#include <ailego/pattern/defer.h>
#include "framework/index_error.h"
#include "framework/index_factory.h"
#include "framework/index_logger.h"
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_factory.h>
#include <zvec/core/framework/index_logger.h>
#include "hnsw_algorithm.h"
#include "hnsw_params.h"

View File

@ -13,8 +13,8 @@
// limitations under the License.
#pragma once
#include <ailego/parallel/thread_pool.h>
#include "framework/index_builder.h"
#include <zvec/ailego/parallel/thread_pool.h>
#include <zvec/core/framework/index_builder.h>
#include "hnsw_algorithm.h"
#include "hnsw_builder_entity.h"

View File

@ -13,7 +13,7 @@
// limitations under the License.
#include "hnsw_builder_entity.h"
#include <iostream>
#include <ailego/hash/crc32c.h>
#include <zvec/ailego/hash/crc32c.h>
#include "utility/sparse_utility.h"
namespace zvec {

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include <ailego/internal/platform.h>
#include <zvec/ailego/internal/platform.h>
#include "hnsw_entity.h"
namespace zvec {

View File

@ -14,12 +14,12 @@
#include "hnsw_chunk.h"
#include <chrono>
#include <random>
#include <ailego/hash/crc32c.h>
#include <ailego/utility/time_helper.h>
#include "framework/index_error.h"
#include "framework/index_helper.h"
#include "framework/index_logger.h"
#include "framework/index_streamer.h"
#include <zvec/ailego/hash/crc32c.h>
#include <zvec/ailego/utility/time_helper.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_helper.h>
#include <zvec/core/framework/index_logger.h>
#include <zvec/core/framework/index_streamer.h>
namespace zvec {
namespace core {

View File

@ -19,13 +19,13 @@
#include <atomic>
#include <cstddef>
#include <mutex>
#include <ailego/internal/platform.h>
#include <ailego/utility/memory_helper.h>
#include <zvec/ailego/internal/platform.h>
#include <zvec/ailego/utility/string_helper.h>
#include "framework/index_error.h"
#include "framework/index_logger.h"
#include "framework/index_storage.h"
#include "framework/index_streamer.h"
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_logger.h>
#include <zvec/core/framework/index_storage.h>
#include <zvec/core/framework/index_streamer.h>
namespace zvec {
namespace core {

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "framework/index_context.h"
#include <zvec/core/framework/index_context.h>
#include "utility/sparse_utility.h"
#include "utility/visit_filter.h"
#include "hnsw_dist_calculator.h"

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "framework/index_meta.h"
#include <zvec/core/framework/index_meta.h>
#include "hnsw_entity.h"
namespace zvec {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "hnsw_entity.h"
#include "framework/index_stats.h"
#include <zvec/core/framework/index_stats.h>
#include "utility/sparse_utility.h"
namespace zvec {

View File

@ -14,12 +14,12 @@
#pragma once
#include <string.h>
#include <ailego/container/heap.h>
#include <ailego/utility/memory_helper.h>
#include "ailego/logger/logger.h"
#include "framework/index_dumper.h"
#include "framework/index_error.h"
#include "framework/index_storage.h"
#include <zvec/ailego/container/heap.h>
#include <zvec/ailego/logger/logger.h>
#include <zvec/core/framework/index_dumper.h>
#include <zvec/core/framework/index_error.h>
#include <zvec/core/framework/index_storage.h>
namespace zvec {
namespace core {

View File

@ -13,9 +13,9 @@
// limitations under the License.
#pragma once
#include "framework/index_provider.h"
#include "framework/index_searcher.h"
#include "framework/index_streamer.h"
#include <zvec/core/framework/index_provider.h>
#include <zvec/core/framework/index_searcher.h>
#include <zvec/core/framework/index_streamer.h>
#include "hnsw_entity.h"
namespace zvec {

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "framework/index_framework.h"
#include <zvec/core/framework/index_framework.h>
#include "hnsw_searcher_entity.h"
#include "hnsw_streamer.h"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "hnsw_searcher_entity.h"
#include <ailego/hash/crc32c.h>
#include <zvec/ailego/hash/crc32c.h>
#include "utility/sparse_utility.h"
namespace zvec {

View File

@ -14,7 +14,7 @@
#pragma once
#include <ailego/parallel/lock.h>
#include "framework/index_framework.h"
#include <zvec/core/framework/index_framework.h>
#include "hnsw_algorithm.h"
#include "hnsw_streamer_entity.h"

Some files were not shown because too many files have changed in this diff Show More