8 if test "x$TEST" = "xshort"; then
9 PR=165; PV=144; IX=115; IY=$IX
11 elif test "x$TEST" = "xmedium"; then
12 PR=901; PV=600; IX=500; IY=$IX
14 elif test "x$TEST" = "xlong"; then
15 PR=1651; PV=1440; IX=1151; IY=$IX
18 echo "usage: $0 [test-size]"
19 echo "test-size -- either short, medium, or long"
25 BIN_SNG=$DIR/sng/ctsimtext
26 BIN_OMP=$DIR/omp/ctsimtext
28 RUNTIME_REGEX="sed -r 's/^[^0-9]* ([0-9\.]+)[ a-z]*/\1/'"
29 for PHAN in herman; do
34 ts=`sh -c "$BIN_SNG phm2if ${phmbase}-sng.if $IX $IY --phantom $PHAN --nsample $NSAMPLE --verbose | tail -1 | $RUNTIME_REGEX"`
35 tm=`sh -c "$BIN_OMP phm2if ${phmbase}-omp.if $IX $IY --phantom $PHAN --nsample $NSAMPLE --verbose | tail -1 | $RUNTIME_REGEX"`
36 ratio=`bc <<< "scale=2; $ts / $tm"`
37 diff=`$BIN_SNG if2 ${phmbase}-omp.if ${phmbase}-sng.if --comp`
38 echo "Phantom,$PHAN,$tm,$ts,$ratio,\"$diff\""
40 for GEOM in equilinear equiangular parallel; do
41 ifbase=${phmbase}-${GEOM}
42 ts=`sh -c "$BIN_SNG phm2pj ${ifbase}-sng.pj $PR $PV --phantom $PHAN --verbose | tail -1 | $RUNTIME_REGEX"`
43 tm=`sh -c "$BIN_OMP phm2pj ${ifbase}-omp.pj $PR $PV --phantom $PHAN --verbose | tail -1 | $RUNTIME_REGEX"`
44 ratio=`bc <<< "scale=2; $ts / $tm"`
45 echo "Projection,$PHAN,$GEOM,$tm,$ts,$ratio"
47 for BP in idiff diff table trig; do
48 for INT in nearest linear cubic; do
49 recbase=${ifbase}-${BP}-${INT}
50 ts=`sh -c "$BIN_SNG pjrec ${ifbase}-sng.pj $recbase-sng.if $IX $IY --verbose --interp $INT --backproj $BP | tail -1 | $RUNTIME_REGEX"`
51 tm=`sh -c "$BIN_OMP pjrec ${ifbase}-omp.pj $recbase-omp.if $IX $IY --verbose --interp $INT --backproj $BP | tail -1 | $RUNTIME_REGEX"`
52 ratio=`bc <<< "scale=2; $ts / $tm"`
53 diff=`$BIN_SNG if2 $recbase-omp.if $recbase-sng.if --comp`
54 echo "Reconstruction,$PHAN,$GEOM,$BP,$INT,$tm,$ts,$ratio,\"$diff\""