From bcd52547af58b15868e24f3904e307548d1fd505 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 14 Dec 2025 15:12:36 +0100 Subject: Cleanup, update documentation, fix examples --- src/solvers/h48/checkdata.h | 192 +++++++++++++++++--------------------------- 1 file changed, 75 insertions(+), 117 deletions(-) (limited to 'src/solvers/h48/checkdata.h') diff --git a/src/solvers/h48/checkdata.h b/src/solvers/h48/checkdata.h index 04afd48..7aa18aa 100644 --- a/src/solvers/h48/checkdata.h +++ b/src/solvers/h48/checkdata.h @@ -18,155 +18,113 @@ uint64_t expected_cocsep[21] = { struct { uint8_t max; uint64_t table[21]; -} expected_h48[12][9] = { +} expected_h48[12] = { [0] = { - [2] = { - .max = 3, - .table = { - [0] = 5473562, - [1] = 34776317, - [2] = 68566704, - [3] = 8750867, - }, - }, - [4] = { - .max = 12, - .table = { - [0] = 1, - [1] = 1, - [2] = 4, - [3] = 34, - [4] = 331, - [5] = 3612, - [6] = 41605, - [7] = 474128, - [8] = 4953846, - [9] = 34776317, - [10] = 68566704, - [11] = 8749194, - [12] = 1673, - }, + .max = 3, + .table = { + [0] = 5473562, + [1] = 34776317, + [2] = 68566704, + [3] = 8750867, }, }, [1] = { - [2] = { - .max = 3, - .table = { - [0] = 6012079, - [1] = 45822302, - [2] = 142018732, - [3] = 41281787, - }, + .max = 3, + .table = { + [0] = 6012079, + [1] = 45822302, + [2] = 142018732, + [3] = 41281787, }, }, [2] = { - [2] = { - .max = 3, - .table = { - [0] = 6391286, - [1] = 55494785, - [2] = 252389935, - [3] = 155993794, - }, + .max = 3, + .table = { + [0] = 6391286, + [1] = 55494785, + [2] = 252389935, + [3] = 155993794, }, }, [3] = { - [2] = { - .max = 3, - .table = { - [0] = 6686828, - [1] = 63867852, - [2] = 392789689, - [3] = 477195231, - }, + .max = 3, + .table = { + [0] = 6686828, + [1] = 63867852, + [2] = 392789689, + [3] = 477195231, }, }, [4] = { - [2] = { - .max = 3, - .table = { - [0] = 77147213, - [1] = 543379415, - [2] = 1139570251, - [3] = 120982321, - }, + .max = 3, + .table = { + [0] = 77147213, + [1] = 543379415, + [2] = 1139570251, + [3] = 120982321, }, }, [5] = { - [2] = { - .max = 3, - .table = { - [0] = 82471284, - [1] = 687850732, - [2] = 2345840746, - [3] = 645995638, - }, + .max = 3, + .table = { + [0] = 82471284, + [1] = 687850732, + [2] = 2345840746, + [3] = 645995638, }, }, [6] = { - [2] = { - .max = 3, - .table = { - [0] = 85941099, - [1] = 804752968, - [2] = 4077248182, - [3] = 2556374551, - }, + .max = 3, + .table = { + [0] = 85941099, + [1] = 804752968, + [2] = 4077248182, + [3] = 2556374551, }, }, [7] = { - [2] = { - .max = 3, - .table = { - [0] = 88529761, - [1] = 897323475, - [2] = 6126260791, - [3] = 7936519573, - }, + .max = 3, + .table = { + [0] = 88529761, + [1] = 897323475, + [2] = 6126260791, + [3] = 7936519573, }, }, [8] = { - [2] = { - .max = 3, - .table = { - [0] = 1051579940, - [1] = 8136021316, - [2] = 19024479822, - [3] = 1885186122, - }, + .max = 3, + .table = { + [0] = 1051579940, + [1] = 8136021316, + [2] = 19024479822, + [3] = 1885186122, }, }, [9] = { - [2] = { - .max = 3, - .table = { - [0] = 1102038189, - [1] = 9888265242, - [2] = 38299375805, - [3] = 10904855164, - }, + .max = 3, + .table = { + [0] = 1102038189, + [1] = 9888265242, + [2] = 38299375805, + [3] = 10904855164, }, }, [10] = { - [2] = { - .max = 3, - .table = { - [0] = 1133240039, - [1] = 11196285614, - [2] = 64164702961, - [3] = 43894840186, - }, + .max = 3, + .table = { + [0] = 1133240039, + [1] = 11196285614, + [2] = 64164702961, + [3] = 43894840186, }, }, [11] = { - [2] = { - .max = 3, - .table = { - [0] = 1150763161, - [1] = 12045845660, - [2] = 91163433330, - [3] = 136418095449, - }, + .max = 3, + .table = { + [0] = 1150763161, + [1] = 12045845660, + [2] = 91163433330, + [3] = 136418095449, }, }, }; @@ -210,8 +168,8 @@ checkdata_h48( continue; } - ed = expected_h48[info.h48h][info.bits].table; - em = expected_h48[info.h48h][info.bits].max; + ed = expected_h48[info.h48h].table; + em = expected_h48[info.h48h].max; LOG("[checkdata] Checking distribution for '%s' from " "table preamble\n", info.solver); -- cgit v1.3