Now using OpenMP for parallel programming and next version is v1.0

This commit is contained in:
Nicolás A. Ortega 2016-12-26 15:57:28 +01:00
parent 6c2f96416b
commit 6b2411e860
No known key found for this signature in database
GPG Key ID: 614272579C2070D1
3 changed files with 6 additions and 2 deletions

View File

@ -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.

View File

@ -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")

View File

@ -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