From 76f97628a5d084b4d3133e09c00b76cb80056742 Mon Sep 17 00:00:00 2001 From: Sanhaoji2 Date: Tue, 7 May 2024 12:15:45 +0800 Subject: [PATCH] add 128 bits tag type --- include/utils.h | 5 +++++ src/index_factory.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/utils.h b/include/utils.h index 2f3b9f9e5..0170d7297 100644 --- a/include/utils.h +++ b/include/utils.h @@ -1193,6 +1193,11 @@ template <> inline const char *diskann_type_to_name() return "int64"; } +template <> inline const char* diskann_type_to_name() +{ + return "tag_uint128"; +} + #ifdef _WINDOWS #include #include diff --git a/src/index_factory.cpp b/src/index_factory.cpp index 35790f8d6..df2bbb4ce 100644 --- a/src/index_factory.cpp +++ b/src/index_factory.cpp @@ -1,4 +1,5 @@ #include "index_factory.h" +#include "tag_uint128.h" #include "pq_l2_distance.h" namespace diskann @@ -184,6 +185,10 @@ std::unique_ptr IndexFactory::create_instance(const std::string & { return create_instance(label_type); } + else if (tag_type == std::string("tag_uint128")) + { + return create_instance(label_type); + } else throw ANNException("Error: unsupported tag_type please choose from [int32/uint32/int64/uint64]", -1); }