From 111b3320c0a5d785ca244cae89978508e099d5d1 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 9 Jul 2019 13:31:20 -0700 Subject: [PATCH] make sure we never execute a job smaller than requested --- libs/utils/include/utils/JobSystem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/utils/include/utils/JobSystem.h b/libs/utils/include/utils/JobSystem.h index 8423134fa1..e1b00c9bc8 100644 --- a/libs/utils/include/utils/JobSystem.h +++ b/libs/utils/include/utils/JobSystem.h @@ -527,7 +527,7 @@ private: size_type const end = first + count; size_type curr = first; - while (curr + c < end) { + while (curr + 2u * c < end) { // this creates jobs from the end of the buffer because the WorkStealingDequeue // is a LIFO, this could help streaming to the d-cache. const size_type pos = end - (curr - first) - c;