-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot.R
46 lines (29 loc) · 932 Bytes
/
plot.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#Q = read.csv("results.gpus.slot3.txt",sep=",")
#Q = read.csv("results.2.txt",sep=",")
#Q = read.csv("gpuredo.txt",sep=",")
Q = read.csv("result.trnosmt.txt",sep=",")
Types = unique(Q$TYPE)
for (T in Types) {
if (FILE) png(paste(T,".png",sep=""))
Single = subset(Q, TYPE==T)
algs = unique(Single$NAME)
Algs =list()
for (a in algs) {
Algs[[a]] = subset(Single, NAME==a)
}
S = unique(Single$SIZE)
range = S*0.0 + min(Single$HOT)
range[1] = max(Single$HOT)
C = c("darkblue","darkgreen", "darkred", "blue","green","red", "turquoise", "yellow", "orange")
plot(S,range, type='n', col='white', main=T, ylab="GFLOPS", xlab="Size")
i = 1
for (a in algs) {
w = Algs[[a]]
str(w)
lines(w$SIZE, w$HOT, col=C[i])
i = i +1
}
legend("topleft", legend=algs,col=C,lwd=3)
if (FILE) dev.off()
else X11()
}