blob: db4ef9f642b5b0527afcef0e0e867869ec168201 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include "indexer/data_header.hpp"
#include "indexer/scale_index_builder.hpp"
namespace indexer
{
template <class TFeaturesVector, typename TWriter>
void BuildIndex(feature::DataHeader const & header, TFeaturesVector const & features,
TWriter & writer, string const & tmpFilePrefix)
{
LOG(LINFO, ("Building scale index."));
uint64_t indexSize;
{
SubWriter<TWriter> subWriter(writer);
covering::IndexScales(header, features, subWriter, tmpFilePrefix);
indexSize = subWriter.Size();
}
LOG(LINFO, ("Built scale index. Size =", indexSize));
}
// doesn't throw exceptions
bool BuildIndexFromDatFile(string const & datFile, string const & tmpFile);
}
|