aboutsummaryrefslogtreecommitdiff
path: root/utils/gentranscode.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-19 10:40:49 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-19 10:40:49 +0100
commit13275a4bb8696e730a4fffdd05b8e1d046e489c6 (patch)
tree4db3ed3ada41158c451188c98e74fdde5ea296b2 /utils/gentranscode.sh
parentd6fdf14d5c320bdca455f910d58d652c5a7827da (diff)
downloadnissy-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-xutils/gentranscode.sh17
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
3type="${1:-src}" 3gcc -DDEBUG h48_to_lst.c ../cube.c -o h48_to_lst
4
5gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type"
6gcc -DDEBUG invert.c ../cube.c -o invert 4gcc -DDEBUG invert.c ../cube.c -o invert
7 5
8lineavx() { printf '#define _trans_cube_%s ' "$1"; } 6lineavx() { printf '#define _trans_cube_%s ' "$1"; }
@@ -13,12 +11,15 @@ sedsrc() { sed '3s/$/ };/ ; 3q'; }
13gen() { 11gen() {
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
23gen 24gen
24rm -f h48_to_"$type" invert 25rm -f h48_to_lst invert

Generated with cgit - Back to sebastiano.tronto.net