aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-02 22:17:14 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-02 22:17:14 +0100
commit9b1c9371333e20611ec5422e660ebec7e66c4261 (patch)
tree4d0d0dbb27056871ab7c81c2903899e4e639b566 /utils
parenta61382e9dec22ea1ff3fea2d59d3c605c0aa2aac (diff)
downloadnissy-core-9b1c9371333e20611ec5422e660ebec7e66c4261.tar.gz
nissy-core-9b1c9371333e20611ec5422e660ebec7e66c4261.zip
Added avx2 moves
Diffstat (limited to '')
-rwxr-xr-xutils/genmovecode.sh19
-rwxr-xr-xutils/gentranscode.sh1
2 files changed, 19 insertions, 1 deletions
diff --git a/utils/genmovecode.sh b/utils/genmovecode.sh
new file mode 100755
index 0000000..c389ea8
--- /dev/null
+++ b/utils/genmovecode.sh
@@ -0,0 +1,19 @@
1#!/bin/sh
2
3type="${1:-src}"
4
5gcc -DDEBUG h48_to_"$type".c ../src/cube.c -o h48_to_"$type"
6
7genfuncs() {
8 for f in move_??_*.txt; do
9 move="$(echo $f | sed 's/.*_// ; s/\.txt//')"
10 printf 'static inline cube_t\ninline_move_%s' "$move"
11 printf '(cube_t c)\n{\n'
12 printf '\tcube_t m = '
13 ./h48_to_"$type" <"$f" | sed '2,4s/^/\t/'
14 printf ';\n\n\treturn compose(c, m);\n}\n\n'
15 done
16}
17
18genfuncs
19rm -f h48_to_"$type" invert
diff --git a/utils/gentranscode.sh b/utils/gentranscode.sh
index e874ad4..7749ba7 100755
--- a/utils/gentranscode.sh
+++ b/utils/gentranscode.sh
@@ -23,7 +23,6 @@ genfuncs() {
23 for f in transform_??_???.txt; do 23 for f in transform_??_???.txt; do
24 trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" 24 trans="$(echo $f | sed 's/.*_// ; s/\.txt//')"
25 printf 'static inline cube_t\ninline_trans_%s' "$trans" 25 printf 'static inline cube_t\ninline_trans_%s' "$trans"
26 [ "$1" = "-i" ] && printf '_inverse'
27 printf '(cube_t c)\n{\n' 26 printf '(cube_t c)\n{\n'
28 printf '\tcube_t ret;\n\n' 27 printf '\tcube_t ret;\n\n'
29 printf '\tcube_t tn = ' 28 printf '\tcube_t tn = '

Generated with cgit - Back to sebastiano.tronto.net