From ffc09ad6d355ee93df3297165323a2ce682fb315 Mon Sep 17 00:00:00 2001 From: Lane Date: Sun, 26 Nov 2023 01:48:04 -0600 Subject: [PATCH] fix bug with getnumthreads --- DotMP/Parallel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotMP/Parallel.cs b/DotMP/Parallel.cs index f46ab2d..a64ae99 100644 --- a/DotMP/Parallel.cs +++ b/DotMP/Parallel.cs @@ -1425,7 +1425,7 @@ public static int GetNumThreads() { var freg = new ForkedRegion(); - return (freg.reg is not null) + return freg.in_parallel ? (int)freg.reg.num_threads : 1; }