MCS = mcs -optimize+ MONO = mono all: plot1.svg plot2.svg plot1.svg: matrix1.cs Makefile cp -f $< matrix.cs make plot.times.svg cp -f plot.times.svg $@ plot2.svg: matrix2.cs Makefile cp -f $< matrix.cs make plot.times.svg cp -f plot.times.svg $@ plot1.jacobi.svg: matrix1.cs Makefile cp -f $< matrix.cs make plot.jacobi.svg cp -f plot.jacobi.svg $@ plot2.jacobi.svg: matrix2.cs Makefile cp -f $< matrix.cs make plot.jacobi.svg cp -f plot.jacobi.svg $@ plot.jacobi.svg: out.jacobi.txt Makefile echo '\ set term svg background rgb "white";\ set out "$@";\ set key left;\ set title "jacobi diagonalization times (`$(MCS) --version` `uname -m`)";\ set xlabel "matrix size n";\ set ylabel "diagonalization time t, sec";\ f(x)=b+(x/a)**c;\ b=0.7; a=20; c=3;\ fit f(x) "$<" via b,a;\ plot \ "$<" title "measurement" \ ,f(x) title sprintf("fit: (n/%.f)^{%.2f}+%.2f",a,c,b) \ '| gnuplot plot.times.svg: out.times.txt Makefile echo '\ set term svg background rgb "white";\ set out "$@";\ set key left;\ set title "matrix multiplication times (`$(MCS) --version` `uname -m`)";\ set xlabel "matrix size n";\ set ylabel "multiplication time t, sec";\ f(x)=b+(x/a)**c;\ b=0.7; a=20; c=3;\ fit f(x) "$<" via b,a;\ plot \ "$<" title "measurement" \ ,f(x) title sprintf("fit: (n/%.f)^{%.2f}+%.2f",a,c,b) \ '| gnuplot out.times.txt: matrix.exe cat /dev/null > $@ for n in `seq 193 10 293`; do \time -ao $@ -f "$$n %U" $(MONO) $< $$n; done out.jacobi.txt: jacobi.exe cat /dev/null > $@ for n in `seq 93 10 133`; do \time -ao $@ -f "$$n %U" $(MONO) $< $$n; done jacobi.exe: jacobi.cs matrix.cs vector.cs $(MCS) $^ -target:exe -main:jacobi matrix.exe: matrix.cs $(MCS) $< -target:exe clean: $(RM) *.svg out* *.exe *.dll