diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-04 14:29:00 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-04 14:29:00 +0200 |
| commit | 283effb16646112ee9c6bba57e021e80f322b29f (patch) | |
| tree | 3c0ad588e550f86df21687e82a17e9f1f60443be /src/solvers/h48/gendata_h48.h | |
| parent | fc150adaf3bff133da0e59d842f13b7b21297fc0 (diff) | |
| download | nissy-core-283effb16646112ee9c6bba57e021e80f322b29f.tar.gz nissy-core-283effb16646112ee9c6bba57e021e80f322b29f.zip | |
Avoid repeating typedefs in tests
Diffstat (limited to 'src/solvers/h48/gendata_h48.h')
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index 6db3998..5da9dc3 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h | |||
| @@ -1,16 +1,3 @@ | |||
| 1 | #define H48_COORDMAX_NOEO ((int64_t)(COCSEP_CLASSES * COMB_12_4 * COMB_8_4)) | ||
| 2 | #define H48_COORDMAX(h) (H48_COORDMAX_NOEO << (int64_t)(h)) | ||
| 3 | #define H48_DIV(k) ((size_t)8 / (size_t)(k)) | ||
| 4 | #define H48_TABLESIZE(h, k) DIV_ROUND_UP((size_t)H48_COORDMAX((h)), H48_DIV(k)) | ||
| 5 | |||
| 6 | #define H48_COEFF(k) (INT64_C(8) / (int64_t)(k)) | ||
| 7 | #define H48_INDEX(i, k) ((i) / H48_COEFF(k)) | ||
| 8 | #define H48_SHIFT(i, k) ((uint8_t)(k) * (uint8_t)((i) % H48_COEFF(k))) | ||
| 9 | #define H48_MASK(i, k) ((UINT8_BIT(k) - UINT8_C(1)) << H48_SHIFT(i, k)) | ||
| 10 | |||
| 11 | #define MAXLEN 20 | ||
| 12 | #define CHUNKS COCSEP_CLASSES | ||
| 13 | |||
| 14 | /* | 1 | /* |
| 15 | TODO: This loop over similar h48 coordinates can be improved by only | 2 | TODO: This loop over similar h48 coordinates can be improved by only |
| 16 | transforming edges, but we need to compose transformations (i.e. conjugate | 3 | transforming edges, but we need to compose transformations (i.e. conjugate |
| @@ -30,66 +17,6 @@ _t by _ttrep). | |||
| 30 | ARG_ACTION \ | 17 | ARG_ACTION \ |
| 31 | } | 18 | } |
| 32 | 19 | ||
| 33 | typedef struct { | ||
| 34 | uint8_t h; | ||
| 35 | uint8_t k; | ||
| 36 | uint8_t base; | ||
| 37 | uint8_t maxdepth; | ||
| 38 | tableinfo_t info; | ||
| 39 | void *buf; | ||
| 40 | void *h48buf; | ||
| 41 | uint32_t *cocsepdata; | ||
| 42 | uint64_t selfsim[COCSEP_CLASSES]; | ||
| 43 | cube_t crep[COCSEP_CLASSES]; | ||
| 44 | } gendata_h48_arg_t; | ||
| 45 | |||
| 46 | typedef struct { | ||
| 47 | uint8_t maxdepth; | ||
| 48 | const uint32_t *cocsepdata; | ||
| 49 | const cube_t *crep; | ||
| 50 | const uint64_t *selfsim; | ||
| 51 | h48map_t *map; | ||
| 52 | } gendata_h48short_arg_t; | ||
| 53 | |||
| 54 | typedef struct { | ||
| 55 | uint8_t depth; | ||
| 56 | uint32_t *cocsepdata; | ||
| 57 | _Atomic uint8_t *table; | ||
| 58 | uint64_t *selfsim; | ||
| 59 | cube_t *crep; | ||
| 60 | uint64_t start; | ||
| 61 | uint64_t end; | ||
| 62 | pthread_mutex_t *table_mutex[CHUNKS]; | ||
| 63 | } h48h0k4_bfs_arg_t; | ||
| 64 | |||
| 65 | typedef struct { | ||
| 66 | cube_t cube; | ||
| 67 | uint8_t h; | ||
| 68 | uint8_t k; | ||
| 69 | uint8_t base; | ||
| 70 | uint8_t shortdepth; | ||
| 71 | uint32_t *cocsepdata; | ||
| 72 | _Atomic uint8_t *table; | ||
| 73 | uint64_t *selfsim; | ||
| 74 | cube_t *crep; | ||
| 75 | h48map_t *shortcubes; | ||
| 76 | pthread_mutex_t *shortcubes_mutex; | ||
| 77 | pthread_mutex_t *table_mutex[CHUNKS]; | ||
| 78 | uint64_t *next; | ||
| 79 | uint64_t *count; | ||
| 80 | } h48k2_dfs_arg_t; | ||
| 81 | |||
| 82 | typedef struct { | ||
| 83 | cube_t cube; | ||
| 84 | int8_t depth; | ||
| 85 | uint8_t h; | ||
| 86 | uint8_t k; | ||
| 87 | uint32_t *cocsepdata; | ||
| 88 | uint64_t *selfsim; | ||
| 89 | _Atomic uint8_t *table; | ||
| 90 | pthread_mutex_t **table_mutex; | ||
| 91 | } gendata_h48_mark_t; | ||
| 92 | |||
| 93 | STATIC uint64_t gendata_h48short(gendata_h48short_arg_t *); | 20 | STATIC uint64_t gendata_h48short(gendata_h48short_arg_t *); |
| 94 | STATIC size_t gendata_h48(gendata_h48_arg_t *); | 21 | STATIC size_t gendata_h48(gendata_h48_arg_t *); |
| 95 | STATIC size_t gendata_h48h0k4(gendata_h48_arg_t *); | 22 | STATIC size_t gendata_h48h0k4(gendata_h48_arg_t *); |
