diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-10 14:44:48 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-10 14:44:48 +0100 |
| commit | fb9ae9e41eaf01b3651395fdd450ac1a4743e592 (patch) | |
| tree | 8fb29e9b62d40d6407f082f55a7164775154bf78 /utils/gentranscode.sh | |
| parent | 04c3ee1f5acac47650be8d0ffbf90e238df0d12b (diff) | |
| download | nissy-core-fb9ae9e41eaf01b3651395fdd450ac1a4743e592.tar.gz nissy-core-fb9ae9e41eaf01b3651395fdd450ac1a4743e592.zip | |
Big changes to the interface
Diffstat (limited to 'utils/gentranscode.sh')
| -rwxr-xr-x | utils/gentranscode.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/gentranscode.sh b/utils/gentranscode.sh index 2f73df7..198ac93 100755 --- a/utils/gentranscode.sh +++ b/utils/gentranscode.sh | |||
| @@ -22,17 +22,17 @@ 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\n_trans_%s' "$trans" | 25 | printf 'static inline cube_fast_t\n_trans_%s' "$trans" |
| 26 | printf '(cube_t c)\n{\n' | 26 | printf '(cube_fast_t c)\n{\n' |
| 27 | printf '\tcube_t ret;\n\n' | 27 | printf '\tcube_fast_t ret;\n\n' |
| 28 | printf '\tcube_t tn = ' | 28 | printf '\tcube_fast_t tn = ' |
| 29 | ./h48_to_"$type" <"$f" | sed '2,4s/^/\t/' | 29 | ./h48_to_"$type" <"$f" | sed '2,4s/^/\t/' |
| 30 | printf ';\n\tcube_t ti = ' | 30 | printf ';\n\tcube_fast_t ti = ' |
| 31 | ./invert <"$f" | ./h48_to_"$type" | sed '2,4 s/^/\t/' | 31 | ./invert <"$f" | ./h48_to_"$type" | sed '2,4 s/^/\t/' |
| 32 | printf ';\n\n\tret = compose(tn, c);\n' | 32 | printf ';\n\n\tret = compose_fast(tn, c);\n' |
| 33 | printf '\tret = compose(ret, ti);\n' | 33 | printf '\tret = compose_fast(ret, ti);\n' |
| 34 | if [ -n "$(echo "$trans" | grep "m")" ]; then | 34 | if [ -n "$(echo "$trans" | grep "m")" ]; then |
| 35 | printf '\tret = _invertco(ret);\n' | 35 | printf '\tret = invertco_fast(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 |
