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