-rwxr-xr-x 987 djbsort-20180710/verif/verifymany
#!/bin/sh -e
version=`cat ../version`
tmp=../link-build/verify-$version
rm -rf $tmp
mkdir -p $tmp
for n in `seq 1 512`
do
echo "n=$n:"
for lib in ../link-install/lib-*
do
[ x"$lib" = x"../link-install/lib-x86" ] && continue
c=`cat $lib/compiler`
echo "lib=$lib compiler=$c"
echo '
#include <stdio.h>
#include "int32_sort.h"
int32_t symbolic['$n'];
int main()
{
long long i;
int32_sort(symbolic,'$n');
for (i = 0;i < '$n';++i) printf("%d\\n",symbolic[i]);
return 0;
}
' > $tmp/symbolic.c
time $c \
-L $lib -Wl,-rpath=$lib \
-I $lib/include \
-o $tmp/symbolic $tmp/symbolic.c \
-l djbsort
time ./unroll symbolic $n $tmp/symbolic > $tmp/unroll
time ./tryinput $n < $tmp/unroll > $tmp/input
time python3 $tmp/input
time ./minmax $n < $tmp/unroll > $tmp/minmax
time ./tryinput $n < $tmp/minmax > $tmp/input
time python3 $tmp/input
time ./decompose $n int32_sort_symbolic < $tmp/minmax
done
done