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 var gatherLo64Idx = [8]uint32{0, 1, 4, 5, 2, 3, 6, 7}
28
29
30 func gatherLo64(x Uint64x4) Uint64x4 {
31 return x.ReshapeToUint32s().LookupMod(LoadUint32x8Array(&gatherLo64Idx)).ReshapeToUint64s()
32 }
33
34
35 var (
36 trunc16To8Idx = [16]int8{0, 2, 4, 6, 8, 10, 12, 14, -1, -1, -1, -1, -1, -1, -1, -1}
37 trunc32To16Idx = [16]int8{0, 1, 4, 5, 8, 9, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1}
38
39 trunc16To8GroupedIdx = [32]int8{
40 0, 2, 4, 6, 8, 10, 12, 14, -1, -1, -1, -1, -1, -1, -1, -1,
41 0, 2, 4, 6, 8, 10, 12, 14, -1, -1, -1, -1, -1, -1, -1, -1,
42 }
43 trunc32To16GroupedIdx = [32]int8{
44 0, 1, 4, 5, 8, 9, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
45 0, 1, 4, 5, 8, 9, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
46 }
47 )
48
49
50 var (
51 maxUint8x8 = [8]uint16{maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8}
52 maxUint16x4 = [4]uint32{maxUint16, maxUint16, maxUint16, maxUint16}
53 maxInt32x2 = [2]int64{maxInt32, maxInt32}
54 minInt32x2 = [2]int64{minInt32, minInt32}
55 maxUint32x2 = [2]int64{maxUint32, maxUint32}
56 maxUint8x16 = [16]uint16{maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8, maxUint8}
57 maxUint16x8 = [8]uint32{maxUint16, maxUint16, maxUint16, maxUint16, maxUint16, maxUint16, maxUint16, maxUint16}
58 maxInt32x4 = [4]int64{maxInt32, maxInt32, maxInt32, maxInt32}
59 minInt32x4 = [4]int64{minInt32, minInt32, minInt32, minInt32}
60 maxUint32x4 = [4]int64{maxUint32, maxUint32, maxUint32, maxUint32}
61 )
62
View as plain text