redefine part_counts to be "number of vector elements in a partition"
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Oct 2021 11:51:09 +0000 (12:51 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Oct 2021 11:51:09 +0000 (12:51 +0100)
fixes the bug

src/ieee754/part/layout_experiment.py

index 1efbe8808a83038732a9c2a00587593f2c5c0188..2e8363abbca51ae9c733e0af2009e4160a21c1f4 100644 (file)
@@ -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())