1
2
3
4
5 package archsimd
6
7
8 type v128 struct {
9 _128 [0]func()
10 }
11
12
13 type Int8x16 struct {
14 int8x16 v128
15 vals [16]int8
16 }
17
18
19 func (x Int8x16) Len() int { return 16 }
20
21
22
23
24 func LoadInt8x16Array(y *[16]int8) Int8x16
25
26
27 func LoadInt8x16(s []int8) Int8x16 {
28 return LoadInt8x16Array((*[16]int8)(s))
29 }
30
31
32
33
34 func (x Int8x16) StoreArray(y *[16]int8)
35
36
37 func (x Int8x16) Store(s []int8) {
38 x.StoreArray((*[16]int8)(s))
39 }
40
41
42 func BroadcastInt8x16(x int8) Int8x16
43
44
45 type Int16x8 struct {
46 int16x8 v128
47 vals [8]int16
48 }
49
50
51 func (x Int16x8) Len() int { return 8 }
52
53
54
55
56 func LoadInt16x8Array(y *[8]int16) Int16x8
57
58
59 func LoadInt16x8(s []int16) Int16x8 {
60 return LoadInt16x8Array((*[8]int16)(s))
61 }
62
63
64
65
66 func (x Int16x8) StoreArray(y *[8]int16)
67
68
69 func (x Int16x8) Store(s []int16) {
70 x.StoreArray((*[8]int16)(s))
71 }
72
73
74 func BroadcastInt16x8(x int16) Int16x8
75
76
77 type Int32x4 struct {
78 int32x4 v128
79 vals [4]int32
80 }
81
82
83 func (x Int32x4) Len() int { return 4 }
84
85
86
87
88 func LoadInt32x4Array(y *[4]int32) Int32x4
89
90
91 func LoadInt32x4(s []int32) Int32x4 {
92 return LoadInt32x4Array((*[4]int32)(s))
93 }
94
95
96
97
98 func (x Int32x4) StoreArray(y *[4]int32)
99
100
101 func (x Int32x4) Store(s []int32) {
102 x.StoreArray((*[4]int32)(s))
103 }
104
105
106 func BroadcastInt32x4(x int32) Int32x4
107
108
109 type Int64x2 struct {
110 int64x2 v128
111 vals [2]int64
112 }
113
114
115 func (x Int64x2) Len() int { return 2 }
116
117
118
119
120 func LoadInt64x2Array(y *[2]int64) Int64x2
121
122
123 func LoadInt64x2(s []int64) Int64x2 {
124 return LoadInt64x2Array((*[2]int64)(s))
125 }
126
127
128
129
130 func (x Int64x2) StoreArray(y *[2]int64)
131
132
133 func (x Int64x2) Store(s []int64) {
134 x.StoreArray((*[2]int64)(s))
135 }
136
137
138 func BroadcastInt64x2(x int64) Int64x2
139
140
141 type Uint8x16 struct {
142 uint8x16 v128
143 vals [16]uint8
144 }
145
146
147 func (x Uint8x16) Len() int { return 16 }
148
149
150
151
152 func LoadUint8x16Array(y *[16]uint8) Uint8x16
153
154
155 func LoadUint8x16(s []uint8) Uint8x16 {
156 return LoadUint8x16Array((*[16]uint8)(s))
157 }
158
159
160
161
162 func (x Uint8x16) StoreArray(y *[16]uint8)
163
164
165 func (x Uint8x16) Store(s []uint8) {
166 x.StoreArray((*[16]uint8)(s))
167 }
168
169
170 func BroadcastUint8x16(x uint8) Uint8x16
171
172
173 type Uint16x8 struct {
174 uint16x8 v128
175 vals [8]uint16
176 }
177
178
179 func (x Uint16x8) Len() int { return 8 }
180
181
182
183
184 func LoadUint16x8Array(y *[8]uint16) Uint16x8
185
186
187 func LoadUint16x8(s []uint16) Uint16x8 {
188 return LoadUint16x8Array((*[8]uint16)(s))
189 }
190
191
192
193
194 func (x Uint16x8) StoreArray(y *[8]uint16)
195
196
197 func (x Uint16x8) Store(s []uint16) {
198 x.StoreArray((*[8]uint16)(s))
199 }
200
201
202 func BroadcastUint16x8(x uint16) Uint16x8
203
204
205 type Uint32x4 struct {
206 uint32x4 v128
207 vals [4]uint32
208 }
209
210
211 func (x Uint32x4) Len() int { return 4 }
212
213
214
215
216 func LoadUint32x4Array(y *[4]uint32) Uint32x4
217
218
219 func LoadUint32x4(s []uint32) Uint32x4 {
220 return LoadUint32x4Array((*[4]uint32)(s))
221 }
222
223
224
225
226 func (x Uint32x4) StoreArray(y *[4]uint32)
227
228
229 func (x Uint32x4) Store(s []uint32) {
230 x.StoreArray((*[4]uint32)(s))
231 }
232
233
234 func BroadcastUint32x4(x uint32) Uint32x4
235
236
237 type Uint64x2 struct {
238 uint64x2 v128
239 vals [2]uint64
240 }
241
242
243 func (x Uint64x2) Len() int { return 2 }
244
245
246
247
248 func LoadUint64x2Array(y *[2]uint64) Uint64x2
249
250
251 func LoadUint64x2(s []uint64) Uint64x2 {
252 return LoadUint64x2Array((*[2]uint64)(s))
253 }
254
255
256
257
258 func (x Uint64x2) StoreArray(y *[2]uint64)
259
260
261 func (x Uint64x2) Store(s []uint64) {
262 x.StoreArray((*[2]uint64)(s))
263 }
264
265
266 func BroadcastUint64x2(x uint64) Uint64x2
267
268
269 type Float32x4 struct {
270 float32x4 v128
271 vals [4]float32
272 }
273
274
275 func (x Float32x4) Len() int { return 4 }
276
277
278
279
280 func LoadFloat32x4Array(y *[4]float32) Float32x4
281
282
283 func LoadFloat32x4(s []float32) Float32x4 {
284 return LoadFloat32x4Array((*[4]float32)(s))
285 }
286
287
288
289
290 func (x Float32x4) StoreArray(y *[4]float32)
291
292
293 func (x Float32x4) Store(s []float32) {
294 x.StoreArray((*[4]float32)(s))
295 }
296
297
298 func BroadcastFloat32x4(x float32) Float32x4
299
300
301 type Float64x2 struct {
302 float64x2 v128
303 vals [2]float64
304 }
305
306
307 func (x Float64x2) Len() int { return 2 }
308
309
310
311
312 func LoadFloat64x2Array(y *[2]float64) Float64x2
313
314
315 func LoadFloat64x2(s []float64) Float64x2 {
316 return LoadFloat64x2Array((*[2]float64)(s))
317 }
318
319
320
321
322 func (x Float64x2) StoreArray(y *[2]float64)
323
324
325 func (x Float64x2) Store(s []float64) {
326 x.StoreArray((*[2]float64)(s))
327 }
328
329
330 func BroadcastFloat64x2(x float64) Float64x2
331
332
333 type Mask8x16 struct {
334 int8x16 v128
335 vals [16]int8
336 }
337
338
339 type Mask16x8 struct {
340 int16x8 v128
341 vals [8]int16
342 }
343
344
345 type Mask32x4 struct {
346 int32x4 v128
347 vals [4]int32
348 }
349
350
351 type Mask64x2 struct {
352 int64x2 v128
353 vals [2]int64
354 }
355
View as plain text