only set standard PartType in non-Simd-mode
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Oct 2021 14:03:22 +0000 (15:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Oct 2021 14:03:22 +0000 (15:03 +0100)
src/ieee754/part/partsig.py

index bc12d26e6805d2b87cb52caa972cd565517c061f..e1bb7ec9f2dbb538763eb9f90c18628048202f7a 100644 (file)
@@ -122,11 +122,12 @@ class SimdSignal(UserValue):
             # parse the args, get elwid from SimdMode,
             # get module as well, call self.set_module(mask.module)
             self.partpoints = ptype.make_layout_get_stuff(mask, *args, **kwargs)
-        if isinstance(mask, PartitionPoints):
-            self.partpoints = mask
         else:
-            self.partpoints = make_partition2(mask, width)
-        self.ptype = PartType(self)
+            if isinstance(mask, PartitionPoints):
+                self.partpoints = mask
+            else:
+                self.partpoints = make_partition2(mask, width)
+            self.ptype = PartType(self)
 
     def set_module(self, m):
         self.m = m