From 13275a4bb8696e730a4fffdd05b8e1d046e489c6 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 19 Nov 2023 10:40:49 +0100 Subject: Simplified cube definition for move and transformations even more --- utils/gentranscode.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'utils/gentranscode.sh') diff --git a/utils/gentranscode.sh b/utils/gentranscode.sh index b9d41b6..f9aeb7b 100755 --- a/utils/gentranscode.sh +++ b/utils/gentranscode.sh @@ -1,8 +1,6 @@ #!/bin/sh -type="${1:-src}" - -gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type" +gcc -DDEBUG h48_to_lst.c ../cube.c -o h48_to_lst gcc -DDEBUG invert.c ../cube.c -o invert lineavx() { printf '#define _trans_cube_%s ' "$1"; } @@ -13,12 +11,15 @@ sedsrc() { sed '3s/$/ };/ ; 3q'; } gen() { for f in transform_??_???.txt; do trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" - line$type "$trans" - ./h48_to_"$type" <"$f" | sed$type - line$type "${trans}_inverse" - ./invert <"$f" | ./h48_to_"$type" | sed$type + printf '#define _trans_cube_%s fastcube( \\\n ' "$trans" + ./h48_to_lst <"$f" + printf ')\n' + printf '#define _trans_cube_%s_inverse fastcube( \\\n ' \ + "$trans" + ./invert <"$f" | ./h48_to_lst + printf ')\n' done } gen -rm -f h48_to_"$type" invert +rm -f h48_to_lst invert -- cgit v1.3