Source file
src/simd/archsimd/maskmerge_gen_amd64.go
1
2
3
4
5 package archsimd
6
7
8
9
10 func (x Int8x16) Masked(mask Mask8x16) Int8x16 {
11 im := mask.ToInt8x16()
12 return im.And(x)
13 }
14
15
16
17
18 func (x Int8x16) Merge(y Int8x16, mask Mask8x16) Int8x16 {
19 im := mask.ToInt8x16()
20 return y.blend(x, im)
21 }
22
23
24
25
26 func (x Int16x8) Masked(mask Mask16x8) Int16x8 {
27 im := mask.ToInt16x8()
28 return im.And(x)
29 }
30
31
32
33
34 func (x Int16x8) Merge(y Int16x8, mask Mask16x8) Int16x8 {
35 im := mask.ToInt16x8().AsInt8x16()
36 ix := x.AsInt8x16()
37 iy := y.AsInt8x16()
38 return iy.blend(ix, im).AsInt16x8()
39 }
40
41
42
43
44 func (x Int32x4) Masked(mask Mask32x4) Int32x4 {
45 im := mask.ToInt32x4()
46 return im.And(x)
47 }
48
49
50
51
52 func (x Int32x4) Merge(y Int32x4, mask Mask32x4) Int32x4 {
53 im := mask.ToInt32x4().AsInt8x16()
54 ix := x.AsInt8x16()
55 iy := y.AsInt8x16()
56 return iy.blend(ix, im).AsInt32x4()
57 }
58
59
60
61
62 func (x Int64x2) Masked(mask Mask64x2) Int64x2 {
63 im := mask.ToInt64x2()
64 return im.And(x)
65 }
66
67
68
69
70 func (x Int64x2) Merge(y Int64x2, mask Mask64x2) Int64x2 {
71 im := mask.ToInt64x2().AsInt8x16()
72 ix := x.AsInt8x16()
73 iy := y.AsInt8x16()
74 return iy.blend(ix, im).AsInt64x2()
75 }
76
77
78
79
80 func (x Uint8x16) Masked(mask Mask8x16) Uint8x16 {
81 im := mask.ToInt8x16()
82 return x.AsInt8x16().And(im).AsUint8x16()
83 }
84
85
86
87
88 func (x Uint8x16) Merge(y Uint8x16, mask Mask8x16) Uint8x16 {
89 im := mask.ToInt8x16()
90 ix := x.AsInt8x16()
91 iy := y.AsInt8x16()
92 return iy.blend(ix, im).AsUint8x16()
93 }
94
95
96
97
98 func (x Uint16x8) Masked(mask Mask16x8) Uint16x8 {
99 im := mask.ToInt16x8()
100 return x.AsInt16x8().And(im).AsUint16x8()
101 }
102
103
104
105
106 func (x Uint16x8) Merge(y Uint16x8, mask Mask16x8) Uint16x8 {
107 im := mask.ToInt16x8().AsInt8x16()
108 ix := x.AsInt8x16()
109 iy := y.AsInt8x16()
110 return iy.blend(ix, im).AsUint16x8()
111 }
112
113
114
115
116 func (x Uint32x4) Masked(mask Mask32x4) Uint32x4 {
117 im := mask.ToInt32x4()
118 return x.AsInt32x4().And(im).AsUint32x4()
119 }
120
121
122
123
124 func (x Uint32x4) Merge(y Uint32x4, mask Mask32x4) Uint32x4 {
125 im := mask.ToInt32x4().AsInt8x16()
126 ix := x.AsInt8x16()
127 iy := y.AsInt8x16()
128 return iy.blend(ix, im).AsUint32x4()
129 }
130
131
132
133
134 func (x Uint64x2) Masked(mask Mask64x2) Uint64x2 {
135 im := mask.ToInt64x2()
136 return x.AsInt64x2().And(im).AsUint64x2()
137 }
138
139
140
141
142 func (x Uint64x2) Merge(y Uint64x2, mask Mask64x2) Uint64x2 {
143 im := mask.ToInt64x2().AsInt8x16()
144 ix := x.AsInt8x16()
145 iy := y.AsInt8x16()
146 return iy.blend(ix, im).AsUint64x2()
147 }
148
149
150
151
152 func (x Float32x4) Masked(mask Mask32x4) Float32x4 {
153 im := mask.ToInt32x4()
154 return x.AsInt32x4().And(im).AsFloat32x4()
155 }
156
157
158
159
160 func (x Float32x4) Merge(y Float32x4, mask Mask32x4) Float32x4 {
161 im := mask.ToInt32x4().AsInt8x16()
162 ix := x.AsInt8x16()
163 iy := y.AsInt8x16()
164 return iy.blend(ix, im).AsFloat32x4()
165 }
166
167
168
169
170 func (x Float64x2) Masked(mask Mask64x2) Float64x2 {
171 im := mask.ToInt64x2()
172 return x.AsInt64x2().And(im).AsFloat64x2()
173 }
174
175
176
177
178 func (x Float64x2) Merge(y Float64x2, mask Mask64x2) Float64x2 {
179 im := mask.ToInt64x2().AsInt8x16()
180 ix := x.AsInt8x16()
181 iy := y.AsInt8x16()
182 return iy.blend(ix, im).AsFloat64x2()
183 }
184
185
186
187
188 func (x Int8x32) Masked(mask Mask8x32) Int8x32 {
189 im := mask.ToInt8x32()
190 return im.And(x)
191 }
192
193
194
195
196 func (x Int8x32) Merge(y Int8x32, mask Mask8x32) Int8x32 {
197 im := mask.ToInt8x32()
198 return y.blend(x, im)
199 }
200
201
202
203
204 func (x Int16x16) Masked(mask Mask16x16) Int16x16 {
205 im := mask.ToInt16x16()
206 return im.And(x)
207 }
208
209
210
211
212 func (x Int16x16) Merge(y Int16x16, mask Mask16x16) Int16x16 {
213 im := mask.ToInt16x16().AsInt8x32()
214 ix := x.AsInt8x32()
215 iy := y.AsInt8x32()
216 return iy.blend(ix, im).AsInt16x16()
217 }
218
219
220
221
222 func (x Int32x8) Masked(mask Mask32x8) Int32x8 {
223 im := mask.ToInt32x8()
224 return im.And(x)
225 }
226
227
228
229
230 func (x Int32x8) Merge(y Int32x8, mask Mask32x8) Int32x8 {
231 im := mask.ToInt32x8().AsInt8x32()
232 ix := x.AsInt8x32()
233 iy := y.AsInt8x32()
234 return iy.blend(ix, im).AsInt32x8()
235 }
236
237
238
239
240 func (x Int64x4) Masked(mask Mask64x4) Int64x4 {
241 im := mask.ToInt64x4()
242 return im.And(x)
243 }
244
245
246
247
248 func (x Int64x4) Merge(y Int64x4, mask Mask64x4) Int64x4 {
249 im := mask.ToInt64x4().AsInt8x32()
250 ix := x.AsInt8x32()
251 iy := y.AsInt8x32()
252 return iy.blend(ix, im).AsInt64x4()
253 }
254
255
256
257
258 func (x Uint8x32) Masked(mask Mask8x32) Uint8x32 {
259 im := mask.ToInt8x32()
260 return x.AsInt8x32().And(im).AsUint8x32()
261 }
262
263
264
265
266 func (x Uint8x32) Merge(y Uint8x32, mask Mask8x32) Uint8x32 {
267 im := mask.ToInt8x32()
268 ix := x.AsInt8x32()
269 iy := y.AsInt8x32()
270 return iy.blend(ix, im).AsUint8x32()
271 }
272
273
274
275
276 func (x Uint16x16) Masked(mask Mask16x16) Uint16x16 {
277 im := mask.ToInt16x16()
278 return x.AsInt16x16().And(im).AsUint16x16()
279 }
280
281
282
283
284 func (x Uint16x16) Merge(y Uint16x16, mask Mask16x16) Uint16x16 {
285 im := mask.ToInt16x16().AsInt8x32()
286 ix := x.AsInt8x32()
287 iy := y.AsInt8x32()
288 return iy.blend(ix, im).AsUint16x16()
289 }
290
291
292
293
294 func (x Uint32x8) Masked(mask Mask32x8) Uint32x8 {
295 im := mask.ToInt32x8()
296 return x.AsInt32x8().And(im).AsUint32x8()
297 }
298
299
300
301
302 func (x Uint32x8) Merge(y Uint32x8, mask Mask32x8) Uint32x8 {
303 im := mask.ToInt32x8().AsInt8x32()
304 ix := x.AsInt8x32()
305 iy := y.AsInt8x32()
306 return iy.blend(ix, im).AsUint32x8()
307 }
308
309
310
311
312 func (x Uint64x4) Masked(mask Mask64x4) Uint64x4 {
313 im := mask.ToInt64x4()
314 return x.AsInt64x4().And(im).AsUint64x4()
315 }
316
317
318
319
320 func (x Uint64x4) Merge(y Uint64x4, mask Mask64x4) Uint64x4 {
321 im := mask.ToInt64x4().AsInt8x32()
322 ix := x.AsInt8x32()
323 iy := y.AsInt8x32()
324 return iy.blend(ix, im).AsUint64x4()
325 }
326
327
328
329
330 func (x Float32x8) Masked(mask Mask32x8) Float32x8 {
331 im := mask.ToInt32x8()
332 return x.AsInt32x8().And(im).AsFloat32x8()
333 }
334
335
336
337
338 func (x Float32x8) Merge(y Float32x8, mask Mask32x8) Float32x8 {
339 im := mask.ToInt32x8().AsInt8x32()
340 ix := x.AsInt8x32()
341 iy := y.AsInt8x32()
342 return iy.blend(ix, im).AsFloat32x8()
343 }
344
345
346
347
348 func (x Float64x4) Masked(mask Mask64x4) Float64x4 {
349 im := mask.ToInt64x4()
350 return x.AsInt64x4().And(im).AsFloat64x4()
351 }
352
353
354
355
356 func (x Float64x4) Merge(y Float64x4, mask Mask64x4) Float64x4 {
357 im := mask.ToInt64x4().AsInt8x32()
358 ix := x.AsInt8x32()
359 iy := y.AsInt8x32()
360 return iy.blend(ix, im).AsFloat64x4()
361 }
362
363
364
365
366 func (x Int8x64) Masked(mask Mask8x64) Int8x64 {
367 im := mask.ToInt8x64()
368 return im.And(x)
369 }
370
371
372
373
374 func (x Int8x64) Merge(y Int8x64, mask Mask8x64) Int8x64 {
375 return y.blendMasked(x, mask)
376 }
377
378
379
380
381 func (x Int16x32) Masked(mask Mask16x32) Int16x32 {
382 im := mask.ToInt16x32()
383 return im.And(x)
384 }
385
386
387
388
389 func (x Int16x32) Merge(y Int16x32, mask Mask16x32) Int16x32 {
390 return y.blendMasked(x, mask)
391 }
392
393
394
395
396 func (x Int32x16) Masked(mask Mask32x16) Int32x16 {
397 im := mask.ToInt32x16()
398 return im.And(x)
399 }
400
401
402
403
404 func (x Int32x16) Merge(y Int32x16, mask Mask32x16) Int32x16 {
405 return y.blendMasked(x, mask)
406 }
407
408
409
410
411 func (x Int64x8) Masked(mask Mask64x8) Int64x8 {
412 im := mask.ToInt64x8()
413 return im.And(x)
414 }
415
416
417
418
419 func (x Int64x8) Merge(y Int64x8, mask Mask64x8) Int64x8 {
420 return y.blendMasked(x, mask)
421 }
422
423
424
425
426 func (x Uint8x64) Masked(mask Mask8x64) Uint8x64 {
427 im := mask.ToInt8x64()
428 return x.AsInt8x64().And(im).AsUint8x64()
429 }
430
431
432
433
434 func (x Uint8x64) Merge(y Uint8x64, mask Mask8x64) Uint8x64 {
435 ix := x.AsInt8x64()
436 iy := y.AsInt8x64()
437 return iy.blendMasked(ix, mask).AsUint8x64()
438 }
439
440
441
442
443 func (x Uint16x32) Masked(mask Mask16x32) Uint16x32 {
444 im := mask.ToInt16x32()
445 return x.AsInt16x32().And(im).AsUint16x32()
446 }
447
448
449
450
451 func (x Uint16x32) Merge(y Uint16x32, mask Mask16x32) Uint16x32 {
452 ix := x.AsInt16x32()
453 iy := y.AsInt16x32()
454 return iy.blendMasked(ix, mask).AsUint16x32()
455 }
456
457
458
459
460 func (x Uint32x16) Masked(mask Mask32x16) Uint32x16 {
461 im := mask.ToInt32x16()
462 return x.AsInt32x16().And(im).AsUint32x16()
463 }
464
465
466
467
468 func (x Uint32x16) Merge(y Uint32x16, mask Mask32x16) Uint32x16 {
469 ix := x.AsInt32x16()
470 iy := y.AsInt32x16()
471 return iy.blendMasked(ix, mask).AsUint32x16()
472 }
473
474
475
476
477 func (x Uint64x8) Masked(mask Mask64x8) Uint64x8 {
478 im := mask.ToInt64x8()
479 return x.AsInt64x8().And(im).AsUint64x8()
480 }
481
482
483
484
485 func (x Uint64x8) Merge(y Uint64x8, mask Mask64x8) Uint64x8 {
486 ix := x.AsInt64x8()
487 iy := y.AsInt64x8()
488 return iy.blendMasked(ix, mask).AsUint64x8()
489 }
490
491
492
493
494 func (x Float32x16) Masked(mask Mask32x16) Float32x16 {
495 im := mask.ToInt32x16()
496 return x.AsInt32x16().And(im).AsFloat32x16()
497 }
498
499
500
501
502 func (x Float32x16) Merge(y Float32x16, mask Mask32x16) Float32x16 {
503 ix := x.AsInt32x16()
504 iy := y.AsInt32x16()
505 return iy.blendMasked(ix, mask).AsFloat32x16()
506 }
507
508
509
510
511 func (x Float64x8) Masked(mask Mask64x8) Float64x8 {
512 im := mask.ToInt64x8()
513 return x.AsInt64x8().And(im).AsFloat64x8()
514 }
515
516
517
518
519 func (x Float64x8) Merge(y Float64x8, mask Mask64x8) Float64x8 {
520 ix := x.AsInt64x8()
521 iy := y.AsInt64x8()
522 return iy.blendMasked(ix, mask).AsFloat64x8()
523 }
524
View as plain text