====================================== Possible Solution and another Exercise [TOC] ====================================== Source Code =========== :import: session11/gemv_sol.c Test Run ======== ---- SHELL (path=session11/,hostname=heim) ------------------------------------- gcc -Wall -std=c11 -O3 -DCOLMAJOR=1 -DMAX_M=3000 -o gemv gemv_sol.c ./gemv | tee gemv_colmajor.dat -------------------------------------------------------------------------------- Using the gnuplot script ---- CODE (file=session11/gemv.plot) ------------------------------------------- set terminal svg size 900, 500 set output "bench.gemv.svg" set xlabel "Matrix dimension M=N" set ylabel "MFLOPS" set yrange [0:12000] set title "GEMV (col major)" set key outside set pointsize 0.5 plot "gemv_colmajor.dat" using 1:4 with linespoints lt 2 lw 3 title "dgemv_ref", \ "gemv_colmajor.dat" using 1:6 with linespoints lt 3 lw 3 title "dgemv_dot", \ "gemv_colmajor.dat" using 1:9 with linespoints lt 4 lw 3 title "dgemv_axpy", \ "gemv_colmajor.dat" using 1:12 with linespoints lt 7 lw 3 title "dgemv_dotf", \ "gemv_colmajor.dat" using 1:15 with linespoints lt 8 lw 3 title "dgemv_axpyf" -------------------------------------------------------------------------------- and running it through gnuplot ---- SHELL(path=session11/,hostname=heim) -------------------------------------- gnuplot gemv.plot -------------------------------------------------------------------------------- gives ---- IMAGE ----------------------- session11/bench.gemv.svg ---------------------------------- Exercise (Gnuplot) ================== Use gnuplot to visualize benchmark results for the row major case. Exercise (Fuse Factor) ====================== Find the best fuse factor for axpyf and dotf.