#!/bin/csh
#  Lab #5 example script

echo uninstrumented timings...
cc -DN=256 -DOFFSET=0 -DFILLER=0  -O3 matmul.c -o matmul
matmul

cc -DN=256 -DOFFSET=0 -DFILLER=0  -O3 transpos.c -o transpos
transpos


echo do instrumented run for N=251
echo compiling matmul
cc -DN=251 -DOFFSET=0 -DFILLER=0  -Wl,-r -non_shared -no_inline -O3 matmul.c -o matmul.rr
atom matmul.rr instr2.c analy2.c -o matmul.atomd
ld matmul.rr -o matmul
echo uninstrumented run
matmul
echo instrumented run
matmul.atomd | dinero -i8K -d8K -b32 -ww -An -a1 -B8 -W8 -z100000000000 

echo do instrumented run for N=251
echo compiling transpos
cc -DN=251 -DOFFSET=0 -DFILLER=0  -Wl,-r -non_shared -no_inline -O3 transpos.c -o transpos.rr
atom transpos.rr instr2.c analy2.c -o transpos.atomd
ld transpos.rr -o transpos
echo uninstrumented run
transpos
echo instrumented run
transpos.atomd | dinero -i8K -d8K -b32 -ww -An -a1 -B8 -W8 -z100000000000 

