Switch from stxxl::vector to std::vector in extractor
This commit is contained in:
committed by
Patrick Niklaus
parent
a498ba6537
commit
3940cc1641
@@ -3,11 +3,14 @@
|
||||
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <stxxl/mng>
|
||||
#ifndef _WIN32
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#if USE_STXXL_LIBRARY
|
||||
#include <stxxl/mng>
|
||||
#endif
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace util
|
||||
@@ -15,6 +18,7 @@ namespace util
|
||||
|
||||
inline void DumpSTXXLStats()
|
||||
{
|
||||
#if USE_STXXL_LIBRARY
|
||||
#if STXXL_VERSION_MAJOR > 1 || (STXXL_VERSION_MAJOR == 1 && STXXL_VERSION_MINOR >= 4)
|
||||
auto manager = stxxl::block_manager::get_instance();
|
||||
util::Log() << "STXXL: peak bytes used: " << manager->get_maximum_allocation();
|
||||
@@ -23,6 +27,7 @@ inline void DumpSTXXLStats()
|
||||
#warning STXXL 1.4+ recommended - STXXL memory summary will not be available
|
||||
util::Log() << "STXXL: memory summary not available, needs STXXL 1.4 or higher";
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void DumpMemoryStats()
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#include "storage/shared_memory_ownership.hpp"
|
||||
|
||||
#include <stxxl/vector>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/iterator/reverse_iterator.hpp>
|
||||
@@ -21,6 +19,10 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#if USE_STXXL_LIBRARY
|
||||
#include <stxxl/vector>
|
||||
#endif
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace util
|
||||
@@ -209,10 +211,16 @@ template <typename DataT> void swap(vector_view<DataT> &lhs, vector_view<DataT>
|
||||
std::swap(lhs.m_size, rhs.m_size);
|
||||
}
|
||||
|
||||
#if USE_STXXL_LIBRARY
|
||||
template <typename T> using ExternalVector = stxxl::vector<T>;
|
||||
#else
|
||||
template <typename T> using ExternalVector = std::vector<T>;
|
||||
#endif
|
||||
|
||||
template <typename DataT, storage::Ownership Ownership>
|
||||
using InternalOrExternalVector =
|
||||
typename std::conditional<Ownership == storage::Ownership::External,
|
||||
stxxl::vector<DataT>,
|
||||
ExternalVector<DataT>,
|
||||
std::vector<DataT>>::type;
|
||||
|
||||
template <typename DataT, storage::Ownership Ownership>
|
||||
|
||||
Reference in New Issue
Block a user