From eb0daf2a7a88c44b419f6d1276dc19e66f80776f Mon Sep 17 00:00:00 2001 From: Not_mr_tangerine <72907421+Gefei-Tan@users.noreply.github.com> Date: Mon, 27 Mar 2023 12:21:24 -0500 Subject: [PATCH] Fix threadpool slicing (#85) --- emp-ot/ferret/lpn_f2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emp-ot/ferret/lpn_f2.h b/emp-ot/ferret/lpn_f2.h index 6ba62e4..720d13e 100644 --- a/emp-ot/ferret/lpn_f2.h +++ b/emp-ot/ferret/lpn_f2.h @@ -75,7 +75,7 @@ class LpnF2 { public: })); } int64_t start = (threads - 1) * width; - int64_t end = min(threads * width, n); + int64_t end = n; task(nn, kk, start, end); for (auto &f: fut) f.get(); @@ -103,7 +103,7 @@ class LpnF2 { public: })); } int64_t start = (threads - 1) * width; - int64_t end = min(threads * width, n); + int64_t end = n; task(nn, kk, start, end); for (auto &f: fut) f.get();