Skip to content

Commit

Permalink
Reduce FOREVER from 290 to 200 years (#2938)
Browse files Browse the repository at this point in the history
Prevents wrap observed in emcc, causing find_max_global to exit immediately unless a custom (and non-wrapping) max_runtime is provided.
  • Loading branch information
Chainfire committed Mar 31, 2024
1 parent 4d6b41c commit 1db5a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dlib/global_optimization/find_max_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)>;
const stop_condition never_stop_early = [](double) { return false; };

Expand Down
2 changes: 1 addition & 1 deletion dlib/global_optimization/find_max_global_abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1db5a38

Please sign in to comment.