1
2
3
4
5 package midway
6
7 import (
8 "internal/buildcfg"
9 )
10
11 func rewriteSizes() []int {
12 switch buildcfg.GOARCH {
13 case "wasm":
14 return []int{0, 128}
15 case "amd64":
16 return []int{0, 128, 256, 512}
17 case "arm64":
18 return []int{0, 128}
19 }
20 return nil
21 }
22
23 const simdPkg = "simd"
24 const archFullPkg = "simd/internal/bridge"
25 const archPkg = "bridge"
26 const vectorSizeFn = "VectorBitSize"
27 const emulatedFn = "Emulated"
28
29 func isSimdTypeName(s string) bool {
30 switch s {
31 case "Int8s", "Int16s", "Int32s", "Int64s",
32 "Uint8s", "Uint16s", "Uint32s", "Uint64s",
33 "Mask8s", "Mask16s", "Mask32s", "Mask64s",
34 "Float32s", "Float64s":
35 return true
36 }
37 return false
38 }
39
View as plain text