From 0ebf5621a62f527dd07717553517d6b89d0bb82a Mon Sep 17 00:00:00 2001 From: feihongxu0824 Date: Mon, 26 Jan 2026 20:01:44 +0800 Subject: [PATCH] feat: support core cpp sdk (#30) * support core cpp sdk * fix * fix * fix * fix cr --- examples/c++/core/main.cc | 86 +++++++ src/ailego/algorithm/binary_quantizer.h | 2 +- src/ailego/algorithm/integer_quantizer.cc | 2 +- src/ailego/algorithm/integer_quantizer.h | 2 +- src/ailego/algorithm/kmeans.h | 5 +- src/ailego/algorithm/lloyd_cluster.h | 4 +- src/ailego/buffer/buffer_manager.cc | 6 +- src/ailego/container/bitmap.h | 1 + src/ailego/container/bloom_filter.h | 4 +- src/ailego/container/params.cc | 6 +- src/ailego/container/vector_array.h | 4 +- src/ailego/encoding/json/mod_json.c | 2 +- src/ailego/hash/crc32c.cc | 3 +- src/ailego/io/file.cc | 4 +- src/ailego/io/file_lock.h | 2 +- src/ailego/logger/logger.cc | 6 +- src/ailego/math/cosine_distance_matrix.h | 8 +- src/ailego/math/distance_matrix_fp16.i | 2 +- src/ailego/math/distance_matrix_fp32.i | 2 +- src/ailego/math/distance_matrix_int32.i | 2 +- src/ailego/math/distance_matrix_int64.i | 2 +- src/ailego/math/distance_utility.h | 2 +- src/ailego/math/euclidean_distance_matrix.h | 4 +- src/ailego/math/hamming_distance_matrix.cc | 2 + src/ailego/math/hamming_distance_matrix.h | 4 +- src/ailego/math/inner_product_matrix.h | 4 +- src/ailego/math/matrix_utility.i | 2 +- .../math/mips_euclidean_distance_matrix.h | 4 +- src/ailego/math/norm1_matrix.h | 5 +- src/ailego/math/norm1_matrix_fp16.cc | 1 + src/ailego/math/norm1_matrix_fp32.cc | 1 + src/ailego/math/norm2_matrix.h | 4 +- src/ailego/math/norm2_matrix_fp16.cc | 1 + src/ailego/math_batch/cosine_distance_batch.h | 4 +- src/ailego/math_batch/distance_batch.h | 2 +- .../math_batch/inner_product_distance_batch.h | 4 +- .../inner_product_distance_batch_impl.h | 4 +- .../inner_product_distance_batch_impl_fp16.h | 4 +- .../inner_product_distance_batch_impl_int8.h | 4 +- src/ailego/math_batch/utils.h | 3 - src/ailego/parallel/lock.h | 2 +- src/ailego/parallel/semaphore.h | 2 +- src/ailego/parallel/thread_pool.cc | 2 +- src/ailego/pattern/scope_guard.h | 2 +- src/ailego/utility/bit_string_helper.h | 2 +- src/ailego/utility/bitset_helper.cc | 1 + src/ailego/utility/bitset_helper.h | 2 +- src/ailego/utility/concurrency_helper.cc | 2 +- src/ailego/utility/dl_helper.h | 2 +- src/ailego/utility/file_helper.cc | 2 +- src/ailego/utility/float_helper.cc | 2 +- src/ailego/utility/matrix_helper.h | 2 +- src/ailego/utility/memory_helper.cc | 4 +- src/ailego/utility/memory_helper.h | 2 +- src/ailego/utility/process_helper.h | 2 +- src/ailego/utility/time_helper.cc | 2 +- src/ailego/version.i | 2 +- src/core/algorithm/cluster/kmeans_cluster.cc | 8 +- .../algorithm/cluster/opt_kmeans_cluster.cc | 6 +- src/core/algorithm/cluster/seeker.h | 2 +- .../algorithm/cluster/stratified_cluster.cc | 8 +- .../cluster/stratified_cluster_trainer.cc | 8 +- .../cluster/stratified_cluster_trainer.h | 4 +- src/core/algorithm/cluster/vector_mean.h | 4 +- src/core/algorithm/flat/flat_builder.h | 4 +- src/core/algorithm/flat/flat_searcher.cc | 4 +- src/core/algorithm/flat/flat_searcher.h | 4 +- .../algorithm/flat/flat_searcher_context.h | 4 +- src/core/algorithm/flat/flat_streamer.cc | 2 +- src/core/algorithm/flat/flat_streamer.h | 2 +- .../algorithm/flat/flat_streamer_entity.cc | 2 +- .../algorithm/flat/flat_streamer_entity.h | 6 +- src/core/algorithm/flat/flat_utility.h | 10 +- .../flat_sparse/flat_sparse_builder.cc | 6 +- .../flat_sparse/flat_sparse_builder.h | 10 +- .../flat_sparse/flat_sparse_context.h | 4 +- .../flat_sparse/flat_sparse_entity.h | 2 +- .../flat_sparse/flat_sparse_index_format.h | 2 +- .../flat_sparse/flat_sparse_provider.h | 4 +- .../flat_sparse/flat_sparse_searcher.cc | 2 +- .../flat_sparse_searcher_entity.cc | 4 +- .../flat_sparse/flat_sparse_searcher_entity.h | 2 +- .../flat_sparse/flat_sparse_streamer.cc | 6 +- .../flat_sparse/flat_sparse_streamer.h | 2 +- .../flat_sparse_streamer_entity.cc | 8 +- .../flat_sparse/flat_sparse_streamer_entity.h | 8 +- src/core/algorithm/hnsw/hnsw_builder.cc | 6 +- src/core/algorithm/hnsw/hnsw_builder.h | 4 +- .../algorithm/hnsw/hnsw_builder_entity.cc | 2 +- src/core/algorithm/hnsw/hnsw_builder_entity.h | 2 +- src/core/algorithm/hnsw/hnsw_chunk.cc | 12 +- src/core/algorithm/hnsw/hnsw_chunk.h | 10 +- src/core/algorithm/hnsw/hnsw_context.h | 2 +- .../algorithm/hnsw/hnsw_dist_calculator.h | 2 +- src/core/algorithm/hnsw/hnsw_entity.cc | 2 +- src/core/algorithm/hnsw/hnsw_entity.h | 10 +- src/core/algorithm/hnsw/hnsw_index_provider.h | 6 +- src/core/algorithm/hnsw/hnsw_searcher.h | 2 +- .../algorithm/hnsw/hnsw_searcher_entity.cc | 2 +- src/core/algorithm/hnsw/hnsw_streamer.h | 2 +- .../algorithm/hnsw/hnsw_streamer_entity.h | 4 +- .../hnsw_sparse/hnsw_sparse_builder.cc | 6 +- .../hnsw_sparse/hnsw_sparse_builder.h | 4 +- .../hnsw_sparse/hnsw_sparse_builder_entity.cc | 2 +- .../hnsw_sparse/hnsw_sparse_builder_entity.h | 2 +- .../hnsw_sparse/hnsw_sparse_chunk.cc | 12 +- .../algorithm/hnsw_sparse/hnsw_sparse_chunk.h | 10 +- .../hnsw_sparse/hnsw_sparse_context.h | 2 +- .../hnsw_sparse/hnsw_sparse_dist_calculator.h | 2 +- .../hnsw_sparse/hnsw_sparse_entity.h | 10 +- .../hnsw_sparse/hnsw_sparse_searcher.h | 2 +- .../hnsw_sparse_searcher_entity.cc | 2 +- .../hnsw_sparse/hnsw_sparse_streamer.h | 2 +- .../hnsw_sparse/hnsw_sparse_streamer_entity.h | 4 +- src/core/algorithm/ivf/ivf_builder.h | 4 +- src/core/algorithm/ivf/ivf_centroid_index.cc | 4 +- src/core/algorithm/ivf/ivf_centroid_index.h | 4 +- .../algorithm/ivf/ivf_distance_calculator.h | 4 +- src/core/algorithm/ivf/ivf_dumper.h | 4 +- src/core/algorithm/ivf/ivf_entity.h | 4 +- src/core/algorithm/ivf/ivf_index_format.h | 2 +- src/core/algorithm/ivf/ivf_index_provider.h | 2 +- src/core/algorithm/ivf/ivf_searcher.cc | 4 +- src/core/algorithm/ivf/ivf_searcher.h | 2 +- src/core/algorithm/ivf/ivf_searcher_context.h | 2 +- src/core/algorithm/ivf/ivf_streamer.cc | 4 +- src/core/algorithm/ivf/ivf_streamer.h | 2 +- src/core/algorithm/ivf/ivf_utility.h | 2 +- src/core/framework/index_cluster.cc | 7 +- src/core/framework/index_context.cc | 3 +- src/core/framework/index_converter.cc | 7 +- src/core/framework/index_error.cc | 2 +- src/core/framework/index_factory.cc | 3 +- src/core/framework/index_flow.cc | 7 +- src/core/framework/index_framework.h | 31 --- src/core/framework/index_helper.cc | 5 +- src/core/framework/index_logger.cc | 6 +- src/core/framework/index_mapping.cc | 9 +- src/core/framework/index_meta.cc | 6 +- src/core/framework/index_plugin.cc | 2 +- src/core/framework/index_version.cc | 3 +- src/core/interface/index.cc | 32 ++- src/core/interface/index_factory.cc | 190 ++++++++++++++- src/core/interface/index_factory.h | 225 ------------------ src/core/interface/index_param.cc | 36 ++- src/core/interface/indexes/flat_index.cc | 5 +- src/core/interface/indexes/hnsw_index.cc | 2 +- src/core/interface/indexes/ivf_index.cc | 2 +- src/core/interface/utils/utils.h | 5 +- src/core/metric/cosine_metric.cc | 4 +- src/core/metric/euclidean_metric.cc | 6 +- src/core/metric/hamming_metric.cc | 6 +- src/core/metric/inner_product_metric.cc | 6 +- src/core/metric/mips_euclidean_metric.cc | 4 +- src/core/metric/quantized_integer_metric.cc | 4 +- .../metric/quantized_integer_metric_matrix.h | 4 +- .../mixed_reducer/mixed_streamer_reducer.cc | 13 +- .../mixed_reducer/mixed_streamer_reducer.h | 11 +- src/core/quantizer/binary_converter.cc | 4 +- src/core/quantizer/binary_reformer.cc | 4 +- src/core/quantizer/cosine_converter.cc | 4 +- src/core/quantizer/cosine_reformer.cc | 4 +- src/core/quantizer/half_float_converter.cc | 2 +- src/core/quantizer/half_float_reformer.cc | 2 +- .../quantizer/integer_quantizer_converter.cc | 4 +- .../quantizer/integer_quantizer_reformer.cc | 4 +- src/core/quantizer/mips_converter.cc | 8 +- src/core/quantizer/mips_reformer.cc | 4 +- src/core/quantizer/record_quantizer.h | 2 +- src/core/utility/basic_refiner.cc | 4 +- src/core/utility/buffer_storage.cc | 10 +- src/core/utility/file_dumper.cc | 10 +- src/core/utility/file_read_storage.cc | 8 +- src/core/utility/memory_dumper.cc | 10 +- src/core/utility/memory_read_storage.cc | 10 +- src/core/utility/mmap_file_read_storage.cc | 8 +- src/core/utility/mmap_file_storage.cc | 8 +- src/core/utility/sparse_utility.h | 6 +- src/core/utility/visit_filter.h | 4 +- src/db/collection.cc | 6 +- src/db/common/concurrent_roaring_bitmap.cc | 2 +- src/db/common/concurrent_roaring_bitmap.h | 6 +- src/db/common/file_helper.h | 4 +- src/db/common/global_resource.cc | 2 +- src/db/common/global_resource.h | 2 +- src/db/common/glogger.h | 4 +- src/db/common/logger.h | 6 +- src/db/common/profiler.h | 6 +- src/db/common/rocbsdb_context.cc | 2 +- src/db/common/rocksdb_context.h | 2 +- src/db/common/typedef.h | 2 +- .../column/inverted_column/inverted_codec.h | 2 +- .../inverted_column_indexer_write.cc | 2 +- .../inverted_column/inverted_doc_range.h | 4 +- .../inverted_column/inverted_indexer.cc | 2 +- .../column/vector_column/engine_helper.hpp | 4 +- .../vector_column/vector_column_indexer.cc | 1 + .../vector_column/vector_column_indexer.h | 5 +- .../vector_column/vector_column_params.h | 8 +- .../vector_column/vector_index_results.h | 2 +- src/db/index/common/id_map.cc | 2 +- src/db/index/common/id_map.h | 2 +- src/db/index/common/type_helper.cc | 2 +- src/db/index/common/type_helper.h | 3 +- src/db/index/common/version_manager.cc | 2 +- src/db/index/segment/segment.cc | 6 +- src/db/index/segment/segment_helper.cc | 2 +- .../index/storage/bufferpool_forward_store.cc | 4 +- .../index/storage/bufferpool_forward_store.h | 2 +- src/db/index/storage/chunked_file_writer.cc | 2 +- .../index/storage/lazy_record_batch_reader.h | 2 +- src/db/index/storage/memory_forward_store.cc | 2 +- src/db/index/storage/mmap_forward_store.cc | 2 +- src/db/index/storage/wal/local_wal_file.cc | 4 +- src/db/index/storage/wal/local_wal_file.h | 2 +- src/db/sqlengine/analyzer/query_analyzer.cc | 4 +- src/db/sqlengine/analyzer/query_info.h | 4 +- .../sqlengine/analyzer/query_info_helper.cc | 2 +- src/db/sqlengine/analyzer/query_node.cc | 2 +- .../sqlengine/analyzer/query_node_walker.cc | 2 +- src/db/sqlengine/common/util.cc | 2 +- .../parser/zvec_cached_sql_parser.cc | 2 +- src/db/sqlengine/parser/zvec_parser.cc | 4 +- src/db/sqlengine/parser/zvec_sql_parser.cc | 2 +- src/db/sqlengine/planner/doc_filter.cc | 2 +- .../sqlengine/planner/invert_recall_node.cc | 2 +- src/db/sqlengine/planner/invert_search.cc | 2 +- src/db/sqlengine/planner/optimizer.cc | 2 +- src/db/sqlengine/planner/plan_info.cc | 2 +- src/db/sqlengine/planner/query_planner.cc | 4 +- src/db/sqlengine/planner/segment_node.cc | 4 +- src/db/sqlengine/planner/segment_node.h | 2 +- .../sqlengine/planner/vector_recall_node.cc | 4 +- src/db/sqlengine/sqlengine_impl.cc | 2 +- .../zvec}/ailego/buffer/buffer_manager.h | 2 +- .../zvec}/ailego/container/blob.h | 2 +- .../zvec}/ailego/container/cube.h | 2 +- .../zvec}/ailego/container/heap.h | 0 .../zvec}/ailego/container/hypercube.h | 2 +- .../zvec}/ailego/container/params.h | 2 +- .../zvec}/ailego/container/vector.h | 2 +- src/{ => include/zvec}/ailego/encoding/json.h | 2 +- .../zvec}/ailego/encoding/json/mod_json.h | 0 .../ailego/encoding/json/mod_json_plus.h | 0 src/{ => include/zvec}/ailego/hash/crc32c.h | 2 +- .../zvec}/ailego/hash/jump_hash.h | 3 +- .../zvec}/ailego/internal/platform.h | 0 src/{ => include/zvec}/ailego/io/file.h | 2 +- src/{ => include/zvec}/ailego/io/mmap_file.h | 4 +- src/{ => include/zvec}/ailego/logger/logger.h | 4 +- .../zvec}/ailego/parallel/thread_pool.h | 2 +- .../zvec}/ailego/parallel/thread_queue.h | 4 +- .../zvec}/ailego/pattern/closure.h | 0 .../zvec}/ailego/pattern/factory.h | 0 .../zvec}/ailego/utility/file_helper.h | 0 .../zvec}/ailego/utility/time_helper.h | 2 +- .../zvec}/ailego/utility/type_helper.h | 0 .../zvec}/core/framework/index_builder.h | 8 +- .../zvec}/core/framework/index_bundle.h | 7 +- .../zvec}/core/framework/index_cluster.h | 16 +- .../zvec}/core/framework/index_context.h | 14 +- .../zvec}/core/framework/index_converter.h | 8 +- .../zvec}/core/framework/index_document.h | 4 +- .../zvec}/core/framework/index_dumper.h | 6 +- .../zvec}/core/framework/index_error.h | 0 .../zvec}/core/framework/index_factory.h | 29 +-- .../zvec}/core/framework/index_features.h | 2 +- .../zvec}/core/framework/index_filter.h | 0 .../zvec}/core/framework/index_flow.h | 5 +- .../zvec}/core/framework/index_format.h | 4 +- .../zvec/core/framework/index_framework.h | 32 +++ .../zvec}/core/framework/index_groupby.h | 0 .../zvec}/core/framework/index_helper.h | 9 +- .../zvec}/core/framework/index_holder.h | 9 +- .../zvec}/core/framework/index_logger.h | 6 +- .../zvec}/core/framework/index_mapping.h | 6 +- .../zvec}/core/framework/index_memory.h | 0 .../zvec}/core/framework/index_meta.h | 2 +- .../zvec}/core/framework/index_metric.h | 10 +- .../zvec}/core/framework/index_module.h | 0 .../zvec}/core/framework/index_packer.h | 10 +- .../zvec}/core/framework/index_plugin.h | 1 + .../zvec}/core/framework/index_provider.h | 7 +- .../zvec}/core/framework/index_reducer.h | 18 +- .../zvec}/core/framework/index_refiner.h | 10 +- .../zvec}/core/framework/index_reformer.h | 4 +- .../zvec}/core/framework/index_runner.h | 18 +- .../zvec}/core/framework/index_searcher.h | 16 +- .../core/framework/index_segment_storage.h | 8 +- .../zvec}/core/framework/index_stats.h | 3 +- .../zvec}/core/framework/index_storage.h | 9 +- .../zvec}/core/framework/index_streamer.h | 11 +- .../zvec}/core/framework/index_threads.h | 10 +- .../zvec}/core/framework/index_trainer.h | 17 +- .../zvec}/core/framework/index_unpacker.h | 9 +- .../zvec}/core/framework/index_version.h | 1 + src/include/zvec/core/interface/constants.h | 14 ++ src/{ => include/zvec}/core/interface/index.h | 57 ++--- .../zvec/core/interface/index_factory.h | 54 +++++ .../zvec}/core/interface/index_param.h | 39 +-- .../core/interface/index_param_builders.h | 23 +- tests/ailego/algorithm/kmeans_test.cc | 4 +- tests/ailego/buffer/buffer_manager_test.cc | 4 +- tests/ailego/container/bitmap_test.cc | 2 +- tests/ailego/container/blob_test.cc | 2 +- tests/ailego/container/cube_test.cc | 2 +- tests/ailego/container/heap_test.cc | 4 +- tests/ailego/container/hypercube_test.cc | 2 +- tests/ailego/container/params_test.cc | 2 +- tests/ailego/container/vector_array_test.cc | 2 +- tests/ailego/container/vector_test.cc | 4 +- tests/ailego/encoding/json_parse_test.cc | 2 +- tests/ailego/hash/crc32c_test.cc | 4 +- tests/ailego/hash/jump_hash_test.cc | 6 +- tests/ailego/io/file_test.cc | 2 +- tests/ailego/io/mmap_file_test.cc | 4 +- tests/ailego/logger/logger_test.cc | 4 +- .../math/cosine_distance_matrix_fp16_test.cc | 4 +- .../math/cosine_distance_matrix_fp32_test.cc | 4 +- .../math/cosine_distance_matrix_int8_test.cc | 4 +- .../euclidean_distance_matrix_fp16_test.cc | 4 +- .../euclidean_distance_matrix_fp32_test.cc | 4 +- .../euclidean_distance_matrix_int4_test.cc | 4 +- .../euclidean_distance_matrix_int8_test.cc | 4 +- .../math/hamming_distance_matrix_test.cc | 4 +- .../math/inner_product_matrix_fp16_test.cc | 4 +- .../math/inner_product_matrix_fp32_test.cc | 4 +- .../math/inner_product_matrix_int4_test.cc | 4 +- .../math/inner_product_matrix_int8_test.cc | 4 +- ...ips_euclidean_distance_matrix_fp16_test.cc | 4 +- ...ips_euclidean_distance_matrix_fp32_test.cc | 4 +- ...ips_euclidean_distance_matrix_int4_test.cc | 4 +- ...ips_euclidean_distance_matrix_int8_test.cc | 4 +- tests/ailego/math/norm_matrix_fp16_test.cc | 4 +- tests/ailego/math/norm_matrix_fp32_test.cc | 4 +- tests/ailego/math/norm_matrix_int4_test.cc | 4 +- tests/ailego/math/norm_matrix_int8_test.cc | 4 +- tests/ailego/math/normalizer_test.cc | 4 +- tests/ailego/parallel/lock_test.cc | 2 +- .../ailego/parallel/multi_thread_list_test.cc | 2 +- tests/ailego/parallel/semaphore_test.cc | 4 +- tests/ailego/parallel/thread_pool_test.cc | 2 +- tests/ailego/parallel/thread_queue_test.cc | 4 +- tests/ailego/pattern/closure_test.cc | 4 +- tests/ailego/pattern/factory_test.cc | 2 +- tests/ailego/pattern/singleton_test.cc | 2 +- .../ailego/utility/bit_string_helper_test.cc | 2 +- tests/ailego/utility/bitset_helper_test.cc | 2 +- tests/ailego/utility/time_helper_test.cc | 2 +- tests/ailego/utility/type_helper_test.cc | 2 +- .../algorithm/cluster/kmeans_cluster_test.cc | 6 +- .../cluster/opt_kmeans_cluster_test.cc | 4 +- .../algorithm/flat/flat_searcher_test.cpp | 2 +- .../flat/flat_streamer_buffer_test.cpp | 6 +- .../flat/flat_streamer_buffer_time_test.cpp | 6 +- .../core/algorithm/flat/flat_streamer_test.cc | 8 +- .../flat_sparse/flat_sparse_searcher_test.cc | 6 +- .../flat_sparse_streamer_buffer_test.cc | 6 +- .../flat_sparse/flat_sparse_streamer_test.cc | 6 +- .../core/algorithm/hnsw/hnsw_builder_test.cc | 4 +- .../algorithm/hnsw/hnsw_searcher_test.cpp | 8 +- .../hnsw/hnsw_streamer_buffer_test.cpp | 6 +- .../core/algorithm/hnsw/hnsw_streamer_test.cc | 2 +- .../hnsw_sparse/hnsw_sparse_builder_test.cc | 4 +- .../hnsw_sparse/hnsw_sparse_searcher_test.cc | 4 +- .../hnsw_sparse_streamer_buffer_test.cpp | 2 +- .../hnsw_sparse/hnsw_sparse_streamer_test.cc | 2 +- tests/core/algorithm/ivf/ivf_builder_test.cc | 2 +- tests/core/algorithm/ivf/ivf_searcher_test.cc | 2 +- tests/core/interface/index_interface_test.cc | 10 +- tests/core/metric/cosine_metric_test.cc | 2 +- tests/core/metric/euclidean_metric_test.cc | 2 +- tests/core/metric/hamming_metric_test.cc | 2 +- .../core/metric/inner_product_metric_test.cc | 2 +- .../metric/quantized_integer_metric_test.cc | 8 +- .../quantizer/half_float_reformer_test.cc | 8 +- .../integer_quantizer_reformer_test.cc | 6 +- tests/core/utility/buffer_storage_test.cpp | 6 +- tests/core/utility/file_dumper_test.cc | 6 +- tests/core/utility/memory_dumper_test.cc | 4 +- .../core/utility/mmap_file_container_test.cc | 4 +- tests/core/utility/mmap_file_storage_test.cpp | 6 +- tests/db/collection_test.cc | 6 +- tests/db/index/segment/segment_test.cc | 2 +- tests/db/index/storage/wal_file_test.cc | 4 +- tests/db/index/utils/utils.cc | 2 +- tests/db/sqlengine/mock_segment.h | 2 +- tools/core/bench_original.cc | 8 +- tools/core/flow.h | 2 +- tools/core/helper.h | 24 +- tools/core/index_meta_helper.h | 2 +- tools/core/local_builder.cc | 18 +- tools/core/local_builder_original.cc | 16 +- tools/core/meta_segment_common.h | 2 +- tools/core/recall_original.cc | 14 +- tools/core/txt2vecs.cc | 2 +- tools/core/vecs_index_holder.h | 4 +- tools/core/vecs_reader.h | 4 +- 398 files changed, 1303 insertions(+), 1166 deletions(-) delete mode 100644 src/core/framework/index_framework.h delete mode 100644 src/core/interface/index_factory.h rename src/{ => include/zvec}/ailego/buffer/buffer_manager.h (99%) rename src/{ => include/zvec}/ailego/container/blob.h (98%) rename src/{ => include/zvec}/ailego/container/cube.h (99%) rename src/{ => include/zvec}/ailego/container/heap.h (100%) rename src/{ => include/zvec}/ailego/container/hypercube.h (99%) rename src/{ => include/zvec}/ailego/container/params.h (99%) rename src/{ => include/zvec}/ailego/container/vector.h (99%) rename src/{ => include/zvec}/ailego/encoding/json.h (92%) rename src/{ => include/zvec}/ailego/encoding/json/mod_json.h (100%) rename src/{ => include/zvec}/ailego/encoding/json/mod_json_plus.h (100%) rename src/{ => include/zvec}/ailego/hash/crc32c.h (95%) rename src/{ => include/zvec}/ailego/hash/jump_hash.h (96%) rename src/{ => include/zvec}/ailego/internal/platform.h (100%) rename src/{ => include/zvec}/ailego/io/file.h (99%) rename src/{ => include/zvec}/ailego/io/mmap_file.h (98%) rename src/{ => include/zvec}/ailego/logger/logger.h (98%) rename src/{ => include/zvec}/ailego/parallel/thread_pool.h (99%) rename src/{ => include/zvec}/ailego/parallel/thread_queue.h (98%) rename src/{ => include/zvec}/ailego/pattern/closure.h (100%) rename src/{ => include/zvec}/ailego/pattern/factory.h (100%) rename src/{ => include/zvec}/ailego/utility/file_helper.h (100%) rename src/{ => include/zvec}/ailego/utility/time_helper.h (99%) rename src/{ => include/zvec}/ailego/utility/type_helper.h (100%) rename src/{ => include/zvec}/core/framework/index_builder.h (90%) rename src/{ => include/zvec}/core/framework/index_bundle.h (98%) rename src/{ => include/zvec}/core/framework/index_cluster.h (95%) rename src/{ => include/zvec}/core/framework/index_context.h (94%) rename src/{ => include/zvec}/core/framework/index_converter.h (97%) rename src/{ => include/zvec}/core/framework/index_document.h (98%) rename src/{ => include/zvec}/core/framework/index_dumper.h (96%) rename src/{ => include/zvec}/core/framework/index_error.h (100%) rename src/{ => include/zvec}/core/framework/index_factory.h (93%) rename src/{ => include/zvec}/core/framework/index_features.h (99%) rename src/{ => include/zvec}/core/framework/index_filter.h (100%) rename src/{ => include/zvec}/core/framework/index_flow.h (99%) rename src/{ => include/zvec}/core/framework/index_format.h (98%) create mode 100644 src/include/zvec/core/framework/index_framework.h rename src/{ => include/zvec}/core/framework/index_groupby.h (100%) rename src/{ => include/zvec}/core/framework/index_helper.h (91%) rename src/{ => include/zvec}/core/framework/index_holder.h (99%) rename src/{ => include/zvec}/core/framework/index_logger.h (98%) rename src/{ => include/zvec}/core/framework/index_mapping.h (97%) rename src/{ => include/zvec}/core/framework/index_memory.h (100%) rename src/{ => include/zvec}/core/framework/index_meta.h (99%) rename src/{ => include/zvec}/core/framework/index_metric.h (94%) rename src/{ => include/zvec}/core/framework/index_module.h (100%) rename src/{ => include/zvec}/core/framework/index_packer.h (96%) rename src/{ => include/zvec}/core/framework/index_plugin.h (99%) rename src/{ => include/zvec}/core/framework/index_provider.h (93%) rename src/{ => include/zvec}/core/framework/index_reducer.h (93%) rename src/{ => include/zvec}/core/framework/index_refiner.h (93%) rename src/{ => include/zvec}/core/framework/index_reformer.h (98%) rename src/{ => include/zvec}/core/framework/index_runner.h (98%) rename src/{ => include/zvec}/core/framework/index_searcher.h (80%) rename src/{ => include/zvec}/core/framework/index_segment_storage.h (97%) rename src/{ => include/zvec}/core/framework/index_stats.h (97%) rename src/{ => include/zvec}/core/framework/index_storage.h (97%) rename src/{ => include/zvec}/core/framework/index_streamer.h (85%) rename src/{ => include/zvec}/core/framework/index_threads.h (96%) rename src/{ => include/zvec}/core/framework/index_trainer.h (87%) rename src/{ => include/zvec}/core/framework/index_unpacker.h (98%) rename src/{ => include/zvec}/core/framework/index_version.h (99%) rename src/{ => include/zvec}/core/interface/index.h (85%) create mode 100644 src/include/zvec/core/interface/index_factory.h rename src/{ => include/zvec}/core/interface/index_param.h (89%) rename src/{ => include/zvec}/core/interface/index_param_builders.h (94%) diff --git a/examples/c++/core/main.cc b/examples/c++/core/main.cc index d269c89..ac941f1 100644 --- a/examples/c++/core/main.cc +++ b/examples/c++/core/main.cc @@ -1,3 +1,89 @@ +#include +#include +#include +#include +#include +#include + +using namespace zvec::core_interface; + +constexpr uint32_t kDimension = 64; +const std::string index_name{"test.index"}; + +Index::Pointer create_index(const BaseIndexParam::Pointer ¶m, + 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 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 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; } \ No newline at end of file diff --git a/src/ailego/algorithm/binary_quantizer.h b/src/ailego/algorithm/binary_quantizer.h index 89057fe..f2dd847 100644 --- a/src/ailego/algorithm/binary_quantizer.h +++ b/src/ailego/algorithm/binary_quantizer.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/algorithm/integer_quantizer.cc b/src/ailego/algorithm/integer_quantizer.cc index 0b07293..a637306 100644 --- a/src/ailego/algorithm/integer_quantizer.cc +++ b/src/ailego/algorithm/integer_quantizer.cc @@ -17,8 +17,8 @@ #include #include #include -#include #include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/algorithm/integer_quantizer.h b/src/ailego/algorithm/integer_quantizer.h index 07a77e5..cdaf38a 100644 --- a/src/ailego/algorithm/integer_quantizer.h +++ b/src/ailego/algorithm/integer_quantizer.h @@ -16,7 +16,7 @@ #include #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/algorithm/kmeans.h b/src/ailego/algorithm/kmeans.h index 1a928d0..097b71e 100644 --- a/src/ailego/algorithm/kmeans.h +++ b/src/ailego/algorithm/kmeans.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,10 @@ #include #include #include -#include +#include +#include #include +#include #include "lloyd_cluster.h" namespace zvec { diff --git a/src/ailego/algorithm/lloyd_cluster.h b/src/ailego/algorithm/lloyd_cluster.h index 4227633..f7f3c96 100644 --- a/src/ailego/algorithm/lloyd_cluster.h +++ b/src/ailego/algorithm/lloyd_cluster.h @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/buffer/buffer_manager.cc b/src/ailego/buffer/buffer_manager.cc index acdb37b..ac2945b 100644 --- a/src/ailego/buffer/buffer_manager.cc +++ b/src/ailego/buffer/buffer_manager.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "buffer_manager.h" #include #include -#include #include #include #include -#include "ailego/internal/platform.h" +#include +#include +#include #ifdef __clang__ #pragma clang diagnostic push diff --git a/src/ailego/container/bitmap.h b/src/ailego/container/bitmap.h index c95dcf7..72d5b50 100644 --- a/src/ailego/container/bitmap.h +++ b/src/ailego/container/bitmap.h @@ -17,6 +17,7 @@ #include #include #include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/container/bloom_filter.h b/src/ailego/container/bloom_filter.h index 714032e..9a8cacd 100644 --- a/src/ailego/container/bloom_filter.h +++ b/src/ailego/container/bloom_filter.h @@ -15,8 +15,8 @@ #pragma once #include -#include -#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/container/params.cc b/src/ailego/container/params.cc index cd62e7b..33e731a 100644 --- a/src/ailego/container/params.cc +++ b/src/ailego/container/params.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "params.h" #include -#include -#include "ailego/logger/logger.h" +#include +#include +#include //! Global environ variable extern char **environ; diff --git a/src/ailego/container/vector_array.h b/src/ailego/container/vector_array.h index dfc82ef..fe7a914 100644 --- a/src/ailego/container/vector_array.h +++ b/src/ailego/container/vector_array.h @@ -14,8 +14,8 @@ #pragma once -#include "ailego/internal/platform.h" -#include "vector.h" +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/encoding/json/mod_json.c b/src/ailego/encoding/json/mod_json.c index aff816f..ea6a110 100644 --- a/src/ailego/encoding/json/mod_json.c +++ b/src/ailego/encoding/json/mod_json.c @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "mod_json.h" #include #include #include #include +#include #ifndef MOD_JSON_TOKEN_DEFOPTS #define MOD_JSON_TOKEN_DEFOPTS 0 /* default options of token */ diff --git a/src/ailego/hash/crc32c.cc b/src/ailego/hash/crc32c.cc index 20157df..bb5ab58 100644 --- a/src/ailego/hash/crc32c.cc +++ b/src/ailego/hash/crc32c.cc @@ -12,8 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "crc32c.h" #include +#include +#include #if !defined(__SSE4_2__) && !defined(__ARM_FEATURE_CRC32) /** diff --git a/src/ailego/io/file.cc b/src/ailego/io/file.cc index 63bc162..79e58a1 100644 --- a/src/ailego/io/file.cc +++ b/src/ailego/io/file.cc @@ -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 +#include #if !defined(_WIN64) && !defined(_WIN32) #include #include diff --git a/src/ailego/io/file_lock.h b/src/ailego/io/file_lock.h index 5e79f51..a571d54 100644 --- a/src/ailego/io/file_lock.h +++ b/src/ailego/io/file_lock.h @@ -14,7 +14,7 @@ #pragma once -#include "file.h" +#include namespace zvec { namespace ailego { diff --git a/src/ailego/logger/logger.cc b/src/ailego/logger/logger.cc index 69bf2ba..deecb88 100644 --- a/src/ailego/logger/logger.cc +++ b/src/ailego/logger/logger.cc @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "logger.h" #include #include #include -#include -#include +#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/math/cosine_distance_matrix.h b/src/ailego/math/cosine_distance_matrix.h index 8f4aabd..2f5ab51 100644 --- a/src/ailego/math/cosine_distance_matrix.h +++ b/src/ailego/math/cosine_distance_matrix.h @@ -14,13 +14,9 @@ #pragma once -#include -#include -#include -#include -#include "distance_utility.h" +#include +#include #include "inner_product_matrix.h" -#include "norm2_matrix.h" namespace zvec { namespace ailego { diff --git a/src/ailego/math/distance_matrix_fp16.i b/src/ailego/math/distance_matrix_fp16.i index ac8b434..26ab75f 100644 --- a/src/ailego/math/distance_matrix_fp16.i +++ b/src/ailego/math/distance_matrix_fp16.i @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include #include "matrix_define.i" #include #if !defined(__AVX__) diff --git a/src/ailego/math/distance_matrix_fp32.i b/src/ailego/math/distance_matrix_fp32.i index 4f610d6..a9ddcd0 100644 --- a/src/ailego/math/distance_matrix_fp32.i +++ b/src/ailego/math/distance_matrix_fp32.i @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include #include "matrix_define.i" #if !defined(__AVX__) diff --git a/src/ailego/math/distance_matrix_int32.i b/src/ailego/math/distance_matrix_int32.i index 867d92d..fbbd5a4 100644 --- a/src/ailego/math/distance_matrix_int32.i +++ b/src/ailego/math/distance_matrix_int32.i @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include #include "matrix_define.i" #if defined(__AVX__) && defined(__GNUC__) diff --git a/src/ailego/math/distance_matrix_int64.i b/src/ailego/math/distance_matrix_int64.i index 6360309..0364d1e 100644 --- a/src/ailego/math/distance_matrix_int64.i +++ b/src/ailego/math/distance_matrix_int64.i @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include #include "matrix_define.i" #if defined(__AVX__) diff --git a/src/ailego/math/distance_utility.h b/src/ailego/math/distance_utility.h index 070745a..b892e2a 100644 --- a/src/ailego/math/distance_utility.h +++ b/src/ailego/math/distance_utility.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/math/euclidean_distance_matrix.h b/src/ailego/math/euclidean_distance_matrix.h index a70d3bb..9155507 100644 --- a/src/ailego/math/euclidean_distance_matrix.h +++ b/src/ailego/math/euclidean_distance_matrix.h @@ -14,9 +14,9 @@ #pragma once -#include #include -#include +#include +#include #include "distance_utility.h" namespace zvec { diff --git a/src/ailego/math/hamming_distance_matrix.cc b/src/ailego/math/hamming_distance_matrix.cc index 7e7d058..0e990d4 100644 --- a/src/ailego/math/hamming_distance_matrix.cc +++ b/src/ailego/math/hamming_distance_matrix.cc @@ -13,6 +13,8 @@ // limitations under the License. #include "hamming_distance_matrix.h" +#include +#include #include "distance_matrix_popcnt.i" namespace zvec { diff --git a/src/ailego/math/hamming_distance_matrix.h b/src/ailego/math/hamming_distance_matrix.h index ace8397..5178e16 100644 --- a/src/ailego/math/hamming_distance_matrix.h +++ b/src/ailego/math/hamming_distance_matrix.h @@ -15,8 +15,8 @@ #pragma once #include -#include -#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/math/inner_product_matrix.h b/src/ailego/math/inner_product_matrix.h index 71ac75c..e1e8718 100644 --- a/src/ailego/math/inner_product_matrix.h +++ b/src/ailego/math/inner_product_matrix.h @@ -17,9 +17,9 @@ #include #include #include -#include #include -#include +#include +#include #include "distance_utility.h" namespace zvec { diff --git a/src/ailego/math/matrix_utility.i b/src/ailego/math/matrix_utility.i index c8c4297..3495147 100644 --- a/src/ailego/math/matrix_utility.i +++ b/src/ailego/math/matrix_utility.i @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/math/mips_euclidean_distance_matrix.h b/src/ailego/math/mips_euclidean_distance_matrix.h index 162228c..666d16c 100644 --- a/src/ailego/math/mips_euclidean_distance_matrix.h +++ b/src/ailego/math/mips_euclidean_distance_matrix.h @@ -14,10 +14,10 @@ #pragma once -#include #include #include -#include +#include +#include #include "distance_utility.h" namespace zvec { diff --git a/src/ailego/math/norm1_matrix.h b/src/ailego/math/norm1_matrix.h index 3e23fa4..7e8d9cb 100644 --- a/src/ailego/math/norm1_matrix.h +++ b/src/ailego/math/norm1_matrix.h @@ -14,10 +14,9 @@ #pragma once -#include -#include #include -#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/math/norm1_matrix_fp16.cc b/src/ailego/math/norm1_matrix_fp16.cc index 2238605..ce36de7 100644 --- a/src/ailego/math/norm1_matrix_fp16.cc +++ b/src/ailego/math/norm1_matrix_fp16.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include "norm1_matrix.h" #include "norm_matrix_fp16.i" diff --git a/src/ailego/math/norm1_matrix_fp32.cc b/src/ailego/math/norm1_matrix_fp32.cc index de4205b..15bd3f7 100644 --- a/src/ailego/math/norm1_matrix_fp32.cc +++ b/src/ailego/math/norm1_matrix_fp32.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include "norm1_matrix.h" #include "norm_matrix_fp32.i" diff --git a/src/ailego/math/norm2_matrix.h b/src/ailego/math/norm2_matrix.h index 9d976cf..3c90514 100644 --- a/src/ailego/math/norm2_matrix.h +++ b/src/ailego/math/norm2_matrix.h @@ -15,9 +15,9 @@ #pragma once #include -#include #include -#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/math/norm2_matrix_fp16.cc b/src/ailego/math/norm2_matrix_fp16.cc index 5c0579e..28dbadb 100644 --- a/src/ailego/math/norm2_matrix_fp16.cc +++ b/src/ailego/math/norm2_matrix_fp16.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include "norm2_matrix.h" #include "norm_matrix_fp16.i" diff --git a/src/ailego/math_batch/cosine_distance_batch.h b/src/ailego/math_batch/cosine_distance_batch.h index d0185d3..b8a8309 100644 --- a/src/ailego/math_batch/cosine_distance_batch.h +++ b/src/ailego/math_batch/cosine_distance_batch.h @@ -16,9 +16,9 @@ #include #include -#include #include -#include +#include +#include #include "inner_product_distance_batch.h" namespace zvec::ailego::DistanceBatch { diff --git a/src/ailego/math_batch/distance_batch.h b/src/ailego/math_batch/distance_batch.h index 8301ac6..87a80eb 100644 --- a/src/ailego/math_batch/distance_batch.h +++ b/src/ailego/math_batch/distance_batch.h @@ -14,7 +14,7 @@ #pragma once -#include +#include "ailego/math/distance_matrix.h" #include "cosine_distance_batch.h" #include "inner_product_distance_batch.h" #include "utils.h" diff --git a/src/ailego/math_batch/inner_product_distance_batch.h b/src/ailego/math_batch/inner_product_distance_batch.h index 66553ff..3a65a27 100644 --- a/src/ailego/math_batch/inner_product_distance_batch.h +++ b/src/ailego/math_batch/inner_product_distance_batch.h @@ -16,9 +16,9 @@ #include #include -#include #include -#include +#include +#include #include "inner_product_distance_batch_impl.h" #include "inner_product_distance_batch_impl_fp16.h" #include "inner_product_distance_batch_impl_int8.h" diff --git a/src/ailego/math_batch/inner_product_distance_batch_impl.h b/src/ailego/math_batch/inner_product_distance_batch_impl.h index bfe8fc6..1554426 100644 --- a/src/ailego/math_batch/inner_product_distance_batch_impl.h +++ b/src/ailego/math_batch/inner_product_distance_batch_impl.h @@ -15,10 +15,10 @@ #pragma once #include -#include #include #include -#include +#include +#include namespace zvec::ailego::DistanceBatch { diff --git a/src/ailego/math_batch/inner_product_distance_batch_impl_fp16.h b/src/ailego/math_batch/inner_product_distance_batch_impl_fp16.h index 7f4f72e..db9e81e 100644 --- a/src/ailego/math_batch/inner_product_distance_batch_impl_fp16.h +++ b/src/ailego/math_batch/inner_product_distance_batch_impl_fp16.h @@ -15,10 +15,10 @@ #pragma once #include -#include #include #include -#include +#include +#include namespace zvec::ailego::DistanceBatch { diff --git a/src/ailego/math_batch/inner_product_distance_batch_impl_int8.h b/src/ailego/math_batch/inner_product_distance_batch_impl_int8.h index 2f5be38..9f49eff 100644 --- a/src/ailego/math_batch/inner_product_distance_batch_impl_int8.h +++ b/src/ailego/math_batch/inner_product_distance_batch_impl_int8.h @@ -15,9 +15,9 @@ #pragma once #include -#include #include -#include +#include +#include namespace zvec::ailego::DistanceBatch { diff --git a/src/ailego/math_batch/utils.h b/src/ailego/math_batch/utils.h index 15f37a4..4b19b0d 100644 --- a/src/ailego/math_batch/utils.h +++ b/src/ailego/math_batch/utils.h @@ -14,9 +14,6 @@ #pragma once -#include -#include - namespace zvec::ailego::DistanceBatch { typedef void (*DistanceBatchQueryPreprocessFunc)(void *query, size_t dim); diff --git a/src/ailego/parallel/lock.h b/src/ailego/parallel/lock.h index 7bbd457..0d19f1a 100644 --- a/src/ailego/parallel/lock.h +++ b/src/ailego/parallel/lock.h @@ -20,8 +20,8 @@ #if __cplusplus >= 201703L #include #endif -#include #include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/parallel/semaphore.h b/src/ailego/parallel/semaphore.h index 263a1f4..89fdbef 100644 --- a/src/ailego/parallel/semaphore.h +++ b/src/ailego/parallel/semaphore.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/parallel/thread_pool.cc b/src/ailego/parallel/thread_pool.cc index fff3788..54a8970 100644 --- a/src/ailego/parallel/thread_pool.cc +++ b/src/ailego/parallel/thread_pool.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "thread_pool.h" +#include #if (defined(__linux) || defined(__linux__)) && !defined(__ANDROID__) #include diff --git a/src/ailego/pattern/scope_guard.h b/src/ailego/pattern/scope_guard.h index f37feaa..075fd39 100644 --- a/src/ailego/pattern/scope_guard.h +++ b/src/ailego/pattern/scope_guard.h @@ -14,7 +14,7 @@ #pragma once -#include "closure.h" +#include namespace zvec { namespace ailego { diff --git a/src/ailego/utility/bit_string_helper.h b/src/ailego/utility/bit_string_helper.h index 43fef95..a50e1ee 100644 --- a/src/ailego/utility/bit_string_helper.h +++ b/src/ailego/utility/bit_string_helper.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include namespace zvec { diff --git a/src/ailego/utility/bitset_helper.cc b/src/ailego/utility/bitset_helper.cc index a4e61ff..19be348 100644 --- a/src/ailego/utility/bitset_helper.cc +++ b/src/ailego/utility/bitset_helper.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "bitset_helper.h" +#include #ifndef __SSE4_2__ #define bitset_popcount32 ailego_popcount32 diff --git a/src/ailego/utility/bitset_helper.h b/src/ailego/utility/bitset_helper.h index a759b68..56ac7e9 100644 --- a/src/ailego/utility/bitset_helper.h +++ b/src/ailego/utility/bitset_helper.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include namespace zvec { diff --git a/src/ailego/utility/concurrency_helper.cc b/src/ailego/utility/concurrency_helper.cc index 08b4713..3f79c9c 100644 --- a/src/ailego/utility/concurrency_helper.cc +++ b/src/ailego/utility/concurrency_helper.cc @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include "file_helper.h" namespace zvec { namespace ailego { diff --git a/src/ailego/utility/dl_helper.h b/src/ailego/utility/dl_helper.h index 4ae1c8e..d72b0dc 100644 --- a/src/ailego/utility/dl_helper.h +++ b/src/ailego/utility/dl_helper.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/utility/file_helper.cc b/src/ailego/utility/file_helper.cc index 095fb82..1ea6a80 100644 --- a/src/ailego/utility/file_helper.cc +++ b/src/ailego/utility/file_helper.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "file_helper.h" +#include #if defined(_WIN32) || defined(_WIN64) #include diff --git a/src/ailego/utility/float_helper.cc b/src/ailego/utility/float_helper.cc index c2a8b96..6e33fed 100644 --- a/src/ailego/utility/float_helper.cc +++ b/src/ailego/utility/float_helper.cc @@ -13,7 +13,7 @@ // limitations under the License. #include -#include +#include #include // #if defined(__F16C__) && defined(__AVX__) diff --git a/src/ailego/utility/matrix_helper.h b/src/ailego/utility/matrix_helper.h index 2fea357..1a05ad5 100644 --- a/src/ailego/utility/matrix_helper.h +++ b/src/ailego/utility/matrix_helper.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/utility/memory_helper.cc b/src/ailego/utility/memory_helper.cc index bb4ef8d..8d99ca2 100644 --- a/src/ailego/utility/memory_helper.cc +++ b/src/ailego/utility/memory_helper.cc @@ -16,10 +16,8 @@ #include #include #include -#include -#include +#include #include -#include "file_helper.h" #if defined(_WIN64) || defined(_WIN32) #include diff --git a/src/ailego/utility/memory_helper.h b/src/ailego/utility/memory_helper.h index b145f03..b6104a8 100644 --- a/src/ailego/utility/memory_helper.h +++ b/src/ailego/utility/memory_helper.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/utility/process_helper.h b/src/ailego/utility/process_helper.h index f28594b..d1fa237 100644 --- a/src/ailego/utility/process_helper.h +++ b/src/ailego/utility/process_helper.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/utility/time_helper.cc b/src/ailego/utility/time_helper.cc index 36b63c1..4bcca6f 100644 --- a/src/ailego/utility/time_helper.cc +++ b/src/ailego/utility/time_helper.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "time_helper.h" +#include #if defined(_WIN64) || defined(_WIN32) #include diff --git a/src/ailego/version.i b/src/ailego/version.i index 198dbb8..c1b14be 100644 --- a/src/ailego/version.i +++ b/src/ailego/version.i @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ailego/internal/platform.h" +#include #ifndef AILEGO_VERSION_TO_STRING_ #define AILEGO_VERSION_TO_STRING_(x) #x diff --git a/src/core/algorithm/cluster/kmeans_cluster.cc b/src/core/algorithm/cluster/kmeans_cluster.cc index 21ccf40..507159b 100644 --- a/src/core/algorithm/cluster/kmeans_cluster.cc +++ b/src/core/algorithm/cluster/kmeans_cluster.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include #include -#include "framework/index_cluster.h" -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include +#include +#include #include "cluster_params.h" #include "linear_seeker.h" #include "vector_mean.h" diff --git a/src/core/algorithm/cluster/opt_kmeans_cluster.cc b/src/core/algorithm/cluster/opt_kmeans_cluster.cc index b1b7c76..49ae8f5 100644 --- a/src/core/algorithm/cluster/opt_kmeans_cluster.cc +++ b/src/core/algorithm/cluster/opt_kmeans_cluster.cc @@ -13,9 +13,9 @@ // limitations under the License. #include #include -#include "framework/index_cluster.h" -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include +#include #include "cluster_params.h" namespace zvec { diff --git a/src/core/algorithm/cluster/seeker.h b/src/core/algorithm/cluster/seeker.h index 46af115..6f14f57 100644 --- a/src/core/algorithm/cluster/seeker.h +++ b/src/core/algorithm/cluster/seeker.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_framework.h" +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/cluster/stratified_cluster.cc b/src/core/algorithm/cluster/stratified_cluster.cc index 09a031f..ae529c2 100644 --- a/src/core/algorithm/cluster/stratified_cluster.cc +++ b/src/core/algorithm/cluster/stratified_cluster.cc @@ -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 -#include "framework/index_cluster.h" -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include +#include +#include #include "cluster_params.h" namespace zvec { diff --git a/src/core/algorithm/cluster/stratified_cluster_trainer.cc b/src/core/algorithm/cluster/stratified_cluster_trainer.cc index e2f96a6..2b47075 100644 --- a/src/core/algorithm/cluster/stratified_cluster_trainer.cc +++ b/src/core/algorithm/cluster/stratified_cluster_trainer.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "stratified_cluster_trainer.h" -#include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_helper.h" +#include +#include +#include +#include #include "cluster_params.h" namespace zvec { diff --git a/src/core/algorithm/cluster/stratified_cluster_trainer.h b/src/core/algorithm/cluster/stratified_cluster_trainer.h index 08f5875..0a82c1e 100644 --- a/src/core/algorithm/cluster/stratified_cluster_trainer.h +++ b/src/core/algorithm/cluster/stratified_cluster_trainer.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include "framework/index_cluster.h" -#include "framework/index_trainer.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/cluster/vector_mean.h b/src/core/algorithm/cluster/vector_mean.h index 529f19c..43c9153 100644 --- a/src/core/algorithm/cluster/vector_mean.h +++ b/src/core/algorithm/cluster/vector_mean.h @@ -17,9 +17,9 @@ #include #include #include -#include -#include +#include #include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/flat/flat_builder.h b/src/core/algorithm/flat/flat_builder.h index 78af5aa..5a48c6e 100644 --- a/src/core/algorithm/flat/flat_builder.h +++ b/src/core/algorithm/flat/flat_builder.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include -#include +#include +#include #include "flat_utility.h" namespace zvec { diff --git a/src/core/algorithm/flat/flat_searcher.cc b/src/core/algorithm/flat/flat_searcher.cc index 8c9b918..ef4e7d4 100644 --- a/src/core/algorithm/flat/flat_searcher.cc +++ b/src/core/algorithm/flat/flat_searcher.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "flat_searcher.h" -#include -#include +#include +#include #include "flat_distance_matrix.h" #include "flat_searcher_context.h" #include "flat_searcher_provider.h" diff --git a/src/core/algorithm/flat/flat_searcher.h b/src/core/algorithm/flat/flat_searcher.h index 12eccd6..78dcb1d 100644 --- a/src/core/algorithm/flat/flat_searcher.h +++ b/src/core/algorithm/flat/flat_searcher.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include -#include "framework/index_searcher.h" +#include +#include #include "flat_distance_matrix.h" #include "flat_index_format.h" diff --git a/src/core/algorithm/flat/flat_searcher_context.h b/src/core/algorithm/flat/flat_searcher_context.h index f92b679..a50e475 100644 --- a/src/core/algorithm/flat/flat_searcher_context.h +++ b/src/core/algorithm/flat/flat_searcher_context.h @@ -14,8 +14,8 @@ #pragma once -#include -#include +#include +#include #include "flat_index_format.h" #include "flat_searcher.h" #include "flat_utility.h" diff --git a/src/core/algorithm/flat/flat_streamer.cc b/src/core/algorithm/flat/flat_streamer.cc index 20830b7..a721cf5 100644 --- a/src/core/algorithm/flat/flat_streamer.cc +++ b/src/core/algorithm/flat/flat_streamer.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "flat_streamer.h" -#include +#include #include "flat_streamer_context.h" #include "flat_streamer_dumper.h" #include "flat_streamer_provider.h" diff --git a/src/core/algorithm/flat/flat_streamer.h b/src/core/algorithm/flat/flat_streamer.h index dde1f40..66ceba6 100644 --- a/src/core/algorithm/flat/flat_streamer.h +++ b/src/core/algorithm/flat/flat_streamer.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include #include "flat_streamer_entity.h" #include "flat_utility.h" diff --git a/src/core/algorithm/flat/flat_streamer_entity.cc b/src/core/algorithm/flat/flat_streamer_entity.cc index 639f383..988f5fd 100644 --- a/src/core/algorithm/flat/flat_streamer_entity.cc +++ b/src/core/algorithm/flat/flat_streamer_entity.cc @@ -14,7 +14,7 @@ #include "flat_streamer_entity.h" #include -#include "framework/index_error.h" +#include #include "flat_utility.h" namespace zvec { diff --git a/src/core/algorithm/flat/flat_streamer_entity.h b/src/core/algorithm/flat/flat_streamer_entity.h index 06c691d..6ac410a 100644 --- a/src/core/algorithm/flat/flat_streamer_entity.h +++ b/src/core/algorithm/flat/flat_streamer_entity.h @@ -17,10 +17,10 @@ #include #include #include -#include -#include -#include #include +#include +#include +#include #include "flat_index_format.h" #include "flat_utility.h" diff --git a/src/core/algorithm/flat/flat_utility.h b/src/core/algorithm/flat/flat_utility.h index 3689ecc..a8e05bc 100644 --- a/src/core/algorithm/flat/flat_utility.h +++ b/src/core/algorithm/flat/flat_utility.h @@ -15,11 +15,11 @@ #include #include -#include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_meta.h" -#include "framework/index_metric.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_builder.cc b/src/core/algorithm/flat_sparse/flat_sparse_builder.cc index 1ed689f..34fcda5 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_builder.cc +++ b/src/core/algorithm/flat_sparse/flat_sparse_builder.cc @@ -16,10 +16,10 @@ #include #include #include -#include -#include -#include #include +#include +#include +#include #include "flat_sparse_index_format.h" #include "flat_sparse_utility.h" diff --git a/src/core/algorithm/flat_sparse/flat_sparse_builder.h b/src/core/algorithm/flat_sparse/flat_sparse_builder.h index 4e9f2b1..de439d8 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_builder.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_builder.h @@ -15,11 +15,11 @@ #pragma once #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_context.h b/src/core/algorithm/flat_sparse/flat_sparse_context.h index 48f5a6a..95d397c 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_context.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_context.h @@ -15,9 +15,9 @@ #pragma once #include -#include -#include #include +#include +#include #include "flat_sparse_entity.h" #include "flat_sparse_searcher.h" #include "flat_sparse_streamer.h" diff --git a/src/core/algorithm/flat_sparse/flat_sparse_entity.h b/src/core/algorithm/flat_sparse/flat_sparse_entity.h index 7b1e0f8..daa3f86 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_entity.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_entity.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include #include "flat_sparse_index_format.h" namespace zvec { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_index_format.h b/src/core/algorithm/flat_sparse/flat_sparse_index_format.h index e141480..23b5974 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_index_format.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_index_format.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_provider.h b/src/core/algorithm/flat_sparse/flat_sparse_provider.h index 0f50b4c..ce758f8 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_provider.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_provider.h @@ -15,9 +15,9 @@ #pragma once #include -#include #include -#include "framework/index_logger.h" +#include +#include #include "flat_sparse_streamer_entity.h" namespace zvec { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_searcher.cc b/src/core/algorithm/flat_sparse/flat_sparse_searcher.cc index 4094825..3e9fce0 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_searcher.cc +++ b/src/core/algorithm/flat_sparse/flat_sparse_searcher.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "flat_sparse_searcher.h" -#include #include +#include #include "flat_sparse_context.h" #include "flat_sparse_provider.h" #include "flat_sparse_search.h" diff --git a/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.cc b/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.cc index f0d331a..91357a5 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.cc +++ b/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "flat_sparse_searcher_entity.h" -#include -#include +#include +#include #include "flat_sparse_utility.h" namespace zvec { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.h b/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.h index 32f8d8d..f87c294 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_searcher_entity.h @@ -14,7 +14,7 @@ #pragma once -#include +#include #include "flat_sparse_entity.h" #include "flat_sparse_index_format.h" diff --git a/src/core/algorithm/flat_sparse/flat_sparse_streamer.cc b/src/core/algorithm/flat_sparse/flat_sparse_streamer.cc index 7d2815d..4df83d8 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_streamer.cc +++ b/src/core/algorithm/flat_sparse/flat_sparse_streamer.cc @@ -14,10 +14,10 @@ #include "flat_sparse_streamer.h" #include -#include #include -#include "framework/index_error.h" -#include "framework/index_meta.h" +#include +#include +#include #include "flat_sparse_context.h" #include "flat_sparse_provider.h" #include "flat_sparse_search.h" diff --git a/src/core/algorithm/flat_sparse/flat_sparse_streamer.h b/src/core/algorithm/flat_sparse/flat_sparse_streamer.h index fa443dc..794d49b 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_streamer.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_streamer.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include #include "flat_sparse_streamer_entity.h" namespace zvec { diff --git a/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.cc b/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.cc index 3e294a6..53d8a24 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.cc +++ b/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.cc @@ -16,11 +16,11 @@ #include #include #include -#include #include -#include "ailego/utility/time_helper.h" -#include "framework/index_error.h" -#include "framework/index_logger.h" +#include +#include +#include +#include #include "flat_sparse_index_format.h" #include "flat_sparse_utility.h" diff --git a/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.h b/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.h index d1adff4..6ef2f9f 100644 --- a/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.h +++ b/src/core/algorithm/flat_sparse/flat_sparse_streamer_entity.h @@ -20,11 +20,11 @@ #include #include #include -#include -#include -#include -#include #include +#include +#include +#include +#include #include "flat_sparse_entity.h" #include "flat_sparse_index_format.h" #include "flat_sparse_utility.h" diff --git a/src/core/algorithm/hnsw/hnsw_builder.cc b/src/core/algorithm/hnsw/hnsw_builder.cc index 301c655..73de7ae 100644 --- a/src/core/algorithm/hnsw/hnsw_builder.cc +++ b/src/core/algorithm/hnsw/hnsw_builder.cc @@ -15,9 +15,9 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_logger.h" +#include +#include +#include #include "hnsw_algorithm.h" #include "hnsw_params.h" diff --git a/src/core/algorithm/hnsw/hnsw_builder.h b/src/core/algorithm/hnsw/hnsw_builder.h index e85534a..e114528 100644 --- a/src/core/algorithm/hnsw/hnsw_builder.h +++ b/src/core/algorithm/hnsw/hnsw_builder.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include -#include "framework/index_builder.h" +#include +#include #include "hnsw_algorithm.h" #include "hnsw_builder_entity.h" diff --git a/src/core/algorithm/hnsw/hnsw_builder_entity.cc b/src/core/algorithm/hnsw/hnsw_builder_entity.cc index 380eade..472d98e 100644 --- a/src/core/algorithm/hnsw/hnsw_builder_entity.cc +++ b/src/core/algorithm/hnsw/hnsw_builder_entity.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "hnsw_builder_entity.h" #include -#include +#include #include "utility/sparse_utility.h" namespace zvec { diff --git a/src/core/algorithm/hnsw/hnsw_builder_entity.h b/src/core/algorithm/hnsw/hnsw_builder_entity.h index 5edfd6d..1708e33 100644 --- a/src/core/algorithm/hnsw/hnsw_builder_entity.h +++ b/src/core/algorithm/hnsw/hnsw_builder_entity.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include +#include #include "hnsw_entity.h" namespace zvec { diff --git a/src/core/algorithm/hnsw/hnsw_chunk.cc b/src/core/algorithm/hnsw/hnsw_chunk.cc index 166aa04..a1e8891 100644 --- a/src/core/algorithm/hnsw/hnsw_chunk.cc +++ b/src/core/algorithm/hnsw/hnsw_chunk.cc @@ -14,12 +14,12 @@ #include "hnsw_chunk.h" #include #include -#include -#include -#include "framework/index_error.h" -#include "framework/index_helper.h" -#include "framework/index_logger.h" -#include "framework/index_streamer.h" +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/hnsw/hnsw_chunk.h b/src/core/algorithm/hnsw/hnsw_chunk.h index 5633b0b..b19d309 100644 --- a/src/core/algorithm/hnsw/hnsw_chunk.h +++ b/src/core/algorithm/hnsw/hnsw_chunk.h @@ -19,13 +19,13 @@ #include #include #include -#include #include +#include #include -#include "framework/index_error.h" -#include "framework/index_logger.h" -#include "framework/index_storage.h" -#include "framework/index_streamer.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/hnsw/hnsw_context.h b/src/core/algorithm/hnsw/hnsw_context.h index 88c6f4f..3358e86 100644 --- a/src/core/algorithm/hnsw/hnsw_context.h +++ b/src/core/algorithm/hnsw/hnsw_context.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_context.h" +#include #include "utility/sparse_utility.h" #include "utility/visit_filter.h" #include "hnsw_dist_calculator.h" diff --git a/src/core/algorithm/hnsw/hnsw_dist_calculator.h b/src/core/algorithm/hnsw/hnsw_dist_calculator.h index fa86ea1..84faba4 100644 --- a/src/core/algorithm/hnsw/hnsw_dist_calculator.h +++ b/src/core/algorithm/hnsw/hnsw_dist_calculator.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_meta.h" +#include #include "hnsw_entity.h" namespace zvec { diff --git a/src/core/algorithm/hnsw/hnsw_entity.cc b/src/core/algorithm/hnsw/hnsw_entity.cc index d5b3421..24a3af5 100644 --- a/src/core/algorithm/hnsw/hnsw_entity.cc +++ b/src/core/algorithm/hnsw/hnsw_entity.cc @@ -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 #include "utility/sparse_utility.h" namespace zvec { diff --git a/src/core/algorithm/hnsw/hnsw_entity.h b/src/core/algorithm/hnsw/hnsw_entity.h index cc4c92e..363a725 100644 --- a/src/core/algorithm/hnsw/hnsw_entity.h +++ b/src/core/algorithm/hnsw/hnsw_entity.h @@ -14,12 +14,12 @@ #pragma once #include -#include #include -#include "ailego/logger/logger.h" -#include "framework/index_dumper.h" -#include "framework/index_error.h" -#include "framework/index_storage.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/hnsw/hnsw_index_provider.h b/src/core/algorithm/hnsw/hnsw_index_provider.h index b5a6f31..4a6ccae 100644 --- a/src/core/algorithm/hnsw/hnsw_index_provider.h +++ b/src/core/algorithm/hnsw/hnsw_index_provider.h @@ -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 +#include +#include #include "hnsw_entity.h" namespace zvec { diff --git a/src/core/algorithm/hnsw/hnsw_searcher.h b/src/core/algorithm/hnsw/hnsw_searcher.h index 306e2c9..4c8a314 100644 --- a/src/core/algorithm/hnsw/hnsw_searcher.h +++ b/src/core/algorithm/hnsw/hnsw_searcher.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_framework.h" +#include #include "hnsw_searcher_entity.h" #include "hnsw_streamer.h" diff --git a/src/core/algorithm/hnsw/hnsw_searcher_entity.cc b/src/core/algorithm/hnsw/hnsw_searcher_entity.cc index 5b9c8c5..6661c1d 100644 --- a/src/core/algorithm/hnsw/hnsw_searcher_entity.cc +++ b/src/core/algorithm/hnsw/hnsw_searcher_entity.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "hnsw_searcher_entity.h" -#include +#include #include "utility/sparse_utility.h" namespace zvec { diff --git a/src/core/algorithm/hnsw/hnsw_streamer.h b/src/core/algorithm/hnsw/hnsw_streamer.h index a2162cb..daadd8d 100644 --- a/src/core/algorithm/hnsw/hnsw_streamer.h +++ b/src/core/algorithm/hnsw/hnsw_streamer.h @@ -14,7 +14,7 @@ #pragma once #include -#include "framework/index_framework.h" +#include #include "hnsw_algorithm.h" #include "hnsw_streamer_entity.h" diff --git a/src/core/algorithm/hnsw/hnsw_streamer_entity.h b/src/core/algorithm/hnsw/hnsw_streamer_entity.h index 7031b56..1a01b14 100644 --- a/src/core/algorithm/hnsw/hnsw_streamer_entity.h +++ b/src/core/algorithm/hnsw/hnsw_streamer_entity.h @@ -15,11 +15,11 @@ #pragma once #include -#include #include #include #include -#include "framework/index_framework.h" +#include +#include #include "hnsw_chunk.h" #include "hnsw_entity.h" #include "hnsw_index_hash.h" diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.cc b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.cc index 758d367..0d8d27e 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.cc +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.cc @@ -15,9 +15,9 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_logger.h" +#include +#include +#include #include "hnsw_sparse_algorithm.h" #include "hnsw_sparse_params.h" diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.h index c5080ce..35c45cc 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include -#include "framework/index_builder.h" +#include +#include #include "hnsw_sparse_algorithm.h" #include "hnsw_sparse_builder_entity.h" diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.cc b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.cc index a27accf..48c20d7 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.cc +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "hnsw_sparse_builder_entity.h" -#include +#include #include "utility/sparse_utility.h" namespace zvec { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.h index 464e1dc..de35fae 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_builder_entity.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include +#include #include "hnsw_sparse_entity.h" namespace zvec { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.cc b/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.cc index eb0e74b..b728bed 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.cc +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.cc @@ -14,12 +14,12 @@ #include "hnsw_sparse_chunk.h" #include #include -#include -#include -#include "framework/index_error.h" -#include "framework/index_helper.h" -#include "framework/index_logger.h" -#include "framework/index_streamer.h" +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.h index a850350..a026989 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_chunk.h @@ -19,13 +19,13 @@ #include #include #include -#include #include +#include #include -#include "framework/index_error.h" -#include "framework/index_logger.h" -#include "framework/index_storage.h" -#include "framework/index_streamer.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_context.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_context.h index 4f31a6d..04a0a3b 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_context.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_context.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_context.h" +#include #include "utility/sparse_utility.h" #include "utility/visit_filter.h" #include "hnsw_sparse_dist_calculator.h" diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_dist_calculator.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_dist_calculator.h index 4a6782b..06cb76e 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_dist_calculator.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_dist_calculator.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_meta.h" +#include #include "hnsw_sparse_entity.h" namespace zvec { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_entity.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_entity.h index 24d3681..7e6c16e 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_entity.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_entity.h @@ -15,12 +15,12 @@ #pragma once #include -#include #include -#include "ailego/logger/logger.h" -#include "framework/index_dumper.h" -#include "framework/index_error.h" -#include "framework/index_storage.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher.h index dec4090..5cb3db6 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_framework.h" +#include #include "hnsw_sparse_searcher_entity.h" #include "hnsw_sparse_streamer.h" diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_entity.cc b/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_entity.cc index fdf5092..8ef79ad 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_entity.cc +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_entity.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "hnsw_sparse_searcher_entity.h" -#include +#include #include "utility/sparse_utility.h" namespace zvec { diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer.h index 21c6be6..fcdcbe5 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer.h @@ -14,7 +14,7 @@ #pragma once #include -#include "framework/index_framework.h" +#include #include "hnsw_sparse_algorithm.h" #include "hnsw_sparse_streamer_entity.h" diff --git a/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_entity.h b/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_entity.h index 97d321d..84087af 100644 --- a/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_entity.h +++ b/src/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_entity.h @@ -14,11 +14,11 @@ #pragma once #include -#include #include #include #include -#include "framework/index_framework.h" +#include +#include #include "hnsw_sparse_chunk.h" #include "hnsw_sparse_entity.h" #include "hnsw_sparse_index_hash.h" diff --git a/src/core/algorithm/ivf/ivf_builder.h b/src/core/algorithm/ivf/ivf_builder.h index 72ec766..1dd9556 100644 --- a/src/core/algorithm/ivf/ivf_builder.h +++ b/src/core/algorithm/ivf/ivf_builder.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include "framework/index_builder.h" -#include "framework/index_meta.h" +#include +#include #include "ivf_centroid_index.h" namespace zvec { diff --git a/src/core/algorithm/ivf/ivf_centroid_index.cc b/src/core/algorithm/ivf/ivf_centroid_index.cc index c662f48..108b5af 100644 --- a/src/core/algorithm/ivf/ivf_centroid_index.cc +++ b/src/core/algorithm/ivf/ivf_centroid_index.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "ivf_centroid_index.h" -#include "framework/index_framework.h" +#include +#include #include "metric/metric_params.h" -#include "quantizer/quantizer_params.h" namespace zvec { namespace core { diff --git a/src/core/algorithm/ivf/ivf_centroid_index.h b/src/core/algorithm/ivf/ivf_centroid_index.h index bdbab8d..db84159 100644 --- a/src/core/algorithm/ivf/ivf_centroid_index.h +++ b/src/core/algorithm/ivf/ivf_centroid_index.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include -#include "framework/index_framework.h" +#include +#include #include "ivf_params.h" #include "ivf_utility.h" diff --git a/src/core/algorithm/ivf/ivf_distance_calculator.h b/src/core/algorithm/ivf/ivf_distance_calculator.h index 7ae0fe6..17a075d 100644 --- a/src/core/algorithm/ivf/ivf_distance_calculator.h +++ b/src/core/algorithm/ivf/ivf_distance_calculator.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include -#include "framework/index_framework.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/ivf/ivf_dumper.h b/src/core/algorithm/ivf/ivf_dumper.h index 781271b..d8ab993 100644 --- a/src/core/algorithm/ivf/ivf_dumper.h +++ b/src/core/algorithm/ivf/ivf_dumper.h @@ -13,9 +13,9 @@ // limitations under the License. #pragma once -#include "framework/index_framework.h" +#include +#include #include "metric/metric_params.h" -#include "quantizer/quantizer_params.h" #include "ivf_index_format.h" #include "ivf_params.h" #include "ivf_utility.h" diff --git a/src/core/algorithm/ivf/ivf_entity.h b/src/core/algorithm/ivf/ivf_entity.h index 184548c..c9d3d96 100644 --- a/src/core/algorithm/ivf/ivf_entity.h +++ b/src/core/algorithm/ivf/ivf_entity.h @@ -13,9 +13,9 @@ // limitations under the License. #pragma once -#include "framework/index_framework.h" +#include +#include #include "metric/metric_params.h" -#include "quantizer/quantizer_params.h" #include "ivf_distance_calculator.h" #include "ivf_index_format.h" #include "ivf_params.h" diff --git a/src/core/algorithm/ivf/ivf_index_format.h b/src/core/algorithm/ivf/ivf_index_format.h index 61be68b..d86ae52 100644 --- a/src/core/algorithm/ivf/ivf_index_format.h +++ b/src/core/algorithm/ivf/ivf_index_format.h @@ -14,7 +14,7 @@ #pragma once #include -#include "framework/index_framework.h" +#include namespace zvec { namespace core { diff --git a/src/core/algorithm/ivf/ivf_index_provider.h b/src/core/algorithm/ivf/ivf_index_provider.h index 13de55f..fda8b33 100644 --- a/src/core/algorithm/ivf/ivf_index_provider.h +++ b/src/core/algorithm/ivf/ivf_index_provider.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_searcher.h" +#include #include "ivf_entity.h" namespace zvec { diff --git a/src/core/algorithm/ivf/ivf_searcher.cc b/src/core/algorithm/ivf/ivf_searcher.cc index ddcb869..972fc86 100644 --- a/src/core/algorithm/ivf/ivf_searcher.cc +++ b/src/core/algorithm/ivf/ivf_searcher.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "ivf_searcher.h" -#include -#include +#include +#include #include "ivf_centroid_index.h" #include "ivf_index_provider.h" #include "ivf_params.h" diff --git a/src/core/algorithm/ivf/ivf_searcher.h b/src/core/algorithm/ivf/ivf_searcher.h index 37d44e9..9dd974d 100644 --- a/src/core/algorithm/ivf/ivf_searcher.h +++ b/src/core/algorithm/ivf/ivf_searcher.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_searcher.h" +#include #include "ivf_centroid_index.h" #include "ivf_entity.h" #include "ivf_searcher_context.h" diff --git a/src/core/algorithm/ivf/ivf_searcher_context.h b/src/core/algorithm/ivf/ivf_searcher_context.h index 959ac93..4d0183e 100644 --- a/src/core/algorithm/ivf/ivf_searcher_context.h +++ b/src/core/algorithm/ivf/ivf_searcher_context.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include +#include #include "ivf_entity.h" #include "ivf_utility.h" diff --git a/src/core/algorithm/ivf/ivf_streamer.cc b/src/core/algorithm/ivf/ivf_streamer.cc index d9fdb8e..a2c9241 100644 --- a/src/core/algorithm/ivf/ivf_streamer.cc +++ b/src/core/algorithm/ivf/ivf_streamer.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #include "ivf_streamer.h" -#include -#include +#include +#include #include "ivf_centroid_index.h" #include "ivf_index_provider.h" #include "ivf_params.h" diff --git a/src/core/algorithm/ivf/ivf_streamer.h b/src/core/algorithm/ivf/ivf_streamer.h index f395f6d..57bdda0 100644 --- a/src/core/algorithm/ivf/ivf_streamer.h +++ b/src/core/algorithm/ivf/ivf_streamer.h @@ -14,7 +14,7 @@ #ifndef __IVF_STREAMER_H__ #define __IVF_STREAMER_H__ -#include "framework/index_streamer.h" +#include #include "ivf_centroid_index.h" #include "ivf_entity.h" #include "ivf_searcher_context.h" diff --git a/src/core/algorithm/ivf/ivf_utility.h b/src/core/algorithm/ivf/ivf_utility.h index 01cd39b..38e41a4 100644 --- a/src/core/algorithm/ivf/ivf_utility.h +++ b/src/core/algorithm/ivf/ivf_utility.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_cluster.cc b/src/core/framework/index_cluster.cc index 118c946..5fbda92 100644 --- a/src/core/framework/index_cluster.cc +++ b/src/core/framework/index_cluster.cc @@ -12,9 +12,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 "index_cluster.h" -#include "index_bundle.h" -#include "index_error.h" + +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_context.cc b/src/core/framework/index_context.cc index e7ffa36..08812d5 100644 --- a/src/core/framework/index_context.cc +++ b/src/core/framework/index_context.cc @@ -11,9 +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 "index_context.h" + #include #include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_converter.cc b/src/core/framework/index_converter.cc index 251ee7b..dcf8480 100644 --- a/src/core/framework/index_converter.cc +++ b/src/core/framework/index_converter.cc @@ -11,9 +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 "index_converter.h" -#include "index_error.h" -#include "index_helper.h" + +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_error.cc b/src/core/framework/index_error.cc index e7184bf..0a259ec 100644 --- a/src/core/framework/index_error.cc +++ b/src/core/framework/index_error.cc @@ -11,7 +11,7 @@ // 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 "index_error.h" +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_factory.cc b/src/core/framework/index_factory.cc index 687100f..69fe0e9 100644 --- a/src/core/framework/index_factory.cc +++ b/src/core/framework/index_factory.cc @@ -11,7 +11,8 @@ // 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 "index_factory.h" + +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_flow.cc b/src/core/framework/index_flow.cc index c68a9a1..d375c73 100644 --- a/src/core/framework/index_flow.cc +++ b/src/core/framework/index_flow.cc @@ -11,9 +11,12 @@ // 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 "index_flow.h" + #include -#include "index_helper.h" +#include +#include +#include +#include //! Default storage #define INDEX_FLOW_STORAGE_DEFAULT "MMapFileReadStorage" diff --git a/src/core/framework/index_framework.h b/src/core/framework/index_framework.h deleted file mode 100644 index d4a12bc..0000000 --- a/src/core/framework/index_framework.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2025-present the zvec project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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. -#pragma once - -#include "index_builder.h" -#include "index_bundle.h" -#include "index_cluster.h" -#include "index_converter.h" -#include "index_factory.h" -#include "index_filter.h" -#include "index_flow.h" -#include "index_helper.h" -#include "index_holder.h" -#include "index_mapping.h" -#include "index_memory.h" -#include "index_meta.h" -#include "index_plugin.h" -#include "index_runner.h" -#include "index_searcher.h" -#include "index_trainer.h" diff --git a/src/core/framework/index_helper.cc b/src/core/framework/index_helper.cc index a19d749..80b12f4 100644 --- a/src/core/framework/index_helper.cc +++ b/src/core/framework/index_helper.cc @@ -11,9 +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 "index_helper.h" + #include -#include "index_error.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_logger.cc b/src/core/framework/index_logger.cc index b54f318..4ab6e2e 100644 --- a/src/core/framework/index_logger.cc +++ b/src/core/framework/index_logger.cc @@ -11,12 +11,12 @@ // 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 "index_logger.h" #include #include #include -#include -#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_mapping.cc b/src/core/framework/index_mapping.cc index 5287779..41475d0 100644 --- a/src/core/framework/index_mapping.cc +++ b/src/core/framework/index_mapping.cc @@ -12,10 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "index_mapping.h" -#include -#include "index_error.h" -#include "index_logger.h" +#include +#include +#include +#include +#include "ailego/utility/memory_helper.h" #ifdef __linux__ #include diff --git a/src/core/framework/index_meta.cc b/src/core/framework/index_meta.cc index 920a134..11d54cb 100644 --- a/src/core/framework/index_meta.cc +++ b/src/core/framework/index_meta.cc @@ -11,9 +11,9 @@ // 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 "index_meta.h" -#include -#include + +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_plugin.cc b/src/core/framework/index_plugin.cc index 5c0e5b8..f9209a6 100644 --- a/src/core/framework/index_plugin.cc +++ b/src/core/framework/index_plugin.cc @@ -11,8 +11,8 @@ // 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 "index_plugin.h" #include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_version.cc b/src/core/framework/index_version.cc index cd206b0..9cd33e7 100644 --- a/src/core/framework/index_version.cc +++ b/src/core/framework/index_version.cc @@ -11,8 +11,9 @@ // 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 "index_version.h" + #include +#include namespace zvec { diff --git a/src/core/interface/index.cc b/src/core/interface/index.cc index 1b6fd50..aca4094 100644 --- a/src/core/interface/index.cc +++ b/src/core/interface/index.cc @@ -12,12 +12,38 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "index.h" -#include "framework/index_error.h" -#include "framework/index_storage.h" +#include +#include +#include +#include +#include "mixed_reducer/mixed_reducer_params.h" namespace zvec::core_interface { +// eliminate the pre-alloc of the context pool +thread_local static std::array() - 1) * 2> + _context_list; + + +bool Index::init_context() { + context_index_ = (magic_enum::enum_integer(param_.index_type) - 1) * 2 + + static_cast(is_sparse_); + if (_context_list[context_index_] == nullptr) { + if ((_context_list[context_index_] = streamer_->create_context()) == + nullptr) { + LOG_ERROR("Failed to create context"); + return false; + } + } + return true; +} + +core::IndexContext::Pointer &Index::acquire_context() { + init_context(); + return _context_list[context_index_]; +} + int Index::ParseMetricName(const BaseIndexParam ¶m) { std::string metric_name; if (is_sparse_) { diff --git a/src/core/interface/index_factory.cc b/src/core/interface/index_factory.cc index f924632..699c9ce 100644 --- a/src/core/interface/index_factory.cc +++ b/src/core/interface/index_factory.cc @@ -11,15 +11,13 @@ // 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. -// -// Created by wangjianning.wjn on 8/28/25. -// -#include "core/framework/index_factory.h" -#include "ailego/container/params.h" -#include "core/framework/index_meta.h" -#include "utils/utils.h" -#include "index_factory.h" +#include +#include +#include +#include +#include +#include "core/interface/utils/utils.h" namespace zvec::core_interface { @@ -113,4 +111,180 @@ BaseIndexParam::Pointer IndexFactory::DeserializeIndexParamFromJson( } } +template , bool> > +std::string IndexFactory::QueryParamSerializeToJson(const QueryParamType ¶m, + bool omit_empty_value) { + ailego::JsonObject json_obj; + + // BaseIndexQueryParam + // omit filter & bf_pks + if (!omit_empty_value || param.topk != 0) { + json_obj.set("topk", ailego::JsonValue(param.topk)); + } + if (!omit_empty_value || param.fetch_vector) { + json_obj.set("fetch_vector", ailego::JsonValue(param.fetch_vector)); + } + if (!omit_empty_value || param.radius != 0.0f) { + json_obj.set("radius", ailego::JsonValue(param.radius)); + } + if (!omit_empty_value || param.is_linear) { + json_obj.set("is_linear", ailego::JsonValue(param.is_linear)); + } + + IndexType index_type{IndexType::kNone}; + if constexpr (std::is_same_v) { + // index_type + index_type = IndexType::kFlat; + } else if constexpr (std::is_same_v) { + if (!omit_empty_value || param.ef_search != 0) { + json_obj.set("ef_search", ailego::JsonValue(param.ef_search)); + } + index_type = IndexType::kHNSW; + } else if constexpr (std::is_same_v) { + if (!omit_empty_value || param.nprobe != 0) { + json_obj.set("nprobe", ailego::JsonValue(param.nprobe)); + } + index_type = IndexType::kIVF; + // json_obj.set("l1QueryParam", + // ailego::JsonValue(QueryParamSerializeToJson(param.l1QueryParam))); + // json_obj.set("l2QueryParam", + // ailego::JsonValue(QueryParamSerializeToJson(param.l2QueryParam))); + } + + json_obj.set("index_type", + ailego::JsonValue(magic_enum::enum_name(index_type).data())); + + return ailego::JsonValue(json_obj).as_json_string().as_stl_string(); +} + +template std::string +IndexFactory::QueryParamSerializeToJson( + const BaseIndexQueryParam ¶m, bool omit_empty_value); +template std::string IndexFactory::QueryParamSerializeToJson( + const FlatQueryParam ¶m, bool omit_empty_value); +template std::string IndexFactory::QueryParamSerializeToJson( + const HNSWQueryParam ¶m, bool omit_empty_value); +template std::string IndexFactory::QueryParamSerializeToJson( + const IVFQueryParam ¶m, bool omit_empty_value); + +template , bool> > +typename QueryParamType::Pointer IndexFactory::QueryParamDeserializeFromJson( + const std::string &json_str) { + ailego::JsonValue tmp_json_value; + if (!tmp_json_value.parse(json_str)) { + LOG_ERROR("Failed to parse json string: %s", json_str.c_str()); + return nullptr; + } + ailego::JsonObject json_obj = tmp_json_value.as_object(); + + auto parse_common_fields = [&](auto ¶m) -> bool { + if (!extract_value_from_json(json_obj, "topk", param->topk, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize topk"); + return false; + } + + if (!extract_value_from_json(json_obj, "fetch_vector", param->fetch_vector, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize fetch_vector"); + return false; + } + + if (!extract_value_from_json(json_obj, "radius", param->radius, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize radius"); + return false; + } + + if (!extract_value_from_json(json_obj, "is_linear", param->is_linear, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize is_linear"); + return false; + } + return true; + }; + + IndexType index_type; + + if (!extract_enum_from_json(json_obj, "index_type", index_type, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize index type"); + return nullptr; + } + + if constexpr (std::is_same_v) { + if (index_type == IndexType::kFlat) { + auto param = std::make_shared(); + if (!parse_common_fields(param)) { + return nullptr; + } + return param; + } else if (index_type == IndexType::kHNSW) { + auto param = std::make_shared(); + if (!parse_common_fields(param)) { + return nullptr; + } + if (!extract_value_from_json(json_obj, "ef_search", param->ef_search, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize ef_search"); + return nullptr; + } + return param; + } else if (index_type == IndexType::kIVF) { + auto param = std::make_shared(); + if (!parse_common_fields(param)) { + return nullptr; + } + if (!extract_value_from_json(json_obj, "nprobe", param->nprobe, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize nprobe"); + return nullptr; + } + return param; + } else { + LOG_ERROR("Unsupported index type: %s", + magic_enum::enum_name(index_type).data()); + return nullptr; + } + } else { + auto param = std::make_shared(); + if (!parse_common_fields(param)) { + return nullptr; + } + if constexpr (std::is_same_v) { + } else if constexpr (std::is_same_v) { + if (!extract_value_from_json(json_obj, "ef_search", param->ef_search, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize ef_search"); + return nullptr; + } + } else if constexpr (std::is_same_v) { + if (!extract_value_from_json(json_obj, "nprobe", param->nprobe, + tmp_json_value)) { + LOG_ERROR("Failed to deserialize nprobe"); + return nullptr; + } + } else { + LOG_ERROR("Unsupported index type: %s", + magic_enum::enum_name(index_type).data()); + return nullptr; + } + return param; + } +} + +template BaseIndexQueryParam::Pointer +IndexFactory::QueryParamDeserializeFromJson( + const std::string &json_str); +template FlatQueryParam::Pointer IndexFactory::QueryParamDeserializeFromJson< + FlatQueryParam>(const std::string &json_str); +template HNSWQueryParam::Pointer IndexFactory::QueryParamDeserializeFromJson< + HNSWQueryParam>(const std::string &json_str); +template IVFQueryParam::Pointer IndexFactory::QueryParamDeserializeFromJson< + IVFQueryParam>(const std::string &json_str); + } // namespace zvec::core_interface diff --git a/src/core/interface/index_factory.h b/src/core/interface/index_factory.h deleted file mode 100644 index a5414a2..0000000 --- a/src/core/interface/index_factory.h +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright 2025-present the zvec project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// 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. -// -// Created by wangjianning.wjn on 8/28/25. -// - -#ifndef ZVEC_INDEX_FACTORY_H -#define ZVEC_INDEX_FACTORY_H - -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include "index.h" -#include "index_param.h" - -namespace zvec::core_interface { - -// 索引的工厂类 -class IndexFactory { - public: - static Index::Pointer CreateAndInitIndex(const BaseIndexParam ¶m); - - static BaseIndexParam::Pointer DeserializeIndexParamFromJson( - const std::string &json_str); - - - static std::string QueryParamSerializeToJson( - const BaseIndexQueryParam ¶m); - - - template < - typename QueryParamType, - std::enable_if_t, - bool> = true> - static std::string QueryParamSerializeToJson(const QueryParamType ¶m, - bool omit_empty_value = false); - - template < - typename QueryParamType, - std::enable_if_t, - bool> = true> - static typename QueryParamType::Pointer QueryParamDeserializeFromJson( - const std::string &json_str); - - // register() -- Index class should have a `create` interface -}; - - -template , bool> > -std::string IndexFactory::QueryParamSerializeToJson(const QueryParamType ¶m, - bool omit_empty_value) { - ailego::JsonObject json_obj; - - // BaseIndexQueryParam - // omit filter & bf_pks - if (!omit_empty_value || param.topk != 0) { - json_obj.set("topk", ailego::JsonValue(param.topk)); - } - if (!omit_empty_value || param.fetch_vector) { - json_obj.set("fetch_vector", ailego::JsonValue(param.fetch_vector)); - } - if (!omit_empty_value || param.radius != 0.0f) { - json_obj.set("radius", ailego::JsonValue(param.radius)); - } - if (!omit_empty_value || param.is_linear) { - json_obj.set("is_linear", ailego::JsonValue(param.is_linear)); - } - - IndexType index_type; - if constexpr (std::is_same_v) { - // index_type - index_type = IndexType::kFlat; - } else if constexpr (std::is_same_v) { - if (!omit_empty_value || param.ef_search != 0) { - json_obj.set("ef_search", ailego::JsonValue(param.ef_search)); - } - index_type = IndexType::kHNSW; - } else if constexpr (std::is_same_v) { - if (!omit_empty_value || param.nprobe != 0) { - json_obj.set("nprobe", ailego::JsonValue(param.nprobe)); - } - index_type = IndexType::kIVF; - // json_obj.set("l1QueryParam", - // ailego::JsonValue(QueryParamSerializeToJson(param.l1QueryParam))); - // json_obj.set("l2QueryParam", - // ailego::JsonValue(QueryParamSerializeToJson(param.l2QueryParam))); - } - - json_obj.set("index_type", - ailego::JsonValue(magic_enum::enum_name(index_type).data())); - - return ailego::JsonValue(json_obj).as_json_string().as_stl_string(); -} - -template , bool> > -typename QueryParamType::Pointer IndexFactory::QueryParamDeserializeFromJson( - const std::string &json_str) { - ailego::JsonValue tmp_json_value; - if (!tmp_json_value.parse(json_str)) { - LOG_ERROR("Failed to parse json string: %s", json_str.c_str()); - return nullptr; - } - ailego::JsonObject json_obj = tmp_json_value.as_object(); - - auto parse_common_fields = [&](auto ¶m) -> bool { - if (!extract_value_from_json(json_obj, "topk", param->topk, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize topk"); - return false; - } - - if (!extract_value_from_json(json_obj, "fetch_vector", param->fetch_vector, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize fetch_vector"); - return false; - } - - if (!extract_value_from_json(json_obj, "radius", param->radius, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize radius"); - return false; - } - - if (!extract_value_from_json(json_obj, "is_linear", param->is_linear, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize is_linear"); - return false; - } - return true; - }; - - IndexType index_type; - - if (!extract_enum_from_json(json_obj, "index_type", index_type, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize index type"); - return nullptr; - } - - if constexpr (std::is_same_v) { - if (index_type == IndexType::kFlat) { - auto param = std::make_shared(); - if (!parse_common_fields(param)) { - return nullptr; - } - return param; - } else if (index_type == IndexType::kHNSW) { - auto param = std::make_shared(); - if (!parse_common_fields(param)) { - return nullptr; - } - if (!extract_value_from_json(json_obj, "ef_search", param->ef_search, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize ef_search"); - return nullptr; - } - return param; - } else if (index_type == IndexType::kIVF) { - auto param = std::make_shared(); - if (!parse_common_fields(param)) { - return nullptr; - } - if (!extract_value_from_json(json_obj, "nprobe", param->nprobe, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize nprobe"); - return nullptr; - } - return param; - } else { - LOG_ERROR("Unsupported index type: %s", - magic_enum::enum_name(index_type).data()); - return nullptr; - } - } else { - auto param = std::make_shared(); - if (!parse_common_fields(param)) { - return nullptr; - } - if constexpr (std::is_same_v) { - } else if constexpr (std::is_same_v) { - if (!extract_value_from_json(json_obj, "ef_search", param->ef_search, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize ef_search"); - return nullptr; - } - } else if constexpr (std::is_same_v) { - if (!extract_value_from_json(json_obj, "nprobe", param->nprobe, - tmp_json_value)) { - LOG_ERROR("Failed to deserialize nprobe"); - return nullptr; - } - } else { - LOG_ERROR("Unsupported index type: %s", - magic_enum::enum_name(index_type).data()); - return nullptr; - } - return param; - } -} - - -} // namespace zvec::core_interface - - -#endif // ZVEC_INDEX_FACTORY_H diff --git a/src/core/interface/index_param.cc b/src/core/interface/index_param.cc index 394788b..71e4012 100644 --- a/src/core/interface/index_param.cc +++ b/src/core/interface/index_param.cc @@ -1,6 +1,20 @@ -#include "index_param.h" -#include -#include +// Copyright 2025-present the zvec project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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 +#include +#include "core/interface/utils/utils.h" namespace zvec { namespace core_interface { @@ -127,6 +141,22 @@ bool HNSWIndexParam::DeserializeFromJsonObject( return true; } +ailego::JsonObject QuantizerParam::SerializeToJsonObject( + bool omit_empty_value) const { + ailego::JsonObject json_obj; + if (!omit_empty_value || type != QuantizerType::kNone) { + json_obj.set("type", + zvec::ailego::JsonValue(magic_enum::enum_name(type).data())); + } + return json_obj; +} + +bool QuantizerParam::DeserializeFromJsonObject( + const ailego::JsonObject &json_obj) { + DESERIALIZE_ENUM_FIELD(json_obj, type, QuantizerType); + return true; +} + // bool BaseIndexQueryParam::DeserializeFromJsonObject( // const ailego::JsonObject &json_obj) { // DESERIALIZE_ENUM_FIELD(json_obj, index_type, IndexType); diff --git a/src/core/interface/indexes/flat_index.cc b/src/core/interface/indexes/flat_index.cc index 0e7e5fd..baf8e22 100644 --- a/src/core/interface/indexes/flat_index.cc +++ b/src/core/interface/indexes/flat_index.cc @@ -11,14 +11,11 @@ // 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. -// -// Created by wangjianning.wjn on 8/28/25. -// #include #include +#include #include "algorithm/flat/flat_utility.h" -#include "interface/index.h" namespace zvec::core_interface { diff --git a/src/core/interface/indexes/hnsw_index.cc b/src/core/interface/indexes/hnsw_index.cc index 7d42691..921db8f 100644 --- a/src/core/interface/indexes/hnsw_index.cc +++ b/src/core/interface/indexes/hnsw_index.cc @@ -14,9 +14,9 @@ #include #include +#include #include "algorithm/hnsw/hnsw_params.h" #include "algorithm/hnsw_sparse/hnsw_sparse_params.h" -#include "interface/index.h" namespace zvec::core_interface { diff --git a/src/core/interface/indexes/ivf_index.cc b/src/core/interface/indexes/ivf_index.cc index debd80e..0cfba03 100644 --- a/src/core/interface/indexes/ivf_index.cc +++ b/src/core/interface/indexes/ivf_index.cc @@ -14,8 +14,8 @@ #include #include +#include #include "algorithm/ivf/ivf_params.h" -#include "interface/index.h" namespace zvec::core_interface { diff --git a/src/core/interface/utils/utils.h b/src/core/interface/utils/utils.h index 74c542f..5fc5365 100644 --- a/src/core/interface/utils/utils.h +++ b/src/core/interface/utils/utils.h @@ -14,12 +14,13 @@ #pragma once -#include -#include #include +#include +#include namespace zvec { namespace core_interface { + template constexpr bool extract_enum_from_json(const ailego::JsonObject &json_obj, const char *key, EnumType &enum_value, diff --git a/src/core/metric/cosine_metric.cc b/src/core/metric/cosine_metric.cc index 525d3fb..1b0fb05 100644 --- a/src/core/metric/cosine_metric.cc +++ b/src/core/metric/cosine_metric.cc @@ -14,8 +14,8 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/metric/euclidean_metric.cc b/src/core/metric/euclidean_metric.cc index 8c74b7d..a1a8d59 100644 --- a/src/core/metric/euclidean_metric.cc +++ b/src/core/metric/euclidean_metric.cc @@ -14,9 +14,9 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_metric.h" +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/metric/hamming_metric.cc b/src/core/metric/hamming_metric.cc index b3125dc..ee19c06 100644 --- a/src/core/metric/hamming_metric.cc +++ b/src/core/metric/hamming_metric.cc @@ -11,9 +11,11 @@ // 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 -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include +#include "ailego/math_batch/distance_batch.h" namespace zvec { namespace core { diff --git a/src/core/metric/inner_product_metric.cc b/src/core/metric/inner_product_metric.cc index 9f6a746..8ef0a11 100644 --- a/src/core/metric/inner_product_metric.cc +++ b/src/core/metric/inner_product_metric.cc @@ -13,9 +13,9 @@ // limitations under the License. #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_metric.h" +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/metric/mips_euclidean_metric.cc b/src/core/metric/mips_euclidean_metric.cc index b8140c7..280bfa7 100644 --- a/src/core/metric/mips_euclidean_metric.cc +++ b/src/core/metric/mips_euclidean_metric.cc @@ -15,8 +15,8 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include #include "metric_params.h" namespace zvec { diff --git a/src/core/metric/quantized_integer_metric.cc b/src/core/metric/quantized_integer_metric.cc index 6e3f87f..56e9563 100644 --- a/src/core/metric/quantized_integer_metric.cc +++ b/src/core/metric/quantized_integer_metric.cc @@ -16,8 +16,8 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include #include "metric_params.h" #include "quantized_integer_metric_batch.h" #include "quantized_integer_metric_matrix.h" diff --git a/src/core/metric/quantized_integer_metric_matrix.h b/src/core/metric/quantized_integer_metric_matrix.h index 11dc9b7..c7cf460 100644 --- a/src/core/metric/quantized_integer_metric_matrix.h +++ b/src/core/metric/quantized_integer_metric_matrix.h @@ -18,8 +18,8 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" +#include +#include #include "metric_params.h" diff --git a/src/core/mixed_reducer/mixed_streamer_reducer.cc b/src/core/mixed_reducer/mixed_streamer_reducer.cc index f4ea063..b5e241b 100644 --- a/src/core/mixed_reducer/mixed_streamer_reducer.cc +++ b/src/core/mixed_reducer/mixed_streamer_reducer.cc @@ -13,14 +13,15 @@ // limitations under the License. #include "mixed_streamer_reducer.h" #include -#include -#include -#include -#include -#include -#include #include +#include #include +#include +#include +#include +#include +#include +#include "mixed_reducer/mixed_reducer_params.h" namespace zvec { namespace core { diff --git a/src/core/mixed_reducer/mixed_streamer_reducer.h b/src/core/mixed_reducer/mixed_streamer_reducer.h index 494224b..ec4c624 100644 --- a/src/core/mixed_reducer/mixed_streamer_reducer.h +++ b/src/core/mixed_reducer/mixed_streamer_reducer.h @@ -16,13 +16,12 @@ #include #include #include -#include -#include -#include -#include #include -#include "framework/index_error.h" -#include "mixed_reducer_params.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/quantizer/binary_converter.cc b/src/core/quantizer/binary_converter.cc index 9fe46dd..852d192 100644 --- a/src/core/quantizer/binary_converter.cc +++ b/src/core/quantizer/binary_converter.cc @@ -14,8 +14,8 @@ #include #include #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/quantizer/binary_reformer.cc b/src/core/quantizer/binary_reformer.cc index 4ff0a04..78ddffd 100644 --- a/src/core/quantizer/binary_reformer.cc +++ b/src/core/quantizer/binary_reformer.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/quantizer/cosine_converter.cc b/src/core/quantizer/cosine_converter.cc index 4e3dbee..e8deaca 100644 --- a/src/core/quantizer/cosine_converter.cc +++ b/src/core/quantizer/cosine_converter.cc @@ -16,8 +16,8 @@ #include #include #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include #include "record_quantizer.h" #include "../metric/metric_params.h" diff --git a/src/core/quantizer/cosine_reformer.cc b/src/core/quantizer/cosine_reformer.cc index 2595f21..5823728 100644 --- a/src/core/quantizer/cosine_reformer.cc +++ b/src/core/quantizer/cosine_reformer.cc @@ -15,8 +15,8 @@ #include #include #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include #include "record_quantizer.h" namespace zvec { diff --git a/src/core/quantizer/half_float_converter.cc b/src/core/quantizer/half_float_converter.cc index 2db004b..4b426d4 100644 --- a/src/core/quantizer/half_float_converter.cc +++ b/src/core/quantizer/half_float_converter.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_framework.h" +#include namespace zvec { namespace core { diff --git a/src/core/quantizer/half_float_reformer.cc b/src/core/quantizer/half_float_reformer.cc index cffe322..0803a85 100644 --- a/src/core/quantizer/half_float_reformer.cc +++ b/src/core/quantizer/half_float_reformer.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_factory.h" +#include #include "record_quantizer.h" namespace zvec { diff --git a/src/core/quantizer/integer_quantizer_converter.cc b/src/core/quantizer/integer_quantizer_converter.cc index e9bc64f..91757a5 100644 --- a/src/core/quantizer/integer_quantizer_converter.cc +++ b/src/core/quantizer/integer_quantizer_converter.cc @@ -16,8 +16,8 @@ #include #include #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include #include "record_quantizer.h" #include "../metric/metric_params.h" diff --git a/src/core/quantizer/integer_quantizer_reformer.cc b/src/core/quantizer/integer_quantizer_reformer.cc index cad431f..9c74103 100644 --- a/src/core/quantizer/integer_quantizer_reformer.cc +++ b/src/core/quantizer/integer_quantizer_reformer.cc @@ -16,8 +16,8 @@ #include #include #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include #include "record_quantizer.h" namespace zvec { diff --git a/src/core/quantizer/mips_converter.cc b/src/core/quantizer/mips_converter.cc index 910443b..343e157 100644 --- a/src/core/quantizer/mips_converter.cc +++ b/src/core/quantizer/mips_converter.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include -#include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/quantizer/mips_reformer.cc b/src/core/quantizer/mips_reformer.cc index b656a96..3e76211 100644 --- a/src/core/quantizer/mips_reformer.cc +++ b/src/core/quantizer/mips_reformer.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_factory.h" -#include "quantizer_params.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/quantizer/record_quantizer.h b/src/core/quantizer/record_quantizer.h index 4170251..06744f6 100644 --- a/src/core/quantizer/record_quantizer.h +++ b/src/core/quantizer/record_quantizer.h @@ -11,7 +11,7 @@ // 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 "framework/index_meta.h" +#include #pragma once diff --git a/src/core/utility/basic_refiner.cc b/src/core/utility/basic_refiner.cc index dbe1759..dd3fdfa 100644 --- a/src/core/utility/basic_refiner.cc +++ b/src/core/utility/basic_refiner.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/index_factory.h" -#include "framework/index_refiner.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/utility/buffer_storage.cc b/src/core/utility/buffer_storage.cc index caa59b2..4ac3c6b 100644 --- a/src/core/utility/buffer_storage.cc +++ b/src/core/utility/buffer_storage.cc @@ -13,11 +13,11 @@ // limitations under the License. #include -#include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_mapping.h" -#include "framework/index_version.h" +#include +#include +#include +#include +#include #include "utility_params.h" namespace zvec { diff --git a/src/core/utility/file_dumper.cc b/src/core/utility/file_dumper.cc index aa40736..c77b1e1 100644 --- a/src/core/utility/file_dumper.cc +++ b/src/core/utility/file_dumper.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_format.h" -#include "framework/index_packer.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/utility/file_read_storage.cc b/src/core/utility/file_read_storage.cc index 11948cf..8f2b79f 100644 --- a/src/core/utility/file_read_storage.cc +++ b/src/core/utility/file_read_storage.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_unpacker.h" +#include +#include +#include +#include #include "utility_params.h" namespace zvec { diff --git a/src/core/utility/memory_dumper.cc b/src/core/utility/memory_dumper.cc index ae24c53..10a1dc3 100644 --- a/src/core/utility/memory_dumper.cc +++ b/src/core/utility/memory_dumper.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_format.h" -#include "framework/index_memory.h" -#include "framework/index_packer.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/utility/memory_read_storage.cc b/src/core/utility/memory_read_storage.cc index 8c339ce..38eb9ea 100644 --- a/src/core/utility/memory_read_storage.cc +++ b/src/core/utility/memory_read_storage.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_format.h" -#include "framework/index_memory.h" -#include "framework/index_unpacker.h" +#include +#include +#include +#include +#include #include "utility_params.h" namespace zvec { diff --git a/src/core/utility/mmap_file_read_storage.cc b/src/core/utility/mmap_file_read_storage.cc index 93a311c..8d62030 100644 --- a/src/core/utility/mmap_file_read_storage.cc +++ b/src/core/utility/mmap_file_read_storage.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include -#include "framework/index_factory.h" -#include "framework/index_format.h" -#include "framework/index_unpacker.h" +#include +#include +#include +#include #include "utility_params.h" namespace zvec { diff --git a/src/core/utility/mmap_file_storage.cc b/src/core/utility/mmap_file_storage.cc index 17d2515..e4a8e23 100644 --- a/src/core/utility/mmap_file_storage.cc +++ b/src/core/utility/mmap_file_storage.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_mapping.h" -#include "framework/index_version.h" +#include +#include +#include +#include #include "utility_params.h" namespace zvec { diff --git a/src/core/utility/sparse_utility.h b/src/core/utility/sparse_utility.h index 7a7928d..6f057c5 100644 --- a/src/core/utility/sparse_utility.h +++ b/src/core/utility/sparse_utility.h @@ -18,9 +18,9 @@ #include #include #include -#include "framework/index_document.h" -#include "framework/index_logger.h" -#include "framework/index_meta.h" +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/utility/visit_filter.h b/src/core/utility/visit_filter.h index 30ed168..348da17 100644 --- a/src/core/utility/visit_filter.h +++ b/src/core/utility/visit_filter.h @@ -22,8 +22,8 @@ #include #include #include -#include "framework/index_error.h" -#include "framework/index_logger.h" +#include +#include namespace zvec { namespace core { diff --git a/src/db/collection.cc b/src/db/collection.cc index ff260bc..6704f0f 100644 --- a/src/db/collection.cc +++ b/src/db/collection.cc @@ -20,17 +20,17 @@ #include #include #include -#include #include -#include +#include +#include #include +#include #include #include #include #include #include #include -#include "ailego/logger/logger.h" #include "db/common/constants.h" #include "db/common/file_helper.h" #include "db/common/profiler.h" diff --git a/src/db/common/concurrent_roaring_bitmap.cc b/src/db/common/concurrent_roaring_bitmap.cc index 258c3f1..9cc298a 100644 --- a/src/db/common/concurrent_roaring_bitmap.cc +++ b/src/db/common/concurrent_roaring_bitmap.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "concurrent_roaring_bitmap.h" -#include +#include namespace zvec { diff --git a/src/db/common/concurrent_roaring_bitmap.h b/src/db/common/concurrent_roaring_bitmap.h index 54f1362..8d5f106 100644 --- a/src/db/common/concurrent_roaring_bitmap.h +++ b/src/db/common/concurrent_roaring_bitmap.h @@ -18,11 +18,11 @@ #include #include #include -#include -#include #include +#include +#include +#include #include -#include "ailego/internal/platform.h" namespace zvec { diff --git a/src/db/common/file_helper.h b/src/db/common/file_helper.h index 4fb9562..ee2408a 100644 --- a/src/db/common/file_helper.h +++ b/src/db/common/file_helper.h @@ -16,8 +16,8 @@ #include #include #include -#include -#include +#include +#include #include namespace zvec { diff --git a/src/db/common/global_resource.cc b/src/db/common/global_resource.cc index d17b38e..2f4ad1c 100644 --- a/src/db/common/global_resource.cc +++ b/src/db/common/global_resource.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "db/common/global_resource.h" #include -#include +#include #include namespace zvec { diff --git a/src/db/common/global_resource.h b/src/db/common/global_resource.h index ea3e812..816e450 100644 --- a/src/db/common/global_resource.h +++ b/src/db/common/global_resource.h @@ -14,8 +14,8 @@ #pragma once #include +#include #include -#include "ailego/parallel/thread_pool.h" namespace zvec { diff --git a/src/db/common/glogger.h b/src/db/common/glogger.h index 9b129a0..93fd9a7 100644 --- a/src/db/common/glogger.h +++ b/src/db/common/glogger.h @@ -11,8 +11,8 @@ // 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 -#include +#include +#include #ifdef __GNUC__ #pragma GCC diagnostic push diff --git a/src/db/common/logger.h b/src/db/common/logger.h index bbc60d3..d0f7eb0 100644 --- a/src/db/common/logger.h +++ b/src/db/common/logger.h @@ -14,11 +14,11 @@ #pragma once -#include -#include #include +#include +#include +#include #include -#include "ailego/pattern/factory.h" #include "db/common/constants.h" #include "error_code.h" diff --git a/src/db/common/profiler.h b/src/db/common/profiler.h index 24fa9b2..52b8838 100644 --- a/src/db/common/profiler.h +++ b/src/db/common/profiler.h @@ -15,9 +15,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "error_code.h" namespace zvec { diff --git a/src/db/common/rocbsdb_context.cc b/src/db/common/rocbsdb_context.cc index 6db1110..790456a 100644 --- a/src/db/common/rocbsdb_context.cc +++ b/src/db/common/rocbsdb_context.cc @@ -13,11 +13,11 @@ // limitations under the License. -#include #include #include #include #include +#include #include "rocksdb_context.h" diff --git a/src/db/common/rocksdb_context.h b/src/db/common/rocksdb_context.h index a833f9d..302d7ca 100644 --- a/src/db/common/rocksdb_context.h +++ b/src/db/common/rocksdb_context.h @@ -16,8 +16,8 @@ #pragma once -#include #include +#include #include diff --git a/src/db/common/typedef.h b/src/db/common/typedef.h index 8c62142..d284389 100644 --- a/src/db/common/typedef.h +++ b/src/db/common/typedef.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include +#include #include "error_code.h" using idx_t = uint64_t; diff --git a/src/db/index/column/inverted_column/inverted_codec.h b/src/db/index/column/inverted_column/inverted_codec.h index 62fb76a..37e3fbd 100644 --- a/src/db/index/column/inverted_column/inverted_codec.h +++ b/src/db/index/column/inverted_column/inverted_codec.h @@ -17,8 +17,8 @@ #include -#include #include +#include #include #include #include "db/common/constants.h" diff --git a/src/db/index/column/inverted_column/inverted_column_indexer_write.cc b/src/db/index/column/inverted_column/inverted_column_indexer_write.cc index ce70752..d41a26c 100644 --- a/src/db/index/column/inverted_column/inverted_column_indexer_write.cc +++ b/src/db/index/column/inverted_column/inverted_column_indexer_write.cc @@ -13,8 +13,8 @@ // limitations under the License. -#include #include +#include #include "inverted_codec.h" #include "inverted_column_indexer.h" diff --git a/src/db/index/column/inverted_column/inverted_doc_range.h b/src/db/index/column/inverted_column/inverted_doc_range.h index bdb1032..3a38ece 100644 --- a/src/db/index/column/inverted_column/inverted_doc_range.h +++ b/src/db/index/column/inverted_column/inverted_doc_range.h @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/src/db/index/column/inverted_column/inverted_indexer.cc b/src/db/index/column/inverted_column/inverted_indexer.cc index 375703b..4997ab1 100644 --- a/src/db/index/column/inverted_column/inverted_indexer.cc +++ b/src/db/index/column/inverted_column/inverted_indexer.cc @@ -14,7 +14,7 @@ #include "inverted_indexer.h" -#include +#include #include "inverted_rocksdb_merger.h" diff --git a/src/db/index/column/vector_column/engine_helper.hpp b/src/db/index/column/vector_column/engine_helper.hpp index c2865c5..de1cfc6 100644 --- a/src/db/index/column/vector_column/engine_helper.hpp +++ b/src/db/index/column/vector_column/engine_helper.hpp @@ -15,11 +15,11 @@ #include #include +#include +#include #include #include #include -#include "core/interface/index.h" -#include "vector_column_indexer.h" #include "vector_column_params.h" diff --git a/src/db/index/column/vector_column/vector_column_indexer.cc b/src/db/index/column/vector_column/vector_column_indexer.cc index d56a2cb..1859e24 100644 --- a/src/db/index/column/vector_column/vector_column_indexer.cc +++ b/src/db/index/column/vector_column/vector_column_indexer.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "vector_column_indexer.h" #include +#include #include #include "engine_helper.hpp" diff --git a/src/db/index/column/vector_column/vector_column_indexer.h b/src/db/index/column/vector_column/vector_column_indexer.h index 756e93f..80766e1 100644 --- a/src/db/index/column/vector_column/vector_column_indexer.h +++ b/src/db/index/column/vector_column/vector_column_indexer.h @@ -16,13 +16,12 @@ #include #include #include -#include #include #include +#include +#include #include #include -#include "core/interface/index.h" -#include "core/interface/index_param.h" #include "db/common/constants.h" #include "db/common/typedef.h" #include "db/index/column/common/index_results.h" diff --git a/src/db/index/column/vector_column/vector_column_params.h b/src/db/index/column/vector_column/vector_column_params.h index 1db4943..86b32eb 100644 --- a/src/db/index/column/vector_column/vector_column_params.h +++ b/src/db/index/column/vector_column/vector_column_params.h @@ -17,13 +17,11 @@ #include #include #include -#include -#include -// #include -// #include "common/constants.h" +#include +#include +#include #include #include -#include "core/interface/index_param.h" #include "db/index/common/index_filter.h" namespace zvec { diff --git a/src/db/index/column/vector_column/vector_index_results.h b/src/db/index/column/vector_column/vector_index_results.h index 44bdf04..154ff6e 100644 --- a/src/db/index/column/vector_column/vector_index_results.h +++ b/src/db/index/column/vector_column/vector_index_results.h @@ -15,7 +15,7 @@ #include #include -#include "core/framework/index_document.h" +#include #include "db/common/typedef.h" #include "db/index/column/common/index_results.h" diff --git a/src/db/index/common/id_map.cc b/src/db/index/common/id_map.cc index 73e58d8..e1e03cf 100644 --- a/src/db/index/common/id_map.cc +++ b/src/db/index/common/id_map.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "id_map.h" -#include +#include #include "db/common/constants.h" diff --git a/src/db/index/common/id_map.h b/src/db/index/common/id_map.h index 02ac9aa..59e6b3e 100644 --- a/src/db/index/common/id_map.h +++ b/src/db/index/common/id_map.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include "db/common/rocksdb_context.h" diff --git a/src/db/index/common/type_helper.cc b/src/db/index/common/type_helper.cc index 7c5911e..7f622bb 100644 --- a/src/db/index/common/type_helper.cc +++ b/src/db/index/common/type_helper.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "type_helper.h" -#include "core/framework/index_meta.h" +#include namespace zvec { diff --git a/src/db/index/common/type_helper.h b/src/db/index/common/type_helper.h index 71ce4a7..33440dc 100644 --- a/src/db/index/common/type_helper.h +++ b/src/db/index/common/type_helper.h @@ -11,9 +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. + #pragma once -#include +#include #include #include "proto/zvec.pb.h" diff --git a/src/db/index/common/version_manager.cc b/src/db/index/common/version_manager.cc index 97e3c3c..47be9cb 100644 --- a/src/db/index/common/version_manager.cc +++ b/src/db/index/common/version_manager.cc @@ -21,8 +21,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/db/index/segment/segment.cc b/src/db/index/segment/segment.cc index 6fc2ac3..1afa038 100644 --- a/src/db/index/segment/segment.cc +++ b/src/db/index/segment/segment.cc @@ -21,16 +21,16 @@ #include #include #include -#include #include -#include -#include #include #include #include #include #include #include +#include +#include +#include #include #include #include diff --git a/src/db/index/segment/segment_helper.cc b/src/db/index/segment/segment_helper.cc index 08a7a81..45b2dfb 100644 --- a/src/db/index/segment/segment_helper.cc +++ b/src/db/index/segment/segment_helper.cc @@ -18,9 +18,9 @@ #include #include #include +#include #include #include -#include "ailego/logger/logger.h" #include "db/common/constants.h" #include "db/common/file_helper.h" #include "db/common/global_resource.h" diff --git a/src/db/index/storage/bufferpool_forward_store.cc b/src/db/index/storage/bufferpool_forward_store.cc index 60b0ad3..a8cbaee 100644 --- a/src/db/index/storage/bufferpool_forward_store.cc +++ b/src/db/index/storage/bufferpool_forward_store.cc @@ -13,8 +13,6 @@ // limitations under the License. #include "bufferpool_forward_store.h" -#include -#include #include #include #include @@ -23,6 +21,8 @@ #include #include #include +#include +#include #include "db/index/storage/store_helper.h" #include "lazy_record_batch_reader.h" diff --git a/src/db/index/storage/bufferpool_forward_store.h b/src/db/index/storage/bufferpool_forward_store.h index c0c357a..c841055 100644 --- a/src/db/index/storage/bufferpool_forward_store.h +++ b/src/db/index/storage/bufferpool_forward_store.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -24,6 +23,7 @@ #include #include #include +#include #include #include "base_forward_store.h" diff --git a/src/db/index/storage/chunked_file_writer.cc b/src/db/index/storage/chunked_file_writer.cc index 490078f..0295b99 100644 --- a/src/db/index/storage/chunked_file_writer.cc +++ b/src/db/index/storage/chunked_file_writer.cc @@ -14,10 +14,10 @@ #include "chunked_file_writer.h" #include -#include #include #include #include +#include namespace zvec { diff --git a/src/db/index/storage/lazy_record_batch_reader.h b/src/db/index/storage/lazy_record_batch_reader.h index 3289bf4..c9e124c 100644 --- a/src/db/index/storage/lazy_record_batch_reader.h +++ b/src/db/index/storage/lazy_record_batch_reader.h @@ -14,9 +14,9 @@ // limitations under the License. #pragma once -#include #include #include +#include #include "db/common/constants.h" diff --git a/src/db/index/storage/memory_forward_store.cc b/src/db/index/storage/memory_forward_store.cc index 4fd832b..94a6aa3 100644 --- a/src/db/index/storage/memory_forward_store.cc +++ b/src/db/index/storage/memory_forward_store.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include #include "db/common/constants.h" #include "db/index/storage/base_forward_store.h" diff --git a/src/db/index/storage/mmap_forward_store.cc b/src/db/index/storage/mmap_forward_store.cc index f96127c..dcaff40 100644 --- a/src/db/index/storage/mmap_forward_store.cc +++ b/src/db/index/storage/mmap_forward_store.cc @@ -14,11 +14,11 @@ #include "mmap_forward_store.h" #include -#include #include #include #include #include +#include #include "db/index/storage/base_forward_store.h" #include "lazy_record_batch_reader.h" diff --git a/src/db/index/storage/wal/local_wal_file.cc b/src/db/index/storage/wal/local_wal_file.cc index 680d871..91490b2 100644 --- a/src/db/index/storage/wal/local_wal_file.cc +++ b/src/db/index/storage/wal/local_wal_file.cc @@ -14,8 +14,8 @@ #include "local_wal_file.h" #include -#include -#include +#include +#include #include "db/common/error_code.h" #include "db/common/file_helper.h" #include "db/common/typedef.h" diff --git a/src/db/index/storage/wal/local_wal_file.h b/src/db/index/storage/wal/local_wal_file.h index efcfd06..d4f392f 100644 --- a/src/db/index/storage/wal/local_wal_file.h +++ b/src/db/index/storage/wal/local_wal_file.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "wal_file.h" namespace zvec { diff --git a/src/db/sqlengine/analyzer/query_analyzer.cc b/src/db/sqlengine/analyzer/query_analyzer.cc index bd01174..4d98137 100644 --- a/src/db/sqlengine/analyzer/query_analyzer.cc +++ b/src/db/sqlengine/analyzer/query_analyzer.cc @@ -14,13 +14,13 @@ #include "query_analyzer.h" #include -#include +#include #include #include +#include #include #include #include -#include "core/framework/index_meta.h" #include "db/common/constants.h" #include "db/common/error_code.h" #include "db/index/common/type_helper.h" diff --git a/src/db/sqlengine/analyzer/query_info.h b/src/db/sqlengine/analyzer/query_info.h index 5dfd738..653231a 100644 --- a/src/db/sqlengine/analyzer/query_info.h +++ b/src/db/sqlengine/analyzer/query_info.h @@ -18,8 +18,8 @@ #include #include #include -#include -#include +#include +#include #include #include "db/common/constants.h" #include "db/sqlengine/common/group_by.h" diff --git a/src/db/sqlengine/analyzer/query_info_helper.cc b/src/db/sqlengine/analyzer/query_info_helper.cc index 058f7ba..77692cc 100644 --- a/src/db/sqlengine/analyzer/query_info_helper.cc +++ b/src/db/sqlengine/analyzer/query_info_helper.cc @@ -14,7 +14,7 @@ #include "query_info_helper.h" #include -#include +#include #include namespace zvec::sqlengine { diff --git a/src/db/sqlengine/analyzer/query_node.cc b/src/db/sqlengine/analyzer/query_node.cc index 50764e6..2a8aa81 100644 --- a/src/db/sqlengine/analyzer/query_node.cc +++ b/src/db/sqlengine/analyzer/query_node.cc @@ -15,7 +15,7 @@ #include "query_node.h" #include #include -#include +#include #include "query_info.h" namespace zvec::sqlengine { diff --git a/src/db/sqlengine/analyzer/query_node_walker.cc b/src/db/sqlengine/analyzer/query_node_walker.cc index 2993f04..c2d5924 100644 --- a/src/db/sqlengine/analyzer/query_node_walker.cc +++ b/src/db/sqlengine/analyzer/query_node_walker.cc @@ -14,7 +14,7 @@ #include "query_node_walker.h" #include -#include +#include #include #include #include diff --git a/src/db/sqlengine/common/util.cc b/src/db/sqlengine/common/util.cc index 5c5d231..3f18bfe 100644 --- a/src/db/sqlengine/common/util.cc +++ b/src/db/sqlengine/common/util.cc @@ -18,9 +18,9 @@ #include #include #include -#include #include #include +#include #include namespace zvec::sqlengine { diff --git a/src/db/sqlengine/parser/zvec_cached_sql_parser.cc b/src/db/sqlengine/parser/zvec_cached_sql_parser.cc index 5214769..bc030bd 100644 --- a/src/db/sqlengine/parser/zvec_cached_sql_parser.cc +++ b/src/db/sqlengine/parser/zvec_cached_sql_parser.cc @@ -15,7 +15,7 @@ #include "zvec_cached_sql_parser.h" #include #include -#include +#include #include #include "atn/ParserATNSimulator.h" #include "db/sqlengine/antlr/gen/SQLLexer.h" diff --git a/src/db/sqlengine/parser/zvec_parser.cc b/src/db/sqlengine/parser/zvec_parser.cc index 91ce93d..de5ae79 100644 --- a/src/db/sqlengine/parser/zvec_parser.cc +++ b/src/db/sqlengine/parser/zvec_parser.cc @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include #include "db/sqlengine/common/util.h" #include "tree/ParseTree.h" diff --git a/src/db/sqlengine/parser/zvec_sql_parser.cc b/src/db/sqlengine/parser/zvec_sql_parser.cc index 1d472f3..c21943f 100644 --- a/src/db/sqlengine/parser/zvec_sql_parser.cc +++ b/src/db/sqlengine/parser/zvec_sql_parser.cc @@ -15,7 +15,7 @@ #include "zvec_sql_parser.h" #include #include -#include +#include #include "atn/ParserATNSimulator.h" #include "db/sqlengine/antlr/gen/SQLLexer.h" #include "db/sqlengine/antlr/gen/SQLParser.h" diff --git a/src/db/sqlengine/planner/doc_filter.cc b/src/db/sqlengine/planner/doc_filter.cc index 43ce1d5..f91535a 100644 --- a/src/db/sqlengine/planner/doc_filter.cc +++ b/src/db/sqlengine/planner/doc_filter.cc @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include "ailego/logger/logger.h" #include "db/sqlengine/planner/invert_search.h" namespace zvec::sqlengine { diff --git a/src/db/sqlengine/planner/invert_recall_node.cc b/src/db/sqlengine/planner/invert_recall_node.cc index 432d390..2656c48 100644 --- a/src/db/sqlengine/planner/invert_recall_node.cc +++ b/src/db/sqlengine/planner/invert_recall_node.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "db/sqlengine/planner/invert_recall_node.h" -#include #include +#include #include "db/sqlengine/planner/invert_search.h" namespace cp = arrow::compute; diff --git a/src/db/sqlengine/planner/invert_search.cc b/src/db/sqlengine/planner/invert_search.cc index 8cd76ab..0f89801 100644 --- a/src/db/sqlengine/planner/invert_search.cc +++ b/src/db/sqlengine/planner/invert_search.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "invert_search.h" -#include +#include #include #include "db/sqlengine/analyzer/query_node.h" #include "db/sqlengine/common/util.h" diff --git a/src/db/sqlengine/planner/optimizer.cc b/src/db/sqlengine/planner/optimizer.cc index f63950e..faacd1f 100644 --- a/src/db/sqlengine/planner/optimizer.cc +++ b/src/db/sqlengine/planner/optimizer.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "optimizer.h" -#include +#include #include #include #include "db/sqlengine/analyzer/query_info_helper.h" diff --git a/src/db/sqlengine/planner/plan_info.cc b/src/db/sqlengine/planner/plan_info.cc index 6f7681c..780fe55 100644 --- a/src/db/sqlengine/planner/plan_info.cc +++ b/src/db/sqlengine/planner/plan_info.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "plan_info.h" -#include #include +#include #include #include "db/common/error_code.h" diff --git a/src/db/sqlengine/planner/query_planner.cc b/src/db/sqlengine/planner/query_planner.cc index e4d8778..c0c588a 100644 --- a/src/db/sqlengine/planner/query_planner.cc +++ b/src/db/sqlengine/planner/query_planner.cc @@ -16,10 +16,10 @@ #include #include #include -#include -#include #include #include +#include +#include #include #include #include diff --git a/src/db/sqlengine/planner/segment_node.cc b/src/db/sqlengine/planner/segment_node.cc index 9c2edf4..aa77291 100644 --- a/src/db/sqlengine/planner/segment_node.cc +++ b/src/db/sqlengine/planner/segment_node.cc @@ -15,9 +15,9 @@ #include "db/sqlengine/planner/segment_node.h" #include #include -#include -#include #include +#include +#include namespace zvec::sqlengine { diff --git a/src/db/sqlengine/planner/segment_node.h b/src/db/sqlengine/planner/segment_node.h index 8852405..352a953 100644 --- a/src/db/sqlengine/planner/segment_node.h +++ b/src/db/sqlengine/planner/segment_node.h @@ -17,10 +17,10 @@ #include #include #include -#include #include #include #include +#include #include #include "db/sqlengine/planner/plan_info.h" diff --git a/src/db/sqlengine/planner/vector_recall_node.cc b/src/db/sqlengine/planner/vector_recall_node.cc index aa5dd1e..f56bb44 100644 --- a/src/db/sqlengine/planner/vector_recall_node.cc +++ b/src/db/sqlengine/planner/vector_recall_node.cc @@ -16,11 +16,11 @@ #include #include #include -#include #include #include -#include +#include #include +#include #include #include #include diff --git a/src/db/sqlengine/sqlengine_impl.cc b/src/db/sqlengine/sqlengine_impl.cc index f889adb..072c103 100644 --- a/src/db/sqlengine/sqlengine_impl.cc +++ b/src/db/sqlengine/sqlengine_impl.cc @@ -14,7 +14,7 @@ #include "db/sqlengine/sqlengine_impl.h" #include -#include +#include #include #include #include "db/common/constants.h" diff --git a/src/ailego/buffer/buffer_manager.h b/src/include/zvec/ailego/buffer/buffer_manager.h similarity index 99% rename from src/ailego/buffer/buffer_manager.h rename to src/include/zvec/ailego/buffer/buffer_manager.h index f9e2120..8aebf75 100644 --- a/src/ailego/buffer/buffer_manager.h +++ b/src/include/zvec/ailego/buffer/buffer_manager.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include namespace arrow { diff --git a/src/ailego/container/blob.h b/src/include/zvec/ailego/container/blob.h similarity index 98% rename from src/ailego/container/blob.h rename to src/include/zvec/ailego/container/blob.h index 2e45f7c..9803b42 100644 --- a/src/ailego/container/blob.h +++ b/src/include/zvec/ailego/container/blob.h @@ -16,7 +16,7 @@ #include #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/container/cube.h b/src/include/zvec/ailego/container/cube.h similarity index 99% rename from src/ailego/container/cube.h rename to src/include/zvec/ailego/container/cube.h index d9ed202..021cdd5 100644 --- a/src/ailego/container/cube.h +++ b/src/include/zvec/ailego/container/cube.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/container/heap.h b/src/include/zvec/ailego/container/heap.h similarity index 100% rename from src/ailego/container/heap.h rename to src/include/zvec/ailego/container/heap.h diff --git a/src/ailego/container/hypercube.h b/src/include/zvec/ailego/container/hypercube.h similarity index 99% rename from src/ailego/container/hypercube.h rename to src/include/zvec/ailego/container/hypercube.h index 490714e..75845ad 100644 --- a/src/ailego/container/hypercube.h +++ b/src/include/zvec/ailego/container/hypercube.h @@ -16,7 +16,7 @@ #include #include -#include "cube.h" +#include namespace zvec { namespace ailego { diff --git a/src/ailego/container/params.h b/src/include/zvec/ailego/container/params.h similarity index 99% rename from src/ailego/container/params.h rename to src/include/zvec/ailego/container/params.h index 464bb6d..6e14a59 100644 --- a/src/ailego/container/params.h +++ b/src/include/zvec/ailego/container/params.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/container/vector.h b/src/include/zvec/ailego/container/vector.h similarity index 99% rename from src/ailego/container/vector.h rename to src/include/zvec/ailego/container/vector.h index 98cdef3..b6f23c8 100644 --- a/src/ailego/container/vector.h +++ b/src/include/zvec/ailego/container/vector.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/encoding/json.h b/src/include/zvec/ailego/encoding/json.h similarity index 92% rename from src/ailego/encoding/json.h rename to src/include/zvec/ailego/encoding/json.h index 6f8d34f..595de10 100644 --- a/src/ailego/encoding/json.h +++ b/src/include/zvec/ailego/encoding/json.h @@ -14,4 +14,4 @@ #pragma once -#include "json/mod_json_plus.h" +#include diff --git a/src/ailego/encoding/json/mod_json.h b/src/include/zvec/ailego/encoding/json/mod_json.h similarity index 100% rename from src/ailego/encoding/json/mod_json.h rename to src/include/zvec/ailego/encoding/json/mod_json.h diff --git a/src/ailego/encoding/json/mod_json_plus.h b/src/include/zvec/ailego/encoding/json/mod_json_plus.h similarity index 100% rename from src/ailego/encoding/json/mod_json_plus.h rename to src/include/zvec/ailego/encoding/json/mod_json_plus.h diff --git a/src/ailego/hash/crc32c.h b/src/include/zvec/ailego/hash/crc32c.h similarity index 95% rename from src/ailego/hash/crc32c.h rename to src/include/zvec/ailego/hash/crc32c.h index c365af3..1add630 100644 --- a/src/ailego/hash/crc32c.h +++ b/src/include/zvec/ailego/hash/crc32c.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/hash/jump_hash.h b/src/include/zvec/ailego/hash/jump_hash.h similarity index 96% rename from src/ailego/hash/jump_hash.h rename to src/include/zvec/ailego/hash/jump_hash.h index c958938..74a1a9b 100644 --- a/src/ailego/hash/jump_hash.h +++ b/src/include/zvec/ailego/hash/jump_hash.h @@ -14,8 +14,7 @@ #pragma once -#include - +#include namespace zvec { namespace ailego { diff --git a/src/ailego/internal/platform.h b/src/include/zvec/ailego/internal/platform.h similarity index 100% rename from src/ailego/internal/platform.h rename to src/include/zvec/ailego/internal/platform.h diff --git a/src/ailego/io/file.h b/src/include/zvec/ailego/io/file.h similarity index 99% rename from src/ailego/io/file.h rename to src/include/zvec/ailego/io/file.h index 54f6b6d..e884bdb 100644 --- a/src/ailego/io/file.h +++ b/src/include/zvec/ailego/io/file.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/io/mmap_file.h b/src/include/zvec/ailego/io/mmap_file.h similarity index 98% rename from src/ailego/io/mmap_file.h rename to src/include/zvec/ailego/io/mmap_file.h index 41a3902..f6404a6 100644 --- a/src/ailego/io/mmap_file.h +++ b/src/include/zvec/ailego/io/mmap_file.h @@ -14,8 +14,8 @@ #pragma once -#include "ailego/internal/platform.h" -#include "file.h" +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/logger/logger.h b/src/include/zvec/ailego/logger/logger.h similarity index 98% rename from src/ailego/logger/logger.h rename to src/include/zvec/ailego/logger/logger.h index bf921f4..872d529 100644 --- a/src/ailego/logger/logger.h +++ b/src/include/zvec/ailego/logger/logger.h @@ -16,8 +16,8 @@ #include #include -#include "ailego/container/params.h" -#include "ailego/pattern/factory.h" +#include +#include //! Register Index Logger #define FACTORY_REGISTER_LOGGER_ALIAS(__NAME__, __IMPL__, ...) \ diff --git a/src/ailego/parallel/thread_pool.h b/src/include/zvec/ailego/parallel/thread_pool.h similarity index 99% rename from src/ailego/parallel/thread_pool.h rename to src/include/zvec/ailego/parallel/thread_pool.h index 8bf56c0..150f014 100644 --- a/src/ailego/parallel/thread_pool.h +++ b/src/include/zvec/ailego/parallel/thread_pool.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/parallel/thread_queue.h b/src/include/zvec/ailego/parallel/thread_queue.h similarity index 98% rename from src/ailego/parallel/thread_queue.h rename to src/include/zvec/ailego/parallel/thread_queue.h index 3940e72..c98a436 100644 --- a/src/ailego/parallel/thread_queue.h +++ b/src/include/zvec/ailego/parallel/thread_queue.h @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/pattern/closure.h b/src/include/zvec/ailego/pattern/closure.h similarity index 100% rename from src/ailego/pattern/closure.h rename to src/include/zvec/ailego/pattern/closure.h diff --git a/src/ailego/pattern/factory.h b/src/include/zvec/ailego/pattern/factory.h similarity index 100% rename from src/ailego/pattern/factory.h rename to src/include/zvec/ailego/pattern/factory.h diff --git a/src/ailego/utility/file_helper.h b/src/include/zvec/ailego/utility/file_helper.h similarity index 100% rename from src/ailego/utility/file_helper.h rename to src/include/zvec/ailego/utility/file_helper.h diff --git a/src/ailego/utility/time_helper.h b/src/include/zvec/ailego/utility/time_helper.h similarity index 99% rename from src/ailego/utility/time_helper.h rename to src/include/zvec/ailego/utility/time_helper.h index b253538..40bc381 100644 --- a/src/ailego/utility/time_helper.h +++ b/src/include/zvec/ailego/utility/time_helper.h @@ -15,7 +15,7 @@ #pragma once #include -#include +#include namespace zvec { namespace ailego { diff --git a/src/ailego/utility/type_helper.h b/src/include/zvec/ailego/utility/type_helper.h similarity index 100% rename from src/ailego/utility/type_helper.h rename to src/include/zvec/ailego/utility/type_helper.h diff --git a/src/core/framework/index_builder.h b/src/include/zvec/core/framework/index_builder.h similarity index 90% rename from src/core/framework/index_builder.h rename to src/include/zvec/core/framework/index_builder.h index 8863e31..d1ea7f7 100644 --- a/src/core/framework/index_builder.h +++ b/src/include/zvec/core/framework/index_builder.h @@ -13,10 +13,10 @@ // limitations under the License. #pragma once -#include "index_helper.h" -#include "index_holder.h" -#include "index_meta.h" -#include "index_runner.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_bundle.h b/src/include/zvec/core/framework/index_bundle.h similarity index 98% rename from src/core/framework/index_bundle.h rename to src/include/zvec/core/framework/index_bundle.h index 2f34566..ea08959 100644 --- a/src/core/framework/index_bundle.h +++ b/src/include/zvec/core/framework/index_bundle.h @@ -11,14 +11,15 @@ // 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. + #pragma once #include #include #include -#include -#include -#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_cluster.h b/src/include/zvec/core/framework/index_cluster.h similarity index 95% rename from src/core/framework/index_cluster.h rename to src/include/zvec/core/framework/index_cluster.h index acb26b4..19a2fdb 100644 --- a/src/core/framework/index_cluster.h +++ b/src/include/zvec/core/framework/index_cluster.h @@ -13,14 +13,14 @@ // limitations under the License. #pragma once -#include -#include -#include -#include "index_bundle.h" -#include "index_features.h" -#include "index_meta.h" -#include "index_module.h" -#include "index_threads.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_context.h b/src/include/zvec/core/framework/index_context.h similarity index 94% rename from src/core/framework/index_context.h rename to src/include/zvec/core/framework/index_context.h index 20f62ba..c77fcf4 100644 --- a/src/core/framework/index_context.h +++ b/src/include/zvec/core/framework/index_context.h @@ -15,13 +15,13 @@ #pragma once #include -#include -#include "index_document.h" -#include "index_error.h" -#include "index_filter.h" -#include "index_groupby.h" -#include "index_metric.h" -#include "index_stats.h" +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_converter.h b/src/include/zvec/core/framework/index_converter.h similarity index 97% rename from src/core/framework/index_converter.h rename to src/include/zvec/core/framework/index_converter.h index db6f7e8..272bc31 100644 --- a/src/core/framework/index_converter.h +++ b/src/include/zvec/core/framework/index_converter.h @@ -14,10 +14,10 @@ #pragma once #include -#include "index_dumper.h" -#include "index_holder.h" -#include "index_meta.h" -#include "index_stats.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_document.h b/src/include/zvec/core/framework/index_document.h similarity index 98% rename from src/core/framework/index_document.h rename to src/include/zvec/core/framework/index_document.h index 37ac4f8..aa74e60 100644 --- a/src/core/framework/index_document.h +++ b/src/include/zvec/core/framework/index_document.h @@ -15,8 +15,8 @@ #include #include -#include -#include "index_storage.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_dumper.h b/src/include/zvec/core/framework/index_dumper.h similarity index 96% rename from src/core/framework/index_dumper.h rename to src/include/zvec/core/framework/index_dumper.h index 40133ab..a638adc 100644 --- a/src/core/framework/index_dumper.h +++ b/src/include/zvec/core/framework/index_dumper.h @@ -13,9 +13,9 @@ // limitations under the License. #pragma once -#include -#include "index_module.h" -#include "index_packer.h" +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_error.h b/src/include/zvec/core/framework/index_error.h similarity index 100% rename from src/core/framework/index_error.h rename to src/include/zvec/core/framework/index_error.h diff --git a/src/core/framework/index_factory.h b/src/include/zvec/core/framework/index_factory.h similarity index 93% rename from src/core/framework/index_factory.h rename to src/include/zvec/core/framework/index_factory.h index 9b9332f..d891eaa 100644 --- a/src/core/framework/index_factory.h +++ b/src/include/zvec/core/framework/index_factory.h @@ -11,22 +11,23 @@ // 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. + #pragma once -#include -#include "index_builder.h" -#include "index_cluster.h" -#include "index_converter.h" -#include "index_dumper.h" -#include "index_logger.h" -#include "index_metric.h" -#include "index_reducer.h" -#include "index_refiner.h" -#include "index_reformer.h" -#include "index_searcher.h" -#include "index_storage.h" -#include "index_streamer.h" -#include "index_trainer.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_features.h b/src/include/zvec/core/framework/index_features.h similarity index 99% rename from src/core/framework/index_features.h rename to src/include/zvec/core/framework/index_features.h index 7efce6b..49d08bb 100644 --- a/src/core/framework/index_features.h +++ b/src/include/zvec/core/framework/index_features.h @@ -18,7 +18,7 @@ #include #include #include -#include "index_meta.h" +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_filter.h b/src/include/zvec/core/framework/index_filter.h similarity index 100% rename from src/core/framework/index_filter.h rename to src/include/zvec/core/framework/index_filter.h diff --git a/src/core/framework/index_flow.h b/src/include/zvec/core/framework/index_flow.h similarity index 99% rename from src/core/framework/index_flow.h rename to src/include/zvec/core/framework/index_flow.h index 19d132b..737323c 100644 --- a/src/core/framework/index_flow.h +++ b/src/include/zvec/core/framework/index_flow.h @@ -13,8 +13,9 @@ // limitations under the License. #pragma once -#include "index_factory.h" - +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_format.h b/src/include/zvec/core/framework/index_format.h similarity index 98% rename from src/core/framework/index_format.h rename to src/include/zvec/core/framework/index_format.h index 0f5e996..d3b7179 100644 --- a/src/core/framework/index_format.h +++ b/src/include/zvec/core/framework/index_format.h @@ -16,8 +16,8 @@ #include #include #include -#include -#include +#include +#include namespace zvec { namespace core { diff --git a/src/include/zvec/core/framework/index_framework.h b/src/include/zvec/core/framework/index_framework.h new file mode 100644 index 0000000..17de222 --- /dev/null +++ b/src/include/zvec/core/framework/index_framework.h @@ -0,0 +1,32 @@ +// Copyright 2025-present the zvec project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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. + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/src/core/framework/index_groupby.h b/src/include/zvec/core/framework/index_groupby.h similarity index 100% rename from src/core/framework/index_groupby.h rename to src/include/zvec/core/framework/index_groupby.h diff --git a/src/core/framework/index_helper.h b/src/include/zvec/core/framework/index_helper.h similarity index 91% rename from src/core/framework/index_helper.h rename to src/include/zvec/core/framework/index_helper.h index 41ae1f0..a9622ae 100644 --- a/src/core/framework/index_helper.h +++ b/src/include/zvec/core/framework/index_helper.h @@ -11,12 +11,13 @@ // 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. + #pragma once -#include "index_dumper.h" -#include "index_holder.h" -#include "index_meta.h" -#include "index_storage.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_holder.h b/src/include/zvec/core/framework/index_holder.h similarity index 99% rename from src/core/framework/index_holder.h rename to src/include/zvec/core/framework/index_holder.h index 4dff9e3..7bb9ba9 100644 --- a/src/core/framework/index_holder.h +++ b/src/include/zvec/core/framework/index_holder.h @@ -17,12 +17,11 @@ #include #include #include -#include -#include #include -#include "ailego/container/vector.h" -#include "index_features.h" -#include "index_meta.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_logger.h b/src/include/zvec/core/framework/index_logger.h similarity index 98% rename from src/core/framework/index_logger.h rename to src/include/zvec/core/framework/index_logger.h index 58d6db9..3263850 100644 --- a/src/core/framework/index_logger.h +++ b/src/include/zvec/core/framework/index_logger.h @@ -11,13 +11,13 @@ // 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. + #pragma once #include -#include #include -#include "ailego/container/params.h" -#include "ailego/logger/logger.h" +#include +#include #include "index_module.h" #define ZVEC_LOG_IMPL(level, format, ...) \ diff --git a/src/core/framework/index_mapping.h b/src/include/zvec/core/framework/index_mapping.h similarity index 97% rename from src/core/framework/index_mapping.h rename to src/include/zvec/core/framework/index_mapping.h index 96bf347..7074088 100644 --- a/src/core/framework/index_mapping.h +++ b/src/include/zvec/core/framework/index_mapping.h @@ -14,9 +14,9 @@ #pragma once #include -#include -#include -#include "index_format.h" +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_memory.h b/src/include/zvec/core/framework/index_memory.h similarity index 100% rename from src/core/framework/index_memory.h rename to src/include/zvec/core/framework/index_memory.h diff --git a/src/core/framework/index_meta.h b/src/include/zvec/core/framework/index_meta.h similarity index 99% rename from src/core/framework/index_meta.h rename to src/include/zvec/core/framework/index_meta.h index bdbecc7..d4ef59e 100644 --- a/src/core/framework/index_meta.h +++ b/src/include/zvec/core/framework/index_meta.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "ailego/container/params.h" +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_metric.h b/src/include/zvec/core/framework/index_metric.h similarity index 94% rename from src/core/framework/index_metric.h rename to src/include/zvec/core/framework/index_metric.h index ef1a992..5d93ba1 100644 --- a/src/core/framework/index_metric.h +++ b/src/include/zvec/core/framework/index_metric.h @@ -14,11 +14,11 @@ #pragma once #include -#include -#include -#include "index_error.h" -#include "index_meta.h" -#include "index_module.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_module.h b/src/include/zvec/core/framework/index_module.h similarity index 100% rename from src/core/framework/index_module.h rename to src/include/zvec/core/framework/index_module.h diff --git a/src/core/framework/index_packer.h b/src/include/zvec/core/framework/index_packer.h similarity index 96% rename from src/core/framework/index_packer.h rename to src/include/zvec/core/framework/index_packer.h index 7181e0e..3b89e12 100644 --- a/src/core/framework/index_packer.h +++ b/src/include/zvec/core/framework/index_packer.h @@ -11,12 +11,14 @@ // 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. + #pragma once -#include -#include "index_error.h" -#include "index_format.h" -#include "index_version.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_plugin.h b/src/include/zvec/core/framework/index_plugin.h similarity index 99% rename from src/core/framework/index_plugin.h rename to src/include/zvec/core/framework/index_plugin.h index 954ed98..9229363 100644 --- a/src/core/framework/index_plugin.h +++ b/src/include/zvec/core/framework/index_plugin.h @@ -11,6 +11,7 @@ // 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. + #pragma once #include diff --git a/src/core/framework/index_provider.h b/src/include/zvec/core/framework/index_provider.h similarity index 93% rename from src/core/framework/index_provider.h rename to src/include/zvec/core/framework/index_provider.h index 93d5671..b5ce143 100644 --- a/src/core/framework/index_provider.h +++ b/src/include/zvec/core/framework/index_provider.h @@ -11,11 +11,12 @@ // 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. + #pragma once -#include "index_error.h" -#include "index_holder.h" -#include "index_storage.h" +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_reducer.h b/src/include/zvec/core/framework/index_reducer.h similarity index 93% rename from src/core/framework/index_reducer.h rename to src/include/zvec/core/framework/index_reducer.h index 5c85bc5..911a0e1 100644 --- a/src/core/framework/index_reducer.h +++ b/src/include/zvec/core/framework/index_reducer.h @@ -14,15 +14,15 @@ #pragma once -#include "ailego/parallel/thread_pool.h" -#include "index_builder.h" -#include "index_converter.h" -#include "index_dumper.h" -#include "index_error.h" -#include "index_filter.h" -#include "index_reformer.h" -#include "index_stats.h" -#include "index_streamer.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_refiner.h b/src/include/zvec/core/framework/index_refiner.h similarity index 93% rename from src/core/framework/index_refiner.h rename to src/include/zvec/core/framework/index_refiner.h index 3b73e50..de850d1 100644 --- a/src/core/framework/index_refiner.h +++ b/src/include/zvec/core/framework/index_refiner.h @@ -15,11 +15,11 @@ #pragma once #include -#include -#include "index_context.h" -#include "index_helper.h" -#include "index_searcher.h" -#include "index_streamer.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_reformer.h b/src/include/zvec/core/framework/index_reformer.h similarity index 98% rename from src/core/framework/index_reformer.h rename to src/include/zvec/core/framework/index_reformer.h index 290dbb3..f2cfa0d 100644 --- a/src/core/framework/index_reformer.h +++ b/src/include/zvec/core/framework/index_reformer.h @@ -13,8 +13,8 @@ // limitations under the License. #pragma once -#include "index_document.h" -#include "index_meta.h" +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_runner.h b/src/include/zvec/core/framework/index_runner.h similarity index 98% rename from src/core/framework/index_runner.h rename to src/include/zvec/core/framework/index_runner.h index 3b032ca..72d39e9 100644 --- a/src/core/framework/index_runner.h +++ b/src/include/zvec/core/framework/index_runner.h @@ -15,15 +15,15 @@ #pragma once #include -#include "index_context.h" -#include "index_dumper.h" -#include "index_meta.h" -#include "index_metric.h" -#include "index_module.h" -#include "index_provider.h" -#include "index_stats.h" -#include "index_threads.h" -#include "index_trainer.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_searcher.h b/src/include/zvec/core/framework/index_searcher.h similarity index 80% rename from src/core/framework/index_searcher.h rename to src/include/zvec/core/framework/index_searcher.h index 0349bd8..4308c8c 100644 --- a/src/core/framework/index_searcher.h +++ b/src/include/zvec/core/framework/index_searcher.h @@ -11,16 +11,16 @@ // 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. + #pragma once -#include -#include "index_context.h" -#include "index_meta.h" -#include "index_metric.h" -#include "index_module.h" -#include "index_provider.h" -#include "index_runner.h" -#include "index_stats.h" +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_segment_storage.h b/src/include/zvec/core/framework/index_segment_storage.h similarity index 97% rename from src/core/framework/index_segment_storage.h rename to src/include/zvec/core/framework/index_segment_storage.h index 0a8e121..82b316d 100644 --- a/src/core/framework/index_segment_storage.h +++ b/src/include/zvec/core/framework/index_segment_storage.h @@ -13,10 +13,10 @@ // limitations under the License. #pragma once -#include "ailego/container/params.h" -#include "index_module.h" -#include "index_storage.h" -#include "index_unpacker.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_stats.h b/src/include/zvec/core/framework/index_stats.h similarity index 97% rename from src/core/framework/index_stats.h rename to src/include/zvec/core/framework/index_stats.h index 868ec51..71d4426 100644 --- a/src/core/framework/index_stats.h +++ b/src/include/zvec/core/framework/index_stats.h @@ -11,9 +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. + #pragma once -#include "ailego/container/params.h" +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_storage.h b/src/include/zvec/core/framework/index_storage.h similarity index 97% rename from src/core/framework/index_storage.h rename to src/include/zvec/core/framework/index_storage.h index ca3e98e..8673d63 100644 --- a/src/core/framework/index_storage.h +++ b/src/include/zvec/core/framework/index_storage.h @@ -11,12 +11,13 @@ // 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. + #pragma once -#include -#include -#include "index_error.h" -#include "index_module.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_streamer.h b/src/include/zvec/core/framework/index_streamer.h similarity index 85% rename from src/core/framework/index_streamer.h rename to src/include/zvec/core/framework/index_streamer.h index 7335154..09ea86f 100644 --- a/src/core/framework/index_streamer.h +++ b/src/include/zvec/core/framework/index_streamer.h @@ -13,12 +13,11 @@ // limitations under the License. #pragma once -#include -#include "index_context.h" -#include "index_helper.h" -#include "index_provider.h" -#include "index_runner.h" -#include "index_stats.h" +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_threads.h b/src/include/zvec/core/framework/index_threads.h similarity index 96% rename from src/core/framework/index_threads.h rename to src/include/zvec/core/framework/index_threads.h index 5b9fa0d..3e0ccc4 100644 --- a/src/core/framework/index_threads.h +++ b/src/include/zvec/core/framework/index_threads.h @@ -11,17 +11,13 @@ // 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. + #pragma once -#include -#include -#include -#include #include #include -#include -#include -#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_trainer.h b/src/include/zvec/core/framework/index_trainer.h similarity index 87% rename from src/core/framework/index_trainer.h rename to src/include/zvec/core/framework/index_trainer.h index 6ad6fdc..9582b05 100644 --- a/src/core/framework/index_trainer.h +++ b/src/include/zvec/core/framework/index_trainer.h @@ -11,16 +11,17 @@ // 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. + #pragma once -#include "index_bundle.h" -#include "index_dumper.h" -#include "index_error.h" -#include "index_holder.h" -#include "index_meta.h" -#include "index_stats.h" -#include "index_storage.h" -#include "index_threads.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_unpacker.h b/src/include/zvec/core/framework/index_unpacker.h similarity index 98% rename from src/core/framework/index_unpacker.h rename to src/include/zvec/core/framework/index_unpacker.h index 8d607a4..425ad12 100644 --- a/src/core/framework/index_unpacker.h +++ b/src/include/zvec/core/framework/index_unpacker.h @@ -11,13 +11,14 @@ // 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. + #pragma once #include -#include -#include "index_error.h" -#include "index_format.h" -#include "index_logger.h" +#include +#include +#include +#include namespace zvec { namespace core { diff --git a/src/core/framework/index_version.h b/src/include/zvec/core/framework/index_version.h similarity index 99% rename from src/core/framework/index_version.h rename to src/include/zvec/core/framework/index_version.h index 0037667..f5fa7e6 100644 --- a/src/core/framework/index_version.h +++ b/src/include/zvec/core/framework/index_version.h @@ -11,6 +11,7 @@ // 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. + #pragma once namespace zvec { diff --git a/src/include/zvec/core/interface/constants.h b/src/include/zvec/core/interface/constants.h index 4efcdfa..79d563b 100644 --- a/src/include/zvec/core/interface/constants.h +++ b/src/include/zvec/core/interface/constants.h @@ -1,3 +1,17 @@ +// Copyright 2025-present the zvec project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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. + #pragma once #include diff --git a/src/core/interface/index.h b/src/include/zvec/core/interface/index.h similarity index 85% rename from src/core/interface/index.h rename to src/include/zvec/core/interface/index.h index 78d1143..71258cb 100644 --- a/src/core/interface/index.h +++ b/src/include/zvec/core/interface/index.h @@ -11,30 +11,26 @@ // 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. + #pragma once -#include + #include -#include -#include #include #include #include #include -#include -#include "core/framework/index_context.h" -#include "core/framework/index_converter.h" -#include "core/framework/index_factory.h" -#include "core/framework/index_filter.h" -#include "core/framework/index_holder.h" -#include "core/framework/index_meta.h" -#include "core/framework/index_metric.h" -#include "core/framework/index_reducer.h" -#include "core/framework/index_reformer.h" -#include "core/framework/index_searcher.h" -#include "core/framework/index_storage.h" -#include "core/mixed_reducer/mixed_reducer_params.h" -#include "index_param.h" -#include "index_param_builders.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace zvec::core_interface { @@ -102,11 +98,6 @@ struct SearchResult { std::vector reverted_sparse_values_list_{}; }; -// eliminate the pre-alloc of the context pool -thread_local static std::array() - 1) * 2> - _context_list; - class Index { public: typedef std::shared_ptr Pointer; @@ -200,24 +191,8 @@ class Index { virtual int CreateAndInitStreamer(const BaseIndexParam ¶m) = 0; protected: - bool init_context() { - context_index_ = (magic_enum::enum_integer(param_.index_type) - 1) * 2 + - static_cast(is_sparse_); - if (_context_list[context_index_] == nullptr) { - if ((_context_list[context_index_] = streamer_->create_context()) == - nullptr) { - LOG_ERROR("Failed to create context"); - return false; - } - } - return true; - } - - core::IndexContext::Pointer &acquire_context() { - init_context(); - return _context_list[context_index_]; - } - + bool init_context(); + core::IndexContext::Pointer &acquire_context(); void release_context() { // context_list_[get_context_index()]->reset(); } diff --git a/src/include/zvec/core/interface/index_factory.h b/src/include/zvec/core/interface/index_factory.h new file mode 100644 index 0000000..d0be6ee --- /dev/null +++ b/src/include/zvec/core/interface/index_factory.h @@ -0,0 +1,54 @@ +// Copyright 2025-present the zvec project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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. + +#pragma once + +#include +#include +#include + +namespace zvec::core_interface { + +// 索引的工厂类 +class IndexFactory { + public: + static Index::Pointer CreateAndInitIndex(const BaseIndexParam ¶m); + + static BaseIndexParam::Pointer DeserializeIndexParamFromJson( + const std::string &json_str); + + + static std::string QueryParamSerializeToJson( + const BaseIndexQueryParam ¶m); + + + template < + typename QueryParamType, + std::enable_if_t, + bool> = true> + static std::string QueryParamSerializeToJson(const QueryParamType ¶m, + bool omit_empty_value = false); + + template < + typename QueryParamType, + std::enable_if_t, + bool> = true> + static typename QueryParamType::Pointer QueryParamDeserializeFromJson( + const std::string &json_str); + + // register() -- Index class should have a `create` interface +}; + + +} // namespace zvec::core_interface \ No newline at end of file diff --git a/src/core/interface/index_param.h b/src/include/zvec/core/interface/index_param.h similarity index 89% rename from src/core/interface/index_param.h rename to src/include/zvec/core/interface/index_param.h index ff7cc98..98da5b1 100644 --- a/src/core/interface/index_param.h +++ b/src/include/zvec/core/interface/index_param.h @@ -11,28 +11,18 @@ // 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. -// -// Created by wangjianning.wjn on 8/28/25. -// -#ifndef ZVEC_INDEX_PARAM_H -#define ZVEC_INDEX_PARAM_H #pragma once -#include #include -#include -#include #include #include #include -#include -#include -#include +#include +#include +#include +#include #include -#include "core/framework/index_filter.h" -#include "core/framework/index_meta.h" -#include "utils/utils.h" namespace zvec::core_interface { #define MAX_DIMENSION 65536 @@ -131,20 +121,10 @@ struct QuantizerParam : public SerializableBase { protected: friend class BaseIndexParam; virtual ailego::JsonObject SerializeToJsonObject( - bool omit_empty_value = false) const override { - ailego::JsonObject json_obj; - if (!omit_empty_value || type != QuantizerType::kNone) { - json_obj.set("type", - zvec::ailego::JsonValue(magic_enum::enum_name(type).data())); - } - return json_obj; - } + bool omit_empty_value = false) const override; virtual bool DeserializeFromJsonObject( - const ailego::JsonObject &json_obj) override { - DESERIALIZE_ENUM_FIELD(json_obj, type, QuantizerType); - return true; - } + const ailego::JsonObject &json_obj) override; }; // preprocessor @@ -314,8 +294,8 @@ struct IVFIndexParam : public BaseIndexParam { struct HNSWIndexParam : public BaseIndexParam { using Pointer = std::shared_ptr; - int m = kDefaultHnswNeighborCnt; // 图中每个点的邻居数 - int ef_construction = kDefaultHnswEfConstruction; // 构建时的邻居候选大小 + int m = kDefaultHnswNeighborCnt; + int ef_construction = kDefaultHnswEfConstruction; // Constructors with delegation HNSWIndexParam() : BaseIndexParam(IndexType::kHNSW) {} @@ -336,5 +316,4 @@ struct HNSWIndexParam : public BaseIndexParam { bool omit_empty_value = false) const override; }; -} // namespace zvec::core_interface -#endif // ZVEC_INDEX_PARAM_H +} // namespace zvec::core_interface \ No newline at end of file diff --git a/src/core/interface/index_param_builders.h b/src/include/zvec/core/interface/index_param_builders.h similarity index 94% rename from src/core/interface/index_param_builders.h rename to src/include/zvec/core/interface/index_param_builders.h index 2f8afb7..f319450 100644 --- a/src/core/interface/index_param_builders.h +++ b/src/include/zvec/core/interface/index_param_builders.h @@ -1,13 +1,24 @@ -#ifndef ZVEC_INDEX_PARAM_BUILDERS_H -#define ZVEC_INDEX_PARAM_BUILDERS_H +// Copyright 2025-present the zvec project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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. + #pragma once #include -#include "index_param.h" +#include namespace zvec::core_interface { - // struct ConditionalIndexParam { // // predicate / rule / threshold // // candidate @@ -336,6 +347,6 @@ class SCANNIndexParamBuilder { return param_ptr; } }; + } // namespace predefined -} // namespace zvec::core_interface -#endif // ZVEC_INDEX_PARAM_BUILDERS_H \ No newline at end of file +} // namespace zvec::core_interface \ No newline at end of file diff --git a/tests/ailego/algorithm/kmeans_test.cc b/tests/ailego/algorithm/kmeans_test.cc index 1eeef5a..0dabbc0 100644 --- a/tests/ailego/algorithm/kmeans_test.cc +++ b/tests/ailego/algorithm/kmeans_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include -#include -#include #include +#include +#include #define protected public #define private public diff --git a/tests/ailego/buffer/buffer_manager_test.cc b/tests/ailego/buffer/buffer_manager_test.cc index e11bbc9..637c3ee 100644 --- a/tests/ailego/buffer/buffer_manager_test.cc +++ b/tests/ailego/buffer/buffer_manager_test.cc @@ -14,9 +14,9 @@ #include #include -#include #include -#include "ailego/logger/logger.h" +#include +#include #if defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push diff --git a/tests/ailego/container/bitmap_test.cc b/tests/ailego/container/bitmap_test.cc index 25ed3ed..9d5c215 100644 --- a/tests/ailego/container/bitmap_test.cc +++ b/tests/ailego/container/bitmap_test.cc @@ -20,8 +20,8 @@ #include #include #include -#include #include +#include #if defined(__AVX2__) #define INTRINSICS_SET "AVX2" diff --git a/tests/ailego/container/blob_test.cc b/tests/ailego/container/blob_test.cc index 52b880b..8bb7ad4 100644 --- a/tests/ailego/container/blob_test.cc +++ b/tests/ailego/container/blob_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include -#include #include +#include using namespace zvec; diff --git a/tests/ailego/container/cube_test.cc b/tests/ailego/container/cube_test.cc index 1f1ae5a..ab6e486 100644 --- a/tests/ailego/container/cube_test.cc +++ b/tests/ailego/container/cube_test.cc @@ -14,8 +14,8 @@ #include #include -#include #include +#include using namespace zvec::ailego; diff --git a/tests/ailego/container/heap_test.cc b/tests/ailego/container/heap_test.cc index cec59cc..1eaa4fd 100644 --- a/tests/ailego/container/heap_test.cc +++ b/tests/ailego/container/heap_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include -#include -#include #include +#include +#include using namespace zvec; diff --git a/tests/ailego/container/hypercube_test.cc b/tests/ailego/container/hypercube_test.cc index fbca967..3fedad1 100644 --- a/tests/ailego/container/hypercube_test.cc +++ b/tests/ailego/container/hypercube_test.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include using namespace zvec::ailego; diff --git a/tests/ailego/container/params_test.cc b/tests/ailego/container/params_test.cc index b4426a9..67fd374 100644 --- a/tests/ailego/container/params_test.cc +++ b/tests/ailego/container/params_test.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/container/vector_array_test.cc b/tests/ailego/container/vector_array_test.cc index 56ff3ba..f7e2e13 100644 --- a/tests/ailego/container/vector_array_test.cc +++ b/tests/ailego/container/vector_array_test.cc @@ -14,8 +14,8 @@ #include #include -#include #include +#include using namespace zvec; diff --git a/tests/ailego/container/vector_test.cc b/tests/ailego/container/vector_test.cc index b80d84b..4fa6d75 100644 --- a/tests/ailego/container/vector_test.cc +++ b/tests/ailego/container/vector_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include -#include -#include #include +#include +#include using namespace zvec; diff --git a/tests/ailego/encoding/json_parse_test.cc b/tests/ailego/encoding/json_parse_test.cc index 072ab82..f426152 100644 --- a/tests/ailego/encoding/json_parse_test.cc +++ b/tests/ailego/encoding/json_parse_test.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include using namespace zvec::ailego; diff --git a/tests/ailego/hash/crc32c_test.cc b/tests/ailego/hash/crc32c_test.cc index 2187834..f7371cb 100644 --- a/tests/ailego/hash/crc32c_test.cc +++ b/tests/ailego/hash/crc32c_test.cc @@ -14,9 +14,9 @@ #include #include -#include -#include #include +#include +#include using namespace zvec; diff --git a/tests/ailego/hash/jump_hash_test.cc b/tests/ailego/hash/jump_hash_test.cc index 38bd3ab..35294a5 100644 --- a/tests/ailego/hash/jump_hash_test.cc +++ b/tests/ailego/hash/jump_hash_test.cc @@ -16,10 +16,10 @@ #include #include #include -#include -#include -#include #include +#include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/io/file_test.cc b/tests/ailego/io/file_test.cc index 0120233..b718736 100644 --- a/tests/ailego/io/file_test.cc +++ b/tests/ailego/io/file_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include +#include using namespace zvec::ailego; diff --git a/tests/ailego/io/mmap_file_test.cc b/tests/ailego/io/mmap_file_test.cc index 96f5a2f..13851b1 100644 --- a/tests/ailego/io/mmap_file_test.cc +++ b/tests/ailego/io/mmap_file_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/logger/logger_test.cc b/tests/ailego/logger/logger_test.cc index e9b6083..ca05ba0 100644 --- a/tests/ailego/logger/logger_test.cc +++ b/tests/ailego/logger/logger_test.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/cosine_distance_matrix_fp16_test.cc b/tests/ailego/math/cosine_distance_matrix_fp16_test.cc index 396fb25..be575ce 100644 --- a/tests/ailego/math/cosine_distance_matrix_fp16_test.cc +++ b/tests/ailego/math/cosine_distance_matrix_fp16_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/cosine_distance_matrix_fp32_test.cc b/tests/ailego/math/cosine_distance_matrix_fp32_test.cc index dd3ad07..4e7c2cc 100644 --- a/tests/ailego/math/cosine_distance_matrix_fp32_test.cc +++ b/tests/ailego/math/cosine_distance_matrix_fp32_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/cosine_distance_matrix_int8_test.cc b/tests/ailego/math/cosine_distance_matrix_int8_test.cc index 3de7f17..0ef36a6 100644 --- a/tests/ailego/math/cosine_distance_matrix_int8_test.cc +++ b/tests/ailego/math/cosine_distance_matrix_int8_test.cc @@ -14,12 +14,12 @@ #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/euclidean_distance_matrix_fp16_test.cc b/tests/ailego/math/euclidean_distance_matrix_fp16_test.cc index 3976809..6d647c3 100644 --- a/tests/ailego/math/euclidean_distance_matrix_fp16_test.cc +++ b/tests/ailego/math/euclidean_distance_matrix_fp16_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/euclidean_distance_matrix_fp32_test.cc b/tests/ailego/math/euclidean_distance_matrix_fp32_test.cc index 4f0f71d..10fe3da 100644 --- a/tests/ailego/math/euclidean_distance_matrix_fp32_test.cc +++ b/tests/ailego/math/euclidean_distance_matrix_fp32_test.cc @@ -18,11 +18,11 @@ #include #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/euclidean_distance_matrix_int4_test.cc b/tests/ailego/math/euclidean_distance_matrix_int4_test.cc index 3a0aecb..94c1bd0 100644 --- a/tests/ailego/math/euclidean_distance_matrix_int4_test.cc +++ b/tests/ailego/math/euclidean_distance_matrix_int4_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/euclidean_distance_matrix_int8_test.cc b/tests/ailego/math/euclidean_distance_matrix_int8_test.cc index b1ddab0..6fd003b 100644 --- a/tests/ailego/math/euclidean_distance_matrix_int8_test.cc +++ b/tests/ailego/math/euclidean_distance_matrix_int8_test.cc @@ -18,11 +18,11 @@ #include #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/hamming_distance_matrix_test.cc b/tests/ailego/math/hamming_distance_matrix_test.cc index 62a7a62..3c42381 100644 --- a/tests/ailego/math/hamming_distance_matrix_test.cc +++ b/tests/ailego/math/hamming_distance_matrix_test.cc @@ -19,11 +19,11 @@ #include #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/inner_product_matrix_fp16_test.cc b/tests/ailego/math/inner_product_matrix_fp16_test.cc index 9516494..2d3999c 100644 --- a/tests/ailego/math/inner_product_matrix_fp16_test.cc +++ b/tests/ailego/math/inner_product_matrix_fp16_test.cc @@ -19,11 +19,11 @@ #include #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/inner_product_matrix_fp32_test.cc b/tests/ailego/math/inner_product_matrix_fp32_test.cc index 80616b7..1c3377f 100644 --- a/tests/ailego/math/inner_product_matrix_fp32_test.cc +++ b/tests/ailego/math/inner_product_matrix_fp32_test.cc @@ -18,11 +18,11 @@ #include #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/inner_product_matrix_int4_test.cc b/tests/ailego/math/inner_product_matrix_int4_test.cc index bd7316e..04a540b 100644 --- a/tests/ailego/math/inner_product_matrix_int4_test.cc +++ b/tests/ailego/math/inner_product_matrix_int4_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/inner_product_matrix_int8_test.cc b/tests/ailego/math/inner_product_matrix_int8_test.cc index fafd01c..b47f23e 100644 --- a/tests/ailego/math/inner_product_matrix_int8_test.cc +++ b/tests/ailego/math/inner_product_matrix_int8_test.cc @@ -18,11 +18,11 @@ #include #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/mips_euclidean_distance_matrix_fp16_test.cc b/tests/ailego/math/mips_euclidean_distance_matrix_fp16_test.cc index 81ad621..8175bcb 100644 --- a/tests/ailego/math/mips_euclidean_distance_matrix_fp16_test.cc +++ b/tests/ailego/math/mips_euclidean_distance_matrix_fp16_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/mips_euclidean_distance_matrix_fp32_test.cc b/tests/ailego/math/mips_euclidean_distance_matrix_fp32_test.cc index 9ae40af..cb2a58c 100644 --- a/tests/ailego/math/mips_euclidean_distance_matrix_fp32_test.cc +++ b/tests/ailego/math/mips_euclidean_distance_matrix_fp32_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/mips_euclidean_distance_matrix_int4_test.cc b/tests/ailego/math/mips_euclidean_distance_matrix_int4_test.cc index c73c128..d4144ee 100644 --- a/tests/ailego/math/mips_euclidean_distance_matrix_int4_test.cc +++ b/tests/ailego/math/mips_euclidean_distance_matrix_int4_test.cc @@ -20,12 +20,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/mips_euclidean_distance_matrix_int8_test.cc b/tests/ailego/math/mips_euclidean_distance_matrix_int8_test.cc index ac1ab6f..f371896 100644 --- a/tests/ailego/math/mips_euclidean_distance_matrix_int8_test.cc +++ b/tests/ailego/math/mips_euclidean_distance_matrix_int8_test.cc @@ -18,12 +18,12 @@ #include #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/math/norm_matrix_fp16_test.cc b/tests/ailego/math/norm_matrix_fp16_test.cc index 3366f83..e68a3b0 100644 --- a/tests/ailego/math/norm_matrix_fp16_test.cc +++ b/tests/ailego/math/norm_matrix_fp16_test.cc @@ -14,11 +14,11 @@ #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/norm_matrix_fp32_test.cc b/tests/ailego/math/norm_matrix_fp32_test.cc index 1198ec8..494827b 100644 --- a/tests/ailego/math/norm_matrix_fp32_test.cc +++ b/tests/ailego/math/norm_matrix_fp32_test.cc @@ -14,12 +14,12 @@ #include #include -#include #include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/norm_matrix_int4_test.cc b/tests/ailego/math/norm_matrix_int4_test.cc index c5a2ff5..7dc69cf 100644 --- a/tests/ailego/math/norm_matrix_int4_test.cc +++ b/tests/ailego/math/norm_matrix_int4_test.cc @@ -14,11 +14,11 @@ #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/norm_matrix_int8_test.cc b/tests/ailego/math/norm_matrix_int8_test.cc index f6ef5b4..483800c 100644 --- a/tests/ailego/math/norm_matrix_int8_test.cc +++ b/tests/ailego/math/norm_matrix_int8_test.cc @@ -14,11 +14,11 @@ #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/math/normalizer_test.cc b/tests/ailego/math/normalizer_test.cc index 83dae7b..c576c05 100644 --- a/tests/ailego/math/normalizer_test.cc +++ b/tests/ailego/math/normalizer_test.cc @@ -14,11 +14,11 @@ #include #include -#include #include #include -#include #include +#include +#include using namespace zvec::ailego; diff --git a/tests/ailego/parallel/lock_test.cc b/tests/ailego/parallel/lock_test.cc index 6b37a78..2a98e8e 100644 --- a/tests/ailego/parallel/lock_test.cc +++ b/tests/ailego/parallel/lock_test.cc @@ -14,8 +14,8 @@ #include #include -#include #include +#include using namespace zvec; diff --git a/tests/ailego/parallel/multi_thread_list_test.cc b/tests/ailego/parallel/multi_thread_list_test.cc index 0a3aa3b..07fd8a9 100644 --- a/tests/ailego/parallel/multi_thread_list_test.cc +++ b/tests/ailego/parallel/multi_thread_list_test.cc @@ -14,7 +14,7 @@ #include #include -#include "ailego/parallel/thread_pool.h" +#include #define private public #include diff --git a/tests/ailego/parallel/semaphore_test.cc b/tests/ailego/parallel/semaphore_test.cc index 62c2189..b9e61a8 100644 --- a/tests/ailego/parallel/semaphore_test.cc +++ b/tests/ailego/parallel/semaphore_test.cc @@ -14,9 +14,9 @@ #include #include -#include -#include #include +#include +#include using namespace zvec; diff --git a/tests/ailego/parallel/thread_pool_test.cc b/tests/ailego/parallel/thread_pool_test.cc index 2ea6662..70459f5 100644 --- a/tests/ailego/parallel/thread_pool_test.cc +++ b/tests/ailego/parallel/thread_pool_test.cc @@ -15,8 +15,8 @@ #include #include #include -#include #include +#include using namespace zvec::ailego; diff --git a/tests/ailego/parallel/thread_queue_test.cc b/tests/ailego/parallel/thread_queue_test.cc index e0fc71e..6a18b4e 100644 --- a/tests/ailego/parallel/thread_queue_test.cc +++ b/tests/ailego/parallel/thread_queue_test.cc @@ -15,9 +15,9 @@ #include #include #include -#include -#include #include +#include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/pattern/closure_test.cc b/tests/ailego/pattern/closure_test.cc index f17c9d1..9e457b1 100644 --- a/tests/ailego/pattern/closure_test.cc +++ b/tests/ailego/pattern/closure_test.cc @@ -14,9 +14,9 @@ #include #include -#include -#include #include +#include +#include using namespace zvec; diff --git a/tests/ailego/pattern/factory_test.cc b/tests/ailego/pattern/factory_test.cc index 5f29cee..e80aa1a 100644 --- a/tests/ailego/pattern/factory_test.cc +++ b/tests/ailego/pattern/factory_test.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include using namespace zvec; using namespace zvec::ailego; diff --git a/tests/ailego/pattern/singleton_test.cc b/tests/ailego/pattern/singleton_test.cc index 951495d..adcf30d 100644 --- a/tests/ailego/pattern/singleton_test.cc +++ b/tests/ailego/pattern/singleton_test.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include +#include #include using namespace zvec::ailego; diff --git a/tests/ailego/utility/bit_string_helper_test.cc b/tests/ailego/utility/bit_string_helper_test.cc index 198f5b4..3fb2ad2 100644 --- a/tests/ailego/utility/bit_string_helper_test.cc +++ b/tests/ailego/utility/bit_string_helper_test.cc @@ -15,8 +15,8 @@ #include #include #include -#include #include +#include using namespace zvec; diff --git a/tests/ailego/utility/bitset_helper_test.cc b/tests/ailego/utility/bitset_helper_test.cc index 7ac0c1b..0b5b6df 100644 --- a/tests/ailego/utility/bitset_helper_test.cc +++ b/tests/ailego/utility/bitset_helper_test.cc @@ -15,8 +15,8 @@ #include #include #include -#include #include +#include using namespace zvec; diff --git a/tests/ailego/utility/time_helper_test.cc b/tests/ailego/utility/time_helper_test.cc index e34fbd4..f0cef9b 100644 --- a/tests/ailego/utility/time_helper_test.cc +++ b/tests/ailego/utility/time_helper_test.cc @@ -14,8 +14,8 @@ #include #include -#include #include +#include using namespace zvec; diff --git a/tests/ailego/utility/type_helper_test.cc b/tests/ailego/utility/type_helper_test.cc index 57e5a20..b3180bf 100644 --- a/tests/ailego/utility/type_helper_test.cc +++ b/tests/ailego/utility/type_helper_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include -#include #include #include +#include using namespace zvec; diff --git a/tests/core/algorithm/cluster/kmeans_cluster_test.cc b/tests/core/algorithm/cluster/kmeans_cluster_test.cc index fdfd511..268b076 100644 --- a/tests/core/algorithm/cluster/kmeans_cluster_test.cc +++ b/tests/core/algorithm/cluster/kmeans_cluster_test.cc @@ -14,10 +14,10 @@ #include #include -#include #include -#include "framework/index_framework.h" -#include "framework/index_meta.h" +#include +#include "zvec/core/framework/index_framework.h" +#include "zvec/core/framework/index_meta.h" using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/cluster/opt_kmeans_cluster_test.cc b/tests/core/algorithm/cluster/opt_kmeans_cluster_test.cc index c4f4493..b195b48 100644 --- a/tests/core/algorithm/cluster/opt_kmeans_cluster_test.cc +++ b/tests/core/algorithm/cluster/opt_kmeans_cluster_test.cc @@ -15,9 +15,9 @@ #include #include #include -#include #include -#include "framework/index_framework.h" +#include +#include "zvec/core/framework/index_framework.h" using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/flat/flat_searcher_test.cpp b/tests/core/algorithm/flat/flat_searcher_test.cpp index dc79211..573cb73 100644 --- a/tests/core/algorithm/flat/flat_searcher_test.cpp +++ b/tests/core/algorithm/flat/flat_searcher_test.cpp @@ -16,9 +16,9 @@ #include #include #include -#include #include #include +#include #include "flat/flat_builder.h" using namespace zvec::core; diff --git a/tests/core/algorithm/flat/flat_streamer_buffer_test.cpp b/tests/core/algorithm/flat/flat_streamer_buffer_test.cpp index a290649..62b25e2 100644 --- a/tests/core/algorithm/flat/flat_streamer_buffer_test.cpp +++ b/tests/core/algorithm/flat/flat_streamer_buffer_test.cpp @@ -1,12 +1,12 @@ #include #include #include -#include #include #include -#include -#include #include +#include +#include +#include using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/flat/flat_streamer_buffer_time_test.cpp b/tests/core/algorithm/flat/flat_streamer_buffer_time_test.cpp index 099db0e..c919e9f 100644 --- a/tests/core/algorithm/flat/flat_streamer_buffer_time_test.cpp +++ b/tests/core/algorithm/flat/flat_streamer_buffer_time_test.cpp @@ -1,12 +1,12 @@ #include #include #include -#include #include #include -#include -#include #include +#include +#include +#include using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/flat/flat_streamer_test.cc b/tests/core/algorithm/flat/flat_streamer_test.cc index 68f3dbc..022c106 100644 --- a/tests/core/algorithm/flat/flat_streamer_test.cc +++ b/tests/core/algorithm/flat/flat_streamer_test.cc @@ -16,13 +16,13 @@ #include #include #include -#include #include #include -#include -#include #include -#include "ailego/encoding/json/mod_json.h" +#include +#include +#include +#include #include "algorithm/flat/flat_utility.h" #if defined(__GNUC__) || defined(__GNUG__) diff --git a/tests/core/algorithm/flat_sparse/flat_sparse_searcher_test.cc b/tests/core/algorithm/flat_sparse/flat_sparse_searcher_test.cc index f03cdf8..f0553dd 100644 --- a/tests/core/algorithm/flat_sparse/flat_sparse_searcher_test.cc +++ b/tests/core/algorithm/flat_sparse/flat_sparse_searcher_test.cc @@ -16,12 +16,12 @@ #include #include #include -#include #include #include #include -#include "framework/index_factory.h" -#include "framework/index_meta.h" +#include +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_meta.h" using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/flat_sparse/flat_sparse_streamer_buffer_test.cc b/tests/core/algorithm/flat_sparse/flat_sparse_streamer_buffer_test.cc index a17fb84..11c84e8 100644 --- a/tests/core/algorithm/flat_sparse/flat_sparse_streamer_buffer_test.cc +++ b/tests/core/algorithm/flat_sparse/flat_sparse_streamer_buffer_test.cc @@ -14,14 +14,14 @@ #include #include -#include #include #include #include #include -#include -#include #include +#include +#include +#include using namespace std; using namespace testing; diff --git a/tests/core/algorithm/flat_sparse/flat_sparse_streamer_test.cc b/tests/core/algorithm/flat_sparse/flat_sparse_streamer_test.cc index 9279e5e..73d85eb 100644 --- a/tests/core/algorithm/flat_sparse/flat_sparse_streamer_test.cc +++ b/tests/core/algorithm/flat_sparse/flat_sparse_streamer_test.cc @@ -15,14 +15,14 @@ #include #include #include -#include #include #include #include #include -#include -#include #include +#include +#include +#include using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/hnsw/hnsw_builder_test.cc b/tests/core/algorithm/hnsw/hnsw_builder_test.cc index c7433b0..402ae97 100644 --- a/tests/core/algorithm/hnsw/hnsw_builder_test.cc +++ b/tests/core/algorithm/hnsw/hnsw_builder_test.cc @@ -16,9 +16,9 @@ #include #include #include -#include #include -#include "framework/index_framework.h" +#include +#include "zvec/core/framework/index_framework.h" #if defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push diff --git a/tests/core/algorithm/hnsw/hnsw_searcher_test.cpp b/tests/core/algorithm/hnsw/hnsw_searcher_test.cpp index d065efb..94b0b31 100644 --- a/tests/core/algorithm/hnsw/hnsw_searcher_test.cpp +++ b/tests/core/algorithm/hnsw/hnsw_searcher_test.cpp @@ -17,12 +17,12 @@ #include #include #include -#include #include #include -#include "framework/index_builder.h" -#include "framework/index_factory.h" -#include "framework/index_meta.h" +#include +#include "zvec/core/framework/index_builder.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_meta.h" #include "hnsw_params.h" using namespace std; diff --git a/tests/core/algorithm/hnsw/hnsw_streamer_buffer_test.cpp b/tests/core/algorithm/hnsw/hnsw_streamer_buffer_test.cpp index 6f110a9..a3dda59 100644 --- a/tests/core/algorithm/hnsw/hnsw_streamer_buffer_test.cpp +++ b/tests/core/algorithm/hnsw/hnsw_streamer_buffer_test.cpp @@ -1,13 +1,13 @@ #include #include #include -#include #include #include #include -#include -#include #include +#include +#include +#include using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/hnsw/hnsw_streamer_test.cc b/tests/core/algorithm/hnsw/hnsw_streamer_test.cc index 8bbafd6..5f21db4 100644 --- a/tests/core/algorithm/hnsw/hnsw_streamer_test.cc +++ b/tests/core/algorithm/hnsw/hnsw_streamer_test.cc @@ -18,8 +18,8 @@ #include #include #include -#include #include +#include #if defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push diff --git a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_builder_test.cc b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_builder_test.cc index 8ba7a71..0f46dab 100644 --- a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_builder_test.cc +++ b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_builder_test.cc @@ -16,9 +16,9 @@ #include #include #include -#include #include -#include "framework/index_framework.h" +#include +#include "zvec/core/framework/index_framework.h" #include "hnsw_sparse_params.h" #if defined(__GNUC__) || defined(__GNUG__) diff --git a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_test.cc b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_test.cc index 30c86b8..78d1547 100644 --- a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_test.cc +++ b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_searcher_test.cc @@ -17,10 +17,10 @@ #include #include #include -#include #include #include -#include "framework/index_framework.h" +#include +#include "zvec/core/framework/index_framework.h" #include "hnsw_sparse_params.h" #if defined(__GNUC__) || defined(__GNUG__) diff --git a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_buffer_test.cpp b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_buffer_test.cpp index 5ddeb0b..c80c956 100644 --- a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_buffer_test.cpp +++ b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_buffer_test.cpp @@ -17,9 +17,9 @@ #include #include #include -#include #include #include +#include #include "hnsw_sparse_streamer.h" using namespace std; diff --git a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_test.cc b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_test.cc index b06e0eb..2990cc9 100644 --- a/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_test.cc +++ b/tests/core/algorithm/hnsw_sparse/hnsw_sparse_streamer_test.cc @@ -18,9 +18,9 @@ #include #include #include -#include #include #include +#include #if defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push diff --git a/tests/core/algorithm/ivf/ivf_builder_test.cc b/tests/core/algorithm/ivf/ivf_builder_test.cc index 001f4cc..7dc7da5 100644 --- a/tests/core/algorithm/ivf/ivf_builder_test.cc +++ b/tests/core/algorithm/ivf/ivf_builder_test.cc @@ -15,8 +15,8 @@ #include #include #include -#include #include +#include using namespace zvec::core; using namespace zvec::ailego; diff --git a/tests/core/algorithm/ivf/ivf_searcher_test.cc b/tests/core/algorithm/ivf/ivf_searcher_test.cc index 7e2689f..0ce94ce 100644 --- a/tests/core/algorithm/ivf/ivf_searcher_test.cc +++ b/tests/core/algorithm/ivf/ivf_searcher_test.cc @@ -16,7 +16,7 @@ #include #include #include -#include "framework/index_framework.h" +#include "zvec/core/framework/index_framework.h" #include "ivf_builder.h" #if defined(__GNUC__) || defined(__GNUG__) diff --git a/tests/core/interface/index_interface_test.cc b/tests/core/interface/index_interface_test.cc index 0873c68..b38eea5 100644 --- a/tests/core/interface/index_interface_test.cc +++ b/tests/core/interface/index_interface_test.cc @@ -17,11 +17,11 @@ #include #include #include -#include "ailego/buffer/buffer_manager.h" -#include "interface/index.h" -#include "interface/index_factory.h" -#include "interface/index_param.h" -#include "interface/index_param_builders.h" +#include "zvec/ailego/buffer/buffer_manager.h" +#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" #if defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push diff --git a/tests/core/metric/cosine_metric_test.cc b/tests/core/metric/cosine_metric_test.cc index 7265f02..9ed3d5e 100644 --- a/tests/core/metric/cosine_metric_test.cc +++ b/tests/core/metric/cosine_metric_test.cc @@ -15,7 +15,7 @@ #include #include #include -#include "framework/index_factory.h" +#include "zvec/core/framework/index_factory.h" using namespace zvec; diff --git a/tests/core/metric/euclidean_metric_test.cc b/tests/core/metric/euclidean_metric_test.cc index e0ffac9..c0c3a36 100644 --- a/tests/core/metric/euclidean_metric_test.cc +++ b/tests/core/metric/euclidean_metric_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include #include -#include "framework/index_factory.h" +#include "zvec/core/framework/index_factory.h" using namespace zvec; using namespace zvec::core; diff --git a/tests/core/metric/hamming_metric_test.cc b/tests/core/metric/hamming_metric_test.cc index 1dc0b87..4c44beb 100644 --- a/tests/core/metric/hamming_metric_test.cc +++ b/tests/core/metric/hamming_metric_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include #include -#include "framework/index_factory.h" +#include "zvec/core/framework/index_factory.h" using namespace zvec; using namespace zvec::core; diff --git a/tests/core/metric/inner_product_metric_test.cc b/tests/core/metric/inner_product_metric_test.cc index 02b81b5..8a0c521 100644 --- a/tests/core/metric/inner_product_metric_test.cc +++ b/tests/core/metric/inner_product_metric_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include #include -#include "framework/index_factory.h" +#include "zvec/core/framework/index_factory.h" using namespace zvec; using namespace zvec::core; diff --git a/tests/core/metric/quantized_integer_metric_test.cc b/tests/core/metric/quantized_integer_metric_test.cc index 0d7309b..5cfec79 100644 --- a/tests/core/metric/quantized_integer_metric_test.cc +++ b/tests/core/metric/quantized_integer_metric_test.cc @@ -14,16 +14,16 @@ #include #include #include -#include #include #include #include -#include -#include #include +#include #include +#include +#include #include "core/quantizer/quantizer_params.h" -#include "framework/index_factory.h" +#include "zvec/core/framework/index_factory.h" using namespace zvec; diff --git a/tests/core/quantizer/half_float_reformer_test.cc b/tests/core/quantizer/half_float_reformer_test.cc index b48b91e..b9e382f 100644 --- a/tests/core/quantizer/half_float_reformer_test.cc +++ b/tests/core/quantizer/half_float_reformer_test.cc @@ -15,12 +15,12 @@ #include #include -// #include -// #include +// #include +// #include #include -#include "framework/index_factory.h" -#include "framework/index_holder.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_holder.h" using namespace zvec::core; diff --git a/tests/core/quantizer/integer_quantizer_reformer_test.cc b/tests/core/quantizer/integer_quantizer_reformer_test.cc index 77d6b21..21967bb 100644 --- a/tests/core/quantizer/integer_quantizer_reformer_test.cc +++ b/tests/core/quantizer/integer_quantizer_reformer_test.cc @@ -14,10 +14,10 @@ #include #include -#include #include -#include "framework/index_factory.h" -#include "framework/index_holder.h" +#include +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_holder.h" using namespace zvec::core; diff --git a/tests/core/utility/buffer_storage_test.cpp b/tests/core/utility/buffer_storage_test.cpp index 134e062..9171ad3 100644 --- a/tests/core/utility/buffer_storage_test.cpp +++ b/tests/core/utility/buffer_storage_test.cpp @@ -13,10 +13,10 @@ // limitations under the License. #include -#include -#include -#include #include +#include +#include +#include using namespace zvec; using namespace zvec::core; diff --git a/tests/core/utility/file_dumper_test.cc b/tests/core/utility/file_dumper_test.cc index 2ed95dd..2677d44 100644 --- a/tests/core/utility/file_dumper_test.cc +++ b/tests/core/utility/file_dumper_test.cc @@ -13,9 +13,9 @@ // limitations under the License. #include #include -#include "framework/index_factory.h" -#include "framework/index_helper.h" -#include "framework/index_segment_storage.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_helper.h" +#include "zvec/core/framework/index_segment_storage.h" using namespace zvec; using namespace zvec::core; diff --git a/tests/core/utility/memory_dumper_test.cc b/tests/core/utility/memory_dumper_test.cc index f828ba1..c6aeee2 100644 --- a/tests/core/utility/memory_dumper_test.cc +++ b/tests/core/utility/memory_dumper_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include #include -#include "framework/index_factory.h" -#include "framework/index_helper.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_helper.h" using namespace zvec; using namespace zvec::core; diff --git a/tests/core/utility/mmap_file_container_test.cc b/tests/core/utility/mmap_file_container_test.cc index 7dc686c..67adab1 100644 --- a/tests/core/utility/mmap_file_container_test.cc +++ b/tests/core/utility/mmap_file_container_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include #include -#include "framework/index_factory.h" -#include "framework/index_helper.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_helper.h" using namespace zvec; using namespace zvec::core; diff --git a/tests/core/utility/mmap_file_storage_test.cpp b/tests/core/utility/mmap_file_storage_test.cpp index 5fa5cca..b0436d8 100644 --- a/tests/core/utility/mmap_file_storage_test.cpp +++ b/tests/core/utility/mmap_file_storage_test.cpp @@ -14,10 +14,10 @@ #include #include -#include -#include -#include #include +#include +#include +#include using namespace zvec; using namespace zvec::core; diff --git a/tests/db/collection_test.cc b/tests/db/collection_test.cc index 47e533b..fb87c59 100644 --- a/tests/db/collection_test.cc +++ b/tests/db/collection_test.cc @@ -22,10 +22,10 @@ #include #include #include -#include -#include #include -#include "ailego/logger/logger.h" +#include +#include +#include #include "db/common/file_helper.h" #include "db/index/common/type_helper.h" #include "index/utils/utils.h" diff --git a/tests/db/index/segment/segment_test.cc b/tests/db/index/segment/segment_test.cc index 57c1f51..161dd53 100644 --- a/tests/db/index/segment/segment_test.cc +++ b/tests/db/index/segment/segment_test.cc @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include "db/common/file_helper.h" #include "db/index/common/delete_store.h" #include "db/index/common/id_map.h" diff --git a/tests/db/index/storage/wal_file_test.cc b/tests/db/index/storage/wal_file_test.cc index 79d4ba7..f430d0a 100644 --- a/tests/db/index/storage/wal_file_test.cc +++ b/tests/db/index/storage/wal_file_test.cc @@ -22,10 +22,10 @@ #include #include #include -#include -#include #include +#include #include +#include #include "db/common/file_helper.h" #if defined(__GNUC__) || defined(__GNUG__) diff --git a/tests/db/index/utils/utils.cc b/tests/db/index/utils/utils.cc index 3a38dd1..e901ee9 100644 --- a/tests/db/index/utils/utils.cc +++ b/tests/db/index/utils/utils.cc @@ -16,7 +16,7 @@ #include #include #include -#include "ailego/logger/logger.h" +#include #include "zvec/db/collection.h" #include "zvec/db/doc.h" #include "zvec/db/index_params.h" diff --git a/tests/db/sqlengine/mock_segment.h b/tests/db/sqlengine/mock_segment.h index 73fcb8d..0872dd3 100644 --- a/tests/db/sqlengine/mock_segment.h +++ b/tests/db/sqlengine/mock_segment.h @@ -17,10 +17,10 @@ #include #include #include -#include #include #include #include +#include #include "db/index/column/common/index_results.h" #include "db/index/column/vector_column/vector_column_indexer.h" #include "db/index/segment/segment.h" diff --git a/tools/core/bench_original.cc b/tools/core/bench_original.cc index d074d1c..65a36d7 100644 --- a/tools/core/bench_original.cc +++ b/tools/core/bench_original.cc @@ -15,11 +15,11 @@ #include #include #include -#include -#include "framework/index_plugin.h" -#include "interface/index_factory.h" -#include "interface/index_param.h" +#include #include "zvec/ailego/utility/string_helper.h" +#include "zvec/core/framework/index_plugin.h" +#include "zvec/core/interface/index_factory.h" +#include "zvec/core/interface/index_param.h" #include "bench_result.h" #include "filter_result_cache.h" #include "flow.h" diff --git a/tools/core/flow.h b/tools/core/flow.h index 85a09ab..43b59eb 100644 --- a/tools/core/flow.h +++ b/tools/core/flow.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "framework/index_flow.h" +#include "zvec/core/framework/index_flow.h" #include "meta_segment_common.h" using namespace std; diff --git a/tools/core/helper.h b/tools/core/helper.h index 7c59f98..c24c89f 100644 --- a/tools/core/helper.h +++ b/tools/core/helper.h @@ -18,20 +18,20 @@ #include #include #include -#include -#include -#include #include -#include -#include +#include +#include +#include +#include #include -#include "framework/index_error.h" -#include "framework/index_factory.h" -#include "framework/index_plugin.h" -#include "framework/index_storage.h" -#include "interface/index.h" -#include "interface/index_factory.h" -#include "interface/index_param.h" +#include +#include "zvec/core/framework/index_error.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_plugin.h" +#include "zvec/core/framework/index_storage.h" +#include "zvec/core/interface/index.h" +#include "zvec/core/interface/index_factory.h" +#include "zvec/core/interface/index_param.h" #include "filter_result_cache.h" #include "meta_segment_common.h" #include "txt_input_reader.h" diff --git a/tools/core/index_meta_helper.h b/tools/core/index_meta_helper.h index f412383..9504463 100644 --- a/tools/core/index_meta_helper.h +++ b/tools/core/index_meta_helper.h @@ -16,7 +16,7 @@ #include #include -#include "framework/index_meta.h" +#include "zvec/core/framework/index_meta.h" namespace zvec { namespace core { diff --git a/tools/core/local_builder.cc b/tools/core/local_builder.cc index 778314b..46f6c6d 100644 --- a/tools/core/local_builder.cc +++ b/tools/core/local_builder.cc @@ -15,17 +15,15 @@ #include #include #include -#include #include -#include -#include "algorithm/flat/flat_utility.h" -#include "algorithm/hnsw/hnsw_params.h" -#include "framework/index_dumper.h" -#include "framework/index_factory.h" -#include "framework/index_logger.h" -#include "framework/index_plugin.h" -#include "framework/index_reformer.h" -#include "framework/index_streamer.h" +#include +#include +#include "zvec/core/framework/index_dumper.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_logger.h" +#include "zvec/core/framework/index_plugin.h" +#include "zvec/core/framework/index_reformer.h" +#include "zvec/core/framework/index_streamer.h" #include "index_meta_helper.h" #include "meta_segment_common.h" #include "vecs_index_holder.h" diff --git a/tools/core/local_builder_original.cc b/tools/core/local_builder_original.cc index e97e96e..f6a4401 100644 --- a/tools/core/local_builder_original.cc +++ b/tools/core/local_builder_original.cc @@ -15,15 +15,15 @@ #include #include #include -#include #include -#include -#include "framework/index_dumper.h" -#include "framework/index_factory.h" -#include "framework/index_logger.h" -#include "framework/index_plugin.h" -#include "framework/index_reformer.h" -#include "framework/index_streamer.h" +#include +#include +#include "zvec/core/framework/index_dumper.h" +#include "zvec/core/framework/index_factory.h" +#include "zvec/core/framework/index_logger.h" +#include "zvec/core/framework/index_plugin.h" +#include "zvec/core/framework/index_reformer.h" +#include "zvec/core/framework/index_streamer.h" #include "index_meta_helper.h" #include "meta_segment_common.h" #include "vecs_index_holder.h" diff --git a/tools/core/meta_segment_common.h b/tools/core/meta_segment_common.h index e43b691..2d1fa48 100644 --- a/tools/core/meta_segment_common.h +++ b/tools/core/meta_segment_common.h @@ -14,7 +14,7 @@ #pragma once -#include +#include namespace zvec { namespace core { diff --git a/tools/core/recall_original.cc b/tools/core/recall_original.cc index 9d334a4..c8b2068 100644 --- a/tools/core/recall_original.cc +++ b/tools/core/recall_original.cc @@ -17,15 +17,15 @@ #include #include #include -#include -#include #include -#include -#include +#include +#include +#include #include -#include "framework/index_plugin.h" -#include "interface/index_factory.h" -#include "interface/index_param.h" +#include +#include "zvec/core/framework/index_plugin.h" +#include "zvec/core/interface/index_factory.h" +#include "zvec/core/interface/index_param.h" #include "filter_result_cache.h" #include "flow.h" #include "txt_input_reader.h" diff --git a/tools/core/txt2vecs.cc b/tools/core/txt2vecs.cc index a951c45..6b8d0cf 100644 --- a/tools/core/txt2vecs.cc +++ b/tools/core/txt2vecs.cc @@ -14,8 +14,8 @@ #include #include -#include "framework/index_meta.h" #include "gflags/gflags.h" +#include "zvec/core/framework/index_meta.h" #include "index_meta_helper.h" #include "txt_input_reader.h" #include "vecs_common.h" diff --git a/tools/core/vecs_index_holder.h b/tools/core/vecs_index_holder.h index 654d025..4d5c8e1 100644 --- a/tools/core/vecs_index_holder.h +++ b/tools/core/vecs_index_holder.h @@ -15,8 +15,8 @@ #pragma once #include -#include -#include "framework/index_holder.h" +#include +#include "zvec/core/framework/index_holder.h" #include "vecs_reader.h" namespace zvec { diff --git a/tools/core/vecs_reader.h b/tools/core/vecs_reader.h index ec7239b..110e520 100644 --- a/tools/core/vecs_reader.h +++ b/tools/core/vecs_reader.h @@ -15,8 +15,8 @@ #pragma once #include -#include -#include "framework/index_meta.h" +#include +#include "zvec/core/framework/index_meta.h" #include "vecs_common.h" namespace zvec {