pfor/ctbenchmarks/run_ct
2021-05-10 18:11:23 +02:00

16 lines
365 B
Bash
Executable File

#!/bin/bash
repetitions=$1; shift
cxx=g++
for mode in $*; do
:>"data/ct_${mode}"
for f in $(ls srcs|grep -E "^main_${mode}_[0-9]+.cpp"); do
n=$(echo ${f}|cut -d'_' -f5|cut -d'.' -f1)
for i in $(seq ${repetitions}); do
echo>>"data/ct_${mode}" "${n}:$( (time -p ${cxx} -O2 -pthread -I../src -o build/null "srcs/${f}") 2>&1|tr '\n' ':')"
done
done
done