From 558b2b07ade2ad501f84908423a3efdd1f67b9b7 Mon Sep 17 00:00:00 2001 From: Rutger van Bergen Date: Thu, 7 Nov 2024 21:25:00 +0100 Subject: [PATCH] Clean up Dockerfile and README --- PrimeCPP/solution_2/Dockerfile | 4 ++-- PrimeCPP/solution_2/README.md | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PrimeCPP/solution_2/Dockerfile b/PrimeCPP/solution_2/Dockerfile index d56ddc06a..e3a2dd0b0 100644 --- a/PrimeCPP/solution_2/Dockerfile +++ b/PrimeCPP/solution_2/Dockerfile @@ -5,8 +5,8 @@ RUN apt-get update -qq \ WORKDIR /opt/app COPY *.cpp . -RUN clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_array.cpp -oprimes_array -RUN clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_mask.cpp -oprimes_mask +RUN clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_array.cpp -oprimes_array \ + && clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_mask.cpp -oprimes_mask FROM ubuntu:22.04 diff --git a/PrimeCPP/solution_2/README.md b/PrimeCPP/solution_2/README.md index d4dd3405a..7c67d9449 100644 --- a/PrimeCPP/solution_2/README.md +++ b/PrimeCPP/solution_2/README.md @@ -8,13 +8,16 @@ ## Run instructions -(Linux): clang++ -march=native -mtune=native -Ofast -pthread -std=c++17 PrimeCPP_PAR.cpp -o Primes_clang++ && ./Primes_clang++ +(Linux): `./run.sh` +(Windows): `.\run.cmd` ## Output +```text Primes Benchmark (c) 2021 Dave's Garage - http://github.com/davepl/primes ------------------------------------------------------------------------- Computing primes to 1000000 on 24 threads for 5 seconds. Passes: 185267, Threads: 24, Time: 5.00074, Average: 2.69921e-05, Limit: 1000000, Counts: 78498/78498, Valid : Pass -davepl_par;185267;5.00074;24;algorithm=base,faithful=yes,bits=1 +davepl_array;185267;5.00074;24;algorithm=base,faithful=yes,bits=1 +```