Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ check_termination(
/* determine improvement in the last couple of iterations */
newest_val = history->energy_history->back();

/* terminate if objective is already 0 */
if (newest_val == static_cast<_s_t<COSTTYPE, SIMDWIDTH>>(0))
return true;

luint_t oldest_pos = 0;
if(hist_size > m_iteration_span)
oldest_pos = (hist_size - 1) - m_iteration_span;
Expand Down