comparison CbC-examples/conv1/benchmark.sh @ 106:85047c4f1ca4

add CbC-examples/rectypeTest
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Wed, 13 Jun 2012 17:18:58 +0900
parents 0b0b0782e795
children
comparison
equal deleted inserted replaced
105:b3cfc7733d3f 106:85047c4f1ca4
1 #!/usr/bin/env zsh 1 #!/usr/bin/env zsh
2 2
3 time=/usr/bin/time 3 time=/usr/bin/time
4 CONV1=./conv1 4 CONV1=./a.out
5 num=10 5 num=10
6 6
7 count=0 7 count=0
8 amount=0 8 amount=0
9 max=0
10 min=99999
9 11
10 echo "$CONV1 $1" 12 echo "$CONV1 $1"
11 while [[ $count -lt $num ]]; do 13 while [[ $count -lt $num ]]; do
12 # /usr/bin/time -p ./conv1 1 2>&1 >& - |grep '^user'|tr -s " "|cut -f2 -d" " 14 # /usr/bin/time -p ./conv1 1 2>&1 >& - |grep '^user'|tr -s " "|cut -f2 -d" "
13 usertime=$( $time -p $CONV1 $1 2>&1 >& - |grep '^user'|tr -s " " |cut -f2 -d" ") 15 usertime=$( $time -p $CONV1 $1 2>&1 >& - |grep '^user'|tr -s " " |cut -f2 -d" ")
28 echo "mintime = $min" 30 echo "mintime = $min"
29 31
30 32
31 amount=$(($amount - $max - $min)) 33 amount=$(($amount - $max - $min))
32 echo "amount time - mintime - maxtime = $amount" 34 echo "amount time - mintime - maxtime = $amount"
33 #count=$(($count-2)) 35 count=$(($count-2))
34 echo "count = $count" 36 echo "count = $count"
35 averagetime=$(($amount/($count))) 37 averagetime=$(($amount/($count)))
36 echo "average time = $averagetime" 38 echo "average time = $averagetime"
37 39