From 0b1930307f41db3ea7552d6b2f4666b33c64d26a Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 9 Jun 2024 20:06:19 +0200 Subject: More cleanup --- old/moves_trans/gentranscode.sh | 42 ----------------------------------------- 1 file changed, 42 deletions(-) delete mode 100755 old/moves_trans/gentranscode.sh (limited to 'old/moves_trans/gentranscode.sh') diff --git a/old/moves_trans/gentranscode.sh b/old/moves_trans/gentranscode.sh deleted file mode 100755 index 198ac93..0000000 --- a/old/moves_trans/gentranscode.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -type="${1:-src}" - -gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type" -gcc -DDEBUG invert.c ../cube.c -o invert - -# Old version -genarray() { - for f in transform_??_???.txt; do - trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" - printf '[%s] = ' "$trans" - if [ "$1" = "-i" ]; then - ./invert <"$f" | ./h48_to_"$type" - else - ./h48_to_"$type" <"$f" - fi - printf ',\n' - done -} - -genfuncs() { - for f in transform_??_???.txt; do - trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" - printf 'static inline cube_fast_t\n_trans_%s' "$trans" - printf '(cube_fast_t c)\n{\n' - printf '\tcube_fast_t ret;\n\n' - printf '\tcube_fast_t tn = ' - ./h48_to_"$type" <"$f" | sed '2,4s/^/\t/' - printf ';\n\tcube_fast_t ti = ' - ./invert <"$f" | ./h48_to_"$type" | sed '2,4 s/^/\t/' - printf ';\n\n\tret = compose_fast(tn, c);\n' - printf '\tret = compose_fast(ret, ti);\n' - if [ -n "$(echo "$trans" | grep "m")" ]; then - printf '\tret = invertco_fast(ret);\n' - fi - printf '\n\treturn ret;\n}\n\n' - done -} - -genfuncs -rm -f h48_to_"$type" invert -- cgit v1.3