diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-19 10:40:49 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-19 10:40:49 +0100 |
| commit | 13275a4bb8696e730a4fffdd05b8e1d046e489c6 (patch) | |
| tree | 4db3ed3ada41158c451188c98e74fdde5ea296b2 /utils/gentranscode.sh | |
| parent | d6fdf14d5c320bdca455f910d58d652c5a7827da (diff) | |
| download | nissy-core-13275a4bb8696e730a4fffdd05b8e1d046e489c6.tar.gz nissy-core-13275a4bb8696e730a4fffdd05b8e1d046e489c6.zip | |
Simplified cube definition for move and transformations even more
Diffstat (limited to 'utils/gentranscode.sh')
| -rwxr-xr-x | utils/gentranscode.sh | 17 |
1 files changed, 9 insertions, 8 deletions
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 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | type="${1:-src}" | 3 | gcc -DDEBUG h48_to_lst.c ../cube.c -o h48_to_lst |
| 4 | |||
| 5 | gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type" | ||
| 6 | gcc -DDEBUG invert.c ../cube.c -o invert | 4 | gcc -DDEBUG invert.c ../cube.c -o invert |
| 7 | 5 | ||
| 8 | lineavx() { printf '#define _trans_cube_%s ' "$1"; } | 6 | lineavx() { printf '#define _trans_cube_%s ' "$1"; } |
| @@ -13,12 +11,15 @@ sedsrc() { sed '3s/$/ };/ ; 3q'; } | |||
| 13 | gen() { | 11 | gen() { |
| 14 | for f in transform_??_???.txt; do | 12 | for f in transform_??_???.txt; do |
| 15 | trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" | 13 | trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" |
| 16 | line$type "$trans" | 14 | printf '#define _trans_cube_%s fastcube( \\\n ' "$trans" |
| 17 | ./h48_to_"$type" <"$f" | sed$type | 15 | ./h48_to_lst <"$f" |
| 18 | line$type "${trans}_inverse" | 16 | printf ')\n' |
| 19 | ./invert <"$f" | ./h48_to_"$type" | sed$type | 17 | printf '#define _trans_cube_%s_inverse fastcube( \\\n ' \ |
| 18 | "$trans" | ||
| 19 | ./invert <"$f" | ./h48_to_lst | ||
| 20 | printf ')\n' | ||
| 20 | done | 21 | done |
| 21 | } | 22 | } |
| 22 | 23 | ||
| 23 | gen | 24 | gen |
| 24 | rm -f h48_to_"$type" invert | 25 | rm -f h48_to_lst invert |
