From 31174736e97d110f628d9e8c982ef85b657672a3 Mon Sep 17 00:00:00 2001 From: Gavin Ridley Date: Sun, 19 Dec 2021 01:27:29 -0500 Subject: [PATCH] fix for non-OMP compile --- src/plot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plot.cpp b/src/plot.cpp index f7d1224f2..2e849c907 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -1161,8 +1161,8 @@ void ProjectionPlot::create_output() const const int n_threads = 1; #endif std::vector>> this_line_segments( - omp_get_max_threads()); - for (int t = 0; t < omp_get_max_threads(); ++t) { + n_threads); + for (int t = 0; t < n_threads; ++t) { this_line_segments[t].resize(pixels_[0]); } @@ -1195,7 +1195,7 @@ void ProjectionPlot::create_output() const s.u.z = 0.0; p.from_source(&s); - int vert = omp_get_thread_num(); + int vert = tid; for (int iter = 0; iter <= pixels_[1] / n_threads; iter++) { // Save bottom line of current work chunk to compare against later