From e09a78dabd9d327f2783bb522a8ef5978228bd2d Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Mon, 29 Oct 2018 15:28:26 -0500 Subject: [PATCH] Adding omp to pixel for loop. --- src/plot.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plot.cpp b/src/plot.cpp index ebc6c4f75..50bfc4917 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -122,6 +122,8 @@ void create_ppm(Plot pl) } double dir[3] = {HALF, HALF, HALF}; +#pragma omp parallel +{ Particle *p = new Particle(); p->initialize(); std::copy(xyz, xyz+3, p->coord[0].xyz); @@ -141,8 +143,8 @@ void create_ppm(Plot pl) data[x][y][BLUE] = rgb[BLUE]; } } - - delete p; + delete p; +} // draw mesh lines if present if (pl.index_meshlines_mesh >= 0) {draw_mesh_lines(pl, data);}