Debian Codegraph @

debian/missing-sources/glam-0.23.0/src/swizzles/sse2/vec3a_impl.rs

raw symbols SCIP
1 // Generated from swizzle_impl.rs.tera template. Edit the template, not the generated file.
2
3 #![allow(clippy::useless_conversion)]
4
5 use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4};
6
7 #[cfg(target_arch = "x86")]
8 use core::arch::x86::*;
9 #[cfg(target_arch = "x86_64")]
10 use core::arch::x86_64::*;
11
12 impl Vec3Swizzles for Vec3A {
13 type Vec2 = Vec2;
14
15 type Vec4 = Vec4;
16
17 #[inline]
18 fn xx(self) -> Vec2 {
19 Vec2 {
20 x: self.x,
21 y: self.x,
22 }
23 }
24
25 #[inline]
26 fn xy(self) -> Vec2 {
27 Vec2 {
28 x: self.x,
29 y: self.y,
30 }
31 }
32
33 #[inline]
34 fn xz(self) -> Vec2 {
35 Vec2 {
36 x: self.x,
37 y: self.z,
38 }
39 }
40
41 #[inline]
42 fn yx(self) -> Vec2 {
43 Vec2 {
44 x: self.y,
45 y: self.x,
46 }
47 }
48
49 #[inline]
50 fn yy(self) -> Vec2 {
51 Vec2 {
52 x: self.y,
53 y: self.y,
54 }
55 }
56
57 #[inline]
58 fn yz(self) -> Vec2 {
59 Vec2 {
60 x: self.y,
61 y: self.z,
62 }
63 }
64
65 #[inline]
66 fn zx(self) -> Vec2 {
67 Vec2 {
68 x: self.z,
69 y: self.x,
70 }
71 }
72
73 #[inline]
74 fn zy(self) -> Vec2 {
75 Vec2 {
76 x: self.z,
77 y: self.y,
78 }
79 }
80
81 #[inline]
82 fn zz(self) -> Vec2 {
83 Vec2 {
84 x: self.z,
85 y: self.z,
86 }
87 }
88
89 #[inline]
90 fn xxx(self) -> Vec3A {
91 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) }).into())
92 }
93
94 #[inline]
95 fn xxy(self) -> Vec3A {
96 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) }).into())
97 }
98
99 #[inline]
100 fn xxz(self) -> Vec3A {
101 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) }).into())
102 }
103
104 #[inline]
105 fn xyx(self) -> Vec3A {
106 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) }).into())
107 }
108
109 #[inline]
110 fn xyy(self) -> Vec3A {
111 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) }).into())
112 }
113
114 #[inline]
115 fn xyz(self) -> Vec3A {
116 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) }).into())
117 }
118
119 #[inline]
120 fn xzx(self) -> Vec3A {
121 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) }).into())
122 }
123
124 #[inline]
125 fn xzy(self) -> Vec3A {
126 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) }).into())
127 }
128
129 #[inline]
130 fn xzz(self) -> Vec3A {
131 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) }).into())
132 }
133
134 #[inline]
135 fn yxx(self) -> Vec3A {
136 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) }).into())
137 }
138
139 #[inline]
140 fn yxy(self) -> Vec3A {
141 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) }).into())
142 }
143
144 #[inline]
145 fn yxz(self) -> Vec3A {
146 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) }).into())
147 }
148
149 #[inline]
150 fn yyx(self) -> Vec3A {
151 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) }).into())
152 }
153
154 #[inline]
155 fn yyy(self) -> Vec3A {
156 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) }).into())
157 }
158
159 #[inline]
160 fn yyz(self) -> Vec3A {
161 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) }).into())
162 }
163
164 #[inline]
165 fn yzx(self) -> Vec3A {
166 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) }).into())
167 }
168
169 #[inline]
170 fn yzy(self) -> Vec3A {
171 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) }).into())
172 }
173
174 #[inline]
175 fn yzz(self) -> Vec3A {
176 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) }).into())
177 }
178
179 #[inline]
180 fn zxx(self) -> Vec3A {
181 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) }).into())
182 }
183
184 #[inline]
185 fn zxy(self) -> Vec3A {
186 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) }).into())
187 }
188
189 #[inline]
190 fn zxz(self) -> Vec3A {
191 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) }).into())
192 }
193
194 #[inline]
195 fn zyx(self) -> Vec3A {
196 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) }).into())
197 }
198
199 #[inline]
200 fn zyy(self) -> Vec3A {
201 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) }).into())
202 }
203
204 #[inline]
205 fn zyz(self) -> Vec3A {
206 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) }).into())
207 }
208
209 #[inline]
210 fn zzx(self) -> Vec3A {
211 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) }).into())
212 }
213
214 #[inline]
215 fn zzy(self) -> Vec3A {
216 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) }).into())
217 }
218
219 #[inline]
220 fn zzz(self) -> Vec3A {
221 Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) }).into())
222 }
223
224 #[inline]
225 fn xxxx(self) -> Vec4 {
226 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) })
227 }
228
229 #[inline]
230 fn xxxy(self) -> Vec4 {
231 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_00) })
232 }
233
234 #[inline]
235 fn xxxz(self) -> Vec4 {
236 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_00) })
237 }
238
239 #[inline]
240 fn xxyx(self) -> Vec4 {
241 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) })
242 }
243
244 #[inline]
245 fn xxyy(self) -> Vec4 {
246 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_00) })
247 }
248
249 #[inline]
250 fn xxyz(self) -> Vec4 {
251 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_00) })
252 }
253
254 #[inline]
255 fn xxzx(self) -> Vec4 {
256 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) })
257 }
258
259 #[inline]
260 fn xxzy(self) -> Vec4 {
261 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_00) })
262 }
263
264 #[inline]
265 fn xxzz(self) -> Vec4 {
266 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_00) })
267 }
268
269 #[inline]
270 fn xyxx(self) -> Vec4 {
271 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) })
272 }
273
274 #[inline]
275 fn xyxy(self) -> Vec4 {
276 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_00) })
277 }
278
279 #[inline]
280 fn xyxz(self) -> Vec4 {
281 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_00) })
282 }
283
284 #[inline]
285 fn xyyx(self) -> Vec4 {
286 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) })
287 }
288
289 #[inline]
290 fn xyyy(self) -> Vec4 {
291 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_00) })
292 }
293
294 #[inline]
295 fn xyyz(self) -> Vec4 {
296 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_00) })
297 }
298
299 #[inline]
300 fn xyzx(self) -> Vec4 {
301 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) })
302 }
303
304 #[inline]
305 fn xyzy(self) -> Vec4 {
306 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_00) })
307 }
308
309 #[inline]
310 fn xyzz(self) -> Vec4 {
311 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_00) })
312 }
313
314 #[inline]
315 fn xzxx(self) -> Vec4 {
316 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) })
317 }
318
319 #[inline]
320 fn xzxy(self) -> Vec4 {
321 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_00) })
322 }
323
324 #[inline]
325 fn xzxz(self) -> Vec4 {
326 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_00) })
327 }
328
329 #[inline]
330 fn xzyx(self) -> Vec4 {
331 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) })
332 }
333
334 #[inline]
335 fn xzyy(self) -> Vec4 {
336 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_00) })
337 }
338
339 #[inline]
340 fn xzyz(self) -> Vec4 {
341 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_00) })
342 }
343
344 #[inline]
345 fn xzzx(self) -> Vec4 {
346 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) })
347 }
348
349 #[inline]
350 fn xzzy(self) -> Vec4 {
351 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_00) })
352 }
353
354 #[inline]
355 fn xzzz(self) -> Vec4 {
356 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_00) })
357 }
358
359 #[inline]
360 fn yxxx(self) -> Vec4 {
361 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) })
362 }
363
364 #[inline]
365 fn yxxy(self) -> Vec4 {
366 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_01) })
367 }
368
369 #[inline]
370 fn yxxz(self) -> Vec4 {
371 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_01) })
372 }
373
374 #[inline]
375 fn yxyx(self) -> Vec4 {
376 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) })
377 }
378
379 #[inline]
380 fn yxyy(self) -> Vec4 {
381 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_01) })
382 }
383
384 #[inline]
385 fn yxyz(self) -> Vec4 {
386 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_01) })
387 }
388
389 #[inline]
390 fn yxzx(self) -> Vec4 {
391 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) })
392 }
393
394 #[inline]
395 fn yxzy(self) -> Vec4 {
396 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_01) })
397 }
398
399 #[inline]
400 fn yxzz(self) -> Vec4 {
401 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_01) })
402 }
403
404 #[inline]
405 fn yyxx(self) -> Vec4 {
406 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) })
407 }
408
409 #[inline]
410 fn yyxy(self) -> Vec4 {
411 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_01) })
412 }
413
414 #[inline]
415 fn yyxz(self) -> Vec4 {
416 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_01) })
417 }
418
419 #[inline]
420 fn yyyx(self) -> Vec4 {
421 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) })
422 }
423
424 #[inline]
425 fn yyyy(self) -> Vec4 {
426 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_01) })
427 }
428
429 #[inline]
430 fn yyyz(self) -> Vec4 {
431 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_01) })
432 }
433
434 #[inline]
435 fn yyzx(self) -> Vec4 {
436 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) })
437 }
438
439 #[inline]
440 fn yyzy(self) -> Vec4 {
441 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_01) })
442 }
443
444 #[inline]
445 fn yyzz(self) -> Vec4 {
446 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_01) })
447 }
448
449 #[inline]
450 fn yzxx(self) -> Vec4 {
451 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) })
452 }
453
454 #[inline]
455 fn yzxy(self) -> Vec4 {
456 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_01) })
457 }
458
459 #[inline]
460 fn yzxz(self) -> Vec4 {
461 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_01) })
462 }
463
464 #[inline]
465 fn yzyx(self) -> Vec4 {
466 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) })
467 }
468
469 #[inline]
470 fn yzyy(self) -> Vec4 {
471 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_01) })
472 }
473
474 #[inline]
475 fn yzyz(self) -> Vec4 {
476 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_01) })
477 }
478
479 #[inline]
480 fn yzzx(self) -> Vec4 {
481 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) })
482 }
483
484 #[inline]
485 fn yzzy(self) -> Vec4 {
486 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_01) })
487 }
488
489 #[inline]
490 fn yzzz(self) -> Vec4 {
491 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_01) })
492 }
493
494 #[inline]
495 fn zxxx(self) -> Vec4 {
496 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) })
497 }
498
499 #[inline]
500 fn zxxy(self) -> Vec4 {
501 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_10) })
502 }
503
504 #[inline]
505 fn zxxz(self) -> Vec4 {
506 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_10) })
507 }
508
509 #[inline]
510 fn zxyx(self) -> Vec4 {
511 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) })
512 }
513
514 #[inline]
515 fn zxyy(self) -> Vec4 {
516 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_10) })
517 }
518
519 #[inline]
520 fn zxyz(self) -> Vec4 {
521 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_10) })
522 }
523
524 #[inline]
525 fn zxzx(self) -> Vec4 {
526 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) })
527 }
528
529 #[inline]
530 fn zxzy(self) -> Vec4 {
531 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_10) })
532 }
533
534 #[inline]
535 fn zxzz(self) -> Vec4 {
536 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_10) })
537 }
538
539 #[inline]
540 fn zyxx(self) -> Vec4 {
541 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) })
542 }
543
544 #[inline]
545 fn zyxy(self) -> Vec4 {
546 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_10) })
547 }
548
549 #[inline]
550 fn zyxz(self) -> Vec4 {
551 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_10) })
552 }
553
554 #[inline]
555 fn zyyx(self) -> Vec4 {
556 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) })
557 }
558
559 #[inline]
560 fn zyyy(self) -> Vec4 {
561 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_10) })
562 }
563
564 #[inline]
565 fn zyyz(self) -> Vec4 {
566 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_10) })
567 }
568
569 #[inline]
570 fn zyzx(self) -> Vec4 {
571 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) })
572 }
573
574 #[inline]
575 fn zyzy(self) -> Vec4 {
576 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_10) })
577 }
578
579 #[inline]
580 fn zyzz(self) -> Vec4 {
581 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_10) })
582 }
583
584 #[inline]
585 fn zzxx(self) -> Vec4 {
586 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) })
587 }
588
589 #[inline]
590 fn zzxy(self) -> Vec4 {
591 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_10) })
592 }
593
594 #[inline]
595 fn zzxz(self) -> Vec4 {
596 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_10) })
597 }
598
599 #[inline]
600 fn zzyx(self) -> Vec4 {
601 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) })
602 }
603
604 #[inline]
605 fn zzyy(self) -> Vec4 {
606 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_10) })
607 }
608
609 #[inline]
610 fn zzyz(self) -> Vec4 {
611 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_10) })
612 }
613
614 #[inline]
615 fn zzzx(self) -> Vec4 {
616 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) })
617 }
618
619 #[inline]
620 fn zzzy(self) -> Vec4 {
621 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_10) })
622 }
623
624 #[inline]
625 fn zzzz(self) -> Vec4 {
626 Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_10) })
627 }
628 }