
1 
#plot.speedup<function()


2 
#{


3 
# ref < 1


4 
#


5 
# file="timings.csv"


6 
# t<read.csv(file=file,header=TRUE)


7 
# a < t$real[ref]/t$real


8 
# file="timingsprime.csv"


9 
# tp<read.csv(file=file,header=TRUE)


10 
# ap < tp$real[ref]/tp$real


11 
# plot(t$n,a,type='b',xlab="# of threads",ylab="Speedup over single thread (laptop)",


12 
# xlim=c(0,t$n[nrow(t)]), ylim=c(0,t$n[nrow(t)]))


13 
# points(tp$n,ap,type='b',col="blue")


14 
# lines(c(0,t$n[nrow(t)]),c(0,t$n[nrow(t)]),lty="dotted")


15 
#


16 
#


17 
# x11()


18 
# file="katsuomsimpletimings.csv"


19 
# t<read.table(file=file,header=TRUE)


20 
# a < t$real[ref]/t$real


21 
# plot(t$n,a,type='b',xlab="# of threads",ylab="Speedup over single thread (katsuo)",


22 
# xlim=c(0,t$n[nrow(t)]), ylim=c(0,t$n[nrow(t)]))


23 
# lines(c(0,t$n[nrow(t)]),c(0,t$n[nrow(t)]),lty="dotted")


24 
#


25 
#}


26 


27 
plot.speedup<function(file)


28 
{


29 
ref < 1


30 


31 
t<read.table(file=file,header=TRUE)


32 
a < t$real[ref]/t$real


33 
plot(t$n,a,type='b',xlab="# of threads",ylab="Speedup over single thread",


34 
xlim=c(0,t$n[nrow(t)]), ylim=c(0,t$n[nrow(t)]),main=file)


35 
lines(c(0,t$n[nrow(t)]),c(0,t$n[nrow(t)]),lty="dotted",lwd=2)


36 
}
