From 6a50b2d1649fbf1f22be783eaa5ebbb9cdf72f64 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 13 Oct 2021 12:51:09 +0100 Subject: [PATCH] redefine part_counts to be "number of vector elements in a partition" fixes the bug --- src/ieee754/part/layout_experiment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ieee754/part/layout_experiment.py b/src/ieee754/part/layout_experiment.py index 1efbe880..2e8363ab 100644 --- a/src/ieee754/part/layout_experiment.py +++ b/src/ieee754/part/layout_experiment.py @@ -101,7 +101,7 @@ def layout(elwid, signed, part_counts, lane_shapes=None, fixed_width=None): if not isinstance(lane_shapes, Mapping): lane_shapes = {i: lane_shapes for i in part_counts} # compute a set of partition widths - cpart_wid = [-lane_shapes[i] // c for i, c in part_counts.items()] + cpart_wid = [-lane_shapes[i] for i, c in part_counts.items()] print("cpart_wid", cpart_wid, "part_counts", part_counts) cpart_wid = -min(cpart_wid) part_count = max(part_counts.values()) -- 2.30.2