Skip to content

Commit

Permalink
initialize dataSize ion abstractInitParams in tiered factory NewIndex…
Browse files Browse the repository at this point in the history
… from hnsw file (#578)
  • Loading branch information
meiravgri authored Dec 24, 2024
1 parent 18afddb commit 63badf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/VecSim/index_factories/tiered_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ VecSimIndex *NewIndex(const TieredIndexParams *params, HNSWIndex<DataType, DistT
.blockSize = hnsw_index->getBlockSize()};

std::shared_ptr<VecSimAllocator> flat_allocator = VecSimAllocator::newVecsimAllocator();
size_t dataSize = VecSimParams_GetDataSize(bf_params.type, bf_params.dim, bf_params.metric);

AbstractIndexInitParams abstractInitParams = {.allocator = flat_allocator,
.dim = bf_params.dim,
.vecType = bf_params.type,
.dataSize = dataSize,
.metric = bf_params.metric,
.blockSize = bf_params.blockSize,
.multi = bf_params.multi,
Expand Down

0 comments on commit 63badf2

Please sign in to comment.