pfor/ctbenchmarks/run_ct

16 lines
365 B
Plaintext
Raw Permalink Normal View History

2021-05-10 16:11:23 +00:00
#!/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