diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2022-06-01 16:42:54 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2022-06-01 16:42:54 +0200 |
| commit | 71a6ce24cfb000f27d7133bb00dbba860a2320b7 (patch) | |
| tree | 02da1147c417b55dad8029b5272402021a136610 | |
| parent | a13d749f7e19eb1b1fc8d178610ba269df6cfe84 (diff) | |
| download | nissy-71a6ce24cfb000f27d7133bb00dbba860a2320b7.tar.gz nissy-71a6ce24cfb000f27d7133bb00dbba860a2320b7.zip | |
Fixed error in block size for ptables
| -rw-r--r-- | TODO.md | 35 | ||||
| -rwxr-xr-x | nissy | bin | 332048 -> 332048 bytes | |||
| -rw-r--r-- | src/pruning.c | 5 |
3 files changed, 20 insertions, 20 deletions
| @@ -3,30 +3,17 @@ | |||
| 3 | This is a list of things that I would like to add or change at some point. | 3 | This is a list of things that I would like to add or change at some point. |
| 4 | It's more of a personal reminder than anything else. | 4 | It's more of a personal reminder than anything else. |
| 5 | 5 | ||
| 6 | ## For version 2.1 | 6 | ## Version 2.0.2 |
| 7 | ### Moving coordinates | 7 | * General idea: only improvement on generating pruning tables, no new |
| 8 | * general cleanup | 8 | commands or anything else |
| 9 | ### Changes to Step and Solve | ||
| 10 | * add a list of "helper" coordinates to every step | ||
| 11 | * Probably nicer: instead of passing a cube pass a structure "cube description" | ||
| 12 | which can contain coordinates and one or more cubes. | ||
| 13 | This can also be used to avoid using index_epud too much in drfin | ||
| 14 | (it is slow because it goes through cubearray). | ||
| 15 | * add a step->move(Cube) function, which may apply moves to the cube or just to | ||
| 16 | the coordinates | ||
| 17 | * optimal solver: move the coordinates for the 3 orientations, but also the | ||
| 18 | cube so we can check the inverse | ||
| 19 | ### Tables management | 9 | ### Tables management |
| 20 | * Check files in tables directory, add command to remove old / extraneous files | 10 | * Check files in tables directory, add command to remove old / extraneous files |
| 21 | * Add checksum to check that tables are generated / downloaded correctly | 11 | * Add checksum to check that tables are generated / downloaded correctly |
| 22 | ### Documentation | 12 | ### Documentation |
| 23 | * Fix README.md with new coordinate system | ||
| 24 | * Write an examples.md file | 13 | * Write an examples.md file |
| 25 | * More screenshots! | 14 | * More screenshots! |
| 26 | ### More | ||
| 27 | * Anything quick and easy from the sections below | ||
| 28 | 15 | ||
| 29 | ## Refactor | 16 | ## For version 2.1 |
| 30 | ### Coordinates | 17 | ### Coordinates |
| 31 | * Text (README.md) description of coordinate system with 3 (or 4) types of | 18 | * Text (README.md) description of coordinate system with 3 (or 4) types of |
| 32 | coordinates: basic (+ fundamental), sym, composite (consisting of at most | 19 | coordinates: basic (+ fundamental), sym, composite (consisting of at most |
| @@ -40,11 +27,23 @@ It's more of a personal reminder than anything else. | |||
| 40 | * For each coordinate, manually disallow "bad" moves, or just ignore the error | 27 | * For each coordinate, manually disallow "bad" moves, or just ignore the error |
| 41 | (probably better to check: low performance cost, detect problems that I might | 28 | (probably better to check: low performance cost, detect problems that I might |
| 42 | be overlooking) | 29 | be overlooking) |
| 30 | ### Changes to Step and Solve | ||
| 31 | * Revolutionize: do everything based on coordinates, replace Cube with | ||
| 32 | CubeArray (or just 4 values, so consistency check is super easy); | ||
| 33 | remove tables for fast inverse. | ||
| 34 | * No need for most of step data: just solve a list of coordinates | ||
| 35 | (+ associated pruning tables) | ||
| 36 | * For steps that accept multiple solved states (e.g. drany): | ||
| 37 | just find a way to "merge" multiple steps as alternatives; or | ||
| 38 | offer multiple lists of coordinates as alternatives | ||
| 39 | * De Bondt's trick: list of 3 coords (as indexes in coord array of the step) | ||
| 40 | that if evaluated to the same pruning value allow for de bondt's trick. | ||
| 41 | * NISS: compute inverse based on current use moves just before switching, | ||
| 42 | using CubeArray; it is not too slow. | ||
| 43 | ### Loading at startup vs dynamically | 43 | ### Loading at startup vs dynamically |
| 44 | * Consider moving more things to the initial loading phase (i.e. remove | 44 | * Consider moving more things to the initial loading phase (i.e. remove |
| 45 | many of the "initialized" parts) | 45 | many of the "initialized" parts) |
| 46 | 46 | ||
| 47 | |||
| 48 | ## Commands | 47 | ## Commands |
| 49 | 48 | ||
| 50 | ### Commands that are available in nissy 1.0, but not in this version (yet): | 49 | ### Commands that are available in nissy 1.0, but not in this version (yet): |
| Binary files differ | |||
diff --git a/src/pruning.c b/src/pruning.c index 3ca9fac..a5e60ce 100644 --- a/src/pruning.c +++ b/src/pruning.c | |||
| @@ -355,7 +355,7 @@ instance_fixnasty(void *arg) | |||
| 355 | 355 | ||
| 356 | td = (ThreadDataGenpt *)arg; | 356 | td = (ThreadDataGenpt *)arg; |
| 357 | nb = td->pd->coord->max / td->pd->coord->base->max; | 357 | nb = td->pd->coord->max / td->pd->coord->base->max; |
| 358 | blocksize = (uint64_t)((nb / td->nthreads) * td->pd->coord->base->max); | 358 | blocksize = (td->pd->coord->base->max / td->nthreads) * nb; |
| 359 | rmin = ((uint64_t)td->thid) * blocksize; | 359 | rmin = ((uint64_t)td->thid) * blocksize; |
| 360 | rmax = td->thid == td->nthreads - 1 ? | 360 | rmax = td->thid == td->nthreads - 1 ? |
| 361 | td->pd->coord->max : | 361 | td->pd->coord->max : |
| @@ -373,7 +373,8 @@ instance_fixnasty(void *arg) | |||
| 373 | ii = td->pd->coord->transform(t, i); | 373 | ii = td->pd->coord->transform(t, i); |
| 374 | if (ii < rmin || ii >= rmax) | 374 | if (ii < rmin || ii >= rmax) |
| 375 | fprintf(stderr, | 375 | fprintf(stderr, |
| 376 | "Error: transformed out of bound!\n"); | 376 | "Error: transformed out of bound! " |
| 377 | "%lu %lu %lu\n", ii, rmin, rmax); | ||
| 377 | if (ptableval_index(td->pd, ii) > td->d) { | 378 | if (ptableval_index(td->pd, ii) > td->d) { |
| 378 | ptable_update_index(td->pd, ii, td->d); | 379 | ptable_update_index(td->pd, ii, td->d); |
| 379 | updated++; | 380 | updated++; |
