From d702f1009deeb544d521d954a5f67f55f1a2be77 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 30 Oct 2021 14:20:13 +0100 Subject: [PATCH] comments --- src/ieee754/part/partsig.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 340a3d40..c413b529 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -162,6 +162,10 @@ class SimdShape(Shape): given) fixed_width is *explicitly* passed through as Shape.width in order to ensure downcasting works as expected. + the width parameter is exactly what would be expected if this was + a Scalar Shape: it can however be given a dictionary of alternative + widths on a per-elwid basis. + a mode flag records what behaviour is required for arithmetic operators. see wiki documentation: it's... complicated. """ @@ -286,6 +290,8 @@ class SimdShape(Shape): lane_shapes = {k: v + other for k, v in self.lane_shapes} return SimdShape(self.scope, lane_shapes, signed=self.signed) elif isinstance(other, SimdShape): + # XXX MO, must be equivalent, not the same object. + # requires an eq override just like in Shape. assert other.scope is self.scope, "scope mismatch" o = other.lane_shapes lane_shapes = {k: v + o[k] for k, v in self.lane_shapes} -- 2.30.2