diff --git a/src/core/algorithm/flat/flat_index_format.h b/src/core/algorithm/flat/flat_index_format.h index 8c3e6908..d91385ab 100644 --- a/src/core/algorithm/flat/flat_index_format.h +++ b/src/core/algorithm/flat/flat_index_format.h @@ -89,8 +89,8 @@ struct LinearIntegerQuantizerParams { /*! Location of Vectors Block in Storage Segment */ struct BlockLocation { - uint16_t segment_id{0}; - uint16_t block_index{0}; + uint32_t segment_id{0}; + uint32_t block_index{0}; }; /*! The Header of a Block in Storage Segment @@ -153,10 +153,10 @@ struct VectorLocation { : segment_id(0u), column_major(0u), reserved(0u), offset(0u) {} //! Constructor - VectorLocation(uint16_t id, bool col, uint32_t off) + VectorLocation(uint32_t id, bool col, uint32_t off) : segment_id(id), column_major(col), reserved(0u), offset(off) {} - uint16_t segment_id{0}; + uint32_t segment_id{0}; uint16_t column_major : 1; uint16_t reserved : 15; uint32_t offset{0}; @@ -168,8 +168,8 @@ struct VectorLocation { } }; -static_assert(sizeof(VectorLocation) == sizeof(uint64_t), - "VectorLocation must be size of 8 bytes"); +// static_assert(sizeof(VectorLocation) == sizeof(uint64_t), +// "VectorLocation must be size of 8 bytes"); struct KeyInfo { KeyInfo(void) : centroid_idx(0u) {} diff --git a/src/core/algorithm/flat/flat_streamer_entity.h b/src/core/algorithm/flat/flat_streamer_entity.h index 277e8f29..06c691da 100644 --- a/src/core/algorithm/flat/flat_streamer_entity.h +++ b/src/core/algorithm/flat/flat_streamer_entity.h @@ -380,8 +380,8 @@ class FlatStreamerEntity { private: //! Constants - static constexpr size_t kMaxSegmentId = std::numeric_limits::max(); - static constexpr size_t kMaxBlockId = std::numeric_limits::max(); + static constexpr size_t kMaxSegmentId = std::numeric_limits::max(); + static constexpr size_t kMaxBlockId = std::numeric_limits::max(); //! Members std::mutex mutex_{}; diff --git a/src/include/zvec/ailego/utility/string_helper.h b/src/include/zvec/ailego/utility/string_helper.h index 7a924ec0..2dab937b 100644 --- a/src/include/zvec/ailego/utility/string_helper.h +++ b/src/include/zvec/ailego/utility/string_helper.h @@ -14,6 +14,7 @@ #pragma once +#include #include #include #include