Debian Codegraph @

src/simd/archsimd/unsafe_helpers.go

raw
1 // Code generated by 'tmplgen'; DO NOT EDIT.
2
3 //go:build goexperiment.simd
4
5 package archsimd
6
7 import "unsafe"
8
9 // paInt8x16 returns a type-unsafe pointer to array that can
10 // only be used with partial load/store operations that only
11 // access the known-safe portions of the array.
12 func paInt8x16(s []int8) *[16]int8 {
13 return (*[16]int8)(unsafe.Pointer(&s[0]))
14 }
15
16 // paInt16x8 returns a type-unsafe pointer to array that can
17 // only be used with partial load/store operations that only
18 // access the known-safe portions of the array.
19 func paInt16x8(s []int16) *[8]int16 {
20 return (*[8]int16)(unsafe.Pointer(&s[0]))
21 }
22
23 // paInt32x4 returns a type-unsafe pointer to array that can
24 // only be used with partial load/store operations that only
25 // access the known-safe portions of the array.
26 func paInt32x4(s []int32) *[4]int32 {
27 return (*[4]int32)(unsafe.Pointer(&s[0]))
28 }
29
30 // paInt64x2 returns a type-unsafe pointer to array that can
31 // only be used with partial load/store operations that only
32 // access the known-safe portions of the array.
33 func paInt64x2(s []int64) *[2]int64 {
34 return (*[2]int64)(unsafe.Pointer(&s[0]))
35 }
36
37 // paUint8x16 returns a type-unsafe pointer to array that can
38 // only be used with partial load/store operations that only
39 // access the known-safe portions of the array.
40 func paUint8x16(s []uint8) *[16]uint8 {
41 return (*[16]uint8)(unsafe.Pointer(&s[0]))
42 }
43
44 // paUint16x8 returns a type-unsafe pointer to array that can
45 // only be used with partial load/store operations that only
46 // access the known-safe portions of the array.
47 func paUint16x8(s []uint16) *[8]uint16 {
48 return (*[8]uint16)(unsafe.Pointer(&s[0]))
49 }
50
51 // paUint32x4 returns a type-unsafe pointer to array that can
52 // only be used with partial load/store operations that only
53 // access the known-safe portions of the array.
54 func paUint32x4(s []uint32) *[4]uint32 {
55 return (*[4]uint32)(unsafe.Pointer(&s[0]))
56 }
57
58 // paUint64x2 returns a type-unsafe pointer to array that can
59 // only be used with partial load/store operations that only
60 // access the known-safe portions of the array.
61 func paUint64x2(s []uint64) *[2]uint64 {
62 return (*[2]uint64)(unsafe.Pointer(&s[0]))
63 }
64
65 // paFloat32x4 returns a type-unsafe pointer to array that can
66 // only be used with partial load/store operations that only
67 // access the known-safe portions of the array.
68 func paFloat32x4(s []float32) *[4]float32 {
69 return (*[4]float32)(unsafe.Pointer(&s[0]))
70 }
71
72 // paFloat64x2 returns a type-unsafe pointer to array that can
73 // only be used with partial load/store operations that only
74 // access the known-safe portions of the array.
75 func paFloat64x2(s []float64) *[2]float64 {
76 return (*[2]float64)(unsafe.Pointer(&s[0]))
77 }
78
79 // paInt8x32 returns a type-unsafe pointer to array that can
80 // only be used with partial load/store operations that only
81 // access the known-safe portions of the array.
82 func paInt8x32(s []int8) *[32]int8 {
83 return (*[32]int8)(unsafe.Pointer(&s[0]))
84 }
85
86 // paInt16x16 returns a type-unsafe pointer to array that can
87 // only be used with partial load/store operations that only
88 // access the known-safe portions of the array.
89 func paInt16x16(s []int16) *[16]int16 {
90 return (*[16]int16)(unsafe.Pointer(&s[0]))
91 }
92
93 // paInt32x8 returns a type-unsafe pointer to array that can
94 // only be used with partial load/store operations that only
95 // access the known-safe portions of the array.
96 func paInt32x8(s []int32) *[8]int32 {
97 return (*[8]int32)(unsafe.Pointer(&s[0]))
98 }
99
100 // paInt64x4 returns a type-unsafe pointer to array that can
101 // only be used with partial load/store operations that only
102 // access the known-safe portions of the array.
103 func paInt64x4(s []int64) *[4]int64 {
104 return (*[4]int64)(unsafe.Pointer(&s[0]))
105 }
106
107 // paUint8x32 returns a type-unsafe pointer to array that can
108 // only be used with partial load/store operations that only
109 // access the known-safe portions of the array.
110 func paUint8x32(s []uint8) *[32]uint8 {
111 return (*[32]uint8)(unsafe.Pointer(&s[0]))
112 }
113
114 // paUint16x16 returns a type-unsafe pointer to array that can
115 // only be used with partial load/store operations that only
116 // access the known-safe portions of the array.
117 func paUint16x16(s []uint16) *[16]uint16 {
118 return (*[16]uint16)(unsafe.Pointer(&s[0]))
119 }
120
121 // paUint32x8 returns a type-unsafe pointer to array that can
122 // only be used with partial load/store operations that only
123 // access the known-safe portions of the array.
124 func paUint32x8(s []uint32) *[8]uint32 {
125 return (*[8]uint32)(unsafe.Pointer(&s[0]))
126 }
127
128 // paUint64x4 returns a type-unsafe pointer to array that can
129 // only be used with partial load/store operations that only
130 // access the known-safe portions of the array.
131 func paUint64x4(s []uint64) *[4]uint64 {
132 return (*[4]uint64)(unsafe.Pointer(&s[0]))
133 }
134
135 // paFloat32x8 returns a type-unsafe pointer to array that can
136 // only be used with partial load/store operations that only
137 // access the known-safe portions of the array.
138 func paFloat32x8(s []float32) *[8]float32 {
139 return (*[8]float32)(unsafe.Pointer(&s[0]))
140 }
141
142 // paFloat64x4 returns a type-unsafe pointer to array that can
143 // only be used with partial load/store operations that only
144 // access the known-safe portions of the array.
145 func paFloat64x4(s []float64) *[4]float64 {
146 return (*[4]float64)(unsafe.Pointer(&s[0]))
147 }
148
149 // paInt8x64 returns a type-unsafe pointer to array that can
150 // only be used with partial load/store operations that only
151 // access the known-safe portions of the array.
152 func paInt8x64(s []int8) *[64]int8 {
153 return (*[64]int8)(unsafe.Pointer(&s[0]))
154 }
155
156 // paInt16x32 returns a type-unsafe pointer to array that can
157 // only be used with partial load/store operations that only
158 // access the known-safe portions of the array.
159 func paInt16x32(s []int16) *[32]int16 {
160 return (*[32]int16)(unsafe.Pointer(&s[0]))
161 }
162
163 // paInt32x16 returns a type-unsafe pointer to array that can
164 // only be used with partial load/store operations that only
165 // access the known-safe portions of the array.
166 func paInt32x16(s []int32) *[16]int32 {
167 return (*[16]int32)(unsafe.Pointer(&s[0]))
168 }
169
170 // paInt64x8 returns a type-unsafe pointer to array that can
171 // only be used with partial load/store operations that only
172 // access the known-safe portions of the array.
173 func paInt64x8(s []int64) *[8]int64 {
174 return (*[8]int64)(unsafe.Pointer(&s[0]))
175 }
176
177 // paUint8x64 returns a type-unsafe pointer to array that can
178 // only be used with partial load/store operations that only
179 // access the known-safe portions of the array.
180 func paUint8x64(s []uint8) *[64]uint8 {
181 return (*[64]uint8)(unsafe.Pointer(&s[0]))
182 }
183
184 // paUint16x32 returns a type-unsafe pointer to array that can
185 // only be used with partial load/store operations that only
186 // access the known-safe portions of the array.
187 func paUint16x32(s []uint16) *[32]uint16 {
188 return (*[32]uint16)(unsafe.Pointer(&s[0]))
189 }
190
191 // paUint32x16 returns a type-unsafe pointer to array that can
192 // only be used with partial load/store operations that only
193 // access the known-safe portions of the array.
194 func paUint32x16(s []uint32) *[16]uint32 {
195 return (*[16]uint32)(unsafe.Pointer(&s[0]))
196 }
197
198 // paUint64x8 returns a type-unsafe pointer to array that can
199 // only be used with partial load/store operations that only
200 // access the known-safe portions of the array.
201 func paUint64x8(s []uint64) *[8]uint64 {
202 return (*[8]uint64)(unsafe.Pointer(&s[0]))
203 }
204
205 // paFloat32x16 returns a type-unsafe pointer to array that can
206 // only be used with partial load/store operations that only
207 // access the known-safe portions of the array.
208 func paFloat32x16(s []float32) *[16]float32 {
209 return (*[16]float32)(unsafe.Pointer(&s[0]))
210 }
211
212 // paFloat64x8 returns a type-unsafe pointer to array that can
213 // only be used with partial load/store operations that only
214 // access the known-safe portions of the array.
215 func paFloat64x8(s []float64) *[8]float64 {
216 return (*[8]float64)(unsafe.Pointer(&s[0]))
217 }