Skip to content

Commit b98ef1f

Browse files
committed
Individualized names for graphs
Removed generated tables and images from "make clean" in etc/
1 parent fa4c862 commit b98ef1f

File tree

4 files changed

+13
-33
lines changed

4 files changed

+13
-33
lines changed

etc/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ graphs: tune get_limbsize
4949

5050
clean:
5151
rm -f *.log *.o *.obj *.exe pprime tune mersenne drprime mont 2kprime pprime.dat \
52-
tuning_list multiplying squaring readradix writeradix get_limbsize *png *.da *.dyn *.dpi *~
52+
tuning_list get_limbsize *.da *.dyn *.dpi *~
5353
rm -rf .libs
5454

5555
.PHONY: tune

etc/plot_graphs.gp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ set key top left;
77
set ylabel "Time"
88
set xlabel "Operand size (limbs)"
99

10-
set output "multiplying.png";
10+
set output "multiplying".ARG1.".png";
1111
set title "Comparing fast and slow multiplying [".ARG1." bits limbsize]";
12-
plot "multiplying" using 1:2 w lines t "slow", "multiplying" using 1:3 w lines t "fast"
12+
plot "multiplying".ARG1."" using 1:2 w lines t "slow", "multiplying".ARG1."" using 1:3 w lines t "fast"
1313

14-
set output "squaring.png";
14+
set output "squaring".ARG1.".png";
1515
set title "Comparing fast and slow squaring [".ARG1." bits limbsize]";
16-
plot "squaring" using 1:2 w lines t "slow", "squaring" using 1:3 w lines t "fast"
16+
plot "squaring".ARG1."" using 1:2 w lines t "slow", "squaring".ARG1."" using 1:3 w lines t "fast"
1717

1818
set xlabel "Operand size (bits)"
19-
set output "readradix.png";
19+
set output "readradix".ARG1.".png";
2020
set title "Comparing fast and slow radix conversion (reading) [".ARG1." bits limbsize]";
21-
plot "readradix" using 1:2 w lines t "slow", "readradix" using 1:3 w lines t "fast"
21+
plot "readradix".ARG1."" using 1:2 w lines t "slow", "readradix".ARG1."" using 1:3 w lines t "fast"
2222

23-
set output "writeradix.png";
23+
set output "writeradix".ARG1.".png";
2424
set title "Comparing fast and slow radix conversion (writing) [".ARG1." bits limbsize]";
25-
plot "writeradix" using 1:2 w lines t "slow", "writeradix" using 1:3 w lines t "fast"
25+
plot "writeradix".ARG1."" using 1:2 w lines t "slow", "writeradix".ARG1."" using 1:3 w lines t "fast"
2626

2727

2828

etc/tune_it.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if [ $# -eq 1 ]; then
119119
if [ $OPTION0 -lt 500 ]; then
120120
OPTION0=500
121121
fi
122-
"$MPWD"/tune -p -r $RLOOPS -L $LAG -S "$RNUM" -o $OFFSET -M $1 -s $TMP0,$TMP1,$TMP2,$TMP3,$TMP4,$TMP5
122+
"$MPWD"/tune -p -r $RLOOPS -L $LAG -S "$RNUM" -o $OFFSET -M $1 -G $(./get_limbsize) -s $TMP0,$TMP1,$TMP2,$TMP3,$TMP4,$TMP5
123123
fi
124124

125125

makefile.shared

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ tuneold: $(LIBNAME)
9999
cd etc/; /bin/sh tune_it.sh; cd ..
100100
$(MAKE) -f makefile.shared
101101

102+
# etc/tune.c uses hidden symbols, so we assume that only difference between the shared and static
103+
# libraries is just that: they are shared or static and simply build a static library to run
104+
# etc/tune
102105
tune:
103106
$(MAKE) -f makefile tune
104107
$(MAKE) -f makefile clean
@@ -116,32 +119,9 @@ graphsold: $(LIBNAME)
116119
cd ..
117120
$(MAKE) -f makefile.shared
118121

119-
120-
# Most of the substitution tricks do not work in Posix make and/or shell
121-
# so we do it by hand. (Yes, it has to be in one line)
122122
graphs:
123123
$(MAKE) -f makefile graphs
124-
cd etc/;\
125-
/bin/mv multiplying.png multiplying.png_backup;\
126-
/bin/mv squaring.png squaring.png_backup;\
127-
/bin/mv readradix.png readradix.png_backup;\
128-
/bin/mv writeradix.png writeradix.png_backup;\
129-
/bin/mv multiplying multiplying_backup;\
130-
/bin/mv squaring squaring_backup;\
131-
/bin/mv readradix readradix_backup;\
132-
/bin/mv writeradix writeradix_backup;\
133-
cd ..
134124
$(MAKE) -f makefile clean
135-
cd etc/;\
136-
/bin/mv multiplying.png_backup multiplying.png;\
137-
/bin/mv squaring.png_backup squaring.png;\
138-
/bin/mv readradix.png_backup readradix.png;\
139-
/bin/mv writeradix.png_backup writeradix.png;\
140-
/bin/mv multiplying_backup multiplying;\
141-
/bin/mv squaring_backup squaring;\
142-
/bin/mv readradix_backup readradix;\
143-
/bin/mv writeradix_backup writeradix;\
144-
cd ..
145125
$(MAKE) -f makefile.shared
146126

147127

0 commit comments

Comments
 (0)