1#ifndef OSMIUM_UTIL_CONFIG_HPP
2#define OSMIUM_UTIL_CONFIG_HPP
45# define strcasecmp _stricmp
52#ifndef OSMIUM_TEST_RUNNER
53 inline const char* getenv_wrapper(
const char* var)
noexcept {
63 const char* env = osmium::detail::getenv_wrapper(
"OSMIUM_POOL_THREADS");
65 return osmium::detail::str_to_int<int>(env);
71 const char* env = osmium::detail::getenv_wrapper(
"OSMIUM_USE_POOL_THREADS_FOR_PBF_PARSING");
73 if (!strcasecmp(env,
"off") ||
74 !strcasecmp(env,
"false") ||
75 !strcasecmp(env,
"no") ||
76 !strcasecmp(env,
"0")) {
83 inline std::size_t
get_max_queue_size(
const char* queue_name,
const std::size_t default_value)
noexcept {
85 std::string name{
"OSMIUM_MAX_"};
87 name +=
"_QUEUE_SIZE";
88 const char* env = osmium::detail::getenv_wrapper(name.c_str());
90 std::size_t value = default_value;
93 const auto new_value = osmium::detail::str_to_int<std::size_t>(env);
107 const char* env = osmium::detail::getenv_wrapper(
"OSMIUM_CLEAN_PAGE_CACHE_AFTER_READ");
109 if (!strcasecmp(env,
"yes")) {
112 if (!strcasecmp(env,
"no")) {
bool use_pool_threads_for_pbf_parsing() noexcept
Definition: config.hpp:70
int get_pool_threads() noexcept
Definition: config.hpp:62
std::size_t get_max_queue_size(const char *queue_name, const std::size_t default_value) noexcept
Definition: config.hpp:83
int8_t clean_page_cache_after_read() noexcept
Definition: config.hpp:106
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53