18 const std::string INFOSTRING =
19 std::string(
"Built on " __DATE__
" at " __TIME__) +
20 " with `" + NUKLEI_BUILDTYPE +
"' flags.\n"
21 "This application is part of Nuklei http://renaud-detry.net/nuklei\n"
22 "To contact the author, see email at http://renaud-detry.net\n";
25 static T initConst(
const char *envVar, T def)
27 const char * envVal = getenv(envVar);
30 T val = numify<T>(envVal);
32 const char * log = getenv(
"NUKLEI_LOG_LEVEL");
33 if (log != NULL && numify<unsigned>(log) >= Log::INFO)
34 std::cout <<
"export " << envVar <<
"=" << val
35 <<
" #(def: " << def <<
").\n";
42 #define defConst(TYPE, VAR, VAL) \
43 const TYPE VAR = initConst<TYPE>("NUKLEI_" #VAR, VAL)
48 const int PRECISION = std::numeric_limits<double>::digits10 + 2;
50 defConst(
bool, KDTREE_DENSITY_EVAL,
true);
51 defConst(
bool, KDTREE_NANOFLANN,
true);
53 defConst(
unsigned int, KDE_KTH_NEAREST_NEIGHBOR, 8);
59 defConst(
appear_t, HSV_METRIC_VALUE_WEIGHT, .6);
61 const int NICEINC = std::numeric_limits<int>::max();
63 defConst(std::string, SERIALIZATION_DEFAULT_OUTPUT_TYPE,
"serial");
64 defConst(std::string, SERIALIZATION_DEFAULT_BOOST_ARCHIVE,
"bbinc");
66 defConst(
unsigned, IMAGE_PROJECTION_RADIUS, 3);
69 defConst(std::string, PARALLELIZATION,
"single");
71 defConst(std::string, PARALLELIZATION,
"openmp");
74 defConst(
bool, ENABLE_CONSOLE_BACKSPACE,
true);
76 defConst(
unsigned, LOG_LEVEL, 0);
80 bool LAST_OUTPUT_LINE_IS_PROGRESS =
false;
82 const bool INTERACTIVE_SHELL =
83 isatty(STDIN_FILENO) && isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) &&
84 (getenv(
"TERM") != NULL) &&
85 (std::string(getenv(
"TERM")) !=
"dumb");
97 #warning Compiling with NDEBUG set.