diff --git a/src/Distancer.cpp b/src/Distancer.cpp index 65ba9fd..27f9b51 100644 --- a/src/Distancer.cpp +++ b/src/Distancer.cpp @@ -78,7 +78,7 @@ Array * Distancer::run () // If no parabolas have been placed, there's nothing else to do if (vertices.empty()) - continue; + PARALLEL_LOOP_CONTINUE // Step back over the data, replacing each element with the value // of the lowest parabola at that location diff --git a/src/Parallel.h b/src/Parallel.h index 5cf6671..badbe62 100644 --- a/src/Parallel.h +++ b/src/Parallel.h @@ -7,21 +7,24 @@ #define PARALLEL_LOOP_START(i,n) \ dispatch_apply(size_t(n), DISPATCH_APPLY_AUTO, ^(size_t i) { +#define PARALLEL_LOOP_CONTINUE return; #define PARALLEL_LOOP_END }); -#elif _OPENMP +#elif defined(_OPENMP) #include #define PARALLEL_LOOP_START(i,n) \ _Pragma("omp parallel for") \ for (size_t i=0; i