diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-27 08:22:55 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-27 08:25:41 +0200 |
| commit | cee9856b2cb151f705acf6d27454ec08ef2b9a4e (patch) | |
| tree | 4616e5c59e01be16e96103f9e9897ef004434eb7 /src/solvers/h48/gendata_h48.h | |
| parent | 0b32395de2500ad87e15fbb0ff4a852e313037e9 (diff) | |
| parent | 79500f46632ba50b1640d16983942b940dd7955f (diff) | |
| download | nissy-core-cee9856b2cb151f705acf6d27454ec08ef2b9a4e.tar.gz nissy-core-cee9856b2cb151f705acf6d27454ec08ef2b9a4e.zip | |
Merge branch 'master' of tronto.net:h48
Diffstat (limited to 'src/solvers/h48/gendata_h48.h')
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index a88eb4f..48d5582 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h | |||
| @@ -104,13 +104,16 @@ STATIC size_t gendata_h48k2_realcoord(gendata_h48_arg_t *); | |||
| 104 | STATIC void gendata_h48k2_dfs(h48k2_dfs_arg_t *arg); | 104 | STATIC void gendata_h48k2_dfs(h48k2_dfs_arg_t *arg); |
| 105 | STATIC void * gendata_h48k2_runthread(void *); | 105 | STATIC void * gendata_h48k2_runthread(void *); |
| 106 | STATIC tableinfo_t makeinfo_h48k2(gendata_h48_arg_t *); | 106 | STATIC tableinfo_t makeinfo_h48k2(gendata_h48_arg_t *); |
| 107 | STATIC void getdistribution_h48( | ||
| 108 | const uint8_t *, uint64_t [static 21], uint8_t, uint8_t); | ||
| 107 | 109 | ||
| 108 | STATIC uint32_t *get_cocsepdata_ptr(const void *); | 110 | STATIC uint32_t *get_cocsepdata_ptr(const void *); |
| 109 | STATIC uint8_t *get_h48data_ptr(const void *); | 111 | STATIC uint8_t *get_h48data_ptr(const void *); |
| 110 | 112 | ||
| 111 | STATIC_INLINE uint8_t get_h48_pval(const uint8_t *, int64_t, uint8_t); | 113 | STATIC_INLINE uint8_t get_h48_pval(const uint8_t *, int64_t, uint8_t); |
| 112 | STATIC_INLINE void set_h48_pval(uint8_t *, int64_t, uint8_t, uint8_t); | 114 | STATIC_INLINE void set_h48_pval(uint8_t *, int64_t, uint8_t, uint8_t); |
| 113 | STATIC_INLINE uint8_t get_h48_bound(cube_t, uint32_t, uint8_t, uint8_t, uint8_t *); | 115 | STATIC_INLINE uint8_t get_h48_bound( |
| 116 | cube_t, uint32_t, uint8_t, uint8_t, uint8_t *); | ||
| 114 | 117 | ||
| 115 | size_t gendata_h48_derive(uint8_t, const void *, void *); | 118 | size_t gendata_h48_derive(uint8_t, const void *, void *); |
| 116 | 119 | ||
| @@ -665,6 +668,25 @@ makeinfo_h48k2(gendata_h48_arg_t *arg) | |||
| 665 | return info; | 668 | return info; |
| 666 | } | 669 | } |
| 667 | 670 | ||
| 671 | STATIC void | ||
| 672 | getdistribution_h48( | ||
| 673 | const uint8_t *table, | ||
| 674 | uint64_t distr[static 21], | ||
| 675 | uint8_t h, | ||
| 676 | uint8_t k | ||
| 677 | ) { | ||
| 678 | uint8_t val; | ||
| 679 | int64_t i, h48max; | ||
| 680 | |||
| 681 | memset(distr, 0, 21 * sizeof(uint64_t)); | ||
| 682 | |||
| 683 | h48max = H48_COORDMAX(h); | ||
| 684 | for (i = 0; i < h48max; i++) { | ||
| 685 | val = get_h48_pval(table, i, k); | ||
| 686 | distr[val]++; | ||
| 687 | } | ||
| 688 | } | ||
| 689 | |||
| 668 | STATIC uint32_t * | 690 | STATIC uint32_t * |
| 669 | get_cocsepdata_ptr(const void *data) | 691 | get_cocsepdata_ptr(const void *data) |
| 670 | { | 692 | { |
