From 6b2411e860e284e862c57f9bc17bf92aa46f8e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Mon, 26 Dec 2016 15:57:28 +0100 Subject: [PATCH] Now using OpenMP for parallel programming and next version is v1.0 --- CHANGELOG | 4 +++- CMakeLists.txt | 3 ++- README.md | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 84afe6a..fdef16e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -27,5 +27,7 @@ Change Log - Allow user to choose base in which the prime numbers are printed. - Give option for primes to be saved to a file upon exit. - Free memory and leave instead of emergency exit. -- v0.7: Additional Functionality +- v1.0: Parallel Computing + - Have primes be computed in parallel for faster prime generation - Allow user to save found primes to be loaded later. + - User can save and read primes in raw output. diff --git a/CMakeLists.txt b/CMakeLists.txt index 2665c17..94df349 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) find_package(GMP REQUIRED) +find_package(OpenMP REQUIRED) include_directories( ${GMP_INCLUDE_DIR}) @@ -23,7 +24,7 @@ set(SRCS src/list.c) # Define the C flags. -set(CMAKE_C_FLAGS "-std=gnu99 -Wall -Wextra -Werror -Wfatal-errors -Wmissing-declarations -pedantic-errors") +set(CMAKE_C_FLAGS "-std=gnu99 ${OpenMP_C_FLAGS} -Wall -Wextra -Werror -Wfatal-errors -Wmissing-declarations -pedantic-errors") set(CMAKE_C_FLAGS_DEBUG "-g -O0") set(CMAKE_C_FLAGS_RELEASE "-O3") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3") diff --git a/README.md b/README.md index 81e3afd..b1431d9 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Building There are multiple dependencies to install before compiling the project: - CMake - GMP +- OpenMP Once the dependencies are installed you can compile by running the following from the root directory of the project: ```bash