threads = 1
stride = 2
arch = "x86_64"
node = "pc"

#############################################################################
# set terminal svg enhanced size 900 480
# set output "arrtype.svg"
# set xlabel "pixels"
# set ylabel "seconds / pixel"
# set title "time of DWT decomposition"
# set format x "%.1s%c"
# set format y "%.1s%c"
# set logscale x
# set logscale y
# 
# plot \
# 	"data/arch=x86_64.node=pc.dir=fwd.threads=2.accel=9.opt-stride=1.j=-1.arr=simple.workers=1.type=float.txt" with lines lc rgb "#ff0000" title "simple", \
# 	"data/arch=x86_64.node=pc.dir=fwd.threads=2.accel=9.opt-stride=1.j=-1.arr=sparse.workers=1.type=float.txt" with lines lc rgb "#00ff00" title "sparse", \
# 	"data/arch=x86_64.node=pc.dir=fwd.threads=2.accel=9.opt-stride=1.j=-1.arr=packed.workers=1.type=float.txt" with lines lc rgb "#0000ff" title "packed"

#############################################################################
# set terminal svg enhanced size 640 420
# set output "optstride.svg"
# set xlabel "pixels"
# set ylabel "seconds / pixel"
# # set title "time of DWT decomposition"
# set format x "%.1s%c"
# set format y "%.1s%c"
# set logscale x
# set logscale y
# 
# plot \
# 	sprintf("data/arch=x86_64.node=pc.dir=fwd.threads=%d.accel=9.opt-stride=0.j=1.arr=packed.workers=1.type=float.txt", threads) with lines lc rgb "#ff0000" lw 2 title "non-optimal stride (0)", \
# 	sprintf("data/arch=x86_64.node=pc.dir=fwd.threads=%d.accel=9.opt-stride=1.j=1.arr=packed.workers=1.type=float.txt", threads) with lines lc rgb "#0000ff" lw 2 title "prime stride (1)", \
# 	sprintf("data/arch=x86_64.node=pc.dir=fwd.threads=%d.accel=9.opt-stride=2.j=1.arr=packed.workers=1.type=float.txt", threads) with lines lc rgb "#00ffff" lw 2 title "prime-set stride (2)"

#############################################################################
# set terminal svg enhanced size 900 480
# set output "threads.svg"
# set xlabel "pixels"
# set ylabel "seconds / pixel"
# set title "time of DWT decomposition"
# set format x "%.1s%c"
# set format y "%.1s%c"
# set logscale x
# set logscale y
# 
# plot \
# 	"data/arch=x86_64.node=pc.dir=fwd.threads=1.accel=9.opt-stride=1.j=-1.arr=packed.workers=1.type=float.txt" with lines lc rgb "#ff0000" title "1 thread", \
# 	"data/arch=x86_64.node=pc.dir=fwd.threads=2.accel=9.opt-stride=1.j=-1.arr=packed.workers=1.type=float.txt" with lines lc rgb "#0000ff" title "2 threads"

#############################################################################
set terminal svg enhanced size 640 420
set output "accel.svg"
set xlabel "pixels"
set ylabel "seconds / pixel"
# set title "time of DWT decomposition"
set format x "%.1s%c"
set format y "%.1s%c"
set logscale x
set logscale y

plot \
	sprintf("data/arch=%s.node=%s.dir=fwd.threads=%d.accel=0.opt-stride=%d.j=1.arr=packed.workers=1.type=float.txt", arch, node, threads, stride) with lines lc rgb "#ff0000" lw 2 title "ML (0)", \
	sprintf("data/arch=%s.node=%s.dir=fwd.threads=%d.accel=9.opt-stride=%d.j=1.arr=packed.workers=1.type=float.txt", arch, node, threads, stride) with lines lc rgb "#0f0f0f" lw 2 title "SDL (9)", \
	sprintf("data/arch=%s.node=%s.dir=fwd.threads=%d.accel=11.opt-stride=%d.j=1.arr=packed.workers=4.type=float.txt", arch, node, threads, stride) with lines lc rgb "#00ff00" lw 2 title "DL4 (11)", \
	sprintf("data/arch=%s.node=%s.dir=fwd.threads=%d.accel=12.opt-stride=%d.j=1.arr=packed.workers=4.type=float.txt", arch, node, threads, stride) with lines lc rgb "#ff8000" lw 2 title "ML4 (12)", \
	sprintf("data/arch=%s.node=%s.dir=fwd.threads=%d.accel=13.opt-stride=%d.j=1.arr=packed.workers=1.type=float.txt", arch, node, threads, 2) with lines lc rgb "#C0C0C0" lw 2 title "(2) ML no-sse (13)"
