File tree 2 files changed +14
-4
lines changed 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
1
3
IF " %1 " == " " || " %1 " == " 1" || " %1 " == " array" (
4
+ ECHO Building and running the array approach...
5
+ ECHO(
2
6
g++ -Ofast PrimeCPP_array.cpp -std=c++17 -lstdc++ -oPrimes_array.exe
3
7
.\Primes_array.exe
8
+ ECHO(
4
9
)
5
10
6
11
IF " %1 " == " " || " %1 " == " 2" || " %1 " == " mask" (
12
+ ECHO Building and running the mask approach...
13
+ ECHO(
7
14
g++ -Ofast PrimeCPP_mask.cpp -std=c++17 -lstdc++ -oPrimes_mask.exe
8
15
.\Primes_mask.exe
16
+ ECHO(
9
17
)
Original file line number Diff line number Diff line change 4
4
# gcc -Ofast -std=c++17 PrimeCPP.cpp -lc++ -oPrimes_gcc.exe
5
5
# clang -Ofast -std=c++17 -lc++ PrimeCPP.cpp -oPrimes_clang.exe
6
6
7
- if [[ " $# " -eq " 0 " -o " $1 " -eq " 1 " -o " $1 " -eq " array" ]]; then
8
- echo " Building and running the array approach"
7
+ if [[ $# == 0 || $1 == 1 || $1 == array ]]; then
8
+ echo -e " Building and running the array approach...\n "
9
9
clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_array.cpp -oprimes_array.exe
10
10
./primes_array.exe
11
+ echo
11
12
fi
12
13
13
- if [[ " $# " -eq " 0 " -o " $1 " -eq " 2 " -o " $1 " -eq " mask" ]]; then
14
- echo " Building and running the mask approach"
14
+ if [[ $# == 0 || $1 == 2 || $1 == mask ]]; then
15
+ echo -e " Building and running the mask approach...\n "
15
16
clang++ -march=native -mtune=native -pthread -Ofast -std=c++17 PrimeCPP_mask.cpp -oprimes_mask.exe
16
17
./primes_mask.exe
18
+ echo
17
19
fi
You can’t perform that action at this time.
0 commit comments