From efe85b3c19a8cd441e2b0725132249e679e4a17c Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Sat, 14 Mar 2020 17:48:43 -0500 Subject: [PATCH] Added missing return to bli_thread_partition_2x2(). Details: - Added a missing return statement to the body of an early case handling branch in bli_thread_partition_2x2(). This bug only affected cases where n_threads < 4, and even then, the code meant to handle cases where n_threads >= 4 executes and does the right thing, albeit using more CPU cycles than needed. Nonetheless, thanks to Kiran Varaganti for reporting this bug via issue #377. - Whitespace changes to bli_thread.c (spaces -> tabs). Change-Id: I2182be0911f76861dd14bec9b6bacb6c20c2725d --- frame/thread/bli_thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frame/thread/bli_thread.c b/frame/thread/bli_thread.c index 6ef86ab0f..b9e493473 100644 --- a/frame/thread/bli_thread.c +++ b/frame/thread/bli_thread.c @@ -1062,6 +1062,8 @@ void bli_thread_partition_2x2 { *nt1 = ( work1 >= work2 ? n_thread : 1 ); *nt2 = ( work1 < work2 ? n_thread : 1 ); + + return; } *nt1 = 1;