Reduce FOREVER from 290 to 200 years (#2938)

Prevents wrap observed in emcc, causing find_max_global to exit immediately unless a custom (and non-wrapping) max_runtime is provided.
This commit is contained in:
Chainfire 2024-03-31 21:26:49 +02:00 committed by GitHub
parent 4d6b41c7a5
commit 1db5a38539
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ template <typename T> static auto go(T&& f, const matrix<double, 0, 1>& a) -> de
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
const auto FOREVER = std::chrono::hours(24*365*290); // 290 years const auto FOREVER = std::chrono::hours(24*365*200); // 200 years
using stop_condition = std::function<bool(double)>; using stop_condition = std::function<bool(double)>;
const stop_condition never_stop_early = [](double) { return false; }; const stop_condition never_stop_early = [](double) { return false; };

View File

@ -68,7 +68,7 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
const auto FOREVER = std::chrono::hours(24*356*290); // 290 years, basically forever const auto FOREVER = std::chrono::hours(24*356*200); // 200 years, basically forever
/*! /*!
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS