Skip to content

Commit 6f83dc9

Browse files
CISCjeffbolznv
andauthored
ensure n_threads > 0
Co-authored-by: Jeff Bolz <[email protected]>
1 parent 26070bc commit 6f83dc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test-barrier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
int main(int argc, char *argv[]) {
1515

16-
int n_threads = std::min(4, (int) std::thread::hardware_concurrency());
16+
int n_threads = std::max(1, std::min(4, (int) std::thread::hardware_concurrency()));
1717
int n_rounds = 100;
1818

1919
if (argc > 1) {

0 commit comments

Comments
 (0)