Skip to content

Commit

Permalink
Individualized names for graphs
Browse files Browse the repository at this point in the history
Removed generated tables and images from "make clean" in etc/
  • Loading branch information
czurnieden committed Jun 13, 2024
1 parent fa4c862 commit b98ef1f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 33 deletions.
2 changes: 1 addition & 1 deletion etc/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ graphs: tune get_limbsize

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

.PHONY: tune
16 changes: 8 additions & 8 deletions etc/plot_graphs.gp
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ set key top left;
set ylabel "Time"
set xlabel "Operand size (limbs)"

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

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

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

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



Expand Down
2 changes: 1 addition & 1 deletion etc/tune_it.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if [ $# -eq 1 ]; then
if [ $OPTION0 -lt 500 ]; then
OPTION0=500
fi
"$MPWD"/tune -p -r $RLOOPS -L $LAG -S "$RNUM" -o $OFFSET -M $1 -s $TMP0,$TMP1,$TMP2,$TMP3,$TMP4,$TMP5
"$MPWD"/tune -p -r $RLOOPS -L $LAG -S "$RNUM" -o $OFFSET -M $1 -G $(./get_limbsize) -s $TMP0,$TMP1,$TMP2,$TMP3,$TMP4,$TMP5
fi


Expand Down
26 changes: 3 additions & 23 deletions makefile.shared
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ tuneold: $(LIBNAME)
cd etc/; /bin/sh tune_it.sh; cd ..
$(MAKE) -f makefile.shared

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


# Most of the substitution tricks do not work in Posix make and/or shell
# so we do it by hand. (Yes, it has to be in one line)
graphs:
$(MAKE) -f makefile graphs
cd etc/;\
/bin/mv multiplying.png multiplying.png_backup;\
/bin/mv squaring.png squaring.png_backup;\
/bin/mv readradix.png readradix.png_backup;\
/bin/mv writeradix.png writeradix.png_backup;\
/bin/mv multiplying multiplying_backup;\
/bin/mv squaring squaring_backup;\
/bin/mv readradix readradix_backup;\
/bin/mv writeradix writeradix_backup;\
cd ..
$(MAKE) -f makefile clean
cd etc/;\
/bin/mv multiplying.png_backup multiplying.png;\
/bin/mv squaring.png_backup squaring.png;\
/bin/mv readradix.png_backup readradix.png;\
/bin/mv writeradix.png_backup writeradix.png;\
/bin/mv multiplying_backup multiplying;\
/bin/mv squaring_backup squaring;\
/bin/mv readradix_backup readradix;\
/bin/mv writeradix_backup writeradix;\
cd ..
$(MAKE) -f makefile.shared


Expand Down

0 comments on commit b98ef1f

Please sign in to comment.