From 31318862cbd1b1278537e3f888a846dfa9b5ac7b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 29 Sep 2022 15:13:30 +0200 Subject: [PATCH] rogueviz:: added CAP_THREAD guard --- rogueviz/rogueviz.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rogueviz/rogueviz.h b/rogueviz/rogueviz.h index e955961d..95968438 100644 --- a/rogueviz/rogueviz.h +++ b/rogueviz/rogueviz.h @@ -357,6 +357,7 @@ namespace objmodels { /* parallelize a computation */ inline int threads = 1; + #if CAP_THREAD template auto parallelize(long long N, T action) -> decltype(action(0,0)) { if(threads == 1) return action(0,N); std::vector v; @@ -371,6 +372,7 @@ namespace objmodels { for(Res r: results) res += r; return res; } + #endif }