add decoding of shift table partial results
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 13 Feb 2020 18:04:46 +0000 (18:04 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 13 Feb 2020 18:04:46 +0000 (18:04 +0000)
3d_gpu/architecture/dynamic_simd/shift.mdwn

index d2a8d2ab6594aa39a340a7ccff6c148bab60eee7..dce5142decc320a30aae6309aa866498c5c3debc 100644 (file)
@@ -85,7 +85,20 @@ For o3:
     1 1 0  | a0b0[31:24] | a1b0[23:16] | a2b2[15:8] | a3b3
     1 1 1  | a0b0[31:24] | a1b1[23:16] | a2b2[15:8] | a3b3
 
-Where for o0 the output is simple a0b0 for all partition permutations.
+    therefore:
+
+    if True:          o3 = a0b0[31:24]
+    if ~p0:           o3 |= a1b0[23:16]
+    if  p0:           o3 |= a1b1[23:16]
+    if ~p0&p1:        o3 |= a2b1[15:8]
+    if  p0&p1:        o3 |= a2b0[15:8]
+    if      p1:       o3 |= a2b2[15:8]
+    if ~p0&~p1&~p2:   o3 |= a3b0
+    if  p0&~p1&~p2:   o3 |= a3b1
+    if      p1&~p2:   o3 |= a3b2
+    if          p2:   o3 |= a3b3
+
+Where for o0 the output is simple: a0b0 for all partition permutations.
 
 ## Note