Skip to content

Commit

Permalink
add 128 bits tag type
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanhaoji2 committed May 7, 2024
1 parent 80061da commit 76f9762
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/utils.h
Expand Up @@ -1193,6 +1193,11 @@ template <> inline const char *diskann_type_to_name<int64_t>()
return "int64";
}

template <> inline const char* diskann_type_to_name<diskann::tag_uint128>()
{
return "tag_uint128";
}

#ifdef _WINDOWS
#include <intrin.h>
#include <Psapi.h>
Expand Down
5 changes: 5 additions & 0 deletions src/index_factory.cpp
@@ -1,4 +1,5 @@
#include "index_factory.h"
#include "tag_uint128.h"
#include "pq_l2_distance.h"

namespace diskann
Expand Down Expand Up @@ -184,6 +185,10 @@ std::unique_ptr<AbstractIndex> IndexFactory::create_instance(const std::string &
{
return create_instance<data_type, uint64_t>(label_type);
}
else if (tag_type == std::string("tag_uint128"))
{
return create_instance<data_type, tag_uint128>(label_type);
}
else
throw ANNException("Error: unsupported tag_type please choose from [int32/uint32/int64/uint64]", -1);
}
Expand Down

0 comments on commit 76f9762

Please sign in to comment.