feat: windows support (#216)
Preliminary support for Windows with remaining TODOs
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
// limitations under the License.
|
||||
#pragma once
|
||||
|
||||
#include <numeric>
|
||||
#include <zvec/core/framework/index_builder.h>
|
||||
#include <zvec/core/framework/index_helper.h>
|
||||
#include "flat_utility.h"
|
||||
|
||||
@@ -41,7 +41,6 @@ struct LinearIndexHeader {
|
||||
block_count(0),
|
||||
index_meta_size(0) {
|
||||
memset(reserved_, 0, sizeof(reserved_));
|
||||
memset(index_meta, 0, sizeof(index_meta));
|
||||
}
|
||||
uint32_t header_size{0};
|
||||
uint32_t total_vector_count{0};
|
||||
@@ -52,7 +51,11 @@ struct LinearIndexHeader {
|
||||
uint32_t block_count{0};
|
||||
uint32_t index_meta_size{0};
|
||||
char reserved_[28] = {0};
|
||||
#ifdef _MSC_VER
|
||||
char index_meta[];
|
||||
#else
|
||||
char index_meta[0];
|
||||
#endif
|
||||
};
|
||||
|
||||
/*! Index Format of Linear Index Meta for each Linear list
|
||||
|
||||
@@ -180,10 +180,10 @@ class FlatStreamer : public IndexStreamer {
|
||||
State state_{STATE_INIT};
|
||||
mutable std::mutex mapping_mutex_{};
|
||||
ailego::SharedMutex dump_mutex_{};
|
||||
FlatStreamerEntity entity_;
|
||||
bool column_major_order_{false};
|
||||
bool use_key_info_map_{true};
|
||||
uint32_t read_block_size_{0};
|
||||
FlatStreamerEntity entity_;
|
||||
};
|
||||
|
||||
} // namespace core
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <numeric>
|
||||
#include "flat_streamer.h"
|
||||
#include "flat_utility.h"
|
||||
|
||||
|
||||
@@ -389,7 +389,6 @@ class FlatStreamerEntity {
|
||||
IndexStorage::Pointer storage_{};
|
||||
IndexMetric::MatrixDistance row_distance_{}, column_distance_{};
|
||||
mutable std::vector<IndexStorage::Segment::Pointer> segments_{};
|
||||
StreamerLinearMeta meta_{};
|
||||
IndexStreamer::Stats &stats_;
|
||||
mutable std::shared_ptr<ailego::SharedMutex> key_info_map_lock_{};
|
||||
std::unordered_map<uint64_t, VectorLocation> key_info_map_{};
|
||||
@@ -401,6 +400,7 @@ class FlatStreamerEntity {
|
||||
uint32_t vec_unit_size_{0};
|
||||
uint32_t vec_cols_{0};
|
||||
mutable std::string vec_buf_{};
|
||||
StreamerLinearMeta meta_{};
|
||||
};
|
||||
|
||||
} // namespace core
|
||||
|
||||
Reference in New Issue
Block a user