fallback to CH, when coreCH used
This commit is contained in:
committed by
Patrick Niklaus
parent
7cf7c46939
commit
2a13f9d10b
@@ -45,7 +45,7 @@ struct ContractorConfig final : storage::IOConfig
|
||||
ContractorConfig()
|
||||
: IOConfig({".osrm.ebg", ".osrm.ebg_nodes", ".osrm.properties"},
|
||||
{},
|
||||
{".osrm.level", ".osrm.core", ".osrm.hsgr", ".osrm.enw"}),
|
||||
{".osrm.hsgr", ".osrm.enw"}),
|
||||
requested_num_threads(0)
|
||||
{
|
||||
}
|
||||
@@ -65,6 +65,7 @@ struct ContractorConfig final : storage::IOConfig
|
||||
|
||||
unsigned requested_num_threads;
|
||||
|
||||
// Deprecated
|
||||
// A percentage of vertices that will be contracted for the hierarchy.
|
||||
// Offers a trade-off between preprocessing and query time.
|
||||
// The remaining vertices form the core of the hierarchy
|
||||
|
||||
@@ -14,37 +14,6 @@ namespace contractor
|
||||
{
|
||||
namespace files
|
||||
{
|
||||
// reads .osrm.core
|
||||
template <typename CoreVectorT>
|
||||
void readCoreMarker(const boost::filesystem::path &path, std::vector<CoreVectorT> &cores)
|
||||
{
|
||||
static_assert(util::is_view_or_vector<bool, CoreVectorT>::value,
|
||||
"cores must be a vector of boolean vectors");
|
||||
storage::io::FileReader reader(path, storage::io::FileReader::VerifyFingerprint);
|
||||
|
||||
auto num_cores = reader.ReadElementCount64();
|
||||
cores.resize(num_cores);
|
||||
for (const auto index : util::irange<std::size_t>(0, num_cores))
|
||||
{
|
||||
storage::serialization::read(reader, cores[index]);
|
||||
}
|
||||
}
|
||||
|
||||
// writes .osrm.core
|
||||
template <typename CoreVectorT>
|
||||
void writeCoreMarker(const boost::filesystem::path &path, const std::vector<CoreVectorT> &cores)
|
||||
{
|
||||
static_assert(util::is_view_or_vector<bool, CoreVectorT>::value,
|
||||
"cores must be a vector of boolean vectors");
|
||||
storage::io::FileWriter writer(path, storage::io::FileWriter::GenerateFingerprint);
|
||||
|
||||
writer.WriteElementCount64(cores.size());
|
||||
for (const auto &core : cores)
|
||||
{
|
||||
storage::serialization::write(writer, core);
|
||||
}
|
||||
}
|
||||
|
||||
// reads .osrm.hsgr file
|
||||
template <typename QueryGraphT, typename EdgeFilterT>
|
||||
inline void readGraph(const boost::filesystem::path &path,
|
||||
@@ -96,24 +65,6 @@ inline void writeGraph(const boost::filesystem::path &path,
|
||||
storage::serialization::write(writer, filter);
|
||||
}
|
||||
}
|
||||
|
||||
// reads .levels file
|
||||
inline void readLevels(const boost::filesystem::path &path, std::vector<float> &node_levels)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileReader::VerifyFingerprint;
|
||||
storage::io::FileReader reader{path, fingerprint};
|
||||
|
||||
storage::serialization::read(reader, node_levels);
|
||||
}
|
||||
|
||||
// writes .levels file
|
||||
inline void writeLevels(const boost::filesystem::path &path, const std::vector<float> &node_levels)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileWriter::GenerateFingerprint;
|
||||
storage::io::FileWriter writer{path, fingerprint};
|
||||
|
||||
storage::serialization::write(writer, node_levels);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user