Skip to content

Commit 2e4e477

Browse files
committed
Added basic OpenMP multi-threading, now ~3x+ faster on my computer depending on the scene (more gains on scenes with lesser instances)
1 parent 10e293a commit 2e4e477

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/Engine.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,6 @@ void Engine::draw_line(double x1, double y1, double x2, double y2, const Mat& ve
10201020

10211021
double total_length = sqrt(pow(direction_x, 2) + pow(direction_y, 2));
10221022

1023-
#pragma omp parallel
10241023
for (x; x < (uint16_t) round(fmax(x1, x2)); x++) {
10251024

10261025
// Check and update depth buffer, or only do so when rasterizing?
@@ -1080,7 +1079,6 @@ void Engine::draw_line(double x1, double y1, double x2, double y2, const Mat& ve
10801079

10811080
double total_length = sqrt(pow(direction_x, 2) + pow(direction_y, 2));
10821081

1083-
#pragma omp parallel
10841082
for (y; y != round(target_y); y += dy > 0 ? 1 : -1) {
10851083

10861084
// Check and update depth buffer, or only do so when rasterizing?

0 commit comments

Comments
 (0)