diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | README.md | 26 | ||||
| -rwxr-xr-x | benchmark/bench.sh | 8 |
3 files changed, 32 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | config.mk | 1 | config.mk |
| 2 | benchmark/results.txt | 2 | benchmark/results |
| 3 | benchmark/run | 3 | benchmark/run |
| 4 | test/*/runtest | 4 | test/*/runtest |
| 5 | test/run | 5 | test/run |
| @@ -16,6 +16,32 @@ $ make test | |||
| 16 | * inverse_move | 16 | * inverse_move |
| 17 | * inverse_trans | 17 | * inverse_trans |
| 18 | 18 | ||
| 19 | ### Simple additions | ||
| 20 | |||
| 21 | * Write to AVX2-src format | ||
| 22 | * move() that takes a string (alg) as input | ||
| 23 | |||
| 24 | ### Changes | ||
| 25 | |||
| 26 | * write one function (static inline or public?) for each move (and trans) | ||
| 27 | * only call the specific functions in performance-critical steps (i.e. solve | ||
| 28 | - if the functions are static inline, all performance-critical steps must | ||
| 29 | be internal to cube.c) | ||
| 30 | * this also enables skipping some unnecessary work (e.g. flip edges, twist | ||
| 31 | corners) for many moves (and mirror transformations) | ||
| 32 | * add benchmarks with moves / trans called directly instead of via the | ||
| 33 | generic function | ||
| 34 | * keep generic move and trans functions with big switch case | ||
| 35 | * bring back constants into cube.c, and maybe also moves (TBD: what to | ||
| 36 | do with architecture-specific code? leave in separate files like now, | ||
| 37 | use just one file for each architecture...) | ||
| 38 | |||
| 39 | ### Documentation and interface | ||
| 40 | |||
| 41 | * remove the constant #define's from cube.h (write a comment instead) | ||
| 42 | * reconsider content of cube.h, remove some stuff | ||
| 43 | * remove doc folder, inline documentation as comments in cube.h or cube.c | ||
| 44 | |||
| 19 | ### AVX2 | 45 | ### AVX2 |
| 20 | 46 | ||
| 21 | * fix base get_ and set_ macros (constant arguments?) | 47 | * fix base get_ and set_ macros (constant arguments?) |
diff --git a/benchmark/bench.sh b/benchmark/bench.sh index 850909c..839515a 100755 --- a/benchmark/bench.sh +++ b/benchmark/bench.sh | |||
| @@ -1,14 +1,16 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | BENCHBIN="benchmark/run" | 3 | BENCHBIN="benchmark/run" |
| 4 | BENCHOUT="benchmark/results.txt" | 4 | BENCHDIR="benchmark/results" |
| 5 | CUBEOBJ="cube.o" | 5 | CUBEOBJ="cube.o" |
| 6 | 6 | ||
| 7 | cc -std=c99 -pthread -O3 -o $BENCHBIN benchmark/bench.c $CUBEOBJ || exit 1; | 7 | cc -std=c99 -pthread -O3 -o $BENCHBIN benchmark/bench.c $CUBEOBJ || exit 1; |
| 8 | 8 | ||
| 9 | $BENCHBIN | tee $BENCHOUT | 9 | d="$(date +'%Y-%m-%d-%H-%M-%S')" |
| 10 | mkdir -p "$BENCHDIR" | ||
| 11 | $BENCHBIN | tee "$BENCHDIR/results-$d.txt" "$BENCHDIR/results.txt" | ||
| 10 | 12 | ||
| 11 | echo "" | 13 | echo "" |
| 12 | echo "Results saved to $BENCHOUT" | 14 | echo "Results saved to $BENCHDIR/results.txt" |
| 13 | 15 | ||
| 14 | rm -rf $BENCHBIN $CUBEOBJ | 16 | rm -rf $BENCHBIN $CUBEOBJ |
