diff options
Diffstat (limited to 'utils')
| -rwxr-xr-x | utils/genmovecode.sh | 6 | ||||
| -rwxr-xr-x | utils/gentranscode.sh | 8 | ||||
| -rw-r--r-- | utils/h48_to_avx.c | 2 | ||||
| -rw-r--r-- | utils/h48_to_src.c | 2 | ||||
| -rw-r--r-- | utils/invert.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/utils/genmovecode.sh b/utils/genmovecode.sh index c389ea8..688ee39 100755 --- a/utils/genmovecode.sh +++ b/utils/genmovecode.sh | |||
| @@ -2,16 +2,16 @@ | |||
| 2 | 2 | ||
| 3 | type="${1:-src}" | 3 | type="${1:-src}" |
| 4 | 4 | ||
| 5 | gcc -DDEBUG h48_to_"$type".c ../src/cube.c -o h48_to_"$type" | 5 | gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type" |
| 6 | 6 | ||
| 7 | genfuncs() { | 7 | genfuncs() { |
| 8 | for f in move_??_*.txt; do | 8 | for f in move_??_*.txt; do |
| 9 | move="$(echo $f | sed 's/.*_// ; s/\.txt//')" | 9 | move="$(echo $f | sed 's/.*_// ; s/\.txt//')" |
| 10 | printf 'static inline cube_t\ninline_move_%s' "$move" | 10 | printf 'static inline cube_t\n_move_%s' "$move" |
| 11 | printf '(cube_t c)\n{\n' | 11 | printf '(cube_t c)\n{\n' |
| 12 | printf '\tcube_t m = ' | 12 | printf '\tcube_t m = ' |
| 13 | ./h48_to_"$type" <"$f" | sed '2,4s/^/\t/' | 13 | ./h48_to_"$type" <"$f" | sed '2,4s/^/\t/' |
| 14 | printf ';\n\n\treturn compose(c, m);\n}\n\n' | 14 | printf ';\n\n\treturn _compose(c, m);\n}\n\n' |
| 15 | done | 15 | done |
| 16 | } | 16 | } |
| 17 | 17 | ||
diff --git a/utils/gentranscode.sh b/utils/gentranscode.sh index 7749ba7..2f73df7 100755 --- a/utils/gentranscode.sh +++ b/utils/gentranscode.sh | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | type="${1:-src}" | 3 | type="${1:-src}" |
| 4 | 4 | ||
| 5 | gcc -DDEBUG h48_to_"$type".c ../src/cube.c -o h48_to_"$type" | 5 | gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type" |
| 6 | gcc -DDEBUG invert.c ../src/cube.c -o invert | 6 | gcc -DDEBUG invert.c ../cube.c -o invert |
| 7 | 7 | ||
| 8 | # Old version | 8 | # Old version |
| 9 | genarray() { | 9 | genarray() { |
| @@ -22,7 +22,7 @@ genarray() { | |||
| 22 | genfuncs() { | 22 | 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\n_trans_%s' "$trans" |
| 26 | printf '(cube_t c)\n{\n' | 26 | printf '(cube_t c)\n{\n' |
| 27 | printf '\tcube_t ret;\n\n' | 27 | printf '\tcube_t ret;\n\n' |
| 28 | printf '\tcube_t tn = ' | 28 | printf '\tcube_t tn = ' |
| @@ -32,7 +32,7 @@ genfuncs() { | |||
| 32 | printf ';\n\n\tret = compose(tn, c);\n' | 32 | printf ';\n\n\tret = compose(tn, c);\n' |
| 33 | printf '\tret = compose(ret, ti);\n' | 33 | printf '\tret = compose(ret, ti);\n' |
| 34 | if [ -n "$(echo "$trans" | grep "m")" ]; then | 34 | if [ -n "$(echo "$trans" | grep "m")" ]; then |
| 35 | printf '\tret = flipallcorners(ret);\n' | 35 | printf '\tret = _invertco(ret);\n' |
| 36 | fi | 36 | fi |
| 37 | printf '\n\treturn ret;\n}\n\n' | 37 | printf '\n\treturn ret;\n}\n\n' |
| 38 | done | 38 | done |
diff --git a/utils/h48_to_avx.c b/utils/h48_to_avx.c index e1d8c2e..e5df2aa 100644 --- a/utils/h48_to_avx.c +++ b/utils/h48_to_avx.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #include <inttypes.h> | 2 | #include <inttypes.h> |
| 3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
| 4 | 4 | ||
| 5 | #include "../src/cube.h" | 5 | #include "../cube.h" |
| 6 | 6 | ||
| 7 | #define STRLENMAX 1000 | 7 | #define STRLENMAX 1000 |
| 8 | 8 | ||
diff --git a/utils/h48_to_src.c b/utils/h48_to_src.c index 97ee4bf..a8fda00 100644 --- a/utils/h48_to_src.c +++ b/utils/h48_to_src.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #include <inttypes.h> | 2 | #include <inttypes.h> |
| 3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
| 4 | 4 | ||
| 5 | #include "../src/cube.h" | 5 | #include "../cube.h" |
| 6 | 6 | ||
| 7 | #define STRLENMAX 1000 | 7 | #define STRLENMAX 1000 |
| 8 | 8 | ||
diff --git a/utils/invert.c b/utils/invert.c index 3088273..aa912e5 100644 --- a/utils/invert.c +++ b/utils/invert.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #include <inttypes.h> | 2 | #include <inttypes.h> |
| 3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
| 4 | 4 | ||
| 5 | #include "../src/cube.h" | 5 | #include "../cube.h" |
| 6 | 6 | ||
| 7 | #define STRLENMAX 1000 | 7 | #define STRLENMAX 1000 |
| 8 | 8 | ||
