From 30c0bdb23b2af763c7311fa1ffa09feba938dfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 25 Oct 2018 23:05:05 +0200 Subject: [PATCH] Removing OpenMP support. Just realized that there are only 8 vertices, and therefore 24 variables being updated every frame, which means that using OpenMP would (if anything) slow it down. --- CMakeLists.txt | 3 +-- src/cube.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bf66b8..10b928d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,6 @@ set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) find_package(GLEW REQUIRED) -find_package(OpenMP REQUIRED) find_package(PkgConfig REQUIRED) pkg_search_module(SDL2 REQUIRED sdl2) @@ -55,7 +54,7 @@ set(SRCS "src/simulation.cpp") # Define C++ compiler flags -set(CMAKE_CXX_FLAGS "-std=c++11 ${OpenMP_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wfatal-errors -Werror -pedantic-errors -fno-elide-constructors") +set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wpedantic -Wfatal-errors -Werror -pedantic-errors -fno-elide-constructors") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3") diff --git a/src/cube.cpp b/src/cube.cpp index 68ea0ae..8bc6860 100644 --- a/src/cube.cpp +++ b/src/cube.cpp @@ -84,7 +84,6 @@ void cube::render() { } void cube::shift_colors() { - #pragma omp parallel for for(size_t i = 0; i < colors.size(); ++i) { colors[i] += color_ascending[i] ? color_shift :