Browse Source

force serial macro

Former-commit-id: 69f77e6b8ed3ab91fc2b806ab917f20484b7b844
Alec Jacobson 9 years ago
parent
commit
d449dd19c3
1 changed files with 6 additions and 1 deletions
  1. 6 1
      include/igl/parallel_for.h

+ 6 - 1
include/igl/parallel_for.h

@@ -123,7 +123,12 @@ inline bool igl::parallel_for(
   // Estimate number of threads in the pool
   // http://ideone.com/Z7zldb
   const static size_t sthc = std::thread::hardware_concurrency();
-  const size_t nthreads = loop_size<min_parallel?0:(sthc==0?8:sthc);
+  const size_t nthreads = 
+#ifdef IGL_PARALLEL_FOR_FORCE_SERIAL
+    0;
+#else
+    loop_size<min_parallel?0:(sthc==0?8:sthc);
+#endif
   if(nthreads==0)
   {
     // serial