Skip to content

Commit 1db5a38

Browse files
authored
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.
1 parent 4d6b41c commit 1db5a38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dlib/global_optimization/find_max_global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ template <typename T> static auto go(T&& f, const matrix<double, 0, 1>& a) -> de
114114

115115
// ----------------------------------------------------------------------------------------
116116

117-
const auto FOREVER = std::chrono::hours(24*365*290); // 290 years
117+
const auto FOREVER = std::chrono::hours(24*365*200); // 200 years
118118
using stop_condition = std::function<bool(double)>;
119119
const stop_condition never_stop_early = [](double) { return false; };
120120

dlib/global_optimization/find_max_global_abstract.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace dlib
6868

6969
// ----------------------------------------------------------------------------------------
7070

71-
const auto FOREVER = std::chrono::hours(24*356*290); // 290 years, basically forever
71+
const auto FOREVER = std::chrono::hours(24*356*200); // 200 years, basically forever
7272

7373
/*!
7474
WHAT THIS OBJECT REPRESENTS

0 commit comments

Comments
 (0)