aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/bench_multi_compilers.sh
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-03-09 16:13:47 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-03-09 16:13:47 +0000
commit9d9d81ad71a52c33ba4db9f8a6059d435d279316 (patch)
treed12a85ca594af99b04ce32f652ae67bf0baf228b /bench/bench_multi_compilers.sh
parentf64311e07de95694187e5d6d5d2e3cd118302076 (diff)
* basic support for multicore CPU via a .evalOMP() which
internaly uses OpenMP if enabled at compile time. * added a bench/ folder with a couple benchmarks and benchmark tools.
Diffstat (limited to 'bench/bench_multi_compilers.sh')
-rwxr-xr-xbench/bench_multi_compilers.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/bench/bench_multi_compilers.sh b/bench/bench_multi_compilers.sh
new file mode 100755
index 000000000..ce5586fb9
--- /dev/null
+++ b/bench/bench_multi_compilers.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if (($# < 2)); then
+ echo "Usage: $0 compilerlist.txt benchfile.cpp"
+else
+
+compilerlist=$1
+benchfile=$2
+
+g=0
+source $compilerlist
+
+# for each compiler, compile benchfile and run the benchmark
+for (( i=0 ; i<g ; ++i )) ; do
+ # check the compiler exists
+ compiler=`echo ${CLIST[$i]} | cut -d " " -f 1`
+ if [ -e `which $compiler` ]; then
+ echo "${CLIST[$i]}"
+# echo "${CLIST[$i]} $benchfile -I.. -o bench~"
+ if [ -e ./.bench ] ; then rm .bench; fi
+ ${CLIST[$i]} $benchfile -I.. -o .bench && ./.bench 2> /dev/null
+ echo ""
+ else
+ echo "compiler not found: $compiler"
+ fi
+done
+
+fi