Skip to content

Commit

Permalink
fix bug with getnumthreads
Browse files Browse the repository at this point in the history
  • Loading branch information
computablee committed Nov 26, 2023
1 parent ca35b92 commit ffc09ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DotMP/Parallel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ffc09ad

Please sign in to comment.