Source file
src/simd/archsimd/converts_emulated_amd64.go
1
2
3
4
5
6
7 package archsimd
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 var gatherLo64Idx = [8]uint32{0, 1, 4, 5, 2, 3, 6, 7}
29
30
31 func gatherLo64(x Uint64x4) Uint64x4 {
32 return x.ReshapeToUint32s().LookupMod(LoadUint32x8Array(&gatherLo64Idx)).ReshapeToUint64s()
33 }
34
35
36 var (
37 trunc16To8Idx = [16]int8{0, 2, 4, 6, 8, 10, 12, 14, -1, -1, -1, -1, -1, -1, -1, -1}
38 trunc32To16Idx = [16]int8{0, 1, 4, 5, 8, 9, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1}
39
40 trunc16To8GroupedIdx = [32]int8{
41 0, 2, 4, 6, 8, 10, 12, 14, -1, -1, -1, -1, -1, -1, -1, -1,
42 0, 2, 4, 6, 8, 10, 12, 14, -1, -1, -1, -1, -1, -1, -1, -1,
43 }
44 trunc32To16GroupedIdx = [32]int8{
45 0, 1, 4, 5, 8, 9, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
46 0, 1, 4, 5, 8, 9, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
47 }
48 )
49
50
51 var (
52 maxUint8x8 = [8]uint16{maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8}
53 maxUint16x4 = [4]uint32{maxUint16, maxUint16, maxUint16, maxUint16}
54 maxInt32x2 = [2]int64{maxInt32, maxInt32}
55 minInt32x2 = [2]int64{minInt32, minInt32}
56 maxUint32x2 = [2]int64{maxUint32, maxUint32}
57 maxUint8x16 = [16]uint16{maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8}
58 maxUint16x8 = [8]uint32{maxUint16, maxUint16, maxUint16, maxUint16, maxUint16, maxUint16, maxUint16, maxUint16}
59 maxInt32x4 = [4]int64{maxInt32, maxInt32, maxInt32, maxInt32}
60 minInt32x4 = [4]int64{minInt32, minInt32, minInt32, minInt32}
61 maxUint32x4 = [4]int64{maxUint32, maxUint32, maxUint32, maxUint32}
62 )
63
View as plain text