diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-07 12:20:51 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-07 12:20:51 +0100 |
| commit | b6fd508253bce9225dd24b6538adb5093892c4f8 (patch) | |
| tree | 75f58f26fca63f0bbda0a351a2cb8f514194a35b /src/cubetypes.h | |
| parent | e528411b1a1be45e1bef0f525fd0f411c9689b11 (diff) | |
| download | nissy-b6fd508253bce9225dd24b6538adb5093892c4f8.tar.gz nissy-b6fd508253bce9225dd24b6538adb5093892c4f8.zip | |
Little performance improvement in optimal solver - more to come!
Diffstat (limited to '')
| -rw-r--r-- | src/cubetypes.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/cubetypes.h b/src/cubetypes.h index f11f480..3f350af 100644 --- a/src/cubetypes.h +++ b/src/cubetypes.h | |||
| @@ -81,8 +81,9 @@ typedef struct commandargs CommandArgs; | |||
| 81 | typedef struct coordinate Coordinate; | 81 | typedef struct coordinate Coordinate; |
| 82 | typedef struct cube Cube; | 82 | typedef struct cube Cube; |
| 83 | typedef struct cubearray CubeArray; | 83 | typedef struct cubearray CubeArray; |
| 84 | typedef struct cubetarget CubeTarget; | ||
| 85 | typedef struct dfsdata DfsData; | 84 | typedef struct dfsdata DfsData; |
| 85 | typedef struct estimatedata EstimateData; | ||
| 86 | typedef struct localinfo LocalInfo; | ||
| 86 | typedef struct piecefilter PieceFilter; | 87 | typedef struct piecefilter PieceFilter; |
| 87 | typedef struct prunedata PruneData; | 88 | typedef struct prunedata PruneData; |
| 88 | typedef struct solveoptions SolveOptions; | 89 | typedef struct solveoptions SolveOptions; |
| @@ -92,7 +93,7 @@ typedef struct threaddata ThreadData; | |||
| 92 | 93 | ||
| 93 | typedef Cube (*AntiIndexer) (uint64_t); | 94 | typedef Cube (*AntiIndexer) (uint64_t); |
| 94 | typedef bool (*Checker) (Cube); | 95 | typedef bool (*Checker) (Cube); |
| 95 | typedef int (*Estimator) (CubeTarget); | 96 | typedef int (*Estimator) (EstimateData *); |
| 96 | typedef bool (*Validator) (Alg *); | 97 | typedef bool (*Validator) (Alg *); |
| 97 | typedef void (*Exec) (CommandArgs *); | 98 | typedef void (*Exec) (CommandArgs *); |
| 98 | typedef uint64_t (*Indexer) (Cube); | 99 | typedef uint64_t (*Indexer) (Cube); |
| @@ -196,13 +197,6 @@ cubearray | |||
| 196 | }; | 197 | }; |
| 197 | 198 | ||
| 198 | struct | 199 | struct |
| 199 | cubetarget | ||
| 200 | { | ||
| 201 | Cube cube; | ||
| 202 | int target; | ||
| 203 | }; | ||
| 204 | |||
| 205 | struct | ||
| 206 | dfsdata | 200 | dfsdata |
| 207 | { | 201 | { |
| 208 | int d; | 202 | int d; |
| @@ -211,6 +205,7 @@ dfsdata | |||
| 211 | bool niss; | 205 | bool niss; |
| 212 | Move last1; | 206 | Move last1; |
| 213 | Move last2; | 207 | Move last2; |
| 208 | EstimateData * ed; | ||
| 214 | AlgList * sols; | 209 | AlgList * sols; |
| 215 | pthread_mutex_t * sols_mutex; | 210 | pthread_mutex_t * sols_mutex; |
| 216 | Alg * current_alg; | 211 | Alg * current_alg; |
| @@ -220,6 +215,29 @@ dfsdata | |||
| 220 | }; | 215 | }; |
| 221 | 216 | ||
| 222 | struct | 217 | struct |
| 218 | estimatedata | ||
| 219 | { | ||
| 220 | Cube cube; | ||
| 221 | int target; | ||
| 222 | Move lastmove; | ||
| 223 | uint64_t movebitmask; | ||
| 224 | LocalInfo * li; | ||
| 225 | }; | ||
| 226 | |||
| 227 | struct | ||
| 228 | localinfo | ||
| 229 | { | ||
| 230 | int corners; | ||
| 231 | int normal_ud; | ||
| 232 | int normal_fb; | ||
| 233 | int normal_rl; | ||
| 234 | int inverse_ud; | ||
| 235 | int inverse_fb; | ||
| 236 | int inverse_rl; | ||
| 237 | int prev_ret; | ||
| 238 | }; | ||
| 239 | |||
| 240 | struct | ||
| 223 | piecefilter | 241 | piecefilter |
| 224 | { | 242 | { |
| 225 | bool epose; | 243 | bool epose; |
