Compare commits
1056
Commits
2017.1
...
release_2019_4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3518404a73 | ||
|
|
bb9c219713 | ||
|
|
1e245a1743 | ||
|
|
21c07cf5bf | ||
|
|
32136c5d78 | ||
|
|
8a7ba18b8a | ||
|
|
d7e16d30e0 | ||
|
|
d66d86dd89 | ||
|
|
cc3703d1e8 | ||
|
|
31918ae0db | ||
|
|
7a48136017 | ||
|
|
362aefaa16 | ||
|
|
bc7178f49d | ||
|
|
3d6b86ec3f | ||
|
|
246c7f0e8b | ||
|
|
a10e96b1a3 | ||
|
|
1fadf7f2b6 | ||
|
|
385cd3542f | ||
|
|
9918cfd99a | ||
|
|
23236541f8 | ||
|
|
13ed6ee903 | ||
|
|
ee2d6662e8 | ||
|
|
3f88aba025 | ||
|
|
2a0aa1875b | ||
|
|
7a5948e542 | ||
|
|
36e812e30e | ||
|
|
9b8253f21c | ||
|
|
e0a7a7c667 | ||
|
|
6ee49ab434 | ||
|
|
8c589502d8 | ||
|
|
5185b8de44 | ||
|
|
72ff668f44 | ||
|
|
729d297f45 | ||
|
|
407997f406 | ||
|
|
2e341240ca | ||
|
|
25bb613124 | ||
|
|
a89097a556 | ||
|
|
21f2625d9e | ||
|
|
078feca004 | ||
|
|
52058d9947 | ||
|
|
2e2390d00e | ||
|
|
c808fa8732 | ||
|
|
fdbb79b677 | ||
|
|
9ab724ae47 | ||
|
|
b5e0387f1e | ||
|
|
9b86f0e824 | ||
|
|
6641c17b93 | ||
|
|
1c300e0240 | ||
|
|
6c5ac66a59 | ||
|
|
61b97e4931 | ||
|
|
cc17dbe2ea | ||
|
|
bb40bcfe45 | ||
|
|
634e09ddfc | ||
|
|
0e4a620768 | ||
|
|
c38117ab8b | ||
|
|
4cf852770e | ||
|
|
ceb30020b5 | ||
|
|
7257de9f11 | ||
|
|
d2a1ac464d | ||
|
|
9281c237a7 | ||
|
|
9d556599ab | ||
|
|
73f3be72e1 | ||
|
|
dca9e2627c | ||
|
|
c34b17418d | ||
|
|
8264b8cae3 | ||
|
|
38581f9571 | ||
|
|
d177a7d733 | ||
|
|
49050e1089 | ||
|
|
48c4bddc1b | ||
|
|
ed1d4b7d33 | ||
|
|
c5d94fbd08 | ||
|
|
0d8e992bdf | ||
|
|
2cfce03f6e | ||
|
|
7f861964ea | ||
|
|
122b384d60 | ||
|
|
eb142cfb4e | ||
|
|
f7262c805f | ||
|
|
f572e5ee05 | ||
|
|
827b8431ca | ||
|
|
712d80cc8a | ||
|
|
580ed9f3d6 | ||
|
|
e81315c131 | ||
|
|
cd731a3798 | ||
|
|
ee7dcc2d83 | ||
|
|
42cb917490 | ||
|
|
b72d3531c0 | ||
|
|
1bb16deb3b | ||
|
|
7a5d1f7d2b | ||
|
|
04bda70b3c | ||
|
|
5a18d0973e | ||
|
|
0498d68f5b | ||
|
|
517dde06e4 | ||
|
|
ce22e5917a | ||
|
|
fc0e652ae0 | ||
|
|
583046c291 | ||
|
|
e621a835fd | ||
|
|
b631f3ddf7 | ||
|
|
e5ff90084e | ||
|
|
74a61e0402 | ||
|
|
bd09cc4feb | ||
|
|
941e5dbcaa | ||
|
|
6b692ff0e9 | ||
|
|
dc24bae943 | ||
|
|
a856788e75 | ||
|
|
7f53c3d4b2 | ||
|
|
0587d54172 | ||
|
|
942eb219eb | ||
|
|
ef68893957 | ||
|
|
51ebee7cfd | ||
|
|
f75593392b | ||
|
|
733ef0ea04 | ||
|
|
5a97c88a69 | ||
|
|
70969b1bc3 | ||
|
|
e89dc0ab0a | ||
|
|
084bc3dc43 | ||
|
|
809f201583 | ||
|
|
b50ab76af5 | ||
|
|
8a43a95b5c | ||
|
|
1c7bc2fc90 | ||
|
|
bda7375e63 | ||
|
|
cce41dd964 | ||
|
|
3e9df0b074 | ||
|
|
21f25a0b00 | ||
|
|
6a3561cb87 | ||
|
|
cc289e8b1e | ||
|
|
5f91f48844 | ||
|
|
2f21848de8 | ||
|
|
b35d4657d5 | ||
|
|
4b58bb679c | ||
|
|
c6adbab340 | ||
|
|
b8d0f88336 | ||
|
|
68c9782e33 | ||
|
|
6a2c59f3e5 | ||
|
|
6b54d5f07b | ||
|
|
cd144a979f | ||
|
|
293ddffb46 | ||
|
|
af3e7861b6 | ||
|
|
8e3ca182b9 | ||
|
|
70febae55b | ||
|
|
086c19f25e | ||
|
|
1e8791da35 | ||
|
|
bb78c04b34 | ||
|
|
3aebe91e36 | ||
|
|
5cc39824e0 | ||
|
|
841a87469b | ||
|
|
1cc61a93a2 | ||
|
|
529b534939 | ||
|
|
e5b51ecebb | ||
|
|
b90444b943 | ||
|
|
d2b41f7598 | ||
|
|
31f4e47903 | ||
|
|
b607933e0f | ||
|
|
5084a11dec | ||
|
|
762b27d306 | ||
|
|
f2108084da | ||
|
|
e410548665 | ||
|
|
150240a9af | ||
|
|
b6a39a2d66 | ||
|
|
581b1894f2 | ||
|
|
f087d7e5ea | ||
|
|
82fcd4f673 | ||
|
|
6376b4bca7 | ||
|
|
758a8a5318 | ||
|
|
e339b32286 | ||
|
|
8c6ded28a8 | ||
|
|
e2157b8352 | ||
|
|
4d6cb464c4 | ||
|
|
0fb7fe719a | ||
|
|
f74789e210 | ||
|
|
78eade475e | ||
|
|
5690bdc02c | ||
|
|
a526612fdb | ||
|
|
bcef315789 | ||
|
|
cf45e99505 | ||
|
|
018a65e0b6 | ||
|
|
b5e8c7f452 | ||
|
|
a9887da9f1 | ||
|
|
67e342119a | ||
|
|
4716881485 | ||
|
|
877fcb47e4 | ||
|
|
0e01a9b200 | ||
|
|
3106257692 | ||
|
|
76cb4e0dc9 | ||
|
|
abda525b84 | ||
|
|
bdb4c78399 | ||
|
|
7f4e03b241 | ||
|
|
af70d684a5 | ||
|
|
ee1fd9c38b | ||
|
|
9e9d488834 | ||
|
|
42cd0f05d7 | ||
|
|
b46b9d157d | ||
|
|
550ce9c7df | ||
|
|
76aed77f59 | ||
|
|
25325244d7 | ||
|
|
a00cdc18ca | ||
|
|
4984e23c07 | ||
|
|
1f6179c1b8 | ||
|
|
02835ff59a | ||
|
|
ff9467ccae | ||
|
|
f9c2ff7c9f | ||
|
|
4def43086e | ||
|
|
4dd032dcff | ||
|
|
92192659d9 | ||
|
|
7b514173c3 | ||
|
|
edf319cde9 | ||
|
|
f7d3275e89 | ||
|
|
045a3a4e50 | ||
|
|
5d672fafc4 | ||
|
|
b02064a160 | ||
|
|
6ff7d22641 | ||
|
|
db569ee551 | ||
|
|
b6031fdb3a | ||
|
|
65f9bdb976 | ||
|
|
1c11cd5e8c | ||
|
|
91e2c2e7e5 | ||
|
|
478f97d66b | ||
|
|
6ca5208ab5 | ||
|
|
ad34bcd9e1 | ||
|
|
e3b5e01435 | ||
|
|
b0cdd23fb3 | ||
|
|
0ce7d93cef | ||
|
|
82a3c06a9d | ||
|
|
92c8c282f5 | ||
|
|
463d3ebd4c | ||
|
|
01ac38dd8a | ||
|
|
f7eb1fc160 | ||
|
|
03573abc3b | ||
|
|
7d746ba947 | ||
|
|
5dcecdb3bd | ||
|
|
6f0cc614e2 | ||
|
|
7d30709306 | ||
|
|
3eb9211520 | ||
|
|
85bd0d39c3 | ||
|
|
f7b8563e57 | ||
|
|
f4859ee094 | ||
|
|
711cd6ce1c | ||
|
|
e3c9f12012 | ||
|
|
fc64f1a958 | ||
|
|
21ac50c204 | ||
|
|
2d2f8f4f31 | ||
|
|
2bc90c07bf | ||
|
|
08dc7ec98b | ||
|
|
3014dd35a8 | ||
|
|
7d94302712 | ||
|
|
934131b877 | ||
|
|
545969161e | ||
|
|
322c353898 | ||
|
|
53c4ac77cf | ||
|
|
54f989f6f5 | ||
|
|
d6a07e9477 | ||
|
|
29d5ae2cd0 | ||
|
|
5b787e19d4 | ||
|
|
b4ea675c9a | ||
|
|
e3940fdf19 | ||
|
|
6d2c89b127 | ||
|
|
d091fc857b | ||
|
|
4152deb15e | ||
|
|
22b1b0cc40 | ||
|
|
19190f4e5e | ||
|
|
f169805fbc | ||
|
|
86190675a2 | ||
|
|
95e121159f | ||
|
|
797bf2fee5 | ||
|
|
dd4a880ec3 | ||
|
|
1dabbab599 | ||
|
|
a45dcb8a01 | ||
|
|
111e8a5588 | ||
|
|
92f4a9e056 | ||
|
|
d3d5b961ff | ||
|
|
6d5a3c047d | ||
|
|
21d947ed6c | ||
|
|
6d5937d18f | ||
|
|
c7cc70c22e | ||
|
|
b47a0b5b72 | ||
|
|
09c6155583 | ||
|
|
7a0edaec06 | ||
|
|
242ba3c2c7 | ||
|
|
dc76661a53 | ||
|
|
a044e17fdc | ||
|
|
bdce9a1841 | ||
|
|
a51799c279 | ||
|
|
34691a0555 | ||
|
|
db69b45c58 | ||
|
|
f7ee5d0d39 | ||
|
|
267d6b2eb7 | ||
|
|
308954635e | ||
|
|
8e0a60eec7 | ||
|
|
7ada0b56f9 | ||
|
|
3e16235c12 | ||
|
|
e4f0269d94 | ||
|
|
c7afb0910d | ||
|
|
fb95762293 | ||
|
|
6490191972 | ||
|
|
5d64910083 | ||
|
|
8188fbd7be | ||
|
|
0169f04a7a | ||
|
|
660482b294 | ||
|
|
dfa6230ad6 | ||
|
|
ddc37aee80 | ||
|
|
6d0fa311c1 | ||
|
|
9a8276d76e | ||
|
|
e47929dcbe | ||
|
|
6f88910466 | ||
|
|
0b9b7c8ed5 | ||
|
|
165c82f26f | ||
|
|
e96a28b38a | ||
|
|
bac8d6afe8 | ||
|
|
d2cd236318 | ||
|
|
f13aec70dd | ||
|
|
bd4a554b27 | ||
|
|
466f094800 | ||
|
|
bff7b0d70a | ||
|
|
05649977a6 | ||
|
|
1497941c3d | ||
|
|
73cf651664 | ||
|
|
d12570ccf9 | ||
|
|
0663286a90 | ||
|
|
e2dd26ee5a | ||
|
|
27627b6d05 | ||
|
|
aef4970aa2 | ||
|
|
f7b77b6f9c | ||
|
|
3d8afdb7be | ||
|
|
6a6bd0fca8 | ||
|
|
518f15d490 | ||
|
|
4638ea2baf | ||
|
|
426e16c75b | ||
|
|
f8bff8dfda | ||
|
|
ab6cf631f4 | ||
|
|
1e7a694c80 | ||
|
|
5a10867d56 | ||
|
|
c50ff53b32 | ||
|
|
684699ace9 | ||
|
|
adc1900d18 | ||
|
|
bcbbb54b70 | ||
|
|
842bce8b32 | ||
|
|
d78e80b548 | ||
|
|
cfdd332a18 | ||
|
|
73007931b2 | ||
|
|
54f3b551ef | ||
|
|
31d2fb67e2 | ||
|
|
db586939e9 | ||
|
|
4ae052cb9c | ||
|
|
aab29b241e | ||
|
|
3d5b90364a | ||
|
|
10658b2801 | ||
|
|
9edfdacd72 | ||
|
|
f060b6042d | ||
|
|
15e66758df | ||
|
|
83f41e04b1 | ||
|
|
a870858bb6 | ||
|
|
34cdde604e | ||
|
|
7c039a2fb8 | ||
|
|
951256c07b | ||
|
|
593e075399 | ||
|
|
56dcddfb83 | ||
|
|
513988e51b | ||
|
|
dfc6d88432 | ||
|
|
9dc2bcc2f9 | ||
|
|
07454f2045 | ||
|
|
9f453ef376 | ||
|
|
5517cd4ccf | ||
|
|
5b7938eda6 | ||
|
|
eb0bf063b8 | ||
|
|
ec0f3bb2ac | ||
|
|
db85279b8c | ||
|
|
cdbca77495 | ||
|
|
df0b7bc7bb | ||
|
|
9998855527 | ||
|
|
92a19869e7 | ||
|
|
ac7b642d8a | ||
|
|
d2a99cbab2 | ||
|
|
1a39f9ddc0 | ||
|
|
0e9fb73463 | ||
|
|
5ff7d510d7 | ||
|
|
bb1d7f5b39 | ||
|
|
06d64b76f7 | ||
|
|
55753a1bf5 | ||
|
|
ea68229303 | ||
|
|
bac68a93df | ||
|
|
4afd1b3fef | ||
|
|
5c6e9afe06 | ||
|
|
8e6d5e6010 | ||
|
|
ff92ac7929 | ||
|
|
03c06e91e8 | ||
|
|
db23d50614 | ||
|
|
21d58357f2 | ||
|
|
5f80d79540 | ||
|
|
1ba843fbec | ||
|
|
0f5548f5f9 | ||
|
|
d2b8b5567f | ||
|
|
a1ad9abc0d | ||
|
|
470a8a3920 | ||
|
|
c0984b2ca4 | ||
|
|
e3e8fa1547 | ||
|
|
e8a4830229 | ||
|
|
9bce2de57b | ||
|
|
bd1e79179b | ||
|
|
862f7b99a7 | ||
|
|
f7e67c8a63 | ||
|
|
1ba1b9f967 | ||
|
|
01d5f23e8f | ||
|
|
caad4dfc14 | ||
|
|
50c0f6ef59 | ||
|
|
b64fda77b5 | ||
|
|
5f6747d6a1 | ||
|
|
366bbd6548 | ||
|
|
4e68de8917 | ||
|
|
023c6288d6 | ||
|
|
c86f4d04dc | ||
|
|
36a9d552da | ||
|
|
14a8d024b9 | ||
|
|
2e5cfd9333 | ||
|
|
9813c9873f | ||
|
|
abe0248c1e | ||
|
|
7150817fc4 | ||
|
|
195f5893c9 | ||
|
|
5ace9e080f | ||
|
|
337cf2d371 | ||
|
|
52d0236f9a | ||
|
|
0898accd58 | ||
|
|
d71e28b7b7 | ||
|
|
ae7b827b0c | ||
|
|
f9b43526f4 | ||
|
|
1e77613a1b | ||
|
|
70dba27f9e | ||
|
|
40bd5ceb5a | ||
|
|
445e7f339e | ||
|
|
5b42298a25 | ||
|
|
ea0c249ad9 | ||
|
|
713a8eec50 | ||
|
|
afec261872 | ||
|
|
b055b4c7dc | ||
|
|
eda86dc44a | ||
|
|
7007cae02d | ||
|
|
af8220968c | ||
|
|
704b1a4e9a | ||
|
|
80055d42ff | ||
|
|
d96baad91d | ||
|
|
f715e5c99e | ||
|
|
86b0583b6b | ||
|
|
ac31bb6779 | ||
|
|
0fc670bcd7 | ||
|
|
75a22be362 | ||
|
|
fdc99a2935 | ||
|
|
ed0ade034e | ||
|
|
83873f4dbf | ||
|
|
20086d14a6 | ||
|
|
637857fb56 | ||
|
|
c523f1bd8b | ||
|
|
95ebfff19c | ||
|
|
1df330ff2c | ||
|
|
1db248a34e | ||
|
|
ad6f5c8727 | ||
|
|
0b5ad33a8c | ||
|
|
46e6b8ff14 | ||
|
|
c6f9d8f92c | ||
|
|
605d07688b | ||
|
|
6adcb2b31e | ||
|
|
094bfae8f1 | ||
|
|
ec5ac09566 | ||
|
|
e020546f29 | ||
|
|
ed1e8c2273 | ||
|
|
033ff82192 | ||
|
|
4be04e28bf | ||
|
|
855d8f4e2e | ||
|
|
f77e47a921 | ||
|
|
37aa46d77b | ||
|
|
7884f82432 | ||
|
|
88b507b169 | ||
|
|
151fb666e4 | ||
|
|
983e0dacd4 | ||
|
|
98f4ec62ec | ||
|
|
ee3bf41a27 | ||
|
|
58eb994a60 | ||
|
|
ad325ac974 | ||
|
|
6bbb44309d | ||
|
|
2bbe696af2 | ||
|
|
a1dd1a77c9 | ||
|
|
c8a885be83 | ||
|
|
0519fd1462 | ||
|
|
7c09f3339b | ||
|
|
6794b61fab | ||
|
|
84ddb4ba21 | ||
|
|
172f1b7934 | ||
|
|
c91207cfe9 | ||
|
|
08ab75f262 | ||
|
|
e287c86315 | ||
|
|
c7872831e9 | ||
|
|
def645a057 | ||
|
|
dcea53b242 | ||
|
|
d5f0c62f56 | ||
|
|
c4901b6a7f | ||
|
|
009404dd37 | ||
|
|
f11be042a6 | ||
|
|
a1c146d439 | ||
|
|
8c90739f6d | ||
|
|
24c0f86eda | ||
|
|
bbf462d1fb | ||
|
|
b6588cd6ba | ||
|
|
0a6347fa43 | ||
|
|
f0b423b319 | ||
|
|
e4000e88be | ||
|
|
9c91ec50b0 | ||
|
|
c65a5d04b1 | ||
|
|
dca4c3c16b | ||
|
|
32d0b01694 | ||
|
|
61975757f4 | ||
|
|
963fbdc564 | ||
|
|
b1317457ab | ||
|
|
1c9b4c1afd | ||
|
|
1a37a9af34 | ||
|
|
dcf506e3d7 | ||
|
|
269c1eb88c | ||
|
|
704808b26f | ||
|
|
ce0a8a6444 | ||
|
|
2584a1f4e2 | ||
|
|
2a3420eedf | ||
|
|
31920972eb | ||
|
|
3cc51e0d01 | ||
|
|
12bf007caf | ||
|
|
e43e604966 | ||
|
|
9a036cc249 | ||
|
|
382f17ffa2 | ||
|
|
59f32e9942 | ||
|
|
7b735cfd17 | ||
|
|
e55ae5ba31 | ||
|
|
ea7f900e81 | ||
|
|
e47bd10096 | ||
|
|
331c3e8c26 | ||
|
|
e1df15a7b9 | ||
|
|
2d9b9a43de | ||
|
|
568e2f3e36 | ||
|
|
bf2b56a69e | ||
|
|
f72f780862 | ||
|
|
0ba6f9b7a0 | ||
|
|
f5a4ad1db0 | ||
|
|
633521b35e | ||
|
|
9af5780c12 | ||
|
|
a7ef02459a | ||
|
|
872d24bf6a | ||
|
|
c249c6c794 | ||
|
|
67cec7dda7 | ||
|
|
a635592dc1 | ||
|
|
d29cabd0b3 | ||
|
|
bac9f7fbc4 | ||
|
|
b6692b9842 | ||
|
|
ca3e2f48ee | ||
|
|
c5d0362df5 | ||
|
|
b00bfb8964 | ||
|
|
5e0c0a6f18 | ||
|
|
f08f27717f | ||
|
|
17ec0747f2 | ||
|
|
089ccb1d6c | ||
|
|
83cd1b94b6 | ||
|
|
91b4e80384 | ||
|
|
fe38cfff6a | ||
|
|
e5280f99ca | ||
|
|
e9877acf80 | ||
|
|
5edaedfd37 | ||
|
|
1ee4f829a4 | ||
|
|
c340256425 | ||
|
|
3a6dcfcd03 | ||
|
|
a18aa0b9a6 | ||
|
|
0489cac94d | ||
|
|
04e82969a9 | ||
|
|
2695b16e9c | ||
|
|
5f56a167d1 | ||
|
|
cbd782d0c1 | ||
|
|
fbee41f6fe | ||
|
|
415b9dd5ff | ||
|
|
608e56940a | ||
|
|
4ac998d55e | ||
|
|
1fc8430e1d | ||
|
|
bb8770c63e | ||
|
|
1b6318ef5b | ||
|
|
8c388b3b96 | ||
|
|
0e451fd768 | ||
|
|
648caa9c35 | ||
|
|
8ce17dec8d | ||
|
|
2c8cc114eb | ||
|
|
50dc290d40 | ||
|
|
c13cac79a0 | ||
|
|
835aedd669 | ||
|
|
7dde56ea6a | ||
|
|
2340b0d619 | ||
|
|
060a5e7461 | ||
|
|
20f87b084f | ||
|
|
535f7c1a9c | ||
|
|
31b2c7d243 | ||
|
|
9df3edad31 | ||
|
|
5303187bea | ||
|
|
20106d5ce1 | ||
|
|
0c3f830c31 | ||
|
|
f79e50d529 | ||
|
|
e1a7141352 | ||
|
|
8f754be165 | ||
|
|
f41c64d3f6 | ||
|
|
42ed53e71e | ||
|
|
a39f531f01 | ||
|
|
baf82f680a | ||
|
|
41e5d36c00 | ||
|
|
9f940d1609 | ||
|
|
38e7a1aaf0 | ||
|
|
3ffe76d161 | ||
|
|
af1657f7e5 | ||
|
|
bbd003f047 | ||
|
|
f93638bcd1 | ||
|
|
aed783f5ca | ||
|
|
0d79639c96 | ||
|
|
ce78412190 | ||
|
|
449f90b361 | ||
|
|
4c92d51b63 | ||
|
|
b5f9e77154 | ||
|
|
6f69433d0e | ||
|
|
7783695d8d | ||
|
|
166d82b44f | ||
|
|
66ac70850b | ||
|
|
1450f3cd94 | ||
|
|
6acfe0688f | ||
|
|
31c9f9fecc | ||
|
|
6bf5723278 | ||
|
|
5e448297e0 | ||
|
|
73fd3a7212 | ||
|
|
0a1c1250dd | ||
|
|
e62fd41e9a | ||
|
|
ef70d38ff7 | ||
|
|
f2e4ad1661 | ||
|
|
2408224379 | ||
|
|
8913dffe2c | ||
|
|
bae6bd73d6 | ||
|
|
6d82e9265a | ||
|
|
42342c5c5f | ||
|
|
ca20cb7bc9 | ||
|
|
0df32f239e | ||
|
|
90efb11775 | ||
|
|
0b6a0d5d8b | ||
|
|
fc92cb1ad9 | ||
|
|
ed386fdbdf | ||
|
|
e7a3345f09 | ||
|
|
b2bad8ab05 | ||
|
|
4af9e42610 | ||
|
|
803532bc1c | ||
|
|
a17af20793 | ||
|
|
919afad03b | ||
|
|
713754e0e6 | ||
|
|
e3322adf2e | ||
|
|
72c2596251 | ||
|
|
e31624a4b7 | ||
|
|
70d619a173 | ||
|
|
333fc7eea2 | ||
|
|
9773c30fdc | ||
|
|
683b87d0b8 | ||
|
|
6ae9c2eca5 | ||
|
|
3a6a22df2e | ||
|
|
5423d0b053 | ||
|
|
adb9542c31 | ||
|
|
f0b817eb0a | ||
|
|
9da3ac3d3c | ||
|
|
1d7fc6e9d4 | ||
|
|
f943d93335 | ||
|
|
9e041c1f0a | ||
|
|
c99e79364f | ||
|
|
471b1757df | ||
|
|
ce72797ce2 | ||
|
|
22cbf44a32 | ||
|
|
0dda63f7ae | ||
|
|
143cf6a02d | ||
|
|
2c90dcf06d | ||
|
|
556ed98d8c | ||
|
|
9f70423f25 | ||
|
|
d413b124c8 | ||
|
|
d953bcaa9d | ||
|
|
079be93667 | ||
|
|
393b601c16 | ||
|
|
f49256bbd4 | ||
|
|
28e4924f83 | ||
|
|
7ec02d28ea | ||
|
|
ae66220ca9 | ||
|
|
849ee12192 | ||
|
|
5577a901da | ||
|
|
7c863ddf00 | ||
|
|
56cac267a2 | ||
|
|
3348c886e5 | ||
|
|
4ee0523b51 | ||
|
|
f4dfc4e298 | ||
|
|
1c6e3cb0da | ||
|
|
5c3f067715 | ||
|
|
365eadc807 | ||
|
|
8b3b3c3f00 | ||
|
|
0a53d2828d | ||
|
|
2c52425d99 | ||
|
|
43c223368c | ||
|
|
6672127c68 | ||
|
|
4c87845f8c | ||
|
|
68e86ad41a | ||
|
|
95e04cf485 | ||
|
|
f7a5f98f85 | ||
|
|
9040c60585 | ||
|
|
cad064b9da | ||
|
|
c569f921a2 | ||
|
|
417f8d2286 | ||
|
|
899f010959 | ||
|
|
2ac430bbe5 | ||
|
|
3f60f7a83c | ||
|
|
05ff92fdea | ||
|
|
3edb759f0f | ||
|
|
ab5cab3656 | ||
|
|
911c0fabba | ||
|
|
e228f3477a | ||
|
|
c479493e02 | ||
|
|
63590fc92d | ||
|
|
f852481576 | ||
|
|
686ba504c2 | ||
|
|
978cf4f4ed | ||
|
|
5bd37772fe | ||
|
|
1d636d6591 | ||
|
|
8a26cf2b49 | ||
|
|
be1518140c | ||
|
|
125e65e575 | ||
|
|
3ac18a9977 | ||
|
|
ea8ab3df8e | ||
|
|
c17f7dd3d4 | ||
|
|
987faffaf2 | ||
|
|
33572e2104 | ||
|
|
592f5fb4b1 | ||
|
|
cb3cf7d651 | ||
|
|
4686ce7e91 | ||
|
|
8b21d57750 | ||
|
|
455c1230b1 | ||
|
|
1a9d736f28 | ||
|
|
88d90bde8f | ||
|
|
30d4e61bb6 | ||
|
|
f849c9d01d | ||
|
|
bfa43df491 | ||
|
|
8672d14319 | ||
|
|
c91f5282f5 | ||
|
|
618ed72241 | ||
|
|
76f5ee1dc0 | ||
|
|
90ad069485 | ||
|
|
0c01c39698 | ||
|
|
928aa45bfc | ||
|
|
4da2b1f8f4 | ||
|
|
99b0cf0ac9 | ||
|
|
b3ff2e3c5c | ||
|
|
5d3dd37ff5 | ||
|
|
c19d4c896f | ||
|
|
ec852affbe | ||
|
|
22b4d2a2b9 | ||
|
|
351fa35ec3 | ||
|
|
b3a3b10af5 | ||
|
|
fc199187f2 | ||
|
|
604c3c85eb | ||
|
|
088ddd77a8 | ||
|
|
f9fb08e490 | ||
|
|
0d30132cc4 | ||
|
|
0dcd343026 | ||
|
|
ebdf324399 | ||
|
|
3ceb55c307 | ||
|
|
d3aba74d8b | ||
|
|
21189bb887 | ||
|
|
9ae7f70062 | ||
|
|
91b0c5d05f | ||
|
|
b02596ddfa | ||
|
|
3e59dd5396 | ||
|
|
f9e4afda77 | ||
|
|
faf9e7655f | ||
|
|
4f3044fec8 | ||
|
|
2208e3dc53 | ||
|
|
a5c4287e53 | ||
|
|
adf8c3e5fc | ||
|
|
4b854d4545 | ||
|
|
5fbf7b1acc | ||
|
|
6e3216e067 | ||
|
|
2b2c3e1194 | ||
|
|
a9cd67659a | ||
|
|
7903ef9c1e | ||
|
|
0d5c19db00 | ||
|
|
9e7e9176cb | ||
|
|
506bf8ed6f | ||
|
|
bfc7a55f70 | ||
|
|
2b7349bf9b | ||
|
|
e4f30555e6 | ||
|
|
1a9d2b8eab | ||
|
|
bdb68a9aef | ||
|
|
d1b6667ac6 | ||
|
|
a318ed1a40 | ||
|
|
74dc4bbe5b | ||
|
|
90e17c5868 | ||
|
|
c512992e2c | ||
|
|
952ea1651f | ||
|
|
343caebcf6 | ||
|
|
66b278b1c9 | ||
|
|
69781acc51 | ||
|
|
37b6453644 | ||
|
|
b887a4a89e | ||
|
|
634601b4b6 | ||
|
|
9d17e2e7e6 | ||
|
|
6488c6538e | ||
|
|
85207c6355 | ||
|
|
7c40f7afe8 | ||
|
|
53d86e518a | ||
|
|
e7f9940582 | ||
|
|
ead9f9a634 | ||
|
|
ae37145d22 | ||
|
|
78d93e50dd | ||
|
|
84da941fa4 | ||
|
|
dc16b3f45b | ||
|
|
0cf64d338b | ||
|
|
593a5f909c | ||
|
|
fe4a921836 | ||
|
|
adf32d1d22 | ||
|
|
0e7dc3242d | ||
|
|
17a1f7eac9 | ||
|
|
a2d412ccfa | ||
|
|
28fe1533b7 | ||
|
|
6fad9eea84 | ||
|
|
595f918f4d | ||
|
|
ad20275dae | ||
|
|
09694409f1 | ||
|
|
8baf8cd49b | ||
|
|
bc0c674dc2 | ||
|
|
f1f4fe9a2d | ||
|
|
5cd4378758 | ||
|
|
f027b94dd4 | ||
|
|
8dbfa61234 | ||
|
|
90f9e2645b | ||
|
|
8795f2c732 | ||
|
|
6b4cc4e7e9 | ||
|
|
ee11528ddf | ||
|
|
c73e58893e | ||
|
|
c4de8f1af8 | ||
|
|
f84a535b2b | ||
|
|
0b0fc67ada | ||
|
|
609a37712d | ||
|
|
0c2fa352c1 | ||
|
|
2218ab96aa | ||
|
|
c1e0e325f9 | ||
|
|
0230852d60 | ||
|
|
a980300e92 | ||
|
|
7a87c4cd4b | ||
|
|
d1536031c9 | ||
|
|
d57dd6dd9c | ||
|
|
8e908c2a78 | ||
|
|
c3a5405cc4 | ||
|
|
bc8df375f0 | ||
|
|
0d993011d8 | ||
|
|
7dce69e60e | ||
|
|
2f41f47898 | ||
|
|
a7363b329b | ||
|
|
1d9b322e3e | ||
|
|
cfb690b035 | ||
|
|
7257ba2722 | ||
|
|
451ad785de | ||
|
|
af626143a5 | ||
|
|
1e38ce53c4 | ||
|
|
967ae81dfd | ||
|
|
91fc0f4148 | ||
|
|
b5ff43a821 | ||
|
|
c39168967f | ||
|
|
43f492cded | ||
|
|
f0da5b630b | ||
|
|
85ab7d1e96 | ||
|
|
cf984ca245 | ||
|
|
896fbf09b6 | ||
|
|
2610783d89 | ||
|
|
3ab77e500b | ||
|
|
b715372abc | ||
|
|
d3a3ececae | ||
|
|
e3a6c3257e | ||
|
|
3a03252d3f | ||
|
|
4fdff00908 | ||
|
|
59ae7b0dd5 | ||
|
|
c71a0c410c | ||
|
|
798944ff38 | ||
|
|
e587f081d6 | ||
|
|
2d0634ef10 | ||
|
|
fdea8113a0 | ||
|
|
a72da67d32 | ||
|
|
e604d24c40 | ||
|
|
72ae4d5695 | ||
|
|
a11870ad77 | ||
|
|
0c437fbab0 | ||
|
|
83c24c5cd0 | ||
|
|
1e7d934cb8 | ||
|
|
49caaa1b0b | ||
|
|
95ef8c3eec | ||
|
|
4731f379f4 | ||
|
|
8beb516b80 | ||
|
|
3d2ac64ce6 | ||
|
|
8f4e521f0b | ||
|
|
84305c155c | ||
|
|
687bfad4a6 | ||
|
|
3f06724cad | ||
|
|
64a97d37f1 | ||
|
|
41348f5130 | ||
|
|
99f54eedbc | ||
|
|
a24282c0de | ||
|
|
ca85b740a6 | ||
|
|
b586c6ce53 | ||
|
|
5f9a6d7046 | ||
|
|
d62fdc2e11 | ||
|
|
6a7691daa0 | ||
|
|
b19ca8ee99 | ||
|
|
5c614c77e2 | ||
|
|
6cf0b87f7b | ||
|
|
c4400c0afc | ||
|
|
3c8cd26846 | ||
|
|
a9ca7f1223 | ||
|
|
d86adce7ea | ||
|
|
fc87d2e1aa | ||
|
|
48f5180605 | ||
|
|
ea08c8c730 | ||
|
|
919e3ad0cb | ||
|
|
602ebbfe46 | ||
|
|
9f2509e7de | ||
|
|
1d287541e3 | ||
|
|
4700cb802e | ||
|
|
64efa00054 | ||
|
|
d8413b1cb4 | ||
|
|
ab3780d347 | ||
|
|
8b0d9a02ec | ||
|
|
2d9b2db683 | ||
|
|
1227ad313e | ||
|
|
0a3edfdcbc | ||
|
|
f6b45faf80 | ||
|
|
be9e2de21d | ||
|
|
94506d7dd6 | ||
|
|
78d1d72f54 | ||
|
|
4037593a05 | ||
|
|
937ae0355b | ||
|
|
09d78308be | ||
|
|
869c72ab70 | ||
|
|
39550cd03e | ||
|
|
89b33f6ce9 | ||
|
|
062da81f7d | ||
|
|
f00cc3015f | ||
|
|
31b2f8d1f6 | ||
|
|
86a26be6d6 | ||
|
|
efe280bbc1 | ||
|
|
2470177190 | ||
|
|
0b9bb91ae5 | ||
|
|
0ef9b97349 | ||
|
|
af4fb739e7 | ||
|
|
e496515a14 | ||
|
|
70997adc9c | ||
|
|
cbbcc98832 | ||
|
|
855f0cbbbf | ||
|
|
ddebf71e02 | ||
|
|
9d1faa791b | ||
|
|
e301b231db | ||
|
|
05ac4f3b6e | ||
|
|
12120e443b | ||
|
|
42b286909d | ||
|
|
ba4e07e361 | ||
|
|
b9610951d8 | ||
|
|
5de050ab62 | ||
|
|
eaf9df8551 | ||
|
|
37ead804bf | ||
|
|
bb5c1d49b6 | ||
|
|
d9c8de2951 | ||
|
|
ece2cbfe14 | ||
|
|
9269468a7b | ||
|
|
c9789a415e | ||
|
|
610c8b2901 | ||
|
|
802153883e | ||
|
|
2399e733b4 | ||
|
|
2e375112e6 | ||
|
|
1ac63f0158 | ||
|
|
42fc52b8f7 | ||
|
|
43c647e2d2 | ||
|
|
289ac4ab63 | ||
|
|
fc02982acc | ||
|
|
2305a74e6c | ||
|
|
4f74235ca1 | ||
|
|
ff65a3f285 | ||
|
|
db1c3b3f40 | ||
|
|
2d6d554cb1 | ||
|
|
332cf7be70 | ||
|
|
0a1fdee998 | ||
|
|
6ecc2d630b | ||
|
|
8ec7f02433 | ||
|
|
4e60574bf0 | ||
|
|
d80b1fc848 | ||
|
|
299b3a1cf7 | ||
|
|
9e06323ba7 | ||
|
|
e089900571 | ||
|
|
8c5b69dce6 | ||
|
|
91969770d5 | ||
|
|
2c6322631b | ||
|
|
63c81e27a2 | ||
|
|
96c68c4d0b | ||
|
|
244c9af3c6 | ||
|
|
8d68203727 | ||
|
|
01864b4d0c | ||
|
|
01b1e0d6f1 | ||
|
|
2e117c4b6d | ||
|
|
053ca3d8d1 | ||
|
|
3f19a0393a | ||
|
|
3a192c8089 | ||
|
|
f2c7ecbbdf | ||
|
|
bec7aa4aac | ||
|
|
faae66b304 | ||
|
|
3c72ce7459 | ||
|
|
48811959fd | ||
|
|
c6c49b2d45 | ||
|
|
0455cb33f5 | ||
|
|
0d98b02431 | ||
|
|
cad595a32c | ||
|
|
e536f20e36 | ||
|
|
94551bf689 | ||
|
|
7bc89acdf5 | ||
|
|
1982f4459a | ||
|
|
4bb88a51b7 | ||
|
|
83e5497a18 | ||
|
|
e57e51a839 | ||
|
|
9d0b86ad98 | ||
|
|
9a36d48d1e | ||
|
|
da756c9a4c | ||
|
|
997f952b86 | ||
|
|
77e748a5e1 | ||
|
|
9bcde198a5 | ||
|
|
b4166be89b | ||
|
|
eb25472f11 | ||
|
|
6ac340f602 | ||
|
|
31b9b74ca8 | ||
|
|
db4f18c70d | ||
|
|
2b9ea45e33 | ||
|
|
a66daa9ac0 | ||
|
|
99ea3b2a25 | ||
|
|
a2554a9f75 | ||
|
|
8370caf705 | ||
|
|
d60a9c82d5 | ||
|
|
293a2a84c3 | ||
|
|
73dd912fd6 | ||
|
|
68affaa4bc | ||
|
|
ea047cde78 | ||
|
|
5d35455492 | ||
|
|
7e7d661bf1 | ||
|
|
70b24f9097 | ||
|
|
7a814f930d | ||
|
|
0b432c07fd | ||
|
|
ecfdd1ccb7 | ||
|
|
ba549822c9 | ||
|
|
8b6109be79 | ||
|
|
ad3169c3c0 | ||
|
|
81b88df3a2 | ||
|
|
738e13a664 | ||
|
|
d7fbaede79 | ||
|
|
652a55b4fb | ||
|
|
05c2878eec | ||
|
|
894beccb28 | ||
|
|
e6c5ffa97a | ||
|
|
fba8dadee7 | ||
|
|
e953b35c62 | ||
|
|
72f3dcfc19 | ||
|
|
148588b179 |
+18
-13
@@ -2,19 +2,22 @@
|
||||
/distr/
|
||||
/deps/
|
||||
|
||||
/bin/app/data/java/lib/
|
||||
/bin/app/data/projects/ignored/
|
||||
/bin/app/data/java/
|
||||
/bin/app/data/python/
|
||||
/bin/app/user/log/
|
||||
/bin/app/user/ApplicationSettings.xml
|
||||
/bin/app/user/window_settings.ini
|
||||
/bin/app/*.log
|
||||
|
||||
/bin/test/data/log/
|
||||
/bin/test/data/temp.xml
|
||||
/bin/test/data/TestSettings.xml
|
||||
/bin/test/data/CommandlineTestSuite/settings.xml
|
||||
/bin/test/data/ConfigManagerTestSuite/temp.xml
|
||||
/bin/test/data/UtilityMavenTestSuite/effective-pom.xml
|
||||
/bin/test/data/SourceGroupTestSuite/java_maven/input/sourcetrail_dependencies
|
||||
|
||||
/java_indexer/bin/
|
||||
/java_indexer/lib/
|
||||
/java_indexer/target/
|
||||
|
||||
/setup/Linux/lib/
|
||||
|
||||
@@ -22,12 +25,13 @@
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPlugin/bin
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPlugin/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPlugin.IntegrationTests/bin/
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPlugin.IntegrationTests/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPluginUtility/bin
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPluginUtility/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtension/bin
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtension/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtensionTests/bin/Debug
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtensionTests/bin/Release
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtensionTests/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtensionUtility/bin
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailExtensionUtility/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/VCProjectEngineWrapperInterfaces/bin
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/VCProjectEngineWrapperInterfaces/obj
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/VCProjectEngineWrapper/bin
|
||||
@@ -37,7 +41,6 @@
|
||||
|
||||
/ide_plugins/vs/vs2015/SourcetrailPlugin/TestResults
|
||||
|
||||
*.coatidb
|
||||
*.srctrldb
|
||||
*.srctrlbm
|
||||
*.suo
|
||||
@@ -47,13 +50,14 @@
|
||||
*.swp
|
||||
*.swo
|
||||
*.VC.db
|
||||
*.timing
|
||||
|
||||
.clang_complete
|
||||
.ycm_extra_conf.py
|
||||
.ycm_extra_conf.pyc
|
||||
|
||||
sourcetrail.srctrlprj
|
||||
compile_commands.json
|
||||
Sourcetrail.srctrlprj
|
||||
Sourcetrail_dev.srctrlprj
|
||||
|
||||
Makefile
|
||||
CMakeLists.txt.user*
|
||||
@@ -63,5 +67,6 @@ CMakeLists.txt.user*
|
||||
/deployment/windows/wixSetup/build
|
||||
/deployment/windows/wixSetup/CustomActions/UninstallRemoveLogFolder/bin
|
||||
/deployment/windows/wixSetup/CustomActions/UninstallRemoveLogFolder/obj
|
||||
/deployment/windows/wixSetup/CustomActions/.vs
|
||||
/deployment/windows/wixSetup/Setup/build/Setup/Release
|
||||
/deployment/windows/wixSetup/Setup/build/Setup/x64
|
||||
|
||||
+96
-77
@@ -1,94 +1,113 @@
|
||||
.script_template: &script_definition
|
||||
variables:
|
||||
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
|
||||
IMAGE_64: coatisoftware/centos7_64_qt_llvm:qt5126-llvm900
|
||||
IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm800
|
||||
|
||||
## Templates ##
|
||||
|
||||
.build_template: &build_def
|
||||
stage: build
|
||||
before_script:
|
||||
# CCache Config/jobs
|
||||
- mkdir -p ccache
|
||||
- export CCACHE_BASEDIR=${PWD}
|
||||
- export CCACHE_DIR=${PWD}/ccache
|
||||
script:
|
||||
- ./script/setup.sh
|
||||
- ./script/buildonly.sh all
|
||||
- ./script/buildonly.sh package
|
||||
- ./build/Release/app/Sourcetrail --licenseFile ./setup/license.txt
|
||||
- cd ./bin/test
|
||||
- ../../build/Release/test/Sourcetrail_test
|
||||
|
||||
Linux64:
|
||||
image: st4ll1/coati_linux_64
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
- triggers
|
||||
<<: *script_definition
|
||||
# - ./script/build.sh release test
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
expire_in: 3 days
|
||||
|
||||
Linux64_tag:
|
||||
image: st4ll1/coati_linux_64
|
||||
.deploy_template: &deploy_def
|
||||
image: alpine
|
||||
stage: deploy
|
||||
only:
|
||||
- tags
|
||||
<<: *script_definition
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME$CI_COMMIT_TAG"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
|
||||
Linux64_manual:
|
||||
image: st4ll1/coati_linux_64
|
||||
stage: deploy
|
||||
except:
|
||||
- master
|
||||
when: manual
|
||||
<<: *script_definition
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
|
||||
Linux64_licenseGenerator:
|
||||
image: st4ll1/coati_linux_64
|
||||
stage: deploy
|
||||
when: manual
|
||||
before_script:
|
||||
- apk add --no-cache lftp git
|
||||
script:
|
||||
- ./script/setup.sh
|
||||
- ./script/buildonly.sh r keygen
|
||||
- mv build/Release/license_generator/Sourcetrail_license_generator .
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- Sourcetrail_license_generator
|
||||
expire_in: 3 days
|
||||
|
||||
Linux32:
|
||||
image: st4ll1/coati_linux_32
|
||||
stage: deploy
|
||||
- VERS=$(git describe --long | sed 's/-/./' | sed 's/-.*//')
|
||||
- TARGET_DIR=releases-$CI_ENVIRONMENT_NAME/$TYPE/$VERS
|
||||
- echo $TARGET_DIR/$CI_ENVIRONMENT_NAME/$TYPE/
|
||||
- lftp -u $FTP_USER,$FTP_PW -p $FTP_PORT $FTP_ADDR -e "mkdir $TARGET_DIR; mput -O $TARGET_DIR Sourcetrail*; bye"
|
||||
only:
|
||||
- master
|
||||
- triggers
|
||||
<<: *script_definition
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
expire_in: 3 days
|
||||
- tags
|
||||
- /^release.*$/
|
||||
|
||||
Linux32_tag:
|
||||
image: st4ll1/coati_linux_32
|
||||
stage: deploy
|
||||
|
||||
## Build Stage ##
|
||||
|
||||
build:Linux64:
|
||||
image: $IMAGE_64
|
||||
when: manual
|
||||
cache:
|
||||
key: cache_linux_64
|
||||
paths:
|
||||
- ccache/
|
||||
- java_indexer/.m2/repository
|
||||
<<: *build_def
|
||||
|
||||
build:Linux32:
|
||||
image: $IMAGE_32
|
||||
when: manual
|
||||
cache:
|
||||
key: cache_linux_32
|
||||
paths:
|
||||
- ccache/
|
||||
- java_indexer/.m2/repository
|
||||
<<: *build_def
|
||||
|
||||
## Deploy ##
|
||||
|
||||
deploy:Linux_staging_beta:
|
||||
when: manual
|
||||
environment:
|
||||
name: staging
|
||||
variables:
|
||||
TYPE: beta
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_staging_full:
|
||||
when: manual
|
||||
environment:
|
||||
name: staging
|
||||
variables:
|
||||
TYPE: full
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_production_beta:
|
||||
when: manual
|
||||
environment:
|
||||
name: production
|
||||
variables:
|
||||
TYPE: beta
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_production_full:
|
||||
when: manual
|
||||
environment:
|
||||
name: production
|
||||
variables:
|
||||
TYPE: full
|
||||
<<: *deploy_def
|
||||
|
||||
deploy:Linux_tag_staging:
|
||||
environment:
|
||||
name: staging
|
||||
variables:
|
||||
TYPE: beta
|
||||
<<: *deploy_def
|
||||
only:
|
||||
- tags
|
||||
<<: *script_definition
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME$CI_COMMIT_TAG"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
|
||||
Linux32_manual:
|
||||
image: st4ll1/coati_linux_32
|
||||
stage: deploy
|
||||
except:
|
||||
- master
|
||||
when: manual
|
||||
<<: *script_definition
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- Sourcetrail*.tar.gz
|
||||
## could be interesting for daily/weekly/monthly builds
|
||||
# https://docs.gitlab.com/ce/user/project/pipelines/schedules.html
|
||||
#
|
||||
#job:on-schedule:
|
||||
#only:
|
||||
# - schedules
|
||||
#
|
||||
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
Authors
|
||||
=======
|
||||
|
||||
Andreas Stallinger
|
||||
Eberhard Gräther (@egraether) <egraether@coati.io>
|
||||
Malte Langkabel (@mlangkabel) <mlangkabel@coati.io>
|
||||
Manuel Dobusch
|
||||
Viktoria Pfausler
|
||||
|
||||
Note: (@user) means a github user name.
|
||||
+1085
File diff suppressed because it is too large
Load Diff
+426
-363
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
# Contributing
|
||||
If you like this project and want to get involved, there are lots of ways you can help:
|
||||
|
||||
* __Spread the word.__ The more people want this project to grow, the greater the motivation for the developers to get things done.
|
||||
* __Fund the development.__ Further development and maintainance of this project is crowd funded via [Patreon](https://www.patreon.com/sourcetrail). If you would like Sourcetrail to grow and improve but cannot spare the time to contribute your self, please consider making a pledge.
|
||||
* __Test Sourcetrail.__ Run it on your own source code. If you find any issues, just report it here. Best, include some detailed step-by-step instructions that illustrate how to reproduce the issue, so that we can use it as a basis to craft a test case for our continuous integration and no one will ever break that case again.
|
||||
* __Write some code.__ Don't be shy here. You can implement whole new features or fix some bugs, but you can also do some refactoring if you think that it benefits the readability or the maintainability of the code. Still, no matter if you just want to work on cosmetics or implement new features, it would be best if you create an issue here on the issue tracker before you actually start handing in pull requests, so that we can discuss those changes first and thus raise the probability that those changes will get pulled quickly.
|
||||
|
||||
To create a pull request, follow these steps:
|
||||
* Fork the Repo on GitHub.
|
||||
* Make your commits.
|
||||
* If you added functionality or fixed a bug, please add a test.
|
||||
* Add your name to the AUTHORS.txt file.
|
||||
* Push to your fork and submit a pull request.
|
||||
+674
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -1,676 +1,229 @@
|
||||
## Sourcetrail
|
||||
# Sourcetrail
|
||||
|
||||
### Setup
|
||||
[Sourcetrail](https://www.sourcetrail.com/) is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code.
|
||||
|
||||
#### External Software
|
||||
Links
|
||||
* [Website](https://www.sourcetrail.com/)
|
||||
* [Download](https://www.sourcetrail.com/downloads)
|
||||
* [Quick Start Guide](https://www.sourcetrail.com/documentation/#QUICKSTARTGUIDE)
|
||||
* [Documentation](https://www.sourcetrail.com/documentation)
|
||||
* [Changelog](CHANGELOG.md)
|
||||
* [Slack Channel](https://join.slack.com/t/sourcetrail/shared_invite/enQtNDc3MjcyOTk5MTc0LTc3NjJiMzI1NDFiOTE2NDZmOWIwMDQzZjA3N2RhOTZlOGMxYmRjOTA1ZGQ3ZDdlNjliZWQ5MDIwOWU1YWZmYzg)
|
||||
* [Mailing List](https://coati.us12.list-manage.com/subscribe/post?u=3dabab4e475b5ed577d1dcd0f&id=cf7301fc53)
|
||||
* [Patreon](https://www.patreon.com/sourcetrail)
|
||||
|
||||
* JDK 1.8
|
||||
* QT 5.8
|
||||
* CxxTest 4.3
|
||||
* Valgrind 3.9.0 (linux)
|
||||
* Clang & LLVM 3.9 (doesnt quite work for windows, use unix setup below and skip all the ninja stuff)(installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
|
||||
* Boost 1.59
|
||||
* Botan 1.11.34
|
||||

|
||||
|
||||
also something about java, but who knows...
|
||||
Sourcetrail is:
|
||||
* free
|
||||
* working offline
|
||||
* operating on Windows, macOS and Linux
|
||||
* supporting C, C++, Java and Python
|
||||
* offering an SDK ([SourcetrailDB](https://github.com/CoatiSoftware/SourcetrailDB)) to write custom language extensions
|
||||
|
||||
#### Environment Variables
|
||||
## Support Sourcetrail via Patreon
|
||||
|
||||
* CXX_TEST_DIR - .../cxxtest-4.3
|
||||
* CLANG_DIR - .../clang-llvm
|
||||
* BOOST_159_DIR - .../boost_1_59_0
|
||||
* BOTAN_DIR - .../Botan-1.11.34
|
||||
The ongoing development and regular software releases are made possible entirely by the support of [these awesome patrons](SPONSORS.md)! If you'd like to join them, please consider [becoming a patron](https://www.patreon.com/sourcetrail) of Souretrail.
|
||||
|
||||
For MacOS and Linux
|
||||
* QT_DIR - .../Qt/Qt5.8.0/5.8/<IDE>
|
||||
## Using Sourcetrail
|
||||
|
||||
For Windows:
|
||||
* QT_WIN32_DIR - .../Qt/Qt5.8.0/win32/5.8/msvc2015<IDE>
|
||||
* QT_WIN64_DIR - .../Qt/Qt5.8.0/win64/5.8/msvc2015_64<IDE>
|
||||
* VLD_DIR - .../Visual Leak Detector
|
||||
* path
|
||||
- apped path to git.exe
|
||||
- apped path to jdk/bin
|
||||
- append path to VisualStudio/Common7/Tools
|
||||
- append path to VisualStudio/Common7/IDE
|
||||
Download the respective build for your operating system from our list of [Releases](https://www.sourcetrail.com/downloads) and install it on your machine. After that follow our [Quick Start Guide](https://www.sourcetrail.com/documentation/#QUICKSTARTGUIDE) to get to know Sourcetrail.
|
||||
|
||||
##### Clang setup
|
||||
## How to Report Issues
|
||||
|
||||
For Windows:
|
||||
Execute Cmake twice (once for each target compiler (32 and 64 bit)). Set the respective build path to ${CLANG_DIR}/build_win32 or ${CLANG_DIR}/build_win64
|
||||
You can post all your feature requests and bug reports on our [issue tracker](https://github.com/CoatiSoftware/Sourcetrail/issues).
|
||||
|
||||
##### Boost setup
|
||||
### Reporting
|
||||
|
||||
For Windows:
|
||||
Build the Boost libs for 32 and 64 bit. Create the subdirectories ${BOOST_159_DIR}/win32 and ${BOOST_159_DIR}/win64 and copy the ${BOOST_159_DIR}/boost folder into each of those platform specific directories. Also move the platform specific libs into the respective ( ${BOOST_159_DIR}/win32/lib and ${BOOST_159_DIR}/win64/lib) folder.
|
||||
Use the following template:
|
||||
|
||||
##### Botan setup
|
||||
* platform version:
|
||||
* Sourcetrail version:
|
||||
* description of the problem:
|
||||
* steps to reproduce the problem:
|
||||
|
||||
For Windows
|
||||
|
||||
Extract the contents of your Botan package into "${BOTAN_DIR}/win32". Duplicate that folder and rename it "win64".
|
||||
### Supporting
|
||||
|
||||
Build 32 bit debug lib in ${BOTAN_DIR}/win32/debug
|
||||
$ python configure.py --cc=msvc --cpu=x86_32 --disable-shared --no-optimizations --with-debug-info
|
||||
If you want to support a certain feature request or you have the same bug that another user already reported, please let us know:
|
||||
* post a comment with "+1" to the issue
|
||||
* or send an email to support@sourcetrail.com with the issue ID
|
||||
|
||||
Build 32 bit release lib in ${BOTAN_DIR}/win32/release
|
||||
$ python configure.py --cc=msvc --cpu=x86_32 --disable-shared
|
||||
## How to Contribute
|
||||
|
||||
To build the 64 bit lib start the VS command prompt with the "amd64" argument as described here:https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx
|
||||
Please read and follow the steps in [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
||||
|
||||
Build 64 bit debug lib in ${BOTAN_DIR}/win64/debug
|
||||
$ python configure.py --cc=msvc --cpu=x86_64 --disable-shared --no-optimizations --with-debug-info
|
||||
|
||||
Build 64 bit release lib in ${BOTAN_DIR}/win64/release
|
||||
$ python configure.py --cc=msvc --cpu=x86_64 --disable-shared
|
||||
# How to Build
|
||||
|
||||
Building Sourcetrail requires several dependencies to be in place on your machine. However, our CMake based setup allows to disable indexing support for specific languages which reduces the number of dependencies to a minimum.
|
||||
|
||||
For MacOS and Linux
|
||||
## Building the bare minimum
|
||||
|
||||
Build release lib in ${BOTAN_DIR}/release
|
||||
Build debug lib in ${BOTAN_DIR}/debug
|
||||
### Required Tools
|
||||
|
||||
for Mac:
|
||||
$ python configure.py --disable-shared --disable-modules=darwin_secrandom
|
||||
#### Git
|
||||
|
||||
for Linux:
|
||||
$ python configure.py --disable-shared
|
||||
This is required for generating the Sourcetrail version number. Get it from: https://git-scm.com/download.
|
||||
|
||||
#### Settings
|
||||
Make sure `git` is available in added to your `PATH` environment variable.
|
||||
|
||||
Run setup script:
|
||||
$ ./script/setup.sh
|
||||
#### CMake v3.12
|
||||
|
||||
### Release
|
||||
This is used for generating a build configuration. Get it from: https://cmake.org/download/
|
||||
|
||||
#### App
|
||||
* create release build
|
||||
* make sure it uses the Sourcetrail icon
|
||||
* obfuscate the executable using upx
|
||||
### Additional tools for Windows
|
||||
|
||||
#### Data folder
|
||||
* put data folder in working directory
|
||||
* add empty log folder
|
||||
* add working tictactoe.xml project to /projects/tictactoe with sources in /projects/tictactoe/src
|
||||
* add empty app settings with one recent project tictactoe.xml
|
||||
* leave window_settings.ini with correct Sourcetrail start layout
|
||||
#### Visual Studio
|
||||
|
||||
#### Package
|
||||
* add app
|
||||
### Additional tools for Unix
|
||||
|
||||
#### Updating Clang on UNIX
|
||||
#### ccache
|
||||
|
||||
$ cd .../clang_llvm
|
||||
This is optionally used to speed up rebuilds if found in `PATH`.
|
||||
|
||||
$ cd llvm
|
||||
$ git pull origin master
|
||||
### Required dependencies
|
||||
|
||||
$ cd tools/clang
|
||||
$ git pull origin master
|
||||
#### Boost 1.68
|
||||
For the __msvc__ compiler pre-built binaries can be downloaded from [sourceforge.net/projects/boost/files/boost-binaries](https://sourceforge.net/projects/boost/files/boost-binaries/)
|
||||
|
||||
$ cd tools/extra/
|
||||
$ git pull origin master
|
||||
For building on Unix:
|
||||
```
|
||||
$ ./bootstrap.sh --with-libraries=filesystem,program_options,system,date_time
|
||||
$ ./b2 --link=static --variant=release --threading=multi --runtime-link=static --cxxflags=-fPIC
|
||||
```
|
||||
|
||||
$ cd ../../../../../build_debug
|
||||
$ cmake -G Ninja -DLLVM_ENABLE_RTTI=ON ../llvm
|
||||
$ ninja -j4 check-all
|
||||
#### Qt 5.12
|
||||
|
||||
$ cd ../release_build
|
||||
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON ../llvm
|
||||
$ ninja -j4 check-all
|
||||
|
||||
#### Remarks
|
||||
|
||||
* Boost lib dir: rename library directory for your system (e.g.: 'lib32-msvc-12.0') to 'lib'
|
||||
|
||||
### Tagging
|
||||
|
||||
$ git tag -a VERSION_NUMBER -m "DESCRIPTION"
|
||||
$ git push --tags
|
||||
|
||||
### Loader gif creation from png sequence
|
||||
|
||||
// from png sequence
|
||||
convert -delay 3 -loop 0 souretrail_*.png souretrail.gif
|
||||
|
||||
// less colors
|
||||
gifsicle --colors 255 souretrail.gif > color.gif
|
||||
|
||||
// crop size
|
||||
gifsicle --crop 0,5+0x-5 color.gif > crop.gif
|
||||
|
||||
// add transparency
|
||||
gifsicle --unoptimize --disposal=previous --transparent="#FFFFFF" crop.gif > trans.gif
|
||||
|
||||
// resize
|
||||
gifsicle --resize-height 18 trans.gif > loader.gif
|
||||
|
||||
### Changelog
|
||||
|
||||
#### 1.0 (beta)
|
||||
released 2017-06-07
|
||||
|
||||
* Fixed issue where black borders appeared around dialogs for some Linux window managers (issue #376)
|
||||
* Use platform default window decorations for UI dialogs
|
||||
* Code: Made snippet minimize/maximize buttons more interactive by showing hover states
|
||||
* Code: improved code view loading performance
|
||||
* Java: Record more "import not found" errors
|
||||
* Support Visual Studio 2017 in Visual Studio Plugin (issue #381)
|
||||
* Graph: increased creation speed by requesting less data
|
||||
* macOS: Codesign .app bundle to avoid "from unidentified developer" warning
|
||||
* Error: Use same error order in error table and code view
|
||||
* Error: Only show first 1000 errors, click button in lower right of error table to show all (issue #385)
|
||||
* Graph: use bezier edges when activating aggregation edge
|
||||
* Send ping after changing plugin ports
|
||||
* Added menu action to display EULA and force accepting on macOS
|
||||
* Fixed use of environment variables in project setup paths
|
||||
* Multi-language project setup via Source Groups setup UI (issue #230)
|
||||
* C/C++: Fixed no files indexed when relative file paths are provided in Compilation Database (issue #388)
|
||||
* C/C++: Display an error when loading a Compilation Database fails
|
||||
* C/C++: Fixed source files within Compilation Database not indexed unless within Indexed Header Paths
|
||||
* Fixed status message length limiting window resizing (issue #372)
|
||||
* Match source file extensions case insensitive (issue #384)
|
||||
* Fixed indexing progress file count in status bar and status view (issue #387)
|
||||
* Windows: remove setup.exe from windows installer with all necessary .dll files
|
||||
* Added history list button between back and forward button
|
||||
* Added history menu showing activated symbols in chronologic order
|
||||
|
||||
#### 0.12.25
|
||||
released 2017-05-16
|
||||
|
||||
* Added QtCreator plugin
|
||||
* Graph: Added context menu action to create bookmark for node under mouse cursor (issue #373)
|
||||
* Code: Fixed code view not scrolled to first fulltext search match in single file mode
|
||||
* Set unrestricted permission for accessing shared memory to fix crash on Windows
|
||||
* Improved setting descriptions in preferences dialog
|
||||
* Java: Updated to JavaParser 3.2.0 and JavaSymbolSolver 0.5.3
|
||||
* Graph: Fixed order of nodes is same as within first encountered header file
|
||||
* Save timestamp after project indexing and show it on the overview screen
|
||||
* Fixed use of correct name delimiters in indexer processes
|
||||
* Fixed crash when running 32 and 64 bit versions in parallel
|
||||
* Bookmark: Changed menu action to "Bookmark Active Symbol"
|
||||
* Graph: Zooming on Ctrl + Mouse Wheel now (Shift + Mouse Wheel still working)
|
||||
* Added dialog to warn about "verbose indexer logging" before indexing.
|
||||
* Added multi process indexing for C/C++ projects to better handle crashes during indexing.
|
||||
* Reduced file accesses during C/C++ indexing.
|
||||
* Graph: Show call graphs, inheritance trees and include trees for active symbol. UI in the top left of the graph view for defining direction and depth. (issues #249 #337)
|
||||
* Improved performance by running UI updates in parallel for each view
|
||||
* Fixed project refresh not recognizing newly added files
|
||||
* Show progress dialog when clicking refresh while computing files (issue #341)
|
||||
* Added show files button to summary of compilation database project setup (issue #354)
|
||||
* Show option to run only C/C++ preprocessor when indexing on indexing start dialog (issue #297)
|
||||
* Added bookmarking feature for nodes and edges. Bookmarks can have categories and comments. Data gets stored in .srctrlbm next to project file. Shortcuts similar to web browsers. (issue #138)
|
||||
* Mark files with errors and all files within a translation unit with fatal errors as incomplete (issue #358)
|
||||
* Fixed compilation database projects using C++ source extensions and standard (issue #366)
|
||||
|
||||
#### 0.11.86
|
||||
released 2017-04-12
|
||||
|
||||
* Terminating all running tasks before closing the application (issue #343)
|
||||
* Use all available cores when setting indexer threads to 0 (issue #342)
|
||||
* Added reset window layout option to view menu (issue #289)
|
||||
* Fixed colorscheme gets refreshed when cancelling preferences dialog
|
||||
* Log: Scroll to first line in errors table after indexing and after display
|
||||
* Copy old ApplicationSettings.xml and window_settings.ini files from previous Coati install if available.
|
||||
* New projects are created with .srctrlprj and .srctrldb endings, but still support old file extensions.
|
||||
* Renamed application from Coati to Sourcetrail
|
||||
* Fixed issues in tutorial project
|
||||
* Graph: Fixed node with no children but qualifier shows expand button
|
||||
* Enable undo/redo actions in context menu only when available
|
||||
* Java: Updated to JavaParser 3.1.2 and JavaSymbolSolver 0.5.2.x
|
||||
* Revised undo/redo stack to handle messages differently
|
||||
* Java: Added support for project setup from Maven
|
||||
* Windows: Hide console when running release builds
|
||||
* Show license information on start screen
|
||||
* Added ping support to plugins and display current connected editor/IDE in status bar.
|
||||
|
||||
#### 0.11.15
|
||||
released 2017-03-01
|
||||
|
||||
* Don't accept richt text in 'enter license' dialog field (issue #207)
|
||||
* Updated EULA to include Test License and better clarify other license types
|
||||
* Fixed icons in project setup dialogs blurry on highDPI screens
|
||||
* Added link to additional downloadable pre-indexed projects to trial start screen
|
||||
* Fixed crash when saving preferences if they contain relative paths
|
||||
* Convert all paths chosen by patch picker relative to project location in project setup
|
||||
* Disabled name and location changing in project editing and removed project moving
|
||||
* Split default file extensions for C++ and C to avoid wrong files getting indexed
|
||||
* Deprecated 'Lazy Include Search', it's only visible to previously created projects (issue #335)
|
||||
* Support relative paths and paths containing environment variables for compilation database path (issue #312)
|
||||
* Removed 'Advanced Settings' section in project setup and show theses options in separate dialog (#293)
|
||||
* Support environment variables containing multiple files in project setup paths (issue #283)
|
||||
* Warn users when no 'Indexed Header Paths' were set in compilation database project (issue #254)
|
||||
* Renamed "Project Paths" to "Indexed Paths" in project setup
|
||||
* Renamed "Project File Location" to "Coati Project Location" in project setup (issue #234)
|
||||
* Allow opening indexed projects in trial mode
|
||||
* Record node type of non-indexed qualifiers (e.g. "std" in "std::string" as namespace)
|
||||
* Log: Fixed error icon loaded for every row (issue #287)
|
||||
* Graph: Fixed lambda are placed within white area to better see call edges
|
||||
* Graph: Show non-indexed nodes within their parents instead of using namespace labeling
|
||||
* Code: Disabled syntax highlighting for project description
|
||||
* Graph: Fixed different font-faces causing graph nodes to expand to bigger cell amount
|
||||
* Mac: Fixed wrong READMEs at some plugins (issue #315)
|
||||
* Mac: Removed boost libraries and libLTO from Mac bundle
|
||||
* Windows: Add Visual Studio compatibility flags to new project when Visual Studio include paths are present
|
||||
* Renamed undefined nodes to non-indexed nodes for clarification
|
||||
* Show progress in file clearing dialog
|
||||
* Extended syntax highlighting for Java and distinguish by project type
|
||||
* offer Windows 64bit build (issue #300)
|
||||
* Fixed legacy Java 6 install necessary on MacOS (issue #280)
|
||||
* Updated to Qt 5.8
|
||||
* Updated to clang/llvm 3.9
|
||||
* Added multithreading to Visual Studio plugin compilation database creation
|
||||
* Graph: Use new list layouting for overview bundles and namespaces/packages
|
||||
* Graph: Group nodes in list layout by starting character and allow jumping to group by pressing the key
|
||||
* Graph: Use node specific styles for overview bundles
|
||||
* Visual Studio plugin can now handle projects with non-native build tool for compilation database export
|
||||
* Changed menu action 'Licenses' to '3rd Party Licenses'
|
||||
* Added dialog with all shortcuts to Help menu
|
||||
* Log: Show error in errors table when clicked in code view (issue #323)
|
||||
* Code: Switched default mouse drag behavior to selection, panning on Shift + drag, and show suitable cursors
|
||||
* Updated company address in about dialog
|
||||
* Graph: Added on-screen zoom buttons
|
||||
* Graph: Split aggregation edge when expanding nodes if possible
|
||||
* Uncommented lines using the std library in TicTacToe sample
|
||||
* Fixed issue with lambda return type (issue #318)
|
||||
* Save builtin types as separate node type (issue #2)
|
||||
* Remove unused included files after refreshing
|
||||
* Java: Fixed packages that only contain packages to show up as non-indexed
|
||||
* Added context-menu actions to copy node names, file paths and show files in containing directory (issue #320)
|
||||
* Fixed crash when entering a single space in 'enter license' dialog (issue #277)
|
||||
* Graph: Made edge lines thicker
|
||||
* Fixed handling and storing of files with the same name
|
||||
* Fixed environment variable detection within project paths for %VARIABLE_NAME% syntax
|
||||
* Coati states whether it needs 32bit or 64bit JRE
|
||||
* Java: Updated indexer to fix a lot of unsolved symbol issues
|
||||
* Graph: Fixed layouter couldn't handle nodes with same name
|
||||
* Graph: Fixed weird looking vertical aggregation edges to child nodes
|
||||
* Code: Don't show stats for non loaded project
|
||||
* Added option to disable UI animations to preferences
|
||||
* Graph: Removed double line around graph view on Mac
|
||||
* Graph: Fixed namespace label cut off at edge of screen
|
||||
* Code: Added single file view mode
|
||||
* Code: Added navigation bar with mode toggle and buttons to navigate references
|
||||
* Graph: Removed underscores in edge hover names
|
||||
* Infere some non-indexed node types by their edges
|
||||
|
||||
|
||||
#### 0.10.0
|
||||
released 2016-12-13
|
||||
|
||||
* Windows: Added runtime DLLs that could be missing on some systems
|
||||
* Click message in status bar to open status window
|
||||
* Graph: Sort nodes alphabetically within each section
|
||||
* Graph: Aggregate type use edges to make referencing nodes appear collapsed
|
||||
* Code: Improved performance through faster source location retrieval for files
|
||||
* Code: Scroll active symbol definition to top of view if possible
|
||||
* Added status tab to Log View showing status bar information
|
||||
* Graph: Fixed graph animation used when clicking edges
|
||||
* Graph: Disable bundling when files or macros are active
|
||||
* Graph: Bundle importing files of active symbol in Java projects
|
||||
* Improved speed of depending file search on refresh
|
||||
* Search: Fixed crashes related to empty searches (issue #251)
|
||||
* Search: Do fulltext search when no autocompletion match is available
|
||||
* Added checkbox for full project refresh to start indexing dialog
|
||||
* Disabled clang error limit by default to make sure all errors are shown
|
||||
* Linux: Updated libs and added missing ones (issue #245)
|
||||
* Updated icons for some graph nodes and project types
|
||||
* Windows: Updated Visual Studio plugin UI
|
||||
* Graph: Fixed view to not recenter on active node when clicking edge
|
||||
* Fixed wrong errors displayed, wrong error counts and error view being wrongly shown
|
||||
* Removed font zoom on CTRL + MouseWheel
|
||||
* Graph: Display namespace information on left side of nodes, activate namespace by clicking label
|
||||
* Improved file clearing performance
|
||||
* Windows: Changed setup folder layout
|
||||
* Added info screen for indexer crash investigation
|
||||
* Code: Fixed display of links to missing symbols in project description
|
||||
* Code: Fixed snippet size calculation causing a slowdown in certain cases
|
||||
* Search: Skip intermediate autocompletions when typing fast
|
||||
* Show dialog for last files inserted into .coatidb at end of indexing
|
||||
* Integrated Visual Studio Plugin with Coati Project creation and removed previous Visual Studio Solution parser
|
||||
* Improved C++ indexer coverage: using decls, using directives, auto keyword, lambda signatures, symbol references inside lambda captures, template argument related elements
|
||||
* Reduced size of .coatidb file by up to 50% for large projects
|
||||
* Fixed anonymouse symbol name conflicts (issue #241)
|
||||
* Preferences: Added Indexer Logging option to print AST information during indexing
|
||||
* Search: Added second line to search autocompletion list showing namespace, package or filepath
|
||||
* Made cells readonly in errors table to prevent editing (issue #236)
|
||||
* Renamed Log Window to Status window
|
||||
|
||||
|
||||
#### 0.9.23
|
||||
released 2016-10-27
|
||||
|
||||
* Windows: Added logging and exception handling to VS plugin
|
||||
* Windows: Added VC++ runtime dlls for windows installer
|
||||
* Windows: Added missing VC++ runtime dlls (issue #231)
|
||||
* Added setting for default graph zoom on mouse wheel to preferences (issue #237)
|
||||
* Scroll errors table to newest error during indexing
|
||||
* Fixed best scoring for search autocompletions skipped some combinations
|
||||
* Fixed flickering of errors table when indexing
|
||||
* Don't show error snippets in overview screen anymore
|
||||
* Fixed crash when Project Paths contain files and lazy include search in enabled (issue #201)
|
||||
* Fixed edge cases that caused deadlocks in indexing
|
||||
* Added language specific project icons to start screen
|
||||
* Fixed application couldn't be quit when start screen was showing (issue #227)
|
||||
* Graph: Fixed missing image file ending when exporting graph for Linux
|
||||
* Log Coati version when logging gets enabled
|
||||
* Fixed non-indexed errors filter in errors table
|
||||
|
||||
#### 0.9.0
|
||||
released 2016-10-14
|
||||
|
||||
* Extended Visual Studio Plugin to export clang Compilation Databases
|
||||
* Implemented new installer for Windows
|
||||
* Run System Header Include Paths and Java Path detection when starting application
|
||||
* Added Log Window with Errors tab showing a table of all errors
|
||||
* Added filters to bottom of error table to define which errors are displayed
|
||||
* Removed ring logging and use one log file again instead
|
||||
* Smaller indexing progress dialog with bar in the middle instead of golden ratio
|
||||
* Code: Set default code snippet expand range to 3 lines for more context
|
||||
* Graph: Fixed undoing of aggregation edge activation caused crash
|
||||
* Graph: Move aggregation and inheritance edges to front when hovered or active
|
||||
* Graph: Push parent nodes of active nodes to back to make all incoming and outgoing edges visible
|
||||
* Properly quit application when window is closed while confirm box is open
|
||||
* Properly quit application when window is closed while indexing (issue #121)
|
||||
* Graph: Count only top level nodes in bundle nodes of graph
|
||||
* Search: Improved scoring of autocompletion matches to use best score for match
|
||||
* App will go into trial mode without valid license
|
||||
* Java: Auto detect java root source directories
|
||||
* Fixed refresh crash (issue #220)
|
||||
* Java: improved indexer reliability a lot
|
||||
* Java: Changed name of generic type to use name of declaration
|
||||
* Fixed project refresh does not recognize removed source paths
|
||||
* Java: Define maximum allocated jvm memory in preferences
|
||||
* Follow symbolic directory links within source paths (issue #205)
|
||||
* Use white size grip in blue dialogs
|
||||
* Graph: Use type node colors for undefined nodes
|
||||
* Java: Show import not found as error
|
||||
* Code: Select and copy source code in code view with SHIFT + mouse drag (issue #7)
|
||||
* Code: Added markers next to line numbers in code view showing active locations and scopes
|
||||
* Merged app and trial to one build
|
||||
|
||||
#### 0.8.21
|
||||
released 2016-09-16
|
||||
|
||||
* Added options for checking multiple paths in Indexed Header Paths dialog during project setup from Compilation Database #190
|
||||
* Added all C/C++ standards supported by clang
|
||||
* Fixed C language setting in empty project setup not propagated to indexer #177
|
||||
* Added Sublime plugin to Sublime Text Package Control
|
||||
* Improved indexer parallelization for faster indexing
|
||||
* Changed all font-sizes to px for similar look on all platforms
|
||||
* Added font face dropdown to Preferences showing all available monospace fonts #172
|
||||
* Smoother font rendering on Windows by setting font engine to FreeType via qt.conf file #137
|
||||
* Interrupt indexing while AST visiting for C/C++ for shorter waiting time
|
||||
* Save graph as PNG image via context menu in graph view #180
|
||||
* Added base folder to Linux package #181
|
||||
* Use inverted golden ratio in indexing progress dialog
|
||||
|
||||
#### 0.8.0
|
||||
released 2016-09-01
|
||||
|
||||
* Improved titles and help texts in project setup UI
|
||||
* Fixed error locations not saved with absolute file paths in Compilation Database projects
|
||||
* Added missing source files extensions setting to the Edit Project dialog #132
|
||||
* Changed default text colors to black in project setup UI #140
|
||||
* Added plugin ports settings to Preferences #145
|
||||
* Improved project state handling on refreshing
|
||||
* Added Java sample project JavaParser: http://javaparser.org/
|
||||
* Fixed regex for system includes used wrongly in syntax highlighter
|
||||
* Added setting to disable file and console logging, default is off #157
|
||||
* Added migrations between different ApplicationSettings versions
|
||||
* Added auto detection for Java library to Preferences
|
||||
* Removed auto refresh option from Search view
|
||||
* Added progress dialogs for indexing and block UI #143
|
||||
* Hide name qualifiers for graph nodes in Java projects
|
||||
* Added handling when java library not found
|
||||
* Added plain text editing dialog to path list boxes
|
||||
* Use language dependent symbol name delimiter in UI
|
||||
* Added scroll speed setting to preferences #112
|
||||
* Added Java project setup UI
|
||||
* Record start and end locations of scopes in Java
|
||||
* Display unresolved types names in Java as 'unresolved-type'
|
||||
* Cache stats for overview to speed up display
|
||||
* Fixed graph nodes to restore their expand state when going back #118
|
||||
* Added shortcuts for navigating to next and previous reference in code view
|
||||
* Pressing Tab in search completes up to next ::, Delete erases to last :: #133
|
||||
* Bundle anonymous namespaces separately in graph overview #126
|
||||
* Added 'Show Data Folder' and 'Show Log Folder' items to Help menu
|
||||
* Added new status bar loader gif with higher resolution
|
||||
* Record type aliases in C++
|
||||
* Added Java indexer
|
||||
* Changed public icon in graph and added default icon
|
||||
* Scroll to file location when finding no symbol at specified location from plugin message
|
||||
* Added shortcut for Preferences on Windows/Linux
|
||||
* Leave code view at original line when expanding scopes
|
||||
* Pan graph view to center on name of active symbol after activation
|
||||
* Moved color scheme selection to Preferences
|
||||
* Moved Preferences menu item to Edit menu on Windows/Linux #113
|
||||
* Added setting for hiding non-fatal errors in unindexed files to preferences, turned on by default
|
||||
* Fixed file out-of-date asterisk disappearing when showing snippets after minimize state
|
||||
* Implemented Atom plugin: https://github.com/CoatiSoftware/atom-coati
|
||||
* Implemented CLion/IntelliJ plugin: https://github.com/CoatiSoftware/idea-coati
|
||||
* Implemented Eclipse plugin: https://github.com/CoatiSoftware/eCoati
|
||||
* Implemented emacs plugin: https://github.com/CoatiSoftware/emacs-coati
|
||||
* Improved code view rendering times
|
||||
* Don't show implicit nodes in search auto completion list
|
||||
|
||||
|
||||
#### 0.7.0.22
|
||||
released 2016-07-07
|
||||
|
||||
* Fixed detected global header search paths lost correct order and caused problems with #include_next directives
|
||||
* Fixed MaxOSX build crashed on launch due to unknown command line option passed
|
||||
* Removed 'Save Project' and 'Save Project As' actions from menu
|
||||
* Fixed indexer getting stuck at 'building caches' when indexing is interrupted
|
||||
* Fixed database not properly closed when errors appeared during indexing
|
||||
* Fixed autocompletions popup flickering while typing
|
||||
* Added resize grip to bottom right corner of every dialog window
|
||||
* Fixed 'paths don't exist' dialog window getting too big with lots of paths shown
|
||||
* Added context menu with 'back' and 'forward' actions available in all views
|
||||
* Removed Clang compiler warnings from console output
|
||||
* Added handling of project specific VS macros to VS solution parser
|
||||
|
||||
#### 0.7.0.0
|
||||
released 2016-06-15
|
||||
|
||||
* Updated to clang 3.8
|
||||
* Fixed crash in search autocompletion retrieval due to edge case in sorting
|
||||
* Fixed size policies in code view to avoid global scrollbar
|
||||
* Added full text search via search field: ?<query> for case-insensitive search, ??<query> for case-sensitive search
|
||||
* Made initialization for full text search lazy: done on first full text search
|
||||
* Defined full text search color in all color schemes
|
||||
* Increased code view performance by caching file IDs and paths
|
||||
* Added multithreaded indexing. Number of threads can be set in the Preferences UI, default is 4
|
||||
* Reworked graph node bundling to only distinguish defined and undefined nodes in each bucket
|
||||
* Made graph node sorting alphabetical and put bundles at end
|
||||
* Changed code view snippet sorting to always show definition on top
|
||||
* Fixed local symbols were not available within lambdas
|
||||
* Added settings for font family, font size and tab with to Preferences UI
|
||||
* Fixed VS solution parser issue with internal macros
|
||||
* Removed header extensions, all included files within the project paths are now analyzed
|
||||
* Fixed crash in sqlite when symbol name has special characters
|
||||
* Improved code view performance by reducing amount of initially open code files
|
||||
* Improved graph view performance through faster data retrieval and smarter structures
|
||||
* Increased aggregation click speed with faster edge id retrieval
|
||||
* Fixed png color profiles to avoid console warning: "libpng warning: iCCP: known incorrect sRGB profile"
|
||||
* Fixed graph edge drawn wrong when leaving from child node of smaller node
|
||||
* Fixed Sublime Text Plugin issue with wrong encoding
|
||||
* Randomized source file order for multithreaded analysis to increase performance
|
||||
* Show name of removed symbol when going back after refreshing
|
||||
* Fixed macro definition not connected to file
|
||||
* Fixed macro use not found in #ifdef, #ifndef, defined() and some expand cases
|
||||
* Removed back and forward steps for some graph and code view manipulations
|
||||
* Fixed code view style broken on Mac due to change of working directory when analyzing compilation database
|
||||
* Added database optimization step after indexing to reduce database size by ~25%
|
||||
* Fixed artifacts after graph view change by clearing view
|
||||
* Fixed autocompletion list highlights at wrong location for long names
|
||||
* Allow files and directories to be excluded from analysis in advanced settings for project setup
|
||||
* Added Qt gif plugin to Mac Release so that loader gif in status bar is visible
|
||||
* Added link to download page to start screen to remind users of updating once in a while
|
||||
* Check if compilation database still exists before refreshing
|
||||
* Added separate step for defining project name, project location and compiliation database to project setup
|
||||
* Explain that the project stays up-to-date with the compilation databes on refresh in project setup UI
|
||||
* Disregard source extensions when loading from compilation database
|
||||
* Removed error logs in name resolver
|
||||
* Added plugin for VIM: https://github.com/CoatiSoftware/vim-coati
|
||||
|
||||
#### 0.6.0.0
|
||||
released 2016-04-27
|
||||
|
||||
* Smoother graph panning and zooming on keyboard using update loop
|
||||
* Differentiate between explicit and implicit nodes and only show implicit nodes in the graph view when connected
|
||||
* Improved file clearing performance on project refresh
|
||||
* Show deleted projects on the start screen and show messagebox to delete them
|
||||
* Show analysis duration in hh:mm:ss
|
||||
* Added suppport for temporary test licenses and show error message when it expired
|
||||
* Increased graph performance by reducing to fixed number of requests
|
||||
* Add vs-clang compatibility flags when creating project from Visual Studio solution
|
||||
* Increased graph edge drawing performance
|
||||
* Added auto detection for system header paths to project wizard and preferences when using gcc, clang or vs compilers
|
||||
* Added bug tracker to help menu
|
||||
* Increased search autocompletion performance to stay mostly below 100ms
|
||||
* Changed style of aggregation edge to cleaner look
|
||||
* Allow certain edge types to enter and leave at top and bottom of nodes as well e.g. inheritance
|
||||
* Increased project load performance
|
||||
* Increased graph creation performance for overview screen
|
||||
* Changed namespace activation to show the namespace name in the search bar and the namespace definitions in the code view
|
||||
* Updated to Qt 5.6
|
||||
* Added analysis for local symbols and allow selecting them in the code view
|
||||
* Improved error display performance by not expanding all of them at once
|
||||
* Added home button next to search field for showing the project overview
|
||||
* Added shortcut and menu item to show project overview
|
||||
* Fixed Path boxes not sized correctly when switching back and forth in the project wizard
|
||||
* Allow support for environment variables in project setup with syntax ${VARIABLE_NAME}
|
||||
* Show quit button on license enter screen when no valid license was entered yet
|
||||
* Allow color schemes to define text colors for code view highlights
|
||||
* Added support for function pointers to analysis
|
||||
* Added Windows system dlls to installer on Windows so users don't not need to install the redistributable package
|
||||
* Changed style of out-of-date files to be followed by *
|
||||
* Set Qt flag for high DPI scaling
|
||||
* Check analyzed paths for existence in project wizard
|
||||
* Inform the user about project changes and ask before reparsing the project
|
||||
* Removed "simple setup" step in project wizard and added "lazy include search"-checkbox
|
||||
* Edit the project settings by clicking the project name in the overview stats
|
||||
* Added welcome message to Coati trial
|
||||
* Defined new highlight colors for code view in all color schemes
|
||||
|
||||
#### 0.5.1.21
|
||||
released 2016-03-16
|
||||
|
||||
* Fixed file logger using wrong directory for first log file
|
||||
* Fixed crash when accessing files without read permission
|
||||
* Center windows on top of main window
|
||||
* Added font size limits
|
||||
* Prevent network message handling without valid license
|
||||
* Fixed type references in headers saved multiple times
|
||||
* Improved context detection for template parameters
|
||||
* Fixed Visual Studio plugin project loading
|
||||
* Added delay for changing fontsize via mouse wheel
|
||||
* Disabled config file warnings
|
||||
* Fixed interrupting of analysis to show message in status bar
|
||||
* Fixed children on namespace activation were bundled
|
||||
* Fixed expanding file with errors showed all locations in red
|
||||
* Show loader animation when loading project
|
||||
* Removed high traffic log messages
|
||||
* Fixed crash when opening newer project with older version of Coati
|
||||
* Fixed project paths are now saved relative if defined relative
|
||||
* Fixed project setup window sizes to adapt to content size
|
||||
* Fixed linux package creating ~/.config if not there
|
||||
* Show fatal errors in UI that stopped analysis
|
||||
* Added compiler flags UI to advanced settings in project setup summary
|
||||
* Added file extension UI to advanced settings in project setup summary
|
||||
* Added graph zooming with Shift + mouse wheel or Shift + WS
|
||||
* Added graph panning with WASD
|
||||
* Improved project load and code view performance
|
||||
* Improved analysis performance for large projects (10x as fast for 1.000.000 LoC)
|
||||
* Added project setup for Compilation Databases
|
||||
|
||||
#### 0.5.0.4
|
||||
released 2016-02-25
|
||||
|
||||
* Fixed preferences not saved
|
||||
* Added link to documentation to Help menu
|
||||
* Improved painting of icons in graph to be smoother
|
||||
* Improved logging to alternate between 2 files of 1000 lines to decrease logfile sizes
|
||||
* Improved analysis performance to take only 66% of the time
|
||||
* Save user data in ~/Library/Application Support/Coati on Mac
|
||||
* Improved style of ui windows
|
||||
* Added Visual Studio solution parsing via project wizard or VS plugin
|
||||
* Added project setup wizard for step-by-step project setup
|
||||
* Added overview and error keywords to search view
|
||||
* Show overview on project open with node bundles per type
|
||||
* Added application move protection to reenter license key
|
||||
* Improved log file names to be sorted chronologically
|
||||
* Improved graph view node bundeling to bundle more
|
||||
* Display scope name at bottom of code snippet
|
||||
* Added .coatiproject file associations with icon for Mac and Windows
|
||||
* Return to last scroll position when going back in code view
|
||||
* Improved back & forward in code view
|
||||
* Update error count while analysis
|
||||
* Improved code view annotation painting performance
|
||||
* Added web documentation
|
||||
* Added trial target without analysis
|
||||
* Added license key window and license checker
|
||||
* Refresh project editing settings
|
||||
* Added C and C++ standard setting to project
|
||||
* Fixed cursor changing for resize and text interactions
|
||||
* Added commandline option for project file
|
||||
* Improved performance of token name saving
|
||||
* Fixed number postions in graph
|
||||
* Added shortcuts for font size resetting to View menu
|
||||
* Added C support
|
||||
* Added option to hide widget window title bars to View menu
|
||||
|
||||
#### 0.4.0
|
||||
released 2016-01-07
|
||||
|
||||
* navigate back via backspace key
|
||||
* navigate back&forward via mouse buttons
|
||||
* renamed undo&redo to back&forward
|
||||
* Fixed tooltip colors in dark color scheme
|
||||
* Fixed style of function or method nodes with children
|
||||
* Improved lambda handling in analysis
|
||||
* Added help texts to project setup and preferences window
|
||||
* Removed 'close window' action from menu
|
||||
* Fixed constructors and destructors using return type 'void' withou source location
|
||||
* Parse errors will be displayed as they appear during analysis
|
||||
* Redesigned the about window
|
||||
* Installing prerequisits in Windows Installer
|
||||
* Added installer for Windows
|
||||
* Introduced file endings .coatiproject and .coatidb for Coati's project files
|
||||
* Removed Coati directory from Linux package
|
||||
* Fixed graph font size was too small for Windows and Linux
|
||||
* Show function and method signature in tooltip when hovering the graph node
|
||||
* Added analysis for template parameter packs
|
||||
* Fixed syntax highlighting to correctly identify strings, comments and block comments
|
||||
* Fixed source locations of many declarations
|
||||
* Coati shows a template's general definition when an implicit specialization is activated
|
||||
* Added new color scheme called "bad_rainbow"
|
||||
* Extended color schemes to allow more extensive use in the graph
|
||||
* Coati now handles anonymous symbols when parsing files
|
||||
* Improved handling of template arguments in analysis
|
||||
* Coati can now handle inclass initialization of members
|
||||
* Network ports for IDE communication can be defined in the ApplicationSettings.xml
|
||||
|
||||
#### 0.3.0
|
||||
released 2015-12-14
|
||||
|
||||
* Saving all template arguments type uses
|
||||
* Added recent projects menu option
|
||||
* Focus all overlapping source locations in the code view
|
||||
* Improved code view auto scroll to center the first active line in the middle
|
||||
* Fixed search query disappeared when not token was found for it
|
||||
* Fixed cursor was jumping at end of query when editing a search query
|
||||
* Reworked code view highlighting
|
||||
* Save comment locations and display them when right next to active symbol
|
||||
* Fixed old data was still in new project window when creating another project
|
||||
* Save macro scopes
|
||||
* Save errors to storage and reactivate them via button in the status bar
|
||||
* Fixed horizontal scroll in code view not activated while scrolling vertically
|
||||
* Improved source locations of template scopes
|
||||
* Save Coati version to sqlite and reparse project whenever the version changes
|
||||
* Increased autocompletion performance by caching and limiting results to 100
|
||||
* Added plugin for Sublime Text (2 & 3)
|
||||
* Added plugin for Visual Studio (2012, 2013, 2015)
|
||||
* Added communication interface from and to Coati via TCP sockets
|
||||
* Added Tutorial project
|
||||
__Note__: still causes style issues on Windows, resort to Qt 5.10
|
||||
|
||||
For the __msvc__ compiler pre-built binaries can be downloaded from [download.qt.io/official_releases/qt](http://download.qt.io/official_releases/qt/)
|
||||
|
||||
### Building
|
||||
|
||||
#### For Windows / Visual Studio
|
||||
```
|
||||
$ cd Sourcetrail
|
||||
$ mkdir -p build/win64
|
||||
$ cd build/win64
|
||||
$ cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT=<path/to/boost_1_68_0> -DQt5_DIR=<path/to/Qt/version/platform/compiler/lib/cmake/Qt5> ../..
|
||||
```
|
||||
If you are using the gui, we recommend that you activate advanced mode. Also you may be required to add some of the defines via the "Add Entry" button.
|
||||
|
||||
After generating the build configuration, just open the Sourcetrail.sln file that was generated by CMake and build the Sourcetrail project.
|
||||
|
||||
#### For Unix
|
||||
|
||||
```
|
||||
$ cd Sourcetrail
|
||||
$ mkdir -p build/Release
|
||||
$ cd build/Release
|
||||
$ cmake -DCMAKE_BUILD_TYPE="Release" -DBOOST_ROOT=<path/to/boost_1_68_0> -DQt5_DIR=<path/to/Qt/version/platform/compiler/lib/cmake/Qt5> ../..
|
||||
$ make Sourcetrail
|
||||
```
|
||||
|
||||
### Running
|
||||
|
||||
Run Sourcetrail from within the build directory. During execution Sourcetrail needs resources from `bin/app/data` and `bin/app/user`. Cmake creates symlinks to these directories within the build directory.
|
||||
|
||||
|
||||
## Enable C/C++ Language Support
|
||||
|
||||
### Required dependencies
|
||||
|
||||
#### LLVM/Clang 8.0.1
|
||||
|
||||
##### Windows
|
||||
For the __msvc__ compiler, follow [these steps](https://clang.llvm.org/get_started.html) to build the project and make sure that you run the cmake command exactly as described.
|
||||
|
||||
##### Unix
|
||||
For Unix, follow this [installation guide](http://clang.llvm.org/docs/LibASTMatchersTutorial.html)
|
||||
|
||||
Build with `-DLLVM_ENABLE_RTTI=ON`.
|
||||
|
||||
### Building
|
||||
|
||||
Run CMake with these additional options:
|
||||
```
|
||||
-DClang_DIR=<path/to/llvm_build/lib/cmake/clang>
|
||||
-DBUILD_CXX_LANGUAGE_PACKAGE=ON
|
||||
```
|
||||
|
||||
## Enable Java Language Support
|
||||
|
||||
### Required dependencies
|
||||
|
||||
#### JDK 1.8
|
||||
|
||||
Install JDK and make sure the `JAVA_HOME` environment variable is set:
|
||||
```
|
||||
JAVA_HOME=.../Java/jdk1.x.x_xxx
|
||||
```
|
||||
|
||||
Also make sure `<jdk_root>/bin` is available in your `PATH` environmen variable.
|
||||
|
||||
### Building
|
||||
|
||||
Run CMake with these additional options:
|
||||
```
|
||||
-DBUILD_JAVA_LANGUAGE_PACKAGE=ON
|
||||
```
|
||||
|
||||
|
||||
## Enable Python Language Support
|
||||
|
||||
### Required dependencies
|
||||
|
||||
#### WinRAR (for Windows only)
|
||||
|
||||
### Building
|
||||
|
||||
Run CMake with these additional options:
|
||||
```
|
||||
-DBUILD_PYTHON_LANGUAGE_PACKAGE=ON
|
||||
```
|
||||
|
||||
## Packaging
|
||||
|
||||
### Windows
|
||||
|
||||
#### Required Tools
|
||||
|
||||
##### Visual Studio
|
||||
|
||||
##### Wix 3.11
|
||||
|
||||
##### Wix extension for Visual Studio
|
||||
|
||||
##### WinRAR
|
||||
|
||||
Make sure to append these directories to your `PATH` environment variable:
|
||||
* VisualStudio/Common7/Tools
|
||||
* VisualStudio/Common7/IDE
|
||||
* .../Microsoft SDKs/Windows/v7.1A/Bin (for uuidgen in deploy script)
|
||||
* .../WiX Toolset v3.11/bin
|
||||
* .../WinRAR
|
||||
|
||||
Run `./script/deploy_windows.sh` script which will generate 32bit/64bit builds and packages these into a portable `.zip` file and a Wix-based Windows installer, each.
|
||||
|
||||
### macOS
|
||||
|
||||
After building, run the `bundle_install.sh` script within the build directory which will create a `Sourcetrail.app` bundle and generate a `Sourcetrail_<version>.dmg` container.
|
||||
|
||||
### Linux
|
||||
|
||||
Run `./script/buildonly.sh package`
|
||||
|
||||
|
||||
# How to Run the Tests
|
||||
|
||||
The automated test suite of Sourcetrail is powered by [Catch2](https://github.com/catchorg/Catch2). To run the tests, simply execute the `Sourcetrail_test` binary. Before executing, please make sure to set the working directory to `./bin/test`.
|
||||
|
||||
|
||||
# License
|
||||
|
||||
Sourcetrail is licensed under the [GNU General Public License Version 3](LICENSE.txt).
|
||||
|
||||
# Trademark
|
||||
|
||||
The "Sourcetrail" name is a trademark owned by Coati Software and is not included within the assets licensed under the GNU GPLv3.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Sponsors
|
||||
|
||||
Nothing to see here, please [move along](https://www.patreon.com/sourcetrail).
|
||||
|
||||
_Note: This file will be updated at the beginning of each month._
|
||||
@@ -0,0 +1,39 @@
|
||||
version: 0.0.0.{build}
|
||||
image: Visual Studio 2017
|
||||
|
||||
install:
|
||||
############################################################################
|
||||
# Install Ninja
|
||||
############################################################################
|
||||
- set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip"
|
||||
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
|
||||
- 7z x ninja.zip -oC:\projects\deps\ninja > nul
|
||||
- set PATH=C:\projects\deps\ninja;%PATH%
|
||||
- ninja --version
|
||||
|
||||
before_build:
|
||||
- choco install winrar -y
|
||||
- SET "PATH=%PATH%;C:\Program Files\WinRAR"
|
||||
- mkdir build
|
||||
- cd build
|
||||
- mkdir temp
|
||||
- cd ../
|
||||
- cd script
|
||||
- cmd: "\"C:/Program Files/Git/usr/bin/bash.exe\" download_python_indexer.sh"
|
||||
- cd ../
|
||||
- cd build
|
||||
- mkdir win64
|
||||
- cd win64
|
||||
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
- cmake -G "Ninja" -DBOOST_ROOT=C:/Libraries/boost_1_69_0 -DQt5_DIR=C:/Qt/5.12.5/msvc2017_64/lib/cmake/Qt5 -DBUILD_PYTHON_LANGUAGE_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release ../../
|
||||
- cd ../../
|
||||
|
||||
build_script:
|
||||
- cd build/win64
|
||||
- ninja
|
||||
- cd ../../
|
||||
|
||||
test_script:
|
||||
- cd bin/test
|
||||
- ..\..\build\win64\Release\test\Sourcetrail_test.exe
|
||||
- cd ../../
|
||||
@@ -1,47 +0,0 @@
|
||||
Copyright (C) 1999-2013,2014,2015 Jack Lloyd
|
||||
2001 Peter J Jones
|
||||
2004-2007 Justin Karneges
|
||||
2004 Vaclav Ovsik
|
||||
2005 Matthew Gregan
|
||||
2005-2006 Matt Johnston
|
||||
2006 Luca Piccarreta
|
||||
2007 Yves Jerschow
|
||||
2007-2008 FlexSecure GmbH
|
||||
2007-2008 Technische Universitat Darmstadt
|
||||
2007-2008,2010,2014 Falko Strenzke
|
||||
2007-2008 Martin Doering
|
||||
2007 Manuel Hartl
|
||||
2007 Christoph Ludwig
|
||||
2007 Patrick Sona
|
||||
2008 Copyright Projet SECRET, INRIA, Rocquencourt
|
||||
2008 Bhaskar Biswas and Nicolas Sendrier
|
||||
2008 Google Inc.
|
||||
2010 Olivier de Gaalon
|
||||
2012 Vojtech Kral
|
||||
2012-2014 Markus Wanner
|
||||
2013 Joel Low
|
||||
2014 cryptosource GmbH
|
||||
2014 Andrew Moon
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions, and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions, and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,13 +0,0 @@
|
||||
Copyright 2014-2016 Javaslang, http://javaslang.io
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,141 +0,0 @@
|
||||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.1
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party.
|
||||
1.1. ''Contributor'' means each entity that creates or contributes to the creation of Modifications.
|
||||
|
||||
1.2. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
|
||||
|
||||
1.3. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
|
||||
|
||||
1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data.
|
||||
|
||||
1.5. ''Executable'' means Covered Code in any form other than Source Code.
|
||||
|
||||
1.6. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
|
||||
|
||||
1.7. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. ''License'' means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
|
||||
|
||||
A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
|
||||
B. Any new file that contains any part of the Original Code or previous Modifications.
|
||||
|
||||
|
||||
1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
|
||||
|
||||
1.12. "You'' (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. Source Code License.
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
|
||||
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and
|
||||
(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.
|
||||
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and
|
||||
(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.
|
||||
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
|
||||
(a) Third Party Claims.
|
||||
If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
|
||||
(b) Contributor APIs.
|
||||
If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.
|
||||
|
||||
|
||||
(c) Representations.
|
||||
Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
|
||||
5. Application of this License.
|
||||
This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.
|
||||
6. Versions of the License.
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation (''Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL'' or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
8. TERMINATION.
|
||||
8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
|
||||
8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
|
||||
11. MISCELLANEOUS.
|
||||
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the MPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
ANY KIND, either express or implied. See the License for the specific language governing rights and
|
||||
limitations under the License.
|
||||
|
||||
The Original Code is Javassist.
|
||||
|
||||
The Initial Developer of the Original Code is Shigeru Chiba. Portions created by the Initial Developer are
|
||||
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
|
||||
|
||||
Contributor(s): __Bill Burke, Jason T. Greene______________.
|
||||
|
||||
Alternatively, the contents of this software may be used under the terms of the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), or the Apache License Version 2.0 (the "AL"), in which case the provisions of the LGPL or the AL are applicable instead of those above. If you wish to allow use of your version of this software only under the terms of either the LGPL or the AL, and not to allow others to use your version of this software under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL or the AL. If you do not delete the provisions above, a recipient may use your version of this software under the terms of any one of the MPL, the LGPL or the AL.
|
||||
@@ -1,174 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
|
||||
Contact: http://www.qt.io/licensing/
|
||||
|
||||
You may use, distribute and copy the Qt Toolkit under the terms of
|
||||
GNU Lesser General Public License version 3, which is displayed below.
|
||||
This license makes reference to the version 3 of the GNU General
|
||||
Public License, which you can find in the LICENSE.GPLv3 file.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
licensedocument, but changing it is not allowed.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the
|
||||
GNU General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort
|
||||
to ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this
|
||||
license document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that, taken
|
||||
together, effectively do not restrict modification of the portions of
|
||||
the Library contained in the Combined Work and reverse engineering for
|
||||
debugging such modifications, if you also do each of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this
|
||||
license document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of
|
||||
this License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with
|
||||
the Library. A suitable mechanism is one that (a) uses at run
|
||||
time a copy of the Library already present on the user's
|
||||
computer system, and (b) will operate properly with a modified
|
||||
version of the Library that is interface-compatible with the
|
||||
Linked Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would
|
||||
otherwise be required to provide such information under section 6
|
||||
of the GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the Application
|
||||
with a modified version of the Linked Version. (If you use option
|
||||
4d0, the Installation Information must accompany the Minimal
|
||||
Corresponding Source and Corresponding Application Code. If you
|
||||
use option 4d1, you must provide the Installation Information in
|
||||
the manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the Library
|
||||
side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities, conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of
|
||||
it is a work based on the Library, and explaining where to find
|
||||
the accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
as you received it specifies that a certain numbered version of the
|
||||
GNU Lesser General Public License "or any later version" applies to
|
||||
it, you have the option of following the terms and conditions either
|
||||
of that published version or of any later version published by the
|
||||
Free Software Foundation. If the Library as you received it does not
|
||||
specify a version number of the GNU Lesser General Public License,
|
||||
you may choose any version of the GNU Lesser General Public License
|
||||
ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the Library.
|
||||
@@ -179,7 +179,7 @@
|
||||
<struct></struct>
|
||||
<enum></enum>
|
||||
<typedef></typedef>
|
||||
<template_parameter_type></template_parameter_type>
|
||||
<template_parameter></template_parameter>
|
||||
<type_parameter></type_parameter>
|
||||
|
||||
<function></function>
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<config>
|
||||
<window>
|
||||
<background>#494949</background>
|
||||
<separator>#CCCCCC</separator>
|
||||
<scrollbar>
|
||||
<background>transparent</background>
|
||||
<handle>#80999999</handle>
|
||||
<line>#80999999</line>
|
||||
</scrollbar>
|
||||
<dock>
|
||||
<text>white</text>
|
||||
<background>#808080</background>
|
||||
<line>#A0A0A0</line>
|
||||
<icon_type>white</icon_type> <!-- white, grey, black -->
|
||||
</dock>
|
||||
<button>
|
||||
<text>white</text>
|
||||
<background>#CC494949</background>
|
||||
<border>#D4D4D4</border>
|
||||
<border_hover>white</border_hover>
|
||||
<icon>white</icon>
|
||||
</button>
|
||||
</window>
|
||||
|
||||
<search>
|
||||
<background>#494949</background>
|
||||
|
||||
@@ -15,7 +38,8 @@
|
||||
|
||||
<field>
|
||||
<text>#FFFFFF</text>
|
||||
<background>#808080</background>
|
||||
<background>#494949</background>
|
||||
<border>#808080</border>
|
||||
<highlight>#B1B1B1</highlight>
|
||||
</field>
|
||||
|
||||
@@ -72,28 +96,30 @@
|
||||
</search>
|
||||
|
||||
<code>
|
||||
<background>#494949</background>
|
||||
<background>#595959</background>
|
||||
|
||||
<navigation>
|
||||
<text>#A0A0A0</text>
|
||||
<line>#CCCCCC</line>
|
||||
<background>#494949</background>
|
||||
<text>#CCCCCC</text>
|
||||
<line>#FFF</line>
|
||||
</navigation>
|
||||
|
||||
<file>
|
||||
<background>#CCCCCC</background>
|
||||
<background>#AAAAAA</background>
|
||||
<hover>#999999</hover>
|
||||
|
||||
<title>
|
||||
<text>black</text>
|
||||
<normal>#CCCCCC</normal>
|
||||
<hover>#BBBBBB</hover>
|
||||
<press>#AAAAAA</press>
|
||||
<hover>#CCCCCC</hover>
|
||||
<press>#CCCCCC</press>
|
||||
<icon>black</icon>
|
||||
<border>#B1B1B1</border>
|
||||
<hatching>grey</hatching>
|
||||
</title>
|
||||
|
||||
<ref_count>
|
||||
<text>#C4C4C4</text>
|
||||
<text>#D4D4D4</text>
|
||||
<background>#494949</background>
|
||||
</ref_count>
|
||||
</file>
|
||||
@@ -108,21 +134,24 @@
|
||||
</title>
|
||||
|
||||
<line_number>
|
||||
<text>#C4C4C4</text>
|
||||
<text>#D4D4D4</text>
|
||||
<inactive_text>#A0A0A0</inactive_text>
|
||||
<background>#494949</background>
|
||||
<marker>#C4C4C4</marker>
|
||||
<marker>
|
||||
<active>#807F80</active>
|
||||
<focus>#D4D4D4</focus>
|
||||
</marker>
|
||||
</line_number>
|
||||
|
||||
<syntax>
|
||||
<normal>#C4C4C4</normal>
|
||||
<text>#D4D4D4</text>
|
||||
<directive>#00A0B6</directive>
|
||||
<keyword>#00A0B6</keyword>
|
||||
<type>#FF4A52</type>
|
||||
<comment>#A0A0A4</comment>
|
||||
<number>#EE7326</number>
|
||||
<quotation>#D663D6</quotation>
|
||||
<function>#FBBA00</function>
|
||||
<keyword>#00BCD6</keyword>
|
||||
<type>#FF5961</type>
|
||||
<comment>#78946B</comment>
|
||||
<number>#FC7F30</number>
|
||||
<quotation>#DB77DB</quotation>
|
||||
<function>#FFCC3B</function>
|
||||
</syntax>
|
||||
|
||||
<selection>
|
||||
@@ -157,7 +186,7 @@
|
||||
<text>#262626</text>
|
||||
</focus>
|
||||
<active>
|
||||
<border>transparent</border>
|
||||
<border>white</border>
|
||||
<fill>#A5DEFF</fill>
|
||||
<text>#262626</text>
|
||||
</active>
|
||||
@@ -178,7 +207,7 @@
|
||||
<fill>#FFFF0000</fill>
|
||||
</focus>
|
||||
</error>
|
||||
<fulltext>
|
||||
<fulltext_search>
|
||||
<normal>
|
||||
<fill>#C2AFEF</fill>
|
||||
<text>#3D3D3D</text>
|
||||
@@ -186,7 +215,17 @@
|
||||
<focus>
|
||||
<fill>#987CEA</fill>
|
||||
</focus>
|
||||
</fulltext>
|
||||
</fulltext_search>
|
||||
<screen_search>
|
||||
<normal>
|
||||
<border>transparent</border>
|
||||
<fill>#D2FA6E</fill>
|
||||
<text>#262626</text>
|
||||
</normal>
|
||||
<focus>
|
||||
<fill>#FA6EF3</fill>
|
||||
</focus>
|
||||
</screen_search>
|
||||
</annotation>
|
||||
</snippet>
|
||||
</code>
|
||||
@@ -209,7 +248,7 @@
|
||||
<normal>#3D3D3D</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>#494949</normal>
|
||||
<normal>#616061</normal>
|
||||
</hatching>
|
||||
</default>
|
||||
|
||||
@@ -240,19 +279,19 @@
|
||||
<enum>
|
||||
<like>type</like>
|
||||
</enum>
|
||||
<union>
|
||||
<like>type</like>
|
||||
</union>
|
||||
<typedef>
|
||||
<like>type</like>
|
||||
</typedef>
|
||||
<template_parameter_type>
|
||||
<like>type</like>
|
||||
</template_parameter_type>
|
||||
<type_parameter>
|
||||
<like>type</like>
|
||||
</type_parameter>
|
||||
|
||||
<function>
|
||||
<fill>
|
||||
<normal>#FBBA00</normal>
|
||||
<normal>#FFCC3B</normal>
|
||||
<focus>#FFD05A</focus>
|
||||
</fill>
|
||||
<border>
|
||||
@@ -260,7 +299,7 @@
|
||||
<focus>#FFFFFF</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#FFFFFF</normal>
|
||||
<normal>#FFE8A6</normal>
|
||||
</hatching>
|
||||
</function>
|
||||
<method>
|
||||
@@ -269,15 +308,15 @@
|
||||
|
||||
<global_variable>
|
||||
<fill>
|
||||
<normal>#00A0B6</normal>
|
||||
<focus>#3BAFB2</focus>
|
||||
<normal>#2FC2D6</normal>
|
||||
<focus>#38D3E8</focus>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>transparent</normal>
|
||||
<focus>#FFFFFF</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#FFFFFF</normal>
|
||||
<normal>#96DAE3</normal>
|
||||
</hatching>
|
||||
</global_variable>
|
||||
<field>
|
||||
@@ -287,9 +326,9 @@
|
||||
<like>global_variable</like>
|
||||
</enum_constant>
|
||||
|
||||
<non_indexed>
|
||||
<symbol>
|
||||
<like>type</like>
|
||||
</non_indexed>
|
||||
</symbol>
|
||||
<namespace>
|
||||
<fill>
|
||||
<normal>#873E3E</normal>
|
||||
@@ -304,7 +343,13 @@
|
||||
<icon>
|
||||
<normal>#FFFFFF</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>#B05151</normal>
|
||||
</hatching>
|
||||
</namespace>
|
||||
<module>
|
||||
<like>namespace</like>
|
||||
</module>
|
||||
<package>
|
||||
<like>namespace</like>
|
||||
</package>
|
||||
@@ -312,7 +357,7 @@
|
||||
<file>
|
||||
<fill>
|
||||
<normal>#4E82F6</normal>
|
||||
<focus>#7FA9F4</focus>
|
||||
<focus>#6793F6</focus>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#20FFFFFF</normal>
|
||||
@@ -325,12 +370,15 @@
|
||||
<normal>#FFFFFF</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>#999999</normal>
|
||||
<normal>#416CCC</normal>
|
||||
</hatching>
|
||||
</file>
|
||||
<macro>
|
||||
<like>file</like>
|
||||
</macro>
|
||||
<annotation>
|
||||
<like>file</like>
|
||||
</annotation>
|
||||
|
||||
<access>
|
||||
<fill>
|
||||
@@ -382,60 +430,137 @@
|
||||
<normal>#B1B1B1</normal>
|
||||
</text>
|
||||
</text>
|
||||
<group>
|
||||
<default>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#FFFFFF</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#807F80</normal>
|
||||
</border>
|
||||
</default>
|
||||
<file>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#D4D4D4</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#4E82F6</normal>
|
||||
<focus>#6793F6</focus>
|
||||
</border>
|
||||
</file>
|
||||
<namespace>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#D4D4D4</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#873E3E</normal>
|
||||
<focus>#944444</focus>
|
||||
</border>
|
||||
</namespace>
|
||||
<inheritance>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#797979</normal>
|
||||
</border>
|
||||
</inheritance>
|
||||
</group>
|
||||
</node>
|
||||
<edge>
|
||||
<default>
|
||||
<normal>#797979</normal>
|
||||
</default>
|
||||
|
||||
<type_use>
|
||||
<like>default</like>
|
||||
</type_use>
|
||||
|
||||
<inheritance>
|
||||
<like>default</like>
|
||||
</inheritance>
|
||||
|
||||
<override>
|
||||
<normal>#CC5E89</normal>
|
||||
<normal>#BA5ECC</normal>
|
||||
</override>
|
||||
|
||||
<call>
|
||||
<normal>#FBBA00</normal>
|
||||
<normal>#DEA400</normal>
|
||||
<trail_focus>#FFFFFF</trail_focus>
|
||||
</call>
|
||||
|
||||
<use>
|
||||
<normal>#2A6484</normal>
|
||||
<normal>#00A0B6</normal>
|
||||
</use>
|
||||
|
||||
<template_argument>
|
||||
<normal>#C1305D</normal>
|
||||
</template_argument>
|
||||
<type_argument>
|
||||
<like>template_argument</like>
|
||||
<normal>#D93D5F</normal>
|
||||
</type_argument>
|
||||
<template_default_argument>
|
||||
<like>template_argument</like>
|
||||
</template_default_argument>
|
||||
<template_specialization>
|
||||
<like>template_argument</like>
|
||||
<like>type_argument</like>
|
||||
</template_specialization>
|
||||
<template_member_specialization>
|
||||
<like>template_argument</like>
|
||||
</template_member_specialization>
|
||||
|
||||
<include>
|
||||
<normal>#4E82F6</normal>
|
||||
</include>
|
||||
<import>
|
||||
<like>include</like>
|
||||
</import>
|
||||
<macro_use>
|
||||
<normal>#4E82F6</normal>
|
||||
<like>include</like>
|
||||
</macro_use>
|
||||
<annotation_use>
|
||||
<like>include</like>
|
||||
</annotation_use>
|
||||
|
||||
<aggregation>
|
||||
<normal>#5D5D5D</normal>
|
||||
<normal>#666666</normal>
|
||||
<focus>#6D6D6D</focus>
|
||||
</aggregation>
|
||||
</edge>
|
||||
</graph>
|
||||
|
||||
<tab>
|
||||
<background>#494949</background>
|
||||
<bar>
|
||||
<background>#808080</background>
|
||||
<border>#BEBEBE</border>
|
||||
<button>
|
||||
<text>
|
||||
<normal>#CCC</normal>
|
||||
<hover>#CCC</hover>
|
||||
<press>white</press>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#CCC</normal>
|
||||
<press>#EEE</press>
|
||||
</border>
|
||||
<background>
|
||||
<normal>#808080</normal>
|
||||
<hover>#505050</hover>
|
||||
<press>#494949</press>
|
||||
</background>
|
||||
<icon>#CCC</icon>
|
||||
</button>
|
||||
</bar>
|
||||
</tab>
|
||||
|
||||
<table>
|
||||
<background>#494949</background>
|
||||
<table>#C4C4C4</table>
|
||||
<table>#D4D4D4</table>
|
||||
<text>
|
||||
<normal>#C4C4C4</normal>
|
||||
<normal>#D4D4D4</normal>
|
||||
<active>black</active>
|
||||
<disabled>#AAA</disabled>
|
||||
</text>
|
||||
<table_line_1>
|
||||
<normal>#494949</normal>
|
||||
@@ -446,10 +571,44 @@
|
||||
<active>#7B7B7B</active>
|
||||
</table_line_2>
|
||||
</table>
|
||||
<tab>
|
||||
|
||||
<screen_search>
|
||||
<background>#808080</background>
|
||||
<border>#BEBEBE</border>
|
||||
<box>
|
||||
<background>#494949</background>
|
||||
<text>#D4D4D4</text>
|
||||
<match_label>#CCCCCC</match_label>
|
||||
</box>
|
||||
<filter>white</filter>
|
||||
<button>
|
||||
<normal>#494949</normal>
|
||||
<hover>#606060</hover>
|
||||
<press>#707070</press>
|
||||
<disabled>#494949</disabled>
|
||||
<icon>white</icon>
|
||||
<icon_disabled>#666666</icon_disabled>
|
||||
</button>
|
||||
</screen_search>
|
||||
|
||||
<custom_trail>
|
||||
<background>#494949</background>
|
||||
<active>#C4C4C4</active>
|
||||
<hover>#878787</hover>
|
||||
<text>#878787</text>
|
||||
</tab>
|
||||
<alt_background>#808080</alt_background>
|
||||
<separator>#CCCCCC</separator>
|
||||
<text>#FFFFFF</text>
|
||||
<text_disabled>darkgrey</text_disabled>
|
||||
<background_disabled>#696969</background_disabled>
|
||||
<button>
|
||||
<default>
|
||||
<text>#FFFFFF</text>
|
||||
<background>#494949</background>
|
||||
<border>#FFFFFF</border>
|
||||
</default>
|
||||
<hover>
|
||||
<text>#494949</text>
|
||||
<background>#FFFFFF</background>
|
||||
<border>#FFFFFF</border>
|
||||
</hover>
|
||||
</button>
|
||||
</custom_trail>
|
||||
</config>
|
||||
|
||||
@@ -1,30 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<config>
|
||||
<window>
|
||||
<background>white</background>
|
||||
<separator>#A2A2A2</separator>
|
||||
<scrollbar>
|
||||
<background>transparent</background>
|
||||
<handle>#80999999</handle>
|
||||
<line>#80999999</line>
|
||||
</scrollbar>
|
||||
<dock>
|
||||
<text>black</text>
|
||||
<background>#E0E0E0</background>
|
||||
<line>#BEBEBE</line>
|
||||
<icon_type>grey</icon_type> <!-- white, grey, black -->
|
||||
</dock>
|
||||
<button>
|
||||
<text>black</text>
|
||||
<background>white</background>
|
||||
<border>#AAA</border>
|
||||
<border_hover>#878787</border_hover>
|
||||
<icon>black</icon>
|
||||
</button>
|
||||
</window>
|
||||
|
||||
<search>
|
||||
<background>white</background>
|
||||
|
||||
<button>
|
||||
<normal>#E0E0E0</normal>
|
||||
<hover>#B2B2B2</hover>
|
||||
<normal>#B0B0B0</normal>
|
||||
<hover>#828282</hover>
|
||||
<press>#626262</press>
|
||||
<disabled>#F2F2F2</disabled>
|
||||
<disabled>#E2E2E2</disabled>
|
||||
<icon>white</icon>
|
||||
<icon_disabled>#DEDEDE</icon_disabled>
|
||||
<icon_disabled>#9E9E9E</icon_disabled>
|
||||
</button>
|
||||
|
||||
<field>
|
||||
<text>black</text>
|
||||
<background>#E0E0E0</background>
|
||||
<highlight>#B2B2B2</highlight>
|
||||
<background>white</background>
|
||||
<border>#B0B0B0</border>
|
||||
<highlight>#929292</highlight>
|
||||
</field>
|
||||
|
||||
<popup>
|
||||
<text>black</text>
|
||||
<by_text>#626262</by_text>
|
||||
<by_text>#525252</by_text>
|
||||
<background>white</background>
|
||||
<highlight>#D0D0D0</highlight>
|
||||
<line>#E0E0E0</line>
|
||||
<highlight>#C0C0C0</highlight>
|
||||
<line>#C0C0C0</line>
|
||||
</popup>
|
||||
|
||||
<query>
|
||||
@@ -44,7 +68,7 @@
|
||||
<text>black</text>
|
||||
</normal>
|
||||
<hover>
|
||||
<fill>#5EA071</fill>
|
||||
<fill>#6DB080</fill>
|
||||
<text>black</text>
|
||||
</hover>
|
||||
</command>
|
||||
@@ -72,21 +96,23 @@
|
||||
</search>
|
||||
|
||||
<code>
|
||||
<background>white</background>
|
||||
<background>#F6F6F6</background>
|
||||
|
||||
<navigation>
|
||||
<text>#B2B2B2</text>
|
||||
<line>#B2B2B2</line>
|
||||
<background>white</background>
|
||||
<text>#727272</text>
|
||||
<line>#A2A2A2</line>
|
||||
</navigation>
|
||||
|
||||
<file>
|
||||
<background>#E0E0E0</background>
|
||||
<background>#D8D8D8</background>
|
||||
<hover>#E0E0E0</hover>
|
||||
|
||||
<title>
|
||||
<text>black</text>
|
||||
<normal>#E0E0E0</normal>
|
||||
<hover>#B2B2B2</hover>
|
||||
<press>#626262</press>
|
||||
<normal>#D0D0D0</normal>
|
||||
<hover>#C0C0C0</hover>
|
||||
<press>#B5B5B5</press>
|
||||
<icon>black</icon>
|
||||
<border>white</border>
|
||||
<hatching>bright</hatching>
|
||||
@@ -102,32 +128,35 @@
|
||||
<background>white</background>
|
||||
|
||||
<title>
|
||||
<text>#A0A0A0</text>
|
||||
<text>#909090</text>
|
||||
<background>transparent</background>
|
||||
<hover>#F5F5F5</hover>
|
||||
</title>
|
||||
|
||||
<line_number>
|
||||
<text>black</text>
|
||||
<inactive_text>#A0A0A0</inactive_text>
|
||||
<inactive_text>#909090</inactive_text>
|
||||
<background>white</background>
|
||||
<marker>#A0A0A0</marker>
|
||||
<marker>
|
||||
<active>#C0C0C0</active>
|
||||
<focus>#727272</focus>
|
||||
</marker>
|
||||
</line_number>
|
||||
|
||||
<syntax>
|
||||
<normal>black</normal>
|
||||
<text>black</text>
|
||||
<directive>#1B8856</directive>
|
||||
<keyword>#1B8856</keyword>
|
||||
<type>#C1492D</type>
|
||||
<comment>#1A801A</comment>
|
||||
<comment>#3D84A8</comment>
|
||||
<number>#C1315E</number>
|
||||
<quotation>#865F9E</quotation>
|
||||
<function>#CC9533</function>
|
||||
<function>#B0812C</function>
|
||||
</syntax>
|
||||
|
||||
<selection>
|
||||
<text>black</text>
|
||||
<background>#E0E0E0</background>
|
||||
<background>#D0D0D0</background>
|
||||
</selection>
|
||||
|
||||
<annotation>
|
||||
@@ -156,7 +185,7 @@
|
||||
<fill>#C6EAFF</fill>
|
||||
</focus>
|
||||
<active>
|
||||
<border>transparent</border>
|
||||
<border>#136391</border>
|
||||
<fill>#C6EAFF</fill>
|
||||
</active>
|
||||
</local_symbol>
|
||||
@@ -173,10 +202,10 @@
|
||||
<text>#000000</text>
|
||||
</normal>
|
||||
<focus>
|
||||
<fill>#FFFF0000</fill>
|
||||
<fill>#CCFF0000</fill>
|
||||
</focus>
|
||||
</error>
|
||||
<fulltext>
|
||||
<fulltext_search>
|
||||
<normal>
|
||||
<fill>#C7C7E2</fill>
|
||||
<text>#000000</text>
|
||||
@@ -184,7 +213,17 @@
|
||||
<focus>
|
||||
<fill>#ABABDD</fill>
|
||||
</focus>
|
||||
</fulltext>
|
||||
</fulltext_search>
|
||||
<screen_search>
|
||||
<normal>
|
||||
<border>transparent</border>
|
||||
<fill>#8ADBBC</fill>
|
||||
<text>#000000</text>
|
||||
</normal>
|
||||
<focus>
|
||||
<fill>#DB97C2</fill>
|
||||
</focus>
|
||||
</screen_search>
|
||||
</annotation>
|
||||
</snippet>
|
||||
</code>
|
||||
@@ -195,7 +234,7 @@
|
||||
<node>
|
||||
<default>
|
||||
<fill>
|
||||
<normal>#ededed</normal>
|
||||
<normal>#D6D6D6</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#3C3C3C</normal>
|
||||
@@ -207,7 +246,7 @@
|
||||
<normal>black</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>white</normal>
|
||||
<normal>#F0F0F0</normal>
|
||||
</hatching>
|
||||
</default>
|
||||
|
||||
@@ -232,12 +271,12 @@
|
||||
<enum>
|
||||
<like>type</like>
|
||||
</enum>
|
||||
<union>
|
||||
<like>type</like>
|
||||
</union>
|
||||
<typedef>
|
||||
<like>type</like>
|
||||
</typedef>
|
||||
<template_parameter_type>
|
||||
<like>type</like>
|
||||
</template_parameter_type>
|
||||
<type_parameter>
|
||||
<like>type</like>
|
||||
</type_parameter>
|
||||
@@ -251,6 +290,9 @@
|
||||
<normal>transparent</normal>
|
||||
<focus>#3C3C3C</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#FFEDC4</normal>
|
||||
</hatching>
|
||||
</function>
|
||||
<method>
|
||||
<like>function</like>
|
||||
@@ -258,13 +300,16 @@
|
||||
|
||||
<global_variable>
|
||||
<fill>
|
||||
<normal>#7BB5D4</normal>
|
||||
<focus>#42A1D4</focus>
|
||||
<normal>#81C1E3</normal>
|
||||
<focus>#72B3D6</focus>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>transparent</normal>
|
||||
<focus>#3C3C3C</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#BBDDED</normal>
|
||||
</hatching>
|
||||
</global_variable>
|
||||
<field>
|
||||
<like>global_variable</like>
|
||||
@@ -273,9 +318,9 @@
|
||||
<like>global_variable</like>
|
||||
</enum_constant>
|
||||
|
||||
<non_indexed>
|
||||
<symbol>
|
||||
<like>type</like>
|
||||
</non_indexed>
|
||||
</symbol>
|
||||
<namespace>
|
||||
<fill>
|
||||
<normal>#EFC5C5</normal>
|
||||
@@ -287,24 +332,36 @@
|
||||
<icon>
|
||||
<normal>#3D3D3D</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>#FFDEDE</normal>
|
||||
</hatching>
|
||||
</namespace>
|
||||
<module>
|
||||
<like>namespace</like>
|
||||
</module>
|
||||
<package>
|
||||
<like>namespace</like>
|
||||
</package>
|
||||
|
||||
<file>
|
||||
<fill>
|
||||
<normal>#DDD</normal>
|
||||
<focus>#CCC</focus>
|
||||
<normal>#BEE0AF</normal>
|
||||
<focus>#A6D492</focus>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#203C3C3C</normal>
|
||||
<focus>#3C3C3C</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#D7F7C8</normal>
|
||||
</hatching>
|
||||
</file>
|
||||
<macro>
|
||||
<like>file</like>
|
||||
</macro>
|
||||
<annotation>
|
||||
<like>file</like>
|
||||
</annotation>
|
||||
|
||||
<access>
|
||||
<fill>
|
||||
@@ -347,65 +404,137 @@
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#B2B2B2</normal>
|
||||
<normal>#A2A2A2</normal>
|
||||
</text>
|
||||
</text>
|
||||
<group>
|
||||
<default>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#D0D0D0</normal>
|
||||
</border>
|
||||
</default>
|
||||
<file>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#5C5C5C</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#BEE0AF</normal>
|
||||
<focus>#A6D492</focus>
|
||||
</border>
|
||||
</file>
|
||||
<namespace>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#5C5C5C</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#EFC5C5</normal>
|
||||
<focus>#EFB3B3</focus>
|
||||
</border>
|
||||
</namespace>
|
||||
<inheritance>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#878787</normal>
|
||||
</border>
|
||||
</inheritance>
|
||||
</group>
|
||||
</node>
|
||||
<edge>
|
||||
<default>
|
||||
<normal>#878787</normal>
|
||||
</default>
|
||||
|
||||
<type_use>
|
||||
<like>default</like>
|
||||
</type_use>
|
||||
|
||||
<inheritance>
|
||||
<like>default</like>
|
||||
</inheritance>
|
||||
|
||||
<override>
|
||||
<normal>#CC5E89</normal>
|
||||
<normal>#A37ACC</normal>
|
||||
</override>
|
||||
|
||||
<call>
|
||||
<normal>#F4BC3D</normal>
|
||||
<trail_focus>#878787</trail_focus>
|
||||
<trail_focus>#F56B3D</trail_focus>
|
||||
</call>
|
||||
|
||||
<use>
|
||||
<normal>#3190BA</normal>
|
||||
<normal>#4B9FC4</normal>
|
||||
</use>
|
||||
|
||||
<template_argument>
|
||||
<normal>#C1305D</normal>
|
||||
</template_argument>
|
||||
<type_argument>
|
||||
<like>template_argument</like>
|
||||
<like>#CF6B7C</like>
|
||||
</type_argument>
|
||||
<template_default_argument>
|
||||
<like>template_argument</like>
|
||||
</template_default_argument>
|
||||
<template_specialization>
|
||||
<like>template_argument</like>
|
||||
<like>type_argument</like>
|
||||
</template_specialization>
|
||||
<template_member_specialization>
|
||||
<like>template_argument</like>
|
||||
</template_member_specialization>
|
||||
|
||||
<include>
|
||||
<normal>#719660</normal>
|
||||
</include>
|
||||
<import>
|
||||
<like>include</like>
|
||||
</import>
|
||||
<macro_use>
|
||||
<like>include</like>
|
||||
</macro_use>
|
||||
<annotation_use>
|
||||
<like>include</like>
|
||||
</annotation_use>
|
||||
|
||||
<aggregation>
|
||||
<normal>#DDD</normal>
|
||||
<focus>#CCC</focus>
|
||||
<normal>#CCC</normal>
|
||||
<focus>#BBB</focus>
|
||||
</aggregation>
|
||||
</edge>
|
||||
</graph>
|
||||
<error>
|
||||
<background>white</background>
|
||||
</error>
|
||||
|
||||
<tab>
|
||||
<background>white</background>
|
||||
<active>black</active>
|
||||
<hover>#878787</hover>
|
||||
<text>#878787</text>
|
||||
<bar>
|
||||
<background>#E0E0E0</background>
|
||||
<border>#A2A2A2</border>
|
||||
<button>
|
||||
<text>
|
||||
<normal>#555</normal>
|
||||
<hover>#555</hover>
|
||||
<press>black</press>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#888</normal>
|
||||
<press>#777</press>
|
||||
</border>
|
||||
<background>
|
||||
<normal>#E0E0E0</normal>
|
||||
<hover>#F0F0F0</hover>
|
||||
<press>#FFFFFF</press>
|
||||
</background>
|
||||
<icon>#555</icon>
|
||||
</button>
|
||||
</bar>
|
||||
</tab>
|
||||
|
||||
<table>
|
||||
<background>white</background>
|
||||
<table>#aaa</table>
|
||||
<text>
|
||||
<normal>black</normal>
|
||||
<active>white</active>
|
||||
<disabled>#777</disabled>
|
||||
</text>
|
||||
<table_line_1>
|
||||
<normal>white</normal>
|
||||
@@ -416,4 +545,44 @@
|
||||
<active>grey</active>
|
||||
</table_line_2>
|
||||
</table>
|
||||
|
||||
<screen_search>
|
||||
<background>#E0E0E0</background>
|
||||
<border>#BEBEBE</border>
|
||||
<box>
|
||||
<background>white</background>
|
||||
<text>black</text>
|
||||
<match_label>#727272</match_label>
|
||||
</box>
|
||||
<filter>black</filter>
|
||||
<button>
|
||||
<normal>white</normal>
|
||||
<hover>#F2F2F2</hover>
|
||||
<press>#CECECE</press>
|
||||
<disabled>white</disabled>
|
||||
<icon>#727272</icon>
|
||||
<icon_disabled>#CECECE</icon_disabled>
|
||||
</button>
|
||||
</screen_search>
|
||||
|
||||
<custom_trail>
|
||||
<background>white</background>
|
||||
<alt_background>#F5F5F5</alt_background>
|
||||
<separator>#C0C0C0</separator>
|
||||
<text>black</text>
|
||||
<text_disabled>#A0A0A0</text_disabled>
|
||||
<background_disabled>#F2F2F2</background_disabled>
|
||||
<button>
|
||||
<default>
|
||||
<text>black</text>
|
||||
<background>white</background>
|
||||
<border>lightgray</border>
|
||||
</default>
|
||||
<hover>
|
||||
<text>white</text>
|
||||
<background>#2D3C86</background>
|
||||
<border>lightgray</border>
|
||||
</hover>
|
||||
</button>
|
||||
</custom_trail>
|
||||
</config>
|
||||
|
||||
@@ -1,13 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<config>
|
||||
<window>
|
||||
<background>#272728</background>
|
||||
<separator>#CCC</separator>
|
||||
<scrollbar>
|
||||
<background>transparent</background>
|
||||
<handle>#80999999</handle>
|
||||
<line>#80999999</line>
|
||||
</scrollbar>
|
||||
<dock>
|
||||
<text>#F7F7F7</text>
|
||||
<background>#555555</background>
|
||||
<line>#808080</line>
|
||||
<icon_type>white</icon_type> <!-- white, grey, black -->
|
||||
</dock>
|
||||
<button>
|
||||
<text>white</text>
|
||||
<background>#3A3A3A</background>
|
||||
<border>#C5C5C5</border>
|
||||
<border_hover>white</border_hover>
|
||||
<icon>white</icon>
|
||||
</button>
|
||||
</window>
|
||||
|
||||
<search>
|
||||
<background>#272728</background>
|
||||
|
||||
<button>
|
||||
<normal>#777777</normal>
|
||||
<hover>#555555</hover>
|
||||
<press>#444444</press>
|
||||
<normal>#555555</normal>
|
||||
<hover>#404040</hover>
|
||||
<press>#3A3A3A</press>
|
||||
<disabled>#333333</disabled>
|
||||
<icon>white</icon>
|
||||
<icon_disabled>#777777</icon_disabled>
|
||||
@@ -15,8 +38,9 @@
|
||||
|
||||
<field>
|
||||
<text>#F7F7F7</text>
|
||||
<background>#777777</background>
|
||||
<highlight>#555555</highlight>
|
||||
<background>#272728</background>
|
||||
<border>#555555</border>
|
||||
<highlight>#999999</highlight>
|
||||
</field>
|
||||
|
||||
<popup>
|
||||
@@ -24,7 +48,7 @@
|
||||
<by_text>#A0A0A0</by_text>
|
||||
<background>#272728</background>
|
||||
<highlight>#333333</highlight>
|
||||
<line>#444444</line>
|
||||
<line>#4A4A4A</line>
|
||||
</popup>
|
||||
|
||||
<query>
|
||||
@@ -72,21 +96,23 @@
|
||||
</search>
|
||||
|
||||
<code>
|
||||
<background>#272728</background>
|
||||
<background>#313132</background>
|
||||
|
||||
<navigation>
|
||||
<text>#A0A0A0</text>
|
||||
<line>#CCC</line>
|
||||
<background>#272728</background>
|
||||
<text>#C5C5C5</text>
|
||||
<line>#999</line>
|
||||
</navigation>
|
||||
|
||||
<file>
|
||||
<background>#777777</background>
|
||||
<background>#5C5C5C</background>
|
||||
<hover>#6C6C6C</hover>
|
||||
|
||||
<title>
|
||||
<text>#F7F7F7</text>
|
||||
<normal>#777777</normal>
|
||||
<hover>#555555</hover>
|
||||
<press>#444444</press>
|
||||
<normal>#5C5C5C</normal>
|
||||
<hover>#4A4A4A</hover>
|
||||
<press>#404040</press>
|
||||
<icon>white</icon>
|
||||
<border>#272728</border>
|
||||
<hatching>dark</hatching>
|
||||
@@ -111,15 +137,18 @@
|
||||
<text>#F7F7F7</text>
|
||||
<inactive_text>#A0A0A0</inactive_text>
|
||||
<background>#272728</background>
|
||||
<marker>#969696</marker>
|
||||
<marker>
|
||||
<active>#797979</active>
|
||||
<focus>#F7F7F7</focus>
|
||||
</marker>
|
||||
</line_number>
|
||||
|
||||
<syntax>
|
||||
<normal>#F7F7F7</normal>
|
||||
<text>#F7F7F7</text>
|
||||
<directive>#1F9C62</directive>
|
||||
<keyword>#1F9C62</keyword>
|
||||
<type>#D95233</type>
|
||||
<comment>#A0A0A4</comment>
|
||||
<comment>#4E768A</comment>
|
||||
<number>#CC3463</number>
|
||||
<quotation>#9368AD</quotation>
|
||||
<function>#D69C36</function>
|
||||
@@ -137,12 +166,12 @@
|
||||
<fill>transparent</fill>
|
||||
</normal>
|
||||
<focus>
|
||||
<border>#F7F7F7</border>
|
||||
<border>#D5D5D5</border>
|
||||
<fill>transparent</fill>
|
||||
</focus>
|
||||
<active>
|
||||
<border>transparent</border>
|
||||
<fill>#F7F7F7</fill>
|
||||
<fill>#D5D5D5</fill>
|
||||
<text>#272728</text>
|
||||
</active>
|
||||
</token>
|
||||
@@ -157,7 +186,7 @@
|
||||
<text>#191919</text>
|
||||
</focus>
|
||||
<active>
|
||||
<border>transparent</border>
|
||||
<border>white</border>
|
||||
<fill>#969696</fill>
|
||||
<text>#272728</text>
|
||||
</active>
|
||||
@@ -171,14 +200,14 @@
|
||||
<error>
|
||||
<normal>
|
||||
<border>transparent</border>
|
||||
<fill>#A0FF0000</fill>
|
||||
<fill>#BBFF0000</fill>
|
||||
<text>#000000</text>
|
||||
</normal>
|
||||
<focus>
|
||||
<fill>#FFFF0000</fill>
|
||||
</focus>
|
||||
</error>
|
||||
<fulltext>
|
||||
<fulltext_search>
|
||||
<normal>
|
||||
<fill>#207EA8</fill>
|
||||
<text>#F7F7F7</text>
|
||||
@@ -187,7 +216,17 @@
|
||||
<border>#006D93</border>
|
||||
<fill>#134B63</fill>
|
||||
</focus>
|
||||
</fulltext>
|
||||
</fulltext_search>
|
||||
<screen_search>
|
||||
<normal>
|
||||
<border>transparent</border>
|
||||
<fill>#6EDB42</fill>
|
||||
<text>#000000</text>
|
||||
</normal>
|
||||
<focus>
|
||||
<fill>#FF52E8</fill>
|
||||
</focus>
|
||||
</screen_search>
|
||||
</annotation>
|
||||
</snippet>
|
||||
</code>
|
||||
@@ -198,7 +237,7 @@
|
||||
<node>
|
||||
<default>
|
||||
<fill>
|
||||
<normal>#4D4D4D</normal>
|
||||
<normal>#5A5A5A</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#C3C3C3</normal>
|
||||
@@ -210,7 +249,7 @@
|
||||
<normal>#F7F7F7</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>#272728</normal>
|
||||
<normal>#3D3D3D</normal>
|
||||
</hatching>
|
||||
</default>
|
||||
|
||||
@@ -235,12 +274,12 @@
|
||||
<enum>
|
||||
<like>type</like>
|
||||
</enum>
|
||||
<union>
|
||||
<like>type</like>
|
||||
</union>
|
||||
<typedef>
|
||||
<like>type</like>
|
||||
</typedef>
|
||||
<template_parameter_type>
|
||||
<like>type</like>
|
||||
</template_parameter_type>
|
||||
<type_parameter>
|
||||
<like>type</like>
|
||||
</type_parameter>
|
||||
@@ -254,6 +293,9 @@
|
||||
<normal>transparent</normal>
|
||||
<focus>#C3C3C3</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#544815</normal>
|
||||
</hatching>
|
||||
</function>
|
||||
<method>
|
||||
<like>function</like>
|
||||
@@ -268,6 +310,9 @@
|
||||
<normal>transparent</normal>
|
||||
<focus>#C3C3C3</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#17384A</normal>
|
||||
</hatching>
|
||||
</global_variable>
|
||||
<field>
|
||||
<like>global_variable</like>
|
||||
@@ -276,9 +321,9 @@
|
||||
<like>global_variable</like>>
|
||||
</enum_constant>
|
||||
|
||||
<non_indexed>
|
||||
<symbol>
|
||||
<like>type</like>
|
||||
</non_indexed>
|
||||
</symbol>
|
||||
<namespace>
|
||||
<fill>
|
||||
<normal>#78282D</normal>
|
||||
@@ -290,7 +335,13 @@
|
||||
<icon>
|
||||
<normal>#C3C3C3</normal>
|
||||
</icon>
|
||||
<hatching>
|
||||
<normal>#521B1F</normal>
|
||||
</hatching>
|
||||
</namespace>
|
||||
<module>
|
||||
<like>namespace</like>
|
||||
</module>
|
||||
<package>
|
||||
<like>namespace</like>
|
||||
</package>
|
||||
@@ -298,16 +349,22 @@
|
||||
<file>
|
||||
<fill>
|
||||
<normal>#1B564E</normal>
|
||||
<focus>#247368</focus>
|
||||
<focus>#21695F</focus>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#20C3C3C3</normal>
|
||||
<focus>#C3C3C3</focus>
|
||||
</border>
|
||||
<hatching>
|
||||
<normal>#123B35</normal>
|
||||
</hatching>
|
||||
</file>
|
||||
<macro>
|
||||
<like>file</like>
|
||||
</macro>
|
||||
<annotation>
|
||||
<like>file</like>
|
||||
</annotation>
|
||||
|
||||
<access>
|
||||
<fill>
|
||||
@@ -353,14 +410,64 @@
|
||||
<normal>#777777</normal>
|
||||
</text>
|
||||
</text>
|
||||
<group>
|
||||
<default>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#5A5A5A</normal>
|
||||
</border>
|
||||
</default>
|
||||
<file>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#C3C3C3</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#1B564E</normal>
|
||||
<focus>#1E6158</focus>
|
||||
</border>
|
||||
</file>
|
||||
<namespace>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<text>
|
||||
<normal>#C3C3C3</normal>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#78282D</normal>
|
||||
<focus>#872D33</focus>
|
||||
</border>
|
||||
</namespace>
|
||||
<inheritance>
|
||||
<fill>
|
||||
<normal>transparent</normal>
|
||||
</fill>
|
||||
<border>
|
||||
<normal>#797979</normal>
|
||||
</border>
|
||||
</inheritance>
|
||||
</group>
|
||||
</node>
|
||||
<edge>
|
||||
<default>
|
||||
<normal>#797979</normal>
|
||||
</default>
|
||||
|
||||
<type_use>
|
||||
<like>default</like>
|
||||
</type_use>
|
||||
|
||||
<inheritance>
|
||||
<like>default</like>
|
||||
</inheritance>
|
||||
|
||||
<override>
|
||||
<normal>#CC5E89</normal>
|
||||
<normal>#8A5A94</normal>
|
||||
</override>
|
||||
|
||||
<call>
|
||||
@@ -369,47 +476,71 @@
|
||||
</call>
|
||||
|
||||
<use>
|
||||
<normal>#2A6484</normal>
|
||||
<normal>#2D6A8C</normal>
|
||||
</use>
|
||||
|
||||
<template_argument>
|
||||
<normal>#C1305D</normal>
|
||||
</template_argument>
|
||||
<type_argument>
|
||||
<like>template_argument</like>
|
||||
<normal>#C14057</normal>
|
||||
</type_argument>
|
||||
<template_default_argument>
|
||||
<like>template_argument</like>
|
||||
</template_default_argument>
|
||||
<template_specialization>
|
||||
<like>template_argument</like>
|
||||
<like>type_argument</like>
|
||||
</template_specialization>
|
||||
<template_member_specialization>
|
||||
<like>template_argument</like>
|
||||
</template_member_specialization>
|
||||
|
||||
<include>
|
||||
<normal>#247368</normal>
|
||||
</include>
|
||||
<import>
|
||||
<like>include</like>
|
||||
</import>
|
||||
<macro_use>
|
||||
<normal>#247368</normal>
|
||||
<like>include</like>
|
||||
</macro_use>
|
||||
<annotation_use>
|
||||
<like>include</like>
|
||||
</annotation_use>
|
||||
|
||||
<aggregation>
|
||||
<normal>#3D3D3D</normal>
|
||||
<focus>#4D4D4D</focus>
|
||||
<normal>#4D4D4D</normal>
|
||||
<focus>#6D6D6D</focus>
|
||||
</aggregation>
|
||||
</edge>
|
||||
</graph>
|
||||
|
||||
<tab>
|
||||
<background>#272728</background>
|
||||
<bar>
|
||||
<background>#555555</background>
|
||||
<border>#BEBEBE</border>
|
||||
<button>
|
||||
<text>
|
||||
<normal>#AAA</normal>
|
||||
<hover>#AAA</hover>
|
||||
<press>white</press>
|
||||
</text>
|
||||
<border>
|
||||
<normal>#777</normal>
|
||||
<press>#999</press>
|
||||
</border>
|
||||
<background>
|
||||
<normal>#555555</normal>
|
||||
<hover>#2F2F2F</hover>
|
||||
<press>#272728</press>
|
||||
</background>
|
||||
<icon>#AAA</icon>
|
||||
</button>
|
||||
</bar>
|
||||
</tab>
|
||||
|
||||
<table>
|
||||
<background>#272728</background>
|
||||
<table>white</table>
|
||||
<table>#C5C5C5</table>
|
||||
<text>
|
||||
<normal>white</normal>
|
||||
<active>black</active>
|
||||
<disabled>#AAA</disabled>
|
||||
</text>
|
||||
<table_line_1>
|
||||
<normal>darkgrey</normal>
|
||||
<normal>#272728</normal>
|
||||
<active>#969696</active>
|
||||
</table_line_1>
|
||||
<table_line_2>
|
||||
@@ -417,10 +548,44 @@
|
||||
<active>#969696</active>
|
||||
</table_line_2>
|
||||
</table>
|
||||
<tab>
|
||||
|
||||
<screen_search>
|
||||
<background>#555555</background>
|
||||
<border>#BEBEBE</border>
|
||||
<box>
|
||||
<background>#272728</background>
|
||||
<text>#F7F7F7</text>
|
||||
<match_label>#C5C5C5</match_label>
|
||||
</box>
|
||||
<filter>#F7F7F7</filter>
|
||||
<button>
|
||||
<normal>#272728</normal>
|
||||
<hover>#333333</hover>
|
||||
<press>#555555</press>
|
||||
<disabled>#272728</disabled>
|
||||
<icon>white</icon>
|
||||
<icon_disabled>#555555</icon_disabled>
|
||||
</button>
|
||||
</screen_search>
|
||||
|
||||
<custom_trail>
|
||||
<background>#272728</background>
|
||||
<active>white</active>
|
||||
<hover>#878787</hover>
|
||||
<text>#878787</text>
|
||||
</tab>
|
||||
<alt_background>#555555</alt_background>
|
||||
<separator>#CCC</separator>
|
||||
<text>#F7F7F7</text>
|
||||
<text_disabled>darkgrey</text_disabled>
|
||||
<background_disabled>#474748</background_disabled>
|
||||
<button>
|
||||
<default>
|
||||
<text>#F7F7F7</text>
|
||||
<background>#272728</background>
|
||||
<border>#F7F7F7</border>
|
||||
</default>
|
||||
<hover>
|
||||
<text>#272728</text>
|
||||
<background>#F7F7F7</background>
|
||||
<border>#F7F7F7</border>
|
||||
</hover>
|
||||
</button>
|
||||
</custom_trail>
|
||||
</config>
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/*===---- cuda_builtin_vars.h - CUDA built-in variables ---------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CUDA_BUILTIN_VARS_H
|
||||
#define __CUDA_BUILTIN_VARS_H
|
||||
|
||||
// Forward declares from vector_types.h.
|
||||
struct uint3;
|
||||
struct dim3;
|
||||
|
||||
// The file implements built-in CUDA variables using __declspec(property).
|
||||
// https://msdn.microsoft.com/en-us/library/yhfk0thd.aspx
|
||||
// All read accesses of built-in variable fields get converted into calls to a
|
||||
// getter function which in turn calls the appropriate builtin to fetch the
|
||||
// value.
|
||||
//
|
||||
// Example:
|
||||
// int x = threadIdx.x;
|
||||
// IR output:
|
||||
// %0 = call i32 @llvm.nvvm.read.ptx.sreg.tid.x() #3
|
||||
// PTX output:
|
||||
// mov.u32 %r2, %tid.x;
|
||||
|
||||
#define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC) \
|
||||
__declspec(property(get = __fetch_builtin_##FIELD)) unsigned int FIELD; \
|
||||
static inline __attribute__((always_inline)) \
|
||||
__attribute__((device)) unsigned int __fetch_builtin_##FIELD(void) { \
|
||||
return INTRINSIC; \
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#define __DELETE =delete
|
||||
#else
|
||||
#define __DELETE
|
||||
#endif
|
||||
|
||||
// Make sure nobody can create instances of the special variable types. nvcc
|
||||
// also disallows taking address of special variables, so we disable address-of
|
||||
// operator as well.
|
||||
#define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName) \
|
||||
__attribute__((device)) TypeName() __DELETE; \
|
||||
__attribute__((device)) TypeName(const TypeName &) __DELETE; \
|
||||
__attribute__((device)) void operator=(const TypeName &) const __DELETE; \
|
||||
__attribute__((device)) TypeName *operator&() const __DELETE
|
||||
|
||||
struct __cuda_builtin_threadIdx_t {
|
||||
__CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_tid_x());
|
||||
__CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_tid_y());
|
||||
__CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_tid_z());
|
||||
// threadIdx should be convertible to uint3 (in fact in nvcc, it *is* a
|
||||
// uint3). This function is defined after we pull in vector_types.h.
|
||||
__attribute__((device)) operator uint3() const;
|
||||
private:
|
||||
__CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_threadIdx_t);
|
||||
};
|
||||
|
||||
struct __cuda_builtin_blockIdx_t {
|
||||
__CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_ctaid_x());
|
||||
__CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_ctaid_y());
|
||||
__CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_ctaid_z());
|
||||
// blockIdx should be convertible to uint3 (in fact in nvcc, it *is* a
|
||||
// uint3). This function is defined after we pull in vector_types.h.
|
||||
__attribute__((device)) operator uint3() const;
|
||||
private:
|
||||
__CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_blockIdx_t);
|
||||
};
|
||||
|
||||
struct __cuda_builtin_blockDim_t {
|
||||
__CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_ntid_x());
|
||||
__CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_ntid_y());
|
||||
__CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_ntid_z());
|
||||
// blockDim should be convertible to dim3 (in fact in nvcc, it *is* a
|
||||
// dim3). This function is defined after we pull in vector_types.h.
|
||||
__attribute__((device)) operator dim3() const;
|
||||
private:
|
||||
__CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_blockDim_t);
|
||||
};
|
||||
|
||||
struct __cuda_builtin_gridDim_t {
|
||||
__CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_nctaid_x());
|
||||
__CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_nctaid_y());
|
||||
__CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_nctaid_z());
|
||||
// gridDim should be convertible to dim3 (in fact in nvcc, it *is* a
|
||||
// dim3). This function is defined after we pull in vector_types.h.
|
||||
__attribute__((device)) operator dim3() const;
|
||||
private:
|
||||
__CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_gridDim_t);
|
||||
};
|
||||
|
||||
#define __CUDA_BUILTIN_VAR \
|
||||
extern const __attribute__((device)) __attribute__((weak))
|
||||
__CUDA_BUILTIN_VAR __cuda_builtin_threadIdx_t threadIdx;
|
||||
__CUDA_BUILTIN_VAR __cuda_builtin_blockIdx_t blockIdx;
|
||||
__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim;
|
||||
__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim;
|
||||
|
||||
// warpSize should translate to read of %WARP_SZ but there's currently no
|
||||
// builtin to do so. According to PTX v4.2 docs 'to date, all target
|
||||
// architectures have a WARP_SZ value of 32'.
|
||||
__attribute__((device)) const int warpSize = 32;
|
||||
|
||||
#undef __CUDA_DEVICE_BUILTIN
|
||||
#undef __CUDA_BUILTIN_VAR
|
||||
#undef __CUDA_DISALLOW_BUILTINVAR_ACCESS
|
||||
|
||||
#endif /* __CUDA_BUILTIN_VARS_H */
|
||||
@@ -0,0 +1,472 @@
|
||||
/*===---- __clang_cuda_cmath.h - Device-side CUDA cmath support ------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __CLANG_CUDA_CMATH_H__
|
||||
#define __CLANG_CUDA_CMATH_H__
|
||||
#ifndef __CUDA__
|
||||
#error "This file is for CUDA compilation only."
|
||||
#endif
|
||||
|
||||
#include <limits>
|
||||
|
||||
// CUDA lets us use various std math functions on the device side. This file
|
||||
// works in concert with __clang_cuda_math_forward_declares.h to make this work.
|
||||
//
|
||||
// Specifically, the forward-declares header declares __device__ overloads for
|
||||
// these functions in the global namespace, then pulls them into namespace std
|
||||
// with 'using' statements. Then this file implements those functions, after
|
||||
// their implementations have been pulled in.
|
||||
//
|
||||
// It's important that we declare the functions in the global namespace and pull
|
||||
// them into namespace std with using statements, as opposed to simply declaring
|
||||
// these functions in namespace std, because our device functions need to
|
||||
// overload the standard library functions, which may be declared in the global
|
||||
// namespace or in std, depending on the degree of conformance of the stdlib
|
||||
// implementation. Declaring in the global namespace and pulling into namespace
|
||||
// std covers all of the known knowns.
|
||||
|
||||
#define __DEVICE__ static __device__ __inline__ __attribute__((always_inline))
|
||||
|
||||
__DEVICE__ long long abs(long long __n) { return ::llabs(__n); }
|
||||
__DEVICE__ long abs(long __n) { return ::labs(__n); }
|
||||
__DEVICE__ float abs(float __x) { return ::fabsf(__x); }
|
||||
__DEVICE__ double abs(double __x) { return ::fabs(__x); }
|
||||
__DEVICE__ float acos(float __x) { return ::acosf(__x); }
|
||||
__DEVICE__ float asin(float __x) { return ::asinf(__x); }
|
||||
__DEVICE__ float atan(float __x) { return ::atanf(__x); }
|
||||
__DEVICE__ float atan2(float __x, float __y) { return ::atan2f(__x, __y); }
|
||||
__DEVICE__ float ceil(float __x) { return ::ceilf(__x); }
|
||||
__DEVICE__ float cos(float __x) { return ::cosf(__x); }
|
||||
__DEVICE__ float cosh(float __x) { return ::coshf(__x); }
|
||||
__DEVICE__ float exp(float __x) { return ::expf(__x); }
|
||||
__DEVICE__ float fabs(float __x) { return ::fabsf(__x); }
|
||||
__DEVICE__ float floor(float __x) { return ::floorf(__x); }
|
||||
__DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); }
|
||||
__DEVICE__ int fpclassify(float __x) {
|
||||
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
|
||||
FP_ZERO, __x);
|
||||
}
|
||||
__DEVICE__ int fpclassify(double __x) {
|
||||
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
|
||||
FP_ZERO, __x);
|
||||
}
|
||||
__DEVICE__ float frexp(float __arg, int *__exp) {
|
||||
return ::frexpf(__arg, __exp);
|
||||
}
|
||||
|
||||
// For inscrutable reasons, the CUDA headers define these functions for us on
|
||||
// Windows.
|
||||
#ifndef _MSC_VER
|
||||
__DEVICE__ bool isinf(float __x) { return ::__isinff(__x); }
|
||||
__DEVICE__ bool isinf(double __x) { return ::__isinf(__x); }
|
||||
__DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); }
|
||||
// For inscrutable reasons, __finite(), the double-precision version of
|
||||
// __finitef, does not exist when compiling for MacOS. __isfinited is available
|
||||
// everywhere and is just as good.
|
||||
__DEVICE__ bool isfinite(double __x) { return ::__isfinited(__x); }
|
||||
__DEVICE__ bool isnan(float __x) { return ::__isnanf(__x); }
|
||||
__DEVICE__ bool isnan(double __x) { return ::__isnan(__x); }
|
||||
#endif
|
||||
|
||||
__DEVICE__ bool isgreater(float __x, float __y) {
|
||||
return __builtin_isgreater(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isgreater(double __x, double __y) {
|
||||
return __builtin_isgreater(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isgreaterequal(float __x, float __y) {
|
||||
return __builtin_isgreaterequal(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isgreaterequal(double __x, double __y) {
|
||||
return __builtin_isgreaterequal(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isless(float __x, float __y) {
|
||||
return __builtin_isless(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isless(double __x, double __y) {
|
||||
return __builtin_isless(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool islessequal(float __x, float __y) {
|
||||
return __builtin_islessequal(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool islessequal(double __x, double __y) {
|
||||
return __builtin_islessequal(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool islessgreater(float __x, float __y) {
|
||||
return __builtin_islessgreater(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool islessgreater(double __x, double __y) {
|
||||
return __builtin_islessgreater(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isnormal(float __x) { return __builtin_isnormal(__x); }
|
||||
__DEVICE__ bool isnormal(double __x) { return __builtin_isnormal(__x); }
|
||||
__DEVICE__ bool isunordered(float __x, float __y) {
|
||||
return __builtin_isunordered(__x, __y);
|
||||
}
|
||||
__DEVICE__ bool isunordered(double __x, double __y) {
|
||||
return __builtin_isunordered(__x, __y);
|
||||
}
|
||||
__DEVICE__ float ldexp(float __arg, int __exp) {
|
||||
return ::ldexpf(__arg, __exp);
|
||||
}
|
||||
__DEVICE__ float log(float __x) { return ::logf(__x); }
|
||||
__DEVICE__ float log10(float __x) { return ::log10f(__x); }
|
||||
__DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); }
|
||||
__DEVICE__ float pow(float __base, float __exp) {
|
||||
return ::powf(__base, __exp);
|
||||
}
|
||||
__DEVICE__ float pow(float __base, int __iexp) {
|
||||
return ::powif(__base, __iexp);
|
||||
}
|
||||
__DEVICE__ double pow(double __base, int __iexp) {
|
||||
return ::powi(__base, __iexp);
|
||||
}
|
||||
__DEVICE__ bool signbit(float __x) { return ::__signbitf(__x); }
|
||||
__DEVICE__ bool signbit(double __x) { return ::__signbitd(__x); }
|
||||
__DEVICE__ float sin(float __x) { return ::sinf(__x); }
|
||||
__DEVICE__ float sinh(float __x) { return ::sinhf(__x); }
|
||||
__DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); }
|
||||
__DEVICE__ float tan(float __x) { return ::tanf(__x); }
|
||||
__DEVICE__ float tanh(float __x) { return ::tanhf(__x); }
|
||||
|
||||
// Notably missing above is nexttoward. We omit it because
|
||||
// libdevice doesn't provide an implementation, and we don't want to be in the
|
||||
// business of implementing tricky libm functions in this header.
|
||||
|
||||
// Now we've defined everything we promised we'd define in
|
||||
// __clang_cuda_math_forward_declares.h. We need to do two additional things to
|
||||
// fix up our math functions.
|
||||
//
|
||||
// 1) Define __device__ overloads for e.g. sin(int). The CUDA headers define
|
||||
// only sin(float) and sin(double), which means that e.g. sin(0) is
|
||||
// ambiguous.
|
||||
//
|
||||
// 2) Pull the __device__ overloads of "foobarf" math functions into namespace
|
||||
// std. These are defined in the CUDA headers in the global namespace,
|
||||
// independent of everything else we've done here.
|
||||
|
||||
// We can't use std::enable_if, because we want to be pre-C++11 compatible. But
|
||||
// we go ahead and unconditionally define functions that are only available when
|
||||
// compiling for C++11 to match the behavior of the CUDA headers.
|
||||
template<bool __B, class __T = void>
|
||||
struct __clang_cuda_enable_if {};
|
||||
|
||||
template <class __T> struct __clang_cuda_enable_if<true, __T> {
|
||||
typedef __T type;
|
||||
};
|
||||
|
||||
// Defines an overload of __fn that accepts one integral argument, calls
|
||||
// __fn((double)x), and returns __retty.
|
||||
#define __CUDA_CLANG_FN_INTEGER_OVERLOAD_1(__retty, __fn) \
|
||||
template <typename __T> \
|
||||
__DEVICE__ \
|
||||
typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer, \
|
||||
__retty>::type \
|
||||
__fn(__T __x) { \
|
||||
return ::__fn((double)__x); \
|
||||
}
|
||||
|
||||
// Defines an overload of __fn that accepts one two arithmetic arguments, calls
|
||||
// __fn((double)x, (double)y), and returns a double.
|
||||
//
|
||||
// Note this is different from OVERLOAD_1, which generates an overload that
|
||||
// accepts only *integral* arguments.
|
||||
#define __CUDA_CLANG_FN_INTEGER_OVERLOAD_2(__retty, __fn) \
|
||||
template <typename __T1, typename __T2> \
|
||||
__DEVICE__ typename __clang_cuda_enable_if< \
|
||||
std::numeric_limits<__T1>::is_specialized && \
|
||||
std::numeric_limits<__T2>::is_specialized, \
|
||||
__retty>::type \
|
||||
__fn(__T1 __x, __T2 __y) { \
|
||||
return __fn((double)__x, (double)__y); \
|
||||
}
|
||||
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, acos)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, acosh)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, asin)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, asinh)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, atan)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, atan2);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, atanh)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, cbrt)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, ceil)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, copysign);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, cos)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, cosh)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, erf)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, erfc)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, exp)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, exp2)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, expm1)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, fabs)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fdim);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, floor)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fmax);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fmin);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fmod);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(int, fpclassify)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, hypot);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(int, ilogb)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isfinite)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isgreater);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isgreaterequal);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isinf);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isless);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, islessequal);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, islessgreater);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isnan);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isnormal)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isunordered);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, lgamma)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log10)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log1p)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log2)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, logb)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long long, llrint)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long long, llround)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long, lrint)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long, lround)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, nearbyint);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, nextafter);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, pow);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, remainder);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, rint);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, round);
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, signbit)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, sin)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, sinh)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, sqrt)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, tan)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, tanh)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, tgamma)
|
||||
__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, trunc);
|
||||
|
||||
#undef __CUDA_CLANG_FN_INTEGER_OVERLOAD_1
|
||||
#undef __CUDA_CLANG_FN_INTEGER_OVERLOAD_2
|
||||
|
||||
// Overloads for functions that don't match the patterns expected by
|
||||
// __CUDA_CLANG_FN_INTEGER_OVERLOAD_{1,2}.
|
||||
template <typename __T1, typename __T2, typename __T3>
|
||||
__DEVICE__ typename __clang_cuda_enable_if<
|
||||
std::numeric_limits<__T1>::is_specialized &&
|
||||
std::numeric_limits<__T2>::is_specialized &&
|
||||
std::numeric_limits<__T3>::is_specialized,
|
||||
double>::type
|
||||
fma(__T1 __x, __T2 __y, __T3 __z) {
|
||||
return std::fma((double)__x, (double)__y, (double)__z);
|
||||
}
|
||||
|
||||
template <typename __T>
|
||||
__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
|
||||
double>::type
|
||||
frexp(__T __x, int *__exp) {
|
||||
return std::frexp((double)__x, __exp);
|
||||
}
|
||||
|
||||
template <typename __T>
|
||||
__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
|
||||
double>::type
|
||||
ldexp(__T __x, int __exp) {
|
||||
return std::ldexp((double)__x, __exp);
|
||||
}
|
||||
|
||||
template <typename __T1, typename __T2>
|
||||
__DEVICE__ typename __clang_cuda_enable_if<
|
||||
std::numeric_limits<__T1>::is_specialized &&
|
||||
std::numeric_limits<__T2>::is_specialized,
|
||||
double>::type
|
||||
remquo(__T1 __x, __T2 __y, int *__quo) {
|
||||
return std::remquo((double)__x, (double)__y, __quo);
|
||||
}
|
||||
|
||||
template <typename __T>
|
||||
__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
|
||||
double>::type
|
||||
scalbln(__T __x, long __exp) {
|
||||
return std::scalbln((double)__x, __exp);
|
||||
}
|
||||
|
||||
template <typename __T>
|
||||
__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
|
||||
double>::type
|
||||
scalbn(__T __x, int __exp) {
|
||||
return std::scalbn((double)__x, __exp);
|
||||
}
|
||||
|
||||
// We need to define these overloads in exactly the namespace our standard
|
||||
// library uses (including the right inline namespace), otherwise they won't be
|
||||
// picked up by other functions in the standard library (e.g. functions in
|
||||
// <complex>). Thus the ugliness below.
|
||||
#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#else
|
||||
namespace std {
|
||||
#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Pull the new overloads we defined above into namespace std.
|
||||
using ::acos;
|
||||
using ::acosh;
|
||||
using ::asin;
|
||||
using ::asinh;
|
||||
using ::atan;
|
||||
using ::atan2;
|
||||
using ::atanh;
|
||||
using ::cbrt;
|
||||
using ::ceil;
|
||||
using ::copysign;
|
||||
using ::cos;
|
||||
using ::cosh;
|
||||
using ::erf;
|
||||
using ::erfc;
|
||||
using ::exp;
|
||||
using ::exp2;
|
||||
using ::expm1;
|
||||
using ::fabs;
|
||||
using ::fdim;
|
||||
using ::floor;
|
||||
using ::fma;
|
||||
using ::fmax;
|
||||
using ::fmin;
|
||||
using ::fmod;
|
||||
using ::fpclassify;
|
||||
using ::frexp;
|
||||
using ::hypot;
|
||||
using ::ilogb;
|
||||
using ::isfinite;
|
||||
using ::isgreater;
|
||||
using ::isgreaterequal;
|
||||
using ::isless;
|
||||
using ::islessequal;
|
||||
using ::islessgreater;
|
||||
using ::isnormal;
|
||||
using ::isunordered;
|
||||
using ::ldexp;
|
||||
using ::lgamma;
|
||||
using ::llrint;
|
||||
using ::llround;
|
||||
using ::log;
|
||||
using ::log10;
|
||||
using ::log1p;
|
||||
using ::log2;
|
||||
using ::logb;
|
||||
using ::lrint;
|
||||
using ::lround;
|
||||
using ::nearbyint;
|
||||
using ::nextafter;
|
||||
using ::pow;
|
||||
using ::remainder;
|
||||
using ::remquo;
|
||||
using ::rint;
|
||||
using ::round;
|
||||
using ::scalbln;
|
||||
using ::scalbn;
|
||||
using ::signbit;
|
||||
using ::sin;
|
||||
using ::sinh;
|
||||
using ::sqrt;
|
||||
using ::tan;
|
||||
using ::tanh;
|
||||
using ::tgamma;
|
||||
using ::trunc;
|
||||
|
||||
// Well this is fun: We need to pull these symbols in for libc++, but we can't
|
||||
// pull them in with libstdc++, because its ::isinf and ::isnan are different
|
||||
// than its std::isinf and std::isnan.
|
||||
#ifndef __GLIBCXX__
|
||||
using ::isinf;
|
||||
using ::isnan;
|
||||
#endif
|
||||
|
||||
// Finally, pull the "foobarf" functions that CUDA defines in its headers into
|
||||
// namespace std.
|
||||
using ::acosf;
|
||||
using ::acoshf;
|
||||
using ::asinf;
|
||||
using ::asinhf;
|
||||
using ::atan2f;
|
||||
using ::atanf;
|
||||
using ::atanhf;
|
||||
using ::cbrtf;
|
||||
using ::ceilf;
|
||||
using ::copysignf;
|
||||
using ::cosf;
|
||||
using ::coshf;
|
||||
using ::erfcf;
|
||||
using ::erff;
|
||||
using ::exp2f;
|
||||
using ::expf;
|
||||
using ::expm1f;
|
||||
using ::fabsf;
|
||||
using ::fdimf;
|
||||
using ::floorf;
|
||||
using ::fmaf;
|
||||
using ::fmaxf;
|
||||
using ::fminf;
|
||||
using ::fmodf;
|
||||
using ::frexpf;
|
||||
using ::hypotf;
|
||||
using ::ilogbf;
|
||||
using ::ldexpf;
|
||||
using ::lgammaf;
|
||||
using ::llrintf;
|
||||
using ::llroundf;
|
||||
using ::log10f;
|
||||
using ::log1pf;
|
||||
using ::log2f;
|
||||
using ::logbf;
|
||||
using ::logf;
|
||||
using ::lrintf;
|
||||
using ::lroundf;
|
||||
using ::modff;
|
||||
using ::nearbyintf;
|
||||
using ::nextafterf;
|
||||
using ::powf;
|
||||
using ::remainderf;
|
||||
using ::remquof;
|
||||
using ::rintf;
|
||||
using ::roundf;
|
||||
using ::scalblnf;
|
||||
using ::scalbnf;
|
||||
using ::sinf;
|
||||
using ::sinhf;
|
||||
using ::sqrtf;
|
||||
using ::tanf;
|
||||
using ::tanhf;
|
||||
using ::tgammaf;
|
||||
using ::truncf;
|
||||
|
||||
#ifdef _LIBCPP_END_NAMESPACE_STD
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
#else
|
||||
#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
#endif
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#undef __DEVICE__
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,203 @@
|
||||
/*===-- __clang_cuda_complex_builtins - CUDA impls of runtime complex fns ---===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_COMPLEX_BUILTINS
|
||||
#define __CLANG_CUDA_COMPLEX_BUILTINS
|
||||
|
||||
// This header defines __muldc3, __mulsc3, __divdc3, and __divsc3. These are
|
||||
// libgcc functions that clang assumes are available when compiling c99 complex
|
||||
// operations. (These implementations come from libc++, and have been modified
|
||||
// to work with CUDA.)
|
||||
|
||||
extern "C" inline __device__ double _Complex __muldc3(double __a, double __b,
|
||||
double __c, double __d) {
|
||||
double __ac = __a * __c;
|
||||
double __bd = __b * __d;
|
||||
double __ad = __a * __d;
|
||||
double __bc = __b * __c;
|
||||
double _Complex z;
|
||||
__real__(z) = __ac - __bd;
|
||||
__imag__(z) = __ad + __bc;
|
||||
if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) {
|
||||
int __recalc = 0;
|
||||
if (std::isinf(__a) || std::isinf(__b)) {
|
||||
__a = std::copysign(std::isinf(__a) ? 1 : 0, __a);
|
||||
__b = std::copysign(std::isinf(__b) ? 1 : 0, __b);
|
||||
if (std::isnan(__c))
|
||||
__c = std::copysign(0, __c);
|
||||
if (std::isnan(__d))
|
||||
__d = std::copysign(0, __d);
|
||||
__recalc = 1;
|
||||
}
|
||||
if (std::isinf(__c) || std::isinf(__d)) {
|
||||
__c = std::copysign(std::isinf(__c) ? 1 : 0, __c);
|
||||
__d = std::copysign(std::isinf(__d) ? 1 : 0, __d);
|
||||
if (std::isnan(__a))
|
||||
__a = std::copysign(0, __a);
|
||||
if (std::isnan(__b))
|
||||
__b = std::copysign(0, __b);
|
||||
__recalc = 1;
|
||||
}
|
||||
if (!__recalc && (std::isinf(__ac) || std::isinf(__bd) ||
|
||||
std::isinf(__ad) || std::isinf(__bc))) {
|
||||
if (std::isnan(__a))
|
||||
__a = std::copysign(0, __a);
|
||||
if (std::isnan(__b))
|
||||
__b = std::copysign(0, __b);
|
||||
if (std::isnan(__c))
|
||||
__c = std::copysign(0, __c);
|
||||
if (std::isnan(__d))
|
||||
__d = std::copysign(0, __d);
|
||||
__recalc = 1;
|
||||
}
|
||||
if (__recalc) {
|
||||
// Can't use std::numeric_limits<double>::infinity() -- that doesn't have
|
||||
// a device overload (and isn't constexpr before C++11, naturally).
|
||||
__real__(z) = __builtin_huge_valf() * (__a * __c - __b * __d);
|
||||
__imag__(z) = __builtin_huge_valf() * (__a * __d + __b * __c);
|
||||
}
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
extern "C" inline __device__ float _Complex __mulsc3(float __a, float __b,
|
||||
float __c, float __d) {
|
||||
float __ac = __a * __c;
|
||||
float __bd = __b * __d;
|
||||
float __ad = __a * __d;
|
||||
float __bc = __b * __c;
|
||||
float _Complex z;
|
||||
__real__(z) = __ac - __bd;
|
||||
__imag__(z) = __ad + __bc;
|
||||
if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) {
|
||||
int __recalc = 0;
|
||||
if (std::isinf(__a) || std::isinf(__b)) {
|
||||
__a = std::copysign(std::isinf(__a) ? 1 : 0, __a);
|
||||
__b = std::copysign(std::isinf(__b) ? 1 : 0, __b);
|
||||
if (std::isnan(__c))
|
||||
__c = std::copysign(0, __c);
|
||||
if (std::isnan(__d))
|
||||
__d = std::copysign(0, __d);
|
||||
__recalc = 1;
|
||||
}
|
||||
if (std::isinf(__c) || std::isinf(__d)) {
|
||||
__c = std::copysign(std::isinf(__c) ? 1 : 0, __c);
|
||||
__d = std::copysign(std::isinf(__d) ? 1 : 0, __d);
|
||||
if (std::isnan(__a))
|
||||
__a = std::copysign(0, __a);
|
||||
if (std::isnan(__b))
|
||||
__b = std::copysign(0, __b);
|
||||
__recalc = 1;
|
||||
}
|
||||
if (!__recalc && (std::isinf(__ac) || std::isinf(__bd) ||
|
||||
std::isinf(__ad) || std::isinf(__bc))) {
|
||||
if (std::isnan(__a))
|
||||
__a = std::copysign(0, __a);
|
||||
if (std::isnan(__b))
|
||||
__b = std::copysign(0, __b);
|
||||
if (std::isnan(__c))
|
||||
__c = std::copysign(0, __c);
|
||||
if (std::isnan(__d))
|
||||
__d = std::copysign(0, __d);
|
||||
__recalc = 1;
|
||||
}
|
||||
if (__recalc) {
|
||||
__real__(z) = __builtin_huge_valf() * (__a * __c - __b * __d);
|
||||
__imag__(z) = __builtin_huge_valf() * (__a * __d + __b * __c);
|
||||
}
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
extern "C" inline __device__ double _Complex __divdc3(double __a, double __b,
|
||||
double __c, double __d) {
|
||||
int __ilogbw = 0;
|
||||
// Can't use std::max, because that's defined in <algorithm>, and we don't
|
||||
// want to pull that in for every compile. The CUDA headers define
|
||||
// ::max(float, float) and ::max(double, double), which is sufficient for us.
|
||||
double __logbw = std::logb(max(std::abs(__c), std::abs(__d)));
|
||||
if (std::isfinite(__logbw)) {
|
||||
__ilogbw = (int)__logbw;
|
||||
__c = std::scalbn(__c, -__ilogbw);
|
||||
__d = std::scalbn(__d, -__ilogbw);
|
||||
}
|
||||
double __denom = __c * __c + __d * __d;
|
||||
double _Complex z;
|
||||
__real__(z) = std::scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
|
||||
__imag__(z) = std::scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
|
||||
if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) {
|
||||
if ((__denom == 0.0) && (!std::isnan(__a) || !std::isnan(__b))) {
|
||||
__real__(z) = std::copysign(__builtin_huge_valf(), __c) * __a;
|
||||
__imag__(z) = std::copysign(__builtin_huge_valf(), __c) * __b;
|
||||
} else if ((std::isinf(__a) || std::isinf(__b)) && std::isfinite(__c) &&
|
||||
std::isfinite(__d)) {
|
||||
__a = std::copysign(std::isinf(__a) ? 1.0 : 0.0, __a);
|
||||
__b = std::copysign(std::isinf(__b) ? 1.0 : 0.0, __b);
|
||||
__real__(z) = __builtin_huge_valf() * (__a * __c + __b * __d);
|
||||
__imag__(z) = __builtin_huge_valf() * (__b * __c - __a * __d);
|
||||
} else if (std::isinf(__logbw) && __logbw > 0.0 && std::isfinite(__a) &&
|
||||
std::isfinite(__b)) {
|
||||
__c = std::copysign(std::isinf(__c) ? 1.0 : 0.0, __c);
|
||||
__d = std::copysign(std::isinf(__d) ? 1.0 : 0.0, __d);
|
||||
__real__(z) = 0.0 * (__a * __c + __b * __d);
|
||||
__imag__(z) = 0.0 * (__b * __c - __a * __d);
|
||||
}
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
extern "C" inline __device__ float _Complex __divsc3(float __a, float __b,
|
||||
float __c, float __d) {
|
||||
int __ilogbw = 0;
|
||||
float __logbw = std::logb(max(std::abs(__c), std::abs(__d)));
|
||||
if (std::isfinite(__logbw)) {
|
||||
__ilogbw = (int)__logbw;
|
||||
__c = std::scalbn(__c, -__ilogbw);
|
||||
__d = std::scalbn(__d, -__ilogbw);
|
||||
}
|
||||
float __denom = __c * __c + __d * __d;
|
||||
float _Complex z;
|
||||
__real__(z) = std::scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
|
||||
__imag__(z) = std::scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
|
||||
if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) {
|
||||
if ((__denom == 0) && (!std::isnan(__a) || !std::isnan(__b))) {
|
||||
__real__(z) = std::copysign(__builtin_huge_valf(), __c) * __a;
|
||||
__imag__(z) = std::copysign(__builtin_huge_valf(), __c) * __b;
|
||||
} else if ((std::isinf(__a) || std::isinf(__b)) && std::isfinite(__c) &&
|
||||
std::isfinite(__d)) {
|
||||
__a = std::copysign(std::isinf(__a) ? 1 : 0, __a);
|
||||
__b = std::copysign(std::isinf(__b) ? 1 : 0, __b);
|
||||
__real__(z) = __builtin_huge_valf() * (__a * __c + __b * __d);
|
||||
__imag__(z) = __builtin_huge_valf() * (__b * __c - __a * __d);
|
||||
} else if (std::isinf(__logbw) && __logbw > 0 && std::isfinite(__a) &&
|
||||
std::isfinite(__b)) {
|
||||
__c = std::copysign(std::isinf(__c) ? 1 : 0, __c);
|
||||
__d = std::copysign(std::isinf(__d) ? 1 : 0, __d);
|
||||
__real__(z) = 0 * (__a * __c + __b * __d);
|
||||
__imag__(z) = 0 * (__b * __c - __a * __d);
|
||||
}
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
#endif // __CLANG_CUDA_COMPLEX_BUILTINS
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,492 @@
|
||||
/*===--- __clang_cuda_intrinsics.h - Device-side CUDA intrinsic wrappers ---===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __CLANG_CUDA_INTRINSICS_H__
|
||||
#define __CLANG_CUDA_INTRINSICS_H__
|
||||
#ifndef __CUDA__
|
||||
#error "This file is for CUDA compilation only."
|
||||
#endif
|
||||
|
||||
// sm_30 intrinsics: __shfl_{up,down,xor}.
|
||||
|
||||
#define __SM_30_INTRINSICS_H__
|
||||
#define __SM_30_INTRINSICS_HPP__
|
||||
|
||||
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
|
||||
|
||||
#pragma push_macro("__MAKE_SHUFFLES")
|
||||
#define __MAKE_SHUFFLES(__FnName, __IntIntrinsic, __FloatIntrinsic, __Mask, \
|
||||
__Type) \
|
||||
inline __device__ int __FnName(int __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
return __IntIntrinsic(__val, __offset, \
|
||||
((warpSize - __width) << 8) | (__Mask)); \
|
||||
} \
|
||||
inline __device__ float __FnName(float __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
return __FloatIntrinsic(__val, __offset, \
|
||||
((warpSize - __width) << 8) | (__Mask)); \
|
||||
} \
|
||||
inline __device__ unsigned int __FnName(unsigned int __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
return static_cast<unsigned int>( \
|
||||
::__FnName(static_cast<int>(__val), __offset, __width)); \
|
||||
} \
|
||||
inline __device__ long long __FnName(long long __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
struct __Bits { \
|
||||
int __a, __b; \
|
||||
}; \
|
||||
_Static_assert(sizeof(__val) == sizeof(__Bits)); \
|
||||
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
|
||||
__Bits __tmp; \
|
||||
memcpy(&__val, &__tmp, sizeof(__val)); \
|
||||
__tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \
|
||||
__tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \
|
||||
long long __ret; \
|
||||
memcpy(&__ret, &__tmp, sizeof(__tmp)); \
|
||||
return __ret; \
|
||||
} \
|
||||
inline __device__ long __FnName(long __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
_Static_assert(sizeof(long) == sizeof(long long) || \
|
||||
sizeof(long) == sizeof(int)); \
|
||||
if (sizeof(long) == sizeof(long long)) { \
|
||||
return static_cast<long>( \
|
||||
::__FnName(static_cast<long long>(__val), __offset, __width)); \
|
||||
} else if (sizeof(long) == sizeof(int)) { \
|
||||
return static_cast<long>( \
|
||||
::__FnName(static_cast<int>(__val), __offset, __width)); \
|
||||
} \
|
||||
} \
|
||||
inline __device__ unsigned long __FnName( \
|
||||
unsigned long __val, __Type __offset, int __width = warpSize) { \
|
||||
return static_cast<unsigned long>( \
|
||||
::__FnName(static_cast<long>(__val), __offset, __width)); \
|
||||
} \
|
||||
inline __device__ unsigned long long __FnName( \
|
||||
unsigned long long __val, __Type __offset, int __width = warpSize) { \
|
||||
return static_cast<unsigned long long>(::__FnName( \
|
||||
static_cast<unsigned long long>(__val), __offset, __width)); \
|
||||
} \
|
||||
inline __device__ double __FnName(double __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
long long __tmp; \
|
||||
_Static_assert(sizeof(__tmp) == sizeof(__val)); \
|
||||
memcpy(&__tmp, &__val, sizeof(__val)); \
|
||||
__tmp = ::__FnName(__tmp, __offset, __width); \
|
||||
double __ret; \
|
||||
memcpy(&__ret, &__tmp, sizeof(__ret)); \
|
||||
return __ret; \
|
||||
}
|
||||
|
||||
__MAKE_SHUFFLES(__shfl, __nvvm_shfl_idx_i32, __nvvm_shfl_idx_f32, 0x1f, int);
|
||||
// We use 0 rather than 31 as our mask, because shfl.up applies to lanes >=
|
||||
// maxLane.
|
||||
__MAKE_SHUFFLES(__shfl_up, __nvvm_shfl_up_i32, __nvvm_shfl_up_f32, 0,
|
||||
unsigned int);
|
||||
__MAKE_SHUFFLES(__shfl_down, __nvvm_shfl_down_i32, __nvvm_shfl_down_f32, 0x1f,
|
||||
unsigned int);
|
||||
__MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f,
|
||||
int);
|
||||
#pragma pop_macro("__MAKE_SHUFFLES")
|
||||
|
||||
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
|
||||
|
||||
#if CUDA_VERSION >= 9000
|
||||
#if (!defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300)
|
||||
// __shfl_sync_* variants available in CUDA-9
|
||||
#pragma push_macro("__MAKE_SYNC_SHUFFLES")
|
||||
#define __MAKE_SYNC_SHUFFLES(__FnName, __IntIntrinsic, __FloatIntrinsic, \
|
||||
__Mask, __Type) \
|
||||
inline __device__ int __FnName(unsigned int __mask, int __val, \
|
||||
__Type __offset, int __width = warpSize) { \
|
||||
return __IntIntrinsic(__mask, __val, __offset, \
|
||||
((warpSize - __width) << 8) | (__Mask)); \
|
||||
} \
|
||||
inline __device__ float __FnName(unsigned int __mask, float __val, \
|
||||
__Type __offset, int __width = warpSize) { \
|
||||
return __FloatIntrinsic(__mask, __val, __offset, \
|
||||
((warpSize - __width) << 8) | (__Mask)); \
|
||||
} \
|
||||
inline __device__ unsigned int __FnName(unsigned int __mask, \
|
||||
unsigned int __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
return static_cast<unsigned int>( \
|
||||
::__FnName(__mask, static_cast<int>(__val), __offset, __width)); \
|
||||
} \
|
||||
inline __device__ long long __FnName(unsigned int __mask, long long __val, \
|
||||
__Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
struct __Bits { \
|
||||
int __a, __b; \
|
||||
}; \
|
||||
_Static_assert(sizeof(__val) == sizeof(__Bits)); \
|
||||
_Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
|
||||
__Bits __tmp; \
|
||||
memcpy(&__val, &__tmp, sizeof(__val)); \
|
||||
__tmp.__a = ::__FnName(__mask, __tmp.__a, __offset, __width); \
|
||||
__tmp.__b = ::__FnName(__mask, __tmp.__b, __offset, __width); \
|
||||
long long __ret; \
|
||||
memcpy(&__ret, &__tmp, sizeof(__tmp)); \
|
||||
return __ret; \
|
||||
} \
|
||||
inline __device__ unsigned long long __FnName( \
|
||||
unsigned int __mask, unsigned long long __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
return static_cast<unsigned long long>(::__FnName( \
|
||||
__mask, static_cast<unsigned long long>(__val), __offset, __width)); \
|
||||
} \
|
||||
inline __device__ long __FnName(unsigned int __mask, long __val, \
|
||||
__Type __offset, int __width = warpSize) { \
|
||||
_Static_assert(sizeof(long) == sizeof(long long) || \
|
||||
sizeof(long) == sizeof(int)); \
|
||||
if (sizeof(long) == sizeof(long long)) { \
|
||||
return static_cast<long>(::__FnName( \
|
||||
__mask, static_cast<long long>(__val), __offset, __width)); \
|
||||
} else if (sizeof(long) == sizeof(int)) { \
|
||||
return static_cast<long>( \
|
||||
::__FnName(__mask, static_cast<int>(__val), __offset, __width)); \
|
||||
} \
|
||||
} \
|
||||
inline __device__ unsigned long __FnName( \
|
||||
unsigned int __mask, unsigned long __val, __Type __offset, \
|
||||
int __width = warpSize) { \
|
||||
return static_cast<unsigned long>( \
|
||||
::__FnName(__mask, static_cast<long>(__val), __offset, __width)); \
|
||||
} \
|
||||
inline __device__ double __FnName(unsigned int __mask, double __val, \
|
||||
__Type __offset, int __width = warpSize) { \
|
||||
long long __tmp; \
|
||||
_Static_assert(sizeof(__tmp) == sizeof(__val)); \
|
||||
memcpy(&__tmp, &__val, sizeof(__val)); \
|
||||
__tmp = ::__FnName(__mask, __tmp, __offset, __width); \
|
||||
double __ret; \
|
||||
memcpy(&__ret, &__tmp, sizeof(__ret)); \
|
||||
return __ret; \
|
||||
}
|
||||
__MAKE_SYNC_SHUFFLES(__shfl_sync, __nvvm_shfl_sync_idx_i32,
|
||||
__nvvm_shfl_sync_idx_f32, 0x1f, int);
|
||||
// We use 0 rather than 31 as our mask, because shfl.up applies to lanes >=
|
||||
// maxLane.
|
||||
__MAKE_SYNC_SHUFFLES(__shfl_up_sync, __nvvm_shfl_sync_up_i32,
|
||||
__nvvm_shfl_sync_up_f32, 0, unsigned int);
|
||||
__MAKE_SYNC_SHUFFLES(__shfl_down_sync, __nvvm_shfl_sync_down_i32,
|
||||
__nvvm_shfl_sync_down_f32, 0x1f, unsigned int);
|
||||
__MAKE_SYNC_SHUFFLES(__shfl_xor_sync, __nvvm_shfl_sync_bfly_i32,
|
||||
__nvvm_shfl_sync_bfly_f32, 0x1f, int);
|
||||
#pragma pop_macro("__MAKE_SYNC_SHUFFLES")
|
||||
|
||||
inline __device__ void __syncwarp(unsigned int mask = 0xffffffff) {
|
||||
return __nvvm_bar_warp_sync(mask);
|
||||
}
|
||||
|
||||
inline __device__ void __barrier_sync(unsigned int id) {
|
||||
__nvvm_barrier_sync(id);
|
||||
}
|
||||
|
||||
inline __device__ void __barrier_sync_count(unsigned int id,
|
||||
unsigned int count) {
|
||||
__nvvm_barrier_sync_cnt(id, count);
|
||||
}
|
||||
|
||||
inline __device__ int __all_sync(unsigned int mask, int pred) {
|
||||
return __nvvm_vote_all_sync(mask, pred);
|
||||
}
|
||||
|
||||
inline __device__ int __any_sync(unsigned int mask, int pred) {
|
||||
return __nvvm_vote_any_sync(mask, pred);
|
||||
}
|
||||
|
||||
inline __device__ int __uni_sync(unsigned int mask, int pred) {
|
||||
return __nvvm_vote_uni_sync(mask, pred);
|
||||
}
|
||||
|
||||
inline __device__ unsigned int __ballot_sync(unsigned int mask, int pred) {
|
||||
return __nvvm_vote_ballot_sync(mask, pred);
|
||||
}
|
||||
|
||||
inline __device__ unsigned int __activemask() { return __nvvm_vote_ballot(1); }
|
||||
|
||||
inline __device__ unsigned int __fns(unsigned mask, unsigned base, int offset) {
|
||||
return __nvvm_fns(mask, base, offset);
|
||||
}
|
||||
|
||||
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
|
||||
|
||||
// Define __match* builtins CUDA-9 headers expect to see.
|
||||
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 700
|
||||
inline __device__ unsigned int __match32_any_sync(unsigned int mask,
|
||||
unsigned int value) {
|
||||
return __nvvm_match_any_sync_i32(mask, value);
|
||||
}
|
||||
|
||||
inline __device__ unsigned long long
|
||||
__match64_any_sync(unsigned int mask, unsigned long long value) {
|
||||
return __nvvm_match_any_sync_i64(mask, value);
|
||||
}
|
||||
|
||||
inline __device__ unsigned int
|
||||
__match32_all_sync(unsigned int mask, unsigned int value, int *pred) {
|
||||
return __nvvm_match_all_sync_i32p(mask, value, pred);
|
||||
}
|
||||
|
||||
inline __device__ unsigned long long
|
||||
__match64_all_sync(unsigned int mask, unsigned long long value, int *pred) {
|
||||
return __nvvm_match_all_sync_i64p(mask, value, pred);
|
||||
}
|
||||
#include "crt/sm_70_rt.hpp"
|
||||
|
||||
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 700
|
||||
#endif // __CUDA_VERSION >= 9000
|
||||
|
||||
// sm_32 intrinsics: __ldg and __funnelshift_{l,lc,r,rc}.
|
||||
|
||||
// Prevent the vanilla sm_32 intrinsics header from being included.
|
||||
#define __SM_32_INTRINSICS_H__
|
||||
#define __SM_32_INTRINSICS_HPP__
|
||||
|
||||
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
|
||||
|
||||
inline __device__ char __ldg(const char *ptr) { return __nvvm_ldg_c(ptr); }
|
||||
inline __device__ short __ldg(const short *ptr) { return __nvvm_ldg_s(ptr); }
|
||||
inline __device__ int __ldg(const int *ptr) { return __nvvm_ldg_i(ptr); }
|
||||
inline __device__ long __ldg(const long *ptr) { return __nvvm_ldg_l(ptr); }
|
||||
inline __device__ long long __ldg(const long long *ptr) {
|
||||
return __nvvm_ldg_ll(ptr);
|
||||
}
|
||||
inline __device__ unsigned char __ldg(const unsigned char *ptr) {
|
||||
return __nvvm_ldg_uc(ptr);
|
||||
}
|
||||
inline __device__ signed char __ldg(const signed char *ptr) {
|
||||
return __nvvm_ldg_uc((const unsigned char *)ptr);
|
||||
}
|
||||
inline __device__ unsigned short __ldg(const unsigned short *ptr) {
|
||||
return __nvvm_ldg_us(ptr);
|
||||
}
|
||||
inline __device__ unsigned int __ldg(const unsigned int *ptr) {
|
||||
return __nvvm_ldg_ui(ptr);
|
||||
}
|
||||
inline __device__ unsigned long __ldg(const unsigned long *ptr) {
|
||||
return __nvvm_ldg_ul(ptr);
|
||||
}
|
||||
inline __device__ unsigned long long __ldg(const unsigned long long *ptr) {
|
||||
return __nvvm_ldg_ull(ptr);
|
||||
}
|
||||
inline __device__ float __ldg(const float *ptr) { return __nvvm_ldg_f(ptr); }
|
||||
inline __device__ double __ldg(const double *ptr) { return __nvvm_ldg_d(ptr); }
|
||||
|
||||
inline __device__ char2 __ldg(const char2 *ptr) {
|
||||
typedef char c2 __attribute__((ext_vector_type(2)));
|
||||
// We can assume that ptr is aligned at least to char2's alignment, but the
|
||||
// load will assume that ptr is aligned to char2's alignment. This is only
|
||||
// safe if alignof(c2) <= alignof(char2).
|
||||
c2 rv = __nvvm_ldg_c2(reinterpret_cast<const c2 *>(ptr));
|
||||
char2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ char4 __ldg(const char4 *ptr) {
|
||||
typedef char c4 __attribute__((ext_vector_type(4)));
|
||||
c4 rv = __nvvm_ldg_c4(reinterpret_cast<const c4 *>(ptr));
|
||||
char4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ short2 __ldg(const short2 *ptr) {
|
||||
typedef short s2 __attribute__((ext_vector_type(2)));
|
||||
s2 rv = __nvvm_ldg_s2(reinterpret_cast<const s2 *>(ptr));
|
||||
short2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ short4 __ldg(const short4 *ptr) {
|
||||
typedef short s4 __attribute__((ext_vector_type(4)));
|
||||
s4 rv = __nvvm_ldg_s4(reinterpret_cast<const s4 *>(ptr));
|
||||
short4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ int2 __ldg(const int2 *ptr) {
|
||||
typedef int i2 __attribute__((ext_vector_type(2)));
|
||||
i2 rv = __nvvm_ldg_i2(reinterpret_cast<const i2 *>(ptr));
|
||||
int2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ int4 __ldg(const int4 *ptr) {
|
||||
typedef int i4 __attribute__((ext_vector_type(4)));
|
||||
i4 rv = __nvvm_ldg_i4(reinterpret_cast<const i4 *>(ptr));
|
||||
int4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ longlong2 __ldg(const longlong2 *ptr) {
|
||||
typedef long long ll2 __attribute__((ext_vector_type(2)));
|
||||
ll2 rv = __nvvm_ldg_ll2(reinterpret_cast<const ll2 *>(ptr));
|
||||
longlong2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline __device__ uchar2 __ldg(const uchar2 *ptr) {
|
||||
typedef unsigned char uc2 __attribute__((ext_vector_type(2)));
|
||||
uc2 rv = __nvvm_ldg_uc2(reinterpret_cast<const uc2 *>(ptr));
|
||||
uchar2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ uchar4 __ldg(const uchar4 *ptr) {
|
||||
typedef unsigned char uc4 __attribute__((ext_vector_type(4)));
|
||||
uc4 rv = __nvvm_ldg_uc4(reinterpret_cast<const uc4 *>(ptr));
|
||||
uchar4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ ushort2 __ldg(const ushort2 *ptr) {
|
||||
typedef unsigned short us2 __attribute__((ext_vector_type(2)));
|
||||
us2 rv = __nvvm_ldg_us2(reinterpret_cast<const us2 *>(ptr));
|
||||
ushort2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ ushort4 __ldg(const ushort4 *ptr) {
|
||||
typedef unsigned short us4 __attribute__((ext_vector_type(4)));
|
||||
us4 rv = __nvvm_ldg_us4(reinterpret_cast<const us4 *>(ptr));
|
||||
ushort4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ uint2 __ldg(const uint2 *ptr) {
|
||||
typedef unsigned int ui2 __attribute__((ext_vector_type(2)));
|
||||
ui2 rv = __nvvm_ldg_ui2(reinterpret_cast<const ui2 *>(ptr));
|
||||
uint2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ uint4 __ldg(const uint4 *ptr) {
|
||||
typedef unsigned int ui4 __attribute__((ext_vector_type(4)));
|
||||
ui4 rv = __nvvm_ldg_ui4(reinterpret_cast<const ui4 *>(ptr));
|
||||
uint4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ ulonglong2 __ldg(const ulonglong2 *ptr) {
|
||||
typedef unsigned long long ull2 __attribute__((ext_vector_type(2)));
|
||||
ull2 rv = __nvvm_ldg_ull2(reinterpret_cast<const ull2 *>(ptr));
|
||||
ulonglong2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline __device__ float2 __ldg(const float2 *ptr) {
|
||||
typedef float f2 __attribute__((ext_vector_type(2)));
|
||||
f2 rv = __nvvm_ldg_f2(reinterpret_cast<const f2 *>(ptr));
|
||||
float2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ float4 __ldg(const float4 *ptr) {
|
||||
typedef float f4 __attribute__((ext_vector_type(4)));
|
||||
f4 rv = __nvvm_ldg_f4(reinterpret_cast<const f4 *>(ptr));
|
||||
float4 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
ret.z = rv[2];
|
||||
ret.w = rv[3];
|
||||
return ret;
|
||||
}
|
||||
inline __device__ double2 __ldg(const double2 *ptr) {
|
||||
typedef double d2 __attribute__((ext_vector_type(2)));
|
||||
d2 rv = __nvvm_ldg_d2(reinterpret_cast<const d2 *>(ptr));
|
||||
double2 ret;
|
||||
ret.x = rv[0];
|
||||
ret.y = rv[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
// TODO: Implement these as intrinsics, so the backend can work its magic on
|
||||
// these. Alternatively, we could implement these as plain C and try to get
|
||||
// llvm to recognize the relevant patterns.
|
||||
inline __device__ unsigned __funnelshift_l(unsigned low32, unsigned high32,
|
||||
unsigned shiftWidth) {
|
||||
unsigned result;
|
||||
asm("shf.l.wrap.b32 %0, %1, %2, %3;"
|
||||
: "=r"(result)
|
||||
: "r"(low32), "r"(high32), "r"(shiftWidth));
|
||||
return result;
|
||||
}
|
||||
inline __device__ unsigned __funnelshift_lc(unsigned low32, unsigned high32,
|
||||
unsigned shiftWidth) {
|
||||
unsigned result;
|
||||
asm("shf.l.clamp.b32 %0, %1, %2, %3;"
|
||||
: "=r"(result)
|
||||
: "r"(low32), "r"(high32), "r"(shiftWidth));
|
||||
return result;
|
||||
}
|
||||
inline __device__ unsigned __funnelshift_r(unsigned low32, unsigned high32,
|
||||
unsigned shiftWidth) {
|
||||
unsigned result;
|
||||
asm("shf.r.wrap.b32 %0, %1, %2, %3;"
|
||||
: "=r"(result)
|
||||
: "r"(low32), "r"(high32), "r"(shiftWidth));
|
||||
return result;
|
||||
}
|
||||
inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32,
|
||||
unsigned shiftWidth) {
|
||||
unsigned ret;
|
||||
asm("shf.r.clamp.b32 %0, %1, %2, %3;"
|
||||
: "=r"(ret)
|
||||
: "r"(low32), "r"(high32), "r"(shiftWidth));
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
|
||||
|
||||
#endif // defined(__CLANG_CUDA_INTRINSICS_H__)
|
||||
@@ -0,0 +1,466 @@
|
||||
/*===-- __clang_cuda_libdevice_declares.h - decls for libdevice functions --===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_LIBDEVICE_DECLARES_H__
|
||||
#define __CLANG_CUDA_LIBDEVICE_DECLARES_H__
|
||||
|
||||
extern "C" {
|
||||
|
||||
__device__ int __nv_abs(int __a);
|
||||
__device__ double __nv_acos(double __a);
|
||||
__device__ float __nv_acosf(float __a);
|
||||
__device__ double __nv_acosh(double __a);
|
||||
__device__ float __nv_acoshf(float __a);
|
||||
__device__ double __nv_asin(double __a);
|
||||
__device__ float __nv_asinf(float __a);
|
||||
__device__ double __nv_asinh(double __a);
|
||||
__device__ float __nv_asinhf(float __a);
|
||||
__device__ double __nv_atan2(double __a, double __b);
|
||||
__device__ float __nv_atan2f(float __a, float __b);
|
||||
__device__ double __nv_atan(double __a);
|
||||
__device__ float __nv_atanf(float __a);
|
||||
__device__ double __nv_atanh(double __a);
|
||||
__device__ float __nv_atanhf(float __a);
|
||||
__device__ int __nv_brev(int __a);
|
||||
__device__ long long __nv_brevll(long long __a);
|
||||
__device__ int __nv_byte_perm(int __a, int __b, int __c);
|
||||
__device__ double __nv_cbrt(double __a);
|
||||
__device__ float __nv_cbrtf(float __a);
|
||||
__device__ double __nv_ceil(double __a);
|
||||
__device__ float __nv_ceilf(float __a);
|
||||
__device__ int __nv_clz(int __a);
|
||||
__device__ int __nv_clzll(long long __a);
|
||||
__device__ double __nv_copysign(double __a, double __b);
|
||||
__device__ float __nv_copysignf(float __a, float __b);
|
||||
__device__ double __nv_cos(double __a);
|
||||
__device__ float __nv_cosf(float __a);
|
||||
__device__ double __nv_cosh(double __a);
|
||||
__device__ float __nv_coshf(float __a);
|
||||
__device__ double __nv_cospi(double __a);
|
||||
__device__ float __nv_cospif(float __a);
|
||||
__device__ double __nv_cyl_bessel_i0(double __a);
|
||||
__device__ float __nv_cyl_bessel_i0f(float __a);
|
||||
__device__ double __nv_cyl_bessel_i1(double __a);
|
||||
__device__ float __nv_cyl_bessel_i1f(float __a);
|
||||
__device__ double __nv_dadd_rd(double __a, double __b);
|
||||
__device__ double __nv_dadd_rn(double __a, double __b);
|
||||
__device__ double __nv_dadd_ru(double __a, double __b);
|
||||
__device__ double __nv_dadd_rz(double __a, double __b);
|
||||
__device__ double __nv_ddiv_rd(double __a, double __b);
|
||||
__device__ double __nv_ddiv_rn(double __a, double __b);
|
||||
__device__ double __nv_ddiv_ru(double __a, double __b);
|
||||
__device__ double __nv_ddiv_rz(double __a, double __b);
|
||||
__device__ double __nv_dmul_rd(double __a, double __b);
|
||||
__device__ double __nv_dmul_rn(double __a, double __b);
|
||||
__device__ double __nv_dmul_ru(double __a, double __b);
|
||||
__device__ double __nv_dmul_rz(double __a, double __b);
|
||||
__device__ float __nv_double2float_rd(double __a);
|
||||
__device__ float __nv_double2float_rn(double __a);
|
||||
__device__ float __nv_double2float_ru(double __a);
|
||||
__device__ float __nv_double2float_rz(double __a);
|
||||
__device__ int __nv_double2hiint(double __a);
|
||||
__device__ int __nv_double2int_rd(double __a);
|
||||
__device__ int __nv_double2int_rn(double __a);
|
||||
__device__ int __nv_double2int_ru(double __a);
|
||||
__device__ int __nv_double2int_rz(double __a);
|
||||
__device__ long long __nv_double2ll_rd(double __a);
|
||||
__device__ long long __nv_double2ll_rn(double __a);
|
||||
__device__ long long __nv_double2ll_ru(double __a);
|
||||
__device__ long long __nv_double2ll_rz(double __a);
|
||||
__device__ int __nv_double2loint(double __a);
|
||||
__device__ unsigned int __nv_double2uint_rd(double __a);
|
||||
__device__ unsigned int __nv_double2uint_rn(double __a);
|
||||
__device__ unsigned int __nv_double2uint_ru(double __a);
|
||||
__device__ unsigned int __nv_double2uint_rz(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_rd(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_rn(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_ru(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_rz(double __a);
|
||||
__device__ unsigned long long __nv_double_as_longlong(double __a);
|
||||
__device__ double __nv_drcp_rd(double __a);
|
||||
__device__ double __nv_drcp_rn(double __a);
|
||||
__device__ double __nv_drcp_ru(double __a);
|
||||
__device__ double __nv_drcp_rz(double __a);
|
||||
__device__ double __nv_dsqrt_rd(double __a);
|
||||
__device__ double __nv_dsqrt_rn(double __a);
|
||||
__device__ double __nv_dsqrt_ru(double __a);
|
||||
__device__ double __nv_dsqrt_rz(double __a);
|
||||
__device__ double __nv_dsub_rd(double __a, double __b);
|
||||
__device__ double __nv_dsub_rn(double __a, double __b);
|
||||
__device__ double __nv_dsub_ru(double __a, double __b);
|
||||
__device__ double __nv_dsub_rz(double __a, double __b);
|
||||
__device__ double __nv_erfc(double __a);
|
||||
__device__ float __nv_erfcf(float __a);
|
||||
__device__ double __nv_erfcinv(double __a);
|
||||
__device__ float __nv_erfcinvf(float __a);
|
||||
__device__ double __nv_erfcx(double __a);
|
||||
__device__ float __nv_erfcxf(float __a);
|
||||
__device__ double __nv_erf(double __a);
|
||||
__device__ float __nv_erff(float __a);
|
||||
__device__ double __nv_erfinv(double __a);
|
||||
__device__ float __nv_erfinvf(float __a);
|
||||
__device__ double __nv_exp10(double __a);
|
||||
__device__ float __nv_exp10f(float __a);
|
||||
__device__ double __nv_exp2(double __a);
|
||||
__device__ float __nv_exp2f(float __a);
|
||||
__device__ double __nv_exp(double __a);
|
||||
__device__ float __nv_expf(float __a);
|
||||
__device__ double __nv_expm1(double __a);
|
||||
__device__ float __nv_expm1f(float __a);
|
||||
__device__ double __nv_fabs(double __a);
|
||||
__device__ float __nv_fabsf(float __a);
|
||||
__device__ float __nv_fadd_rd(float __a, float __b);
|
||||
__device__ float __nv_fadd_rn(float __a, float __b);
|
||||
__device__ float __nv_fadd_ru(float __a, float __b);
|
||||
__device__ float __nv_fadd_rz(float __a, float __b);
|
||||
__device__ float __nv_fast_cosf(float __a);
|
||||
__device__ float __nv_fast_exp10f(float __a);
|
||||
__device__ float __nv_fast_expf(float __a);
|
||||
__device__ float __nv_fast_fdividef(float __a, float __b);
|
||||
__device__ float __nv_fast_log10f(float __a);
|
||||
__device__ float __nv_fast_log2f(float __a);
|
||||
__device__ float __nv_fast_logf(float __a);
|
||||
__device__ float __nv_fast_powf(float __a, float __b);
|
||||
__device__ void __nv_fast_sincosf(float __a, float *__sptr, float *__cptr);
|
||||
__device__ float __nv_fast_sinf(float __a);
|
||||
__device__ float __nv_fast_tanf(float __a);
|
||||
__device__ double __nv_fdim(double __a, double __b);
|
||||
__device__ float __nv_fdimf(float __a, float __b);
|
||||
__device__ float __nv_fdiv_rd(float __a, float __b);
|
||||
__device__ float __nv_fdiv_rn(float __a, float __b);
|
||||
__device__ float __nv_fdiv_ru(float __a, float __b);
|
||||
__device__ float __nv_fdiv_rz(float __a, float __b);
|
||||
__device__ int __nv_ffs(int __a);
|
||||
__device__ int __nv_ffsll(long long __a);
|
||||
__device__ int __nv_finitef(float __a);
|
||||
__device__ unsigned short __nv_float2half_rn(float __a);
|
||||
__device__ int __nv_float2int_rd(float __a);
|
||||
__device__ int __nv_float2int_rn(float __a);
|
||||
__device__ int __nv_float2int_ru(float __a);
|
||||
__device__ int __nv_float2int_rz(float __a);
|
||||
__device__ long long __nv_float2ll_rd(float __a);
|
||||
__device__ long long __nv_float2ll_rn(float __a);
|
||||
__device__ long long __nv_float2ll_ru(float __a);
|
||||
__device__ long long __nv_float2ll_rz(float __a);
|
||||
__device__ unsigned int __nv_float2uint_rd(float __a);
|
||||
__device__ unsigned int __nv_float2uint_rn(float __a);
|
||||
__device__ unsigned int __nv_float2uint_ru(float __a);
|
||||
__device__ unsigned int __nv_float2uint_rz(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_rd(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_rn(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_ru(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_rz(float __a);
|
||||
__device__ int __nv_float_as_int(float __a);
|
||||
__device__ unsigned int __nv_float_as_uint(float __a);
|
||||
__device__ double __nv_floor(double __a);
|
||||
__device__ float __nv_floorf(float __a);
|
||||
__device__ double __nv_fma(double __a, double __b, double __c);
|
||||
__device__ float __nv_fmaf(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_rd(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_rn(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_ru(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_rz(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_rd(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_rn(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ru(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_rz(float __a, float __b, float __c);
|
||||
__device__ double __nv_fma_rd(double __a, double __b, double __c);
|
||||
__device__ double __nv_fma_rn(double __a, double __b, double __c);
|
||||
__device__ double __nv_fma_ru(double __a, double __b, double __c);
|
||||
__device__ double __nv_fma_rz(double __a, double __b, double __c);
|
||||
__device__ double __nv_fmax(double __a, double __b);
|
||||
__device__ float __nv_fmaxf(float __a, float __b);
|
||||
__device__ double __nv_fmin(double __a, double __b);
|
||||
__device__ float __nv_fminf(float __a, float __b);
|
||||
__device__ double __nv_fmod(double __a, double __b);
|
||||
__device__ float __nv_fmodf(float __a, float __b);
|
||||
__device__ float __nv_fmul_rd(float __a, float __b);
|
||||
__device__ float __nv_fmul_rn(float __a, float __b);
|
||||
__device__ float __nv_fmul_ru(float __a, float __b);
|
||||
__device__ float __nv_fmul_rz(float __a, float __b);
|
||||
__device__ float __nv_frcp_rd(float __a);
|
||||
__device__ float __nv_frcp_rn(float __a);
|
||||
__device__ float __nv_frcp_ru(float __a);
|
||||
__device__ float __nv_frcp_rz(float __a);
|
||||
__device__ double __nv_frexp(double __a, int *__b);
|
||||
__device__ float __nv_frexpf(float __a, int *__b);
|
||||
__device__ float __nv_frsqrt_rn(float __a);
|
||||
__device__ float __nv_fsqrt_rd(float __a);
|
||||
__device__ float __nv_fsqrt_rn(float __a);
|
||||
__device__ float __nv_fsqrt_ru(float __a);
|
||||
__device__ float __nv_fsqrt_rz(float __a);
|
||||
__device__ float __nv_fsub_rd(float __a, float __b);
|
||||
__device__ float __nv_fsub_rn(float __a, float __b);
|
||||
__device__ float __nv_fsub_ru(float __a, float __b);
|
||||
__device__ float __nv_fsub_rz(float __a, float __b);
|
||||
__device__ int __nv_hadd(int __a, int __b);
|
||||
__device__ float __nv_half2float(unsigned short __h);
|
||||
__device__ double __nv_hiloint2double(int __a, int __b);
|
||||
__device__ double __nv_hypot(double __a, double __b);
|
||||
__device__ float __nv_hypotf(float __a, float __b);
|
||||
__device__ int __nv_ilogb(double __a);
|
||||
__device__ int __nv_ilogbf(float __a);
|
||||
__device__ double __nv_int2double_rn(int __a);
|
||||
__device__ float __nv_int2float_rd(int __a);
|
||||
__device__ float __nv_int2float_rn(int __a);
|
||||
__device__ float __nv_int2float_ru(int __a);
|
||||
__device__ float __nv_int2float_rz(int __a);
|
||||
__device__ float __nv_int_as_float(int __a);
|
||||
__device__ int __nv_isfinited(double __a);
|
||||
__device__ int __nv_isinfd(double __a);
|
||||
__device__ int __nv_isinff(float __a);
|
||||
__device__ int __nv_isnand(double __a);
|
||||
__device__ int __nv_isnanf(float __a);
|
||||
__device__ double __nv_j0(double __a);
|
||||
__device__ float __nv_j0f(float __a);
|
||||
__device__ double __nv_j1(double __a);
|
||||
__device__ float __nv_j1f(float __a);
|
||||
__device__ float __nv_jnf(int __a, float __b);
|
||||
__device__ double __nv_jn(int __a, double __b);
|
||||
__device__ double __nv_ldexp(double __a, int __b);
|
||||
__device__ float __nv_ldexpf(float __a, int __b);
|
||||
__device__ double __nv_lgamma(double __a);
|
||||
__device__ float __nv_lgammaf(float __a);
|
||||
__device__ double __nv_ll2double_rd(long long __a);
|
||||
__device__ double __nv_ll2double_rn(long long __a);
|
||||
__device__ double __nv_ll2double_ru(long long __a);
|
||||
__device__ double __nv_ll2double_rz(long long __a);
|
||||
__device__ float __nv_ll2float_rd(long long __a);
|
||||
__device__ float __nv_ll2float_rn(long long __a);
|
||||
__device__ float __nv_ll2float_ru(long long __a);
|
||||
__device__ float __nv_ll2float_rz(long long __a);
|
||||
__device__ long long __nv_llabs(long long __a);
|
||||
__device__ long long __nv_llmax(long long __a, long long __b);
|
||||
__device__ long long __nv_llmin(long long __a, long long __b);
|
||||
__device__ long long __nv_llrint(double __a);
|
||||
__device__ long long __nv_llrintf(float __a);
|
||||
__device__ long long __nv_llround(double __a);
|
||||
__device__ long long __nv_llroundf(float __a);
|
||||
__device__ double __nv_log10(double __a);
|
||||
__device__ float __nv_log10f(float __a);
|
||||
__device__ double __nv_log1p(double __a);
|
||||
__device__ float __nv_log1pf(float __a);
|
||||
__device__ double __nv_log2(double __a);
|
||||
__device__ float __nv_log2f(float __a);
|
||||
__device__ double __nv_logb(double __a);
|
||||
__device__ float __nv_logbf(float __a);
|
||||
__device__ double __nv_log(double __a);
|
||||
__device__ float __nv_logf(float __a);
|
||||
__device__ double __nv_longlong_as_double(long long __a);
|
||||
__device__ int __nv_max(int __a, int __b);
|
||||
__device__ int __nv_min(int __a, int __b);
|
||||
__device__ double __nv_modf(double __a, double *__b);
|
||||
__device__ float __nv_modff(float __a, float *__b);
|
||||
__device__ int __nv_mul24(int __a, int __b);
|
||||
__device__ long long __nv_mul64hi(long long __a, long long __b);
|
||||
__device__ int __nv_mulhi(int __a, int __b);
|
||||
__device__ double __nv_nan(const signed char *__a);
|
||||
__device__ float __nv_nanf(const signed char *__a);
|
||||
__device__ double __nv_nearbyint(double __a);
|
||||
__device__ float __nv_nearbyintf(float __a);
|
||||
__device__ double __nv_nextafter(double __a, double __b);
|
||||
__device__ float __nv_nextafterf(float __a, float __b);
|
||||
__device__ double __nv_norm3d(double __a, double __b, double __c);
|
||||
__device__ float __nv_norm3df(float __a, float __b, float __c);
|
||||
__device__ double __nv_norm4d(double __a, double __b, double __c, double __d);
|
||||
__device__ float __nv_norm4df(float __a, float __b, float __c, float __d);
|
||||
__device__ double __nv_normcdf(double __a);
|
||||
__device__ float __nv_normcdff(float __a);
|
||||
__device__ double __nv_normcdfinv(double __a);
|
||||
__device__ float __nv_normcdfinvf(float __a);
|
||||
__device__ float __nv_normf(int __a, const float *__b);
|
||||
__device__ double __nv_norm(int __a, const double *__b);
|
||||
__device__ int __nv_popc(int __a);
|
||||
__device__ int __nv_popcll(long long __a);
|
||||
__device__ double __nv_pow(double __a, double __b);
|
||||
__device__ float __nv_powf(float __a, float __b);
|
||||
__device__ double __nv_powi(double __a, int __b);
|
||||
__device__ float __nv_powif(float __a, int __b);
|
||||
__device__ double __nv_rcbrt(double __a);
|
||||
__device__ float __nv_rcbrtf(float __a);
|
||||
__device__ double __nv_rcp64h(double __a);
|
||||
__device__ double __nv_remainder(double __a, double __b);
|
||||
__device__ float __nv_remainderf(float __a, float __b);
|
||||
__device__ double __nv_remquo(double __a, double __b, int *__c);
|
||||
__device__ float __nv_remquof(float __a, float __b, int *__c);
|
||||
__device__ int __nv_rhadd(int __a, int __b);
|
||||
__device__ double __nv_rhypot(double __a, double __b);
|
||||
__device__ float __nv_rhypotf(float __a, float __b);
|
||||
__device__ double __nv_rint(double __a);
|
||||
__device__ float __nv_rintf(float __a);
|
||||
__device__ double __nv_rnorm3d(double __a, double __b, double __c);
|
||||
__device__ float __nv_rnorm3df(float __a, float __b, float __c);
|
||||
__device__ double __nv_rnorm4d(double __a, double __b, double __c, double __d);
|
||||
__device__ float __nv_rnorm4df(float __a, float __b, float __c, float __d);
|
||||
__device__ float __nv_rnormf(int __a, const float *__b);
|
||||
__device__ double __nv_rnorm(int __a, const double *__b);
|
||||
__device__ double __nv_round(double __a);
|
||||
__device__ float __nv_roundf(float __a);
|
||||
__device__ double __nv_rsqrt(double __a);
|
||||
__device__ float __nv_rsqrtf(float __a);
|
||||
__device__ int __nv_sad(int __a, int __b, int __c);
|
||||
__device__ float __nv_saturatef(float __a);
|
||||
__device__ double __nv_scalbn(double __a, int __b);
|
||||
__device__ float __nv_scalbnf(float __a, int __b);
|
||||
__device__ int __nv_signbitd(double __a);
|
||||
__device__ int __nv_signbitf(float __a);
|
||||
__device__ void __nv_sincos(double __a, double *__b, double *__c);
|
||||
__device__ void __nv_sincosf(float __a, float *__b, float *__c);
|
||||
__device__ void __nv_sincospi(double __a, double *__b, double *__c);
|
||||
__device__ void __nv_sincospif(float __a, float *__b, float *__c);
|
||||
__device__ double __nv_sin(double __a);
|
||||
__device__ float __nv_sinf(float __a);
|
||||
__device__ double __nv_sinh(double __a);
|
||||
__device__ float __nv_sinhf(float __a);
|
||||
__device__ double __nv_sinpi(double __a);
|
||||
__device__ float __nv_sinpif(float __a);
|
||||
__device__ double __nv_sqrt(double __a);
|
||||
__device__ float __nv_sqrtf(float __a);
|
||||
__device__ double __nv_tan(double __a);
|
||||
__device__ float __nv_tanf(float __a);
|
||||
__device__ double __nv_tanh(double __a);
|
||||
__device__ float __nv_tanhf(float __a);
|
||||
__device__ double __nv_tgamma(double __a);
|
||||
__device__ float __nv_tgammaf(float __a);
|
||||
__device__ double __nv_trunc(double __a);
|
||||
__device__ float __nv_truncf(float __a);
|
||||
__device__ int __nv_uhadd(unsigned int __a, unsigned int __b);
|
||||
__device__ double __nv_uint2double_rn(unsigned int __i);
|
||||
__device__ float __nv_uint2float_rd(unsigned int __a);
|
||||
__device__ float __nv_uint2float_rn(unsigned int __a);
|
||||
__device__ float __nv_uint2float_ru(unsigned int __a);
|
||||
__device__ float __nv_uint2float_rz(unsigned int __a);
|
||||
__device__ float __nv_uint_as_float(unsigned int __a);
|
||||
__device__ double __nv_ull2double_rd(unsigned long long __a);
|
||||
__device__ double __nv_ull2double_rn(unsigned long long __a);
|
||||
__device__ double __nv_ull2double_ru(unsigned long long __a);
|
||||
__device__ double __nv_ull2double_rz(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_rd(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_rn(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_ru(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_rz(unsigned long long __a);
|
||||
__device__ unsigned long long __nv_ullmax(unsigned long long __a,
|
||||
unsigned long long __b);
|
||||
__device__ unsigned long long __nv_ullmin(unsigned long long __a,
|
||||
unsigned long long __b);
|
||||
__device__ unsigned int __nv_umax(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_umin(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_umul24(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned long long __nv_umul64hi(unsigned long long __a,
|
||||
unsigned long long __b);
|
||||
__device__ unsigned int __nv_umulhi(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_urhadd(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_usad(unsigned int __a, unsigned int __b,
|
||||
unsigned int __c);
|
||||
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 9020
|
||||
__device__ int __nv_vabs2(int __a);
|
||||
__device__ int __nv_vabs4(int __a);
|
||||
__device__ int __nv_vabsdiffs2(int __a, int __b);
|
||||
__device__ int __nv_vabsdiffs4(int __a, int __b);
|
||||
__device__ int __nv_vabsdiffu2(int __a, int __b);
|
||||
__device__ int __nv_vabsdiffu4(int __a, int __b);
|
||||
__device__ int __nv_vabsss2(int __a);
|
||||
__device__ int __nv_vabsss4(int __a);
|
||||
__device__ int __nv_vadd2(int __a, int __b);
|
||||
__device__ int __nv_vadd4(int __a, int __b);
|
||||
__device__ int __nv_vaddss2(int __a, int __b);
|
||||
__device__ int __nv_vaddss4(int __a, int __b);
|
||||
__device__ int __nv_vaddus2(int __a, int __b);
|
||||
__device__ int __nv_vaddus4(int __a, int __b);
|
||||
__device__ int __nv_vavgs2(int __a, int __b);
|
||||
__device__ int __nv_vavgs4(int __a, int __b);
|
||||
__device__ int __nv_vavgu2(int __a, int __b);
|
||||
__device__ int __nv_vavgu4(int __a, int __b);
|
||||
__device__ int __nv_vcmpeq2(int __a, int __b);
|
||||
__device__ int __nv_vcmpeq4(int __a, int __b);
|
||||
__device__ int __nv_vcmpges2(int __a, int __b);
|
||||
__device__ int __nv_vcmpges4(int __a, int __b);
|
||||
__device__ int __nv_vcmpgeu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpgeu4(int __a, int __b);
|
||||
__device__ int __nv_vcmpgts2(int __a, int __b);
|
||||
__device__ int __nv_vcmpgts4(int __a, int __b);
|
||||
__device__ int __nv_vcmpgtu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpgtu4(int __a, int __b);
|
||||
__device__ int __nv_vcmples2(int __a, int __b);
|
||||
__device__ int __nv_vcmples4(int __a, int __b);
|
||||
__device__ int __nv_vcmpleu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpleu4(int __a, int __b);
|
||||
__device__ int __nv_vcmplts2(int __a, int __b);
|
||||
__device__ int __nv_vcmplts4(int __a, int __b);
|
||||
__device__ int __nv_vcmpltu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpltu4(int __a, int __b);
|
||||
__device__ int __nv_vcmpne2(int __a, int __b);
|
||||
__device__ int __nv_vcmpne4(int __a, int __b);
|
||||
__device__ int __nv_vhaddu2(int __a, int __b);
|
||||
__device__ int __nv_vhaddu4(int __a, int __b);
|
||||
__device__ int __nv_vmaxs2(int __a, int __b);
|
||||
__device__ int __nv_vmaxs4(int __a, int __b);
|
||||
__device__ int __nv_vmaxu2(int __a, int __b);
|
||||
__device__ int __nv_vmaxu4(int __a, int __b);
|
||||
__device__ int __nv_vmins2(int __a, int __b);
|
||||
__device__ int __nv_vmins4(int __a, int __b);
|
||||
__device__ int __nv_vminu2(int __a, int __b);
|
||||
__device__ int __nv_vminu4(int __a, int __b);
|
||||
__device__ int __nv_vneg2(int __a);
|
||||
__device__ int __nv_vneg4(int __a);
|
||||
__device__ int __nv_vnegss2(int __a);
|
||||
__device__ int __nv_vnegss4(int __a);
|
||||
__device__ int __nv_vsads2(int __a, int __b);
|
||||
__device__ int __nv_vsads4(int __a, int __b);
|
||||
__device__ int __nv_vsadu2(int __a, int __b);
|
||||
__device__ int __nv_vsadu4(int __a, int __b);
|
||||
__device__ int __nv_vseteq2(int __a, int __b);
|
||||
__device__ int __nv_vseteq4(int __a, int __b);
|
||||
__device__ int __nv_vsetges2(int __a, int __b);
|
||||
__device__ int __nv_vsetges4(int __a, int __b);
|
||||
__device__ int __nv_vsetgeu2(int __a, int __b);
|
||||
__device__ int __nv_vsetgeu4(int __a, int __b);
|
||||
__device__ int __nv_vsetgts2(int __a, int __b);
|
||||
__device__ int __nv_vsetgts4(int __a, int __b);
|
||||
__device__ int __nv_vsetgtu2(int __a, int __b);
|
||||
__device__ int __nv_vsetgtu4(int __a, int __b);
|
||||
__device__ int __nv_vsetles2(int __a, int __b);
|
||||
__device__ int __nv_vsetles4(int __a, int __b);
|
||||
__device__ int __nv_vsetleu2(int __a, int __b);
|
||||
__device__ int __nv_vsetleu4(int __a, int __b);
|
||||
__device__ int __nv_vsetlts2(int __a, int __b);
|
||||
__device__ int __nv_vsetlts4(int __a, int __b);
|
||||
__device__ int __nv_vsetltu2(int __a, int __b);
|
||||
__device__ int __nv_vsetltu4(int __a, int __b);
|
||||
__device__ int __nv_vsetne2(int __a, int __b);
|
||||
__device__ int __nv_vsetne4(int __a, int __b);
|
||||
__device__ int __nv_vsub2(int __a, int __b);
|
||||
__device__ int __nv_vsub4(int __a, int __b);
|
||||
__device__ int __nv_vsubss2(int __a, int __b);
|
||||
__device__ int __nv_vsubss4(int __a, int __b);
|
||||
__device__ int __nv_vsubus2(int __a, int __b);
|
||||
__device__ int __nv_vsubus4(int __a, int __b);
|
||||
#endif // CUDA_VERSION
|
||||
__device__ double __nv_y0(double __a);
|
||||
__device__ float __nv_y0f(float __a);
|
||||
__device__ double __nv_y1(double __a);
|
||||
__device__ float __nv_y1f(float __a);
|
||||
__device__ float __nv_ynf(int __a, float __b);
|
||||
__device__ double __nv_yn(int __a, double __b);
|
||||
} // extern "C"
|
||||
#endif // __CLANG_CUDA_LIBDEVICE_DECLARES_H__
|
||||
@@ -0,0 +1,286 @@
|
||||
/*===- __clang_math_forward_declares.h - Prototypes of __device__ math fns --===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __CLANG__CUDA_MATH_FORWARD_DECLARES_H__
|
||||
#define __CLANG__CUDA_MATH_FORWARD_DECLARES_H__
|
||||
#ifndef __CUDA__
|
||||
#error "This file is for CUDA compilation only."
|
||||
#endif
|
||||
|
||||
// This file forward-declares of some math functions we (or the CUDA headers)
|
||||
// will define later. We need to do this, and do it before cmath is included,
|
||||
// because the standard library may have constexpr math functions. In the
|
||||
// absence of a prior __device__ decl, those constexpr functions may become
|
||||
// implicitly host+device. host+device functions can't be overloaded, so that
|
||||
// would preclude the use of our own __device__ overloads for these functions.
|
||||
|
||||
#pragma push_macro("__DEVICE__")
|
||||
#define __DEVICE__ \
|
||||
static __inline__ __attribute__((always_inline)) __attribute__((device))
|
||||
|
||||
__DEVICE__ double abs(double);
|
||||
__DEVICE__ float abs(float);
|
||||
__DEVICE__ int abs(int);
|
||||
__DEVICE__ long abs(long);
|
||||
__DEVICE__ long long abs(long long);
|
||||
__DEVICE__ double acos(double);
|
||||
__DEVICE__ float acos(float);
|
||||
__DEVICE__ double acosh(double);
|
||||
__DEVICE__ float acosh(float);
|
||||
__DEVICE__ double asin(double);
|
||||
__DEVICE__ float asin(float);
|
||||
__DEVICE__ double asinh(double);
|
||||
__DEVICE__ float asinh(float);
|
||||
__DEVICE__ double atan2(double, double);
|
||||
__DEVICE__ float atan2(float, float);
|
||||
__DEVICE__ double atan(double);
|
||||
__DEVICE__ float atan(float);
|
||||
__DEVICE__ double atanh(double);
|
||||
__DEVICE__ float atanh(float);
|
||||
__DEVICE__ double cbrt(double);
|
||||
__DEVICE__ float cbrt(float);
|
||||
__DEVICE__ double ceil(double);
|
||||
__DEVICE__ float ceil(float);
|
||||
__DEVICE__ double copysign(double, double);
|
||||
__DEVICE__ float copysign(float, float);
|
||||
__DEVICE__ double cos(double);
|
||||
__DEVICE__ float cos(float);
|
||||
__DEVICE__ double cosh(double);
|
||||
__DEVICE__ float cosh(float);
|
||||
__DEVICE__ double erfc(double);
|
||||
__DEVICE__ float erfc(float);
|
||||
__DEVICE__ double erf(double);
|
||||
__DEVICE__ float erf(float);
|
||||
__DEVICE__ double exp2(double);
|
||||
__DEVICE__ float exp2(float);
|
||||
__DEVICE__ double exp(double);
|
||||
__DEVICE__ float exp(float);
|
||||
__DEVICE__ double expm1(double);
|
||||
__DEVICE__ float expm1(float);
|
||||
__DEVICE__ double fabs(double);
|
||||
__DEVICE__ float fabs(float);
|
||||
__DEVICE__ double fdim(double, double);
|
||||
__DEVICE__ float fdim(float, float);
|
||||
__DEVICE__ double floor(double);
|
||||
__DEVICE__ float floor(float);
|
||||
__DEVICE__ double fma(double, double, double);
|
||||
__DEVICE__ float fma(float, float, float);
|
||||
__DEVICE__ double fmax(double, double);
|
||||
__DEVICE__ float fmax(float, float);
|
||||
__DEVICE__ double fmin(double, double);
|
||||
__DEVICE__ float fmin(float, float);
|
||||
__DEVICE__ double fmod(double, double);
|
||||
__DEVICE__ float fmod(float, float);
|
||||
__DEVICE__ int fpclassify(double);
|
||||
__DEVICE__ int fpclassify(float);
|
||||
__DEVICE__ double frexp(double, int *);
|
||||
__DEVICE__ float frexp(float, int *);
|
||||
__DEVICE__ double hypot(double, double);
|
||||
__DEVICE__ float hypot(float, float);
|
||||
__DEVICE__ int ilogb(double);
|
||||
__DEVICE__ int ilogb(float);
|
||||
__DEVICE__ bool isfinite(double);
|
||||
__DEVICE__ bool isfinite(float);
|
||||
__DEVICE__ bool isgreater(double, double);
|
||||
__DEVICE__ bool isgreaterequal(double, double);
|
||||
__DEVICE__ bool isgreaterequal(float, float);
|
||||
__DEVICE__ bool isgreater(float, float);
|
||||
__DEVICE__ bool isinf(double);
|
||||
__DEVICE__ bool isinf(float);
|
||||
__DEVICE__ bool isless(double, double);
|
||||
__DEVICE__ bool islessequal(double, double);
|
||||
__DEVICE__ bool islessequal(float, float);
|
||||
__DEVICE__ bool isless(float, float);
|
||||
__DEVICE__ bool islessgreater(double, double);
|
||||
__DEVICE__ bool islessgreater(float, float);
|
||||
__DEVICE__ bool isnan(double);
|
||||
__DEVICE__ bool isnan(float);
|
||||
__DEVICE__ bool isnormal(double);
|
||||
__DEVICE__ bool isnormal(float);
|
||||
__DEVICE__ bool isunordered(double, double);
|
||||
__DEVICE__ bool isunordered(float, float);
|
||||
__DEVICE__ long labs(long);
|
||||
__DEVICE__ double ldexp(double, int);
|
||||
__DEVICE__ float ldexp(float, int);
|
||||
__DEVICE__ double lgamma(double);
|
||||
__DEVICE__ float lgamma(float);
|
||||
__DEVICE__ long long llabs(long long);
|
||||
__DEVICE__ long long llrint(double);
|
||||
__DEVICE__ long long llrint(float);
|
||||
__DEVICE__ double log10(double);
|
||||
__DEVICE__ float log10(float);
|
||||
__DEVICE__ double log1p(double);
|
||||
__DEVICE__ float log1p(float);
|
||||
__DEVICE__ double log2(double);
|
||||
__DEVICE__ float log2(float);
|
||||
__DEVICE__ double logb(double);
|
||||
__DEVICE__ float logb(float);
|
||||
__DEVICE__ double log(double);
|
||||
__DEVICE__ float log(float);
|
||||
__DEVICE__ long lrint(double);
|
||||
__DEVICE__ long lrint(float);
|
||||
__DEVICE__ long lround(double);
|
||||
__DEVICE__ long lround(float);
|
||||
__DEVICE__ long long llround(float); // No llround(double).
|
||||
__DEVICE__ double modf(double, double *);
|
||||
__DEVICE__ float modf(float, float *);
|
||||
__DEVICE__ double nan(const char *);
|
||||
__DEVICE__ float nanf(const char *);
|
||||
__DEVICE__ double nearbyint(double);
|
||||
__DEVICE__ float nearbyint(float);
|
||||
__DEVICE__ double nextafter(double, double);
|
||||
__DEVICE__ float nextafter(float, float);
|
||||
__DEVICE__ double pow(double, double);
|
||||
__DEVICE__ double pow(double, int);
|
||||
__DEVICE__ float pow(float, float);
|
||||
__DEVICE__ float pow(float, int);
|
||||
__DEVICE__ double remainder(double, double);
|
||||
__DEVICE__ float remainder(float, float);
|
||||
__DEVICE__ double remquo(double, double, int *);
|
||||
__DEVICE__ float remquo(float, float, int *);
|
||||
__DEVICE__ double rint(double);
|
||||
__DEVICE__ float rint(float);
|
||||
__DEVICE__ double round(double);
|
||||
__DEVICE__ float round(float);
|
||||
__DEVICE__ double scalbln(double, long);
|
||||
__DEVICE__ float scalbln(float, long);
|
||||
__DEVICE__ double scalbn(double, int);
|
||||
__DEVICE__ float scalbn(float, int);
|
||||
__DEVICE__ bool signbit(double);
|
||||
__DEVICE__ bool signbit(float);
|
||||
__DEVICE__ double sin(double);
|
||||
__DEVICE__ float sin(float);
|
||||
__DEVICE__ double sinh(double);
|
||||
__DEVICE__ float sinh(float);
|
||||
__DEVICE__ double sqrt(double);
|
||||
__DEVICE__ float sqrt(float);
|
||||
__DEVICE__ double tan(double);
|
||||
__DEVICE__ float tan(float);
|
||||
__DEVICE__ double tanh(double);
|
||||
__DEVICE__ float tanh(float);
|
||||
__DEVICE__ double tgamma(double);
|
||||
__DEVICE__ float tgamma(float);
|
||||
__DEVICE__ double trunc(double);
|
||||
__DEVICE__ float trunc(float);
|
||||
|
||||
// Notably missing above is nexttoward, which we don't define on
|
||||
// the device side because libdevice doesn't give us an implementation, and we
|
||||
// don't want to be in the business of writing one ourselves.
|
||||
|
||||
// We need to define these overloads in exactly the namespace our standard
|
||||
// library uses (including the right inline namespace), otherwise they won't be
|
||||
// picked up by other functions in the standard library (e.g. functions in
|
||||
// <complex>). Thus the ugliness below.
|
||||
#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#else
|
||||
namespace std {
|
||||
#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using ::abs;
|
||||
using ::acos;
|
||||
using ::acosh;
|
||||
using ::asin;
|
||||
using ::asinh;
|
||||
using ::atan;
|
||||
using ::atan2;
|
||||
using ::atanh;
|
||||
using ::cbrt;
|
||||
using ::ceil;
|
||||
using ::copysign;
|
||||
using ::cos;
|
||||
using ::cosh;
|
||||
using ::erf;
|
||||
using ::erfc;
|
||||
using ::exp;
|
||||
using ::exp2;
|
||||
using ::expm1;
|
||||
using ::fabs;
|
||||
using ::fdim;
|
||||
using ::floor;
|
||||
using ::fma;
|
||||
using ::fmax;
|
||||
using ::fmin;
|
||||
using ::fmod;
|
||||
using ::fpclassify;
|
||||
using ::frexp;
|
||||
using ::hypot;
|
||||
using ::ilogb;
|
||||
using ::isfinite;
|
||||
using ::isgreater;
|
||||
using ::isgreaterequal;
|
||||
using ::isinf;
|
||||
using ::isless;
|
||||
using ::islessequal;
|
||||
using ::islessgreater;
|
||||
using ::isnan;
|
||||
using ::isnormal;
|
||||
using ::isunordered;
|
||||
using ::labs;
|
||||
using ::ldexp;
|
||||
using ::lgamma;
|
||||
using ::llabs;
|
||||
using ::llrint;
|
||||
using ::log;
|
||||
using ::log10;
|
||||
using ::log1p;
|
||||
using ::log2;
|
||||
using ::logb;
|
||||
using ::lrint;
|
||||
using ::lround;
|
||||
using ::llround;
|
||||
using ::modf;
|
||||
using ::nan;
|
||||
using ::nanf;
|
||||
using ::nearbyint;
|
||||
using ::nextafter;
|
||||
using ::pow;
|
||||
using ::remainder;
|
||||
using ::remquo;
|
||||
using ::rint;
|
||||
using ::round;
|
||||
using ::scalbln;
|
||||
using ::scalbn;
|
||||
using ::signbit;
|
||||
using ::sin;
|
||||
using ::sinh;
|
||||
using ::sqrt;
|
||||
using ::tan;
|
||||
using ::tanh;
|
||||
using ::tgamma;
|
||||
using ::trunc;
|
||||
|
||||
#ifdef _LIBCPP_END_NAMESPACE_STD
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
#else
|
||||
#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
#endif
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#pragma pop_macro("__DEVICE__")
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,430 @@
|
||||
/*===---- __clang_cuda_runtime_wrapper.h - CUDA runtime support -------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING: This header is intended to be directly -include'd by
|
||||
* the compiler and is not supposed to be included by users.
|
||||
*
|
||||
* CUDA headers are implemented in a way that currently makes it
|
||||
* impossible for user code to #include directly when compiling with
|
||||
* Clang. They present different view of CUDA-supplied functions
|
||||
* depending on where in NVCC's compilation pipeline the headers are
|
||||
* included. Neither of these modes provides function definitions with
|
||||
* correct attributes, so we use preprocessor to force the headers
|
||||
* into a form that Clang can use.
|
||||
*
|
||||
* Similarly to NVCC which -include's cuda_runtime.h, Clang -include's
|
||||
* this file during every CUDA compilation.
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_RUNTIME_WRAPPER_H__
|
||||
#define __CLANG_CUDA_RUNTIME_WRAPPER_H__
|
||||
|
||||
#if defined(__CUDA__) && defined(__clang__)
|
||||
|
||||
// Include some forward declares that must come before cmath.
|
||||
#include <__clang_cuda_math_forward_declares.h>
|
||||
|
||||
// Include some standard headers to avoid CUDA headers including them
|
||||
// while some required macros (like __THROW) are in a weird state.
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Preserve common macros that will be changed below by us or by CUDA
|
||||
// headers.
|
||||
#pragma push_macro("__THROW")
|
||||
#pragma push_macro("__CUDA_ARCH__")
|
||||
|
||||
// WARNING: Preprocessor hacks below are based on specific details of
|
||||
// CUDA-7.x headers and are not expected to work with any other
|
||||
// version of CUDA headers.
|
||||
#include "cuda.h"
|
||||
#if !defined(CUDA_VERSION)
|
||||
#error "cuda.h did not define CUDA_VERSION"
|
||||
#elif CUDA_VERSION < 7000 || CUDA_VERSION > 10000
|
||||
#error "Unsupported CUDA version!"
|
||||
#endif
|
||||
|
||||
#pragma push_macro("__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__")
|
||||
#if CUDA_VERSION >= 10000
|
||||
#define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
|
||||
#endif
|
||||
|
||||
// Make largest subset of device functions available during host
|
||||
// compilation -- SM_35 for the time being.
|
||||
#ifndef __CUDA_ARCH__
|
||||
#define __CUDA_ARCH__ 350
|
||||
#endif
|
||||
|
||||
#include "__clang_cuda_builtin_vars.h"
|
||||
|
||||
// No need for device_launch_parameters.h as __clang_cuda_builtin_vars.h above
|
||||
// has taken care of builtin variables declared in the file.
|
||||
#define __DEVICE_LAUNCH_PARAMETERS_H__
|
||||
|
||||
// {math,device}_functions.h only have declarations of the
|
||||
// functions. We don't need them as we're going to pull in their
|
||||
// definitions from .hpp files.
|
||||
#define __DEVICE_FUNCTIONS_H__
|
||||
#define __MATH_FUNCTIONS_H__
|
||||
#define __COMMON_FUNCTIONS_H__
|
||||
// device_functions_decls is replaced by __clang_cuda_device_functions.h
|
||||
// included below.
|
||||
#define __DEVICE_FUNCTIONS_DECLS_H__
|
||||
|
||||
#undef __CUDACC__
|
||||
#if CUDA_VERSION < 9000
|
||||
#define __CUDABE__
|
||||
#else
|
||||
#define __CUDA_LIBDEVICE__
|
||||
#endif
|
||||
// Disables definitions of device-side runtime support stubs in
|
||||
// cuda_device_runtime_api.h
|
||||
#include "driver_types.h"
|
||||
#include "host_config.h"
|
||||
#include "host_defines.h"
|
||||
|
||||
// Temporarily replace "nv_weak" with weak, so __attribute__((nv_weak)) in
|
||||
// cuda_device_runtime_api.h ends up being __attribute__((weak)) which is the
|
||||
// functional equivalent of what we need.
|
||||
#pragma push_macro("nv_weak")
|
||||
#define nv_weak weak
|
||||
#undef __CUDABE__
|
||||
#undef __CUDA_LIBDEVICE__
|
||||
#define __CUDACC__
|
||||
#include "cuda_runtime.h"
|
||||
|
||||
#pragma pop_macro("nv_weak")
|
||||
#undef __CUDACC__
|
||||
#define __CUDABE__
|
||||
|
||||
// CUDA headers use __nvvm_memcpy and __nvvm_memset which Clang does
|
||||
// not have at the moment. Emulate them with a builtin memcpy/memset.
|
||||
#define __nvvm_memcpy(s, d, n, a) __builtin_memcpy(s, d, n)
|
||||
#define __nvvm_memset(d, c, n, a) __builtin_memset(d, c, n)
|
||||
|
||||
#if CUDA_VERSION < 9000
|
||||
#include "crt/device_runtime.h"
|
||||
#endif
|
||||
#include "crt/host_runtime.h"
|
||||
// device_runtime.h defines __cxa_* macros that will conflict with
|
||||
// cxxabi.h.
|
||||
// FIXME: redefine these as __device__ functions.
|
||||
#undef __cxa_vec_ctor
|
||||
#undef __cxa_vec_cctor
|
||||
#undef __cxa_vec_dtor
|
||||
#undef __cxa_vec_new
|
||||
#undef __cxa_vec_new2
|
||||
#undef __cxa_vec_new3
|
||||
#undef __cxa_vec_delete2
|
||||
#undef __cxa_vec_delete
|
||||
#undef __cxa_vec_delete3
|
||||
#undef __cxa_pure_virtual
|
||||
|
||||
// math_functions.hpp expects this host function be defined on MacOS, but it
|
||||
// ends up not being there because of the games we play here. Just define it
|
||||
// ourselves; it's simple enough.
|
||||
#ifdef __APPLE__
|
||||
inline __host__ double __signbitd(double x) {
|
||||
return std::signbit(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
// CUDA 9.1 no longer provides declarations for libdevice functions, so we need
|
||||
// to provide our own.
|
||||
#include <__clang_cuda_libdevice_declares.h>
|
||||
|
||||
// Wrappers for many device-side standard library functions became compiler
|
||||
// builtins in CUDA-9 and have been removed from the CUDA headers. Clang now
|
||||
// provides its own implementation of the wrappers.
|
||||
#if CUDA_VERSION >= 9000
|
||||
#include <__clang_cuda_device_functions.h>
|
||||
#endif
|
||||
|
||||
// __THROW is redefined to be empty by device_functions_decls.h in CUDA. Clang's
|
||||
// counterpart does not do it, so we need to make it empty here to keep
|
||||
// following CUDA includes happy.
|
||||
#undef __THROW
|
||||
#define __THROW
|
||||
|
||||
// CUDA 8.0.41 relies on __USE_FAST_MATH__ and __CUDA_PREC_DIV's values.
|
||||
// Previous versions used to check whether they are defined or not.
|
||||
// CU_DEVICE_INVALID macro is only defined in 8.0.41, so we use it
|
||||
// here to detect the switch.
|
||||
|
||||
#if defined(CU_DEVICE_INVALID)
|
||||
#if !defined(__USE_FAST_MATH__)
|
||||
#define __USE_FAST_MATH__ 0
|
||||
#endif
|
||||
|
||||
#if !defined(__CUDA_PREC_DIV)
|
||||
#define __CUDA_PREC_DIV 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Temporarily poison __host__ macro to ensure it's not used by any of
|
||||
// the headers we're about to include.
|
||||
#pragma push_macro("__host__")
|
||||
#define __host__ UNEXPECTED_HOST_ATTRIBUTE
|
||||
|
||||
// device_functions.hpp and math_functions*.hpp use 'static
|
||||
// __forceinline__' (with no __device__) for definitions of device
|
||||
// functions. Temporarily redefine __forceinline__ to include
|
||||
// __device__.
|
||||
#pragma push_macro("__forceinline__")
|
||||
#define __forceinline__ __device__ __inline__ __attribute__((always_inline))
|
||||
#if CUDA_VERSION < 9000
|
||||
#include "device_functions.hpp"
|
||||
#endif
|
||||
|
||||
// math_function.hpp uses the __USE_FAST_MATH__ macro to determine whether we
|
||||
// get the slow-but-accurate or fast-but-inaccurate versions of functions like
|
||||
// sin and exp. This is controlled in clang by -fcuda-approx-transcendentals.
|
||||
//
|
||||
// device_functions.hpp uses __USE_FAST_MATH__ for a different purpose (fast vs.
|
||||
// slow divides), so we need to scope our define carefully here.
|
||||
#pragma push_macro("__USE_FAST_MATH__")
|
||||
#if defined(__CLANG_CUDA_APPROX_TRANSCENDENTALS__)
|
||||
#define __USE_FAST_MATH__ 1
|
||||
#endif
|
||||
|
||||
#if CUDA_VERSION >= 9000
|
||||
// CUDA-9.2 needs host-side memcpy for some host functions in
|
||||
// device_functions.hpp
|
||||
#if CUDA_VERSION >= 9020
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include "crt/math_functions.hpp"
|
||||
#else
|
||||
#include "math_functions.hpp"
|
||||
#endif
|
||||
|
||||
#pragma pop_macro("__USE_FAST_MATH__")
|
||||
|
||||
#if CUDA_VERSION < 9000
|
||||
#include "math_functions_dbl_ptx3.hpp"
|
||||
#endif
|
||||
#pragma pop_macro("__forceinline__")
|
||||
|
||||
// Pull in host-only functions that are only available when neither
|
||||
// __CUDACC__ nor __CUDABE__ are defined.
|
||||
#undef __MATH_FUNCTIONS_HPP__
|
||||
#undef __CUDABE__
|
||||
#if CUDA_VERSION < 9000
|
||||
#include "math_functions.hpp"
|
||||
#endif
|
||||
// Alas, additional overloads for these functions are hard to get to.
|
||||
// Considering that we only need these overloads for a few functions,
|
||||
// we can provide them here.
|
||||
static inline float rsqrt(float __a) { return rsqrtf(__a); }
|
||||
static inline float rcbrt(float __a) { return rcbrtf(__a); }
|
||||
static inline float sinpi(float __a) { return sinpif(__a); }
|
||||
static inline float cospi(float __a) { return cospif(__a); }
|
||||
static inline void sincospi(float __a, float *__b, float *__c) {
|
||||
return sincospif(__a, __b, __c);
|
||||
}
|
||||
static inline float erfcinv(float __a) { return erfcinvf(__a); }
|
||||
static inline float normcdfinv(float __a) { return normcdfinvf(__a); }
|
||||
static inline float normcdf(float __a) { return normcdff(__a); }
|
||||
static inline float erfcx(float __a) { return erfcxf(__a); }
|
||||
|
||||
#if CUDA_VERSION < 9000
|
||||
// For some reason single-argument variant is not always declared by
|
||||
// CUDA headers. Alas, device_functions.hpp included below needs it.
|
||||
static inline __device__ void __brkpt(int __c) { __brkpt(); }
|
||||
#endif
|
||||
|
||||
// Now include *.hpp with definitions of various GPU functions. Alas,
|
||||
// a lot of thins get declared/defined with __host__ attribute which
|
||||
// we don't want and we have to define it out. We also have to include
|
||||
// {device,math}_functions.hpp again in order to extract the other
|
||||
// branch of #if/else inside.
|
||||
#define __host__
|
||||
#undef __CUDABE__
|
||||
#define __CUDACC__
|
||||
#if CUDA_VERSION >= 9000
|
||||
// Some atomic functions became compiler builtins in CUDA-9 , so we need their
|
||||
// declarations.
|
||||
#include "device_atomic_functions.h"
|
||||
#endif
|
||||
#undef __DEVICE_FUNCTIONS_HPP__
|
||||
#include "device_atomic_functions.hpp"
|
||||
#if CUDA_VERSION >= 9000
|
||||
#include "crt/device_functions.hpp"
|
||||
#include "crt/device_double_functions.hpp"
|
||||
#else
|
||||
#include "device_functions.hpp"
|
||||
#define __CUDABE__
|
||||
#include "device_double_functions.h"
|
||||
#undef __CUDABE__
|
||||
#endif
|
||||
#include "sm_20_atomic_functions.hpp"
|
||||
#include "sm_20_intrinsics.hpp"
|
||||
#include "sm_32_atomic_functions.hpp"
|
||||
|
||||
// Don't include sm_30_intrinsics.h and sm_32_intrinsics.h. These define the
|
||||
// __shfl and __ldg intrinsics using inline (volatile) asm, but we want to
|
||||
// define them using builtins so that the optimizer can reason about and across
|
||||
// these instructions. In particular, using intrinsics for ldg gets us the
|
||||
// [addr+imm] addressing mode, which, although it doesn't actually exist in the
|
||||
// hardware, seems to generate faster machine code because ptxas can more easily
|
||||
// reason about our code.
|
||||
|
||||
#if CUDA_VERSION >= 8000
|
||||
#pragma push_macro("__CUDA_ARCH__")
|
||||
#undef __CUDA_ARCH__
|
||||
#include "sm_60_atomic_functions.hpp"
|
||||
#include "sm_61_intrinsics.hpp"
|
||||
#pragma pop_macro("__CUDA_ARCH__")
|
||||
#endif
|
||||
|
||||
#undef __MATH_FUNCTIONS_HPP__
|
||||
|
||||
// math_functions.hpp defines ::signbit as a __host__ __device__ function. This
|
||||
// conflicts with libstdc++'s constexpr ::signbit, so we have to rename
|
||||
// math_function.hpp's ::signbit. It's guarded by #undef signbit, but that's
|
||||
// conditional on __GNUC__. :)
|
||||
#pragma push_macro("signbit")
|
||||
#pragma push_macro("__GNUC__")
|
||||
#undef __GNUC__
|
||||
#define signbit __ignored_cuda_signbit
|
||||
|
||||
// CUDA-9 omits device-side definitions of some math functions if it sees
|
||||
// include guard from math.h wrapper from libstdc++. We have to undo the header
|
||||
// guard temporarily to get the definitions we need.
|
||||
#pragma push_macro("_GLIBCXX_MATH_H")
|
||||
#pragma push_macro("_LIBCPP_VERSION")
|
||||
#if CUDA_VERSION >= 9000
|
||||
#undef _GLIBCXX_MATH_H
|
||||
// We also need to undo another guard that checks for libc++ 3.8+
|
||||
#ifdef _LIBCPP_VERSION
|
||||
#define _LIBCPP_VERSION 3700
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CUDA_VERSION >= 9000
|
||||
#include "crt/math_functions.hpp"
|
||||
#else
|
||||
#include "math_functions.hpp"
|
||||
#endif
|
||||
#pragma pop_macro("_GLIBCXX_MATH_H")
|
||||
#pragma pop_macro("_LIBCPP_VERSION")
|
||||
#pragma pop_macro("__GNUC__")
|
||||
#pragma pop_macro("signbit")
|
||||
|
||||
#pragma pop_macro("__host__")
|
||||
|
||||
#include "texture_indirect_functions.h"
|
||||
|
||||
// Restore state of __CUDA_ARCH__ and __THROW we had on entry.
|
||||
#pragma pop_macro("__CUDA_ARCH__")
|
||||
#pragma pop_macro("__THROW")
|
||||
|
||||
// Set up compiler macros expected to be seen during compilation.
|
||||
#undef __CUDABE__
|
||||
#define __CUDACC__
|
||||
|
||||
extern "C" {
|
||||
// Device-side CUDA system calls.
|
||||
// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls
|
||||
// We need these declarations and wrappers for device-side
|
||||
// malloc/free/printf calls to work without relying on
|
||||
// -fcuda-disable-target-call-checks option.
|
||||
__device__ int vprintf(const char *, const char *);
|
||||
__device__ void free(void *) __attribute((nothrow));
|
||||
__device__ void *malloc(size_t) __attribute((nothrow)) __attribute__((malloc));
|
||||
__device__ void __assertfail(const char *__message, const char *__file,
|
||||
unsigned __line, const char *__function,
|
||||
size_t __charSize) __attribute__((noreturn));
|
||||
|
||||
// In order for standard assert() macro on linux to work we need to
|
||||
// provide device-side __assert_fail()
|
||||
__device__ static inline void __assert_fail(const char *__message,
|
||||
const char *__file, unsigned __line,
|
||||
const char *__function) {
|
||||
__assertfail(__message, __file, __line, __function, sizeof(char));
|
||||
}
|
||||
|
||||
// Clang will convert printf into vprintf, but we still need
|
||||
// device-side declaration for it.
|
||||
__device__ int printf(const char *, ...);
|
||||
} // extern "C"
|
||||
|
||||
// We also need device-side std::malloc and std::free.
|
||||
namespace std {
|
||||
__device__ static inline void free(void *__ptr) { ::free(__ptr); }
|
||||
__device__ static inline void *malloc(size_t __size) {
|
||||
return ::malloc(__size);
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
// Out-of-line implementations from __clang_cuda_builtin_vars.h. These need to
|
||||
// come after we've pulled in the definition of uint3 and dim3.
|
||||
|
||||
__device__ inline __cuda_builtin_threadIdx_t::operator uint3() const {
|
||||
uint3 ret;
|
||||
ret.x = x;
|
||||
ret.y = y;
|
||||
ret.z = z;
|
||||
return ret;
|
||||
}
|
||||
|
||||
__device__ inline __cuda_builtin_blockIdx_t::operator uint3() const {
|
||||
uint3 ret;
|
||||
ret.x = x;
|
||||
ret.y = y;
|
||||
ret.z = z;
|
||||
return ret;
|
||||
}
|
||||
|
||||
__device__ inline __cuda_builtin_blockDim_t::operator dim3() const {
|
||||
return dim3(x, y, z);
|
||||
}
|
||||
|
||||
__device__ inline __cuda_builtin_gridDim_t::operator dim3() const {
|
||||
return dim3(x, y, z);
|
||||
}
|
||||
|
||||
#include <__clang_cuda_cmath.h>
|
||||
#include <__clang_cuda_intrinsics.h>
|
||||
#include <__clang_cuda_complex_builtins.h>
|
||||
|
||||
// curand_mtgp32_kernel helpfully redeclares blockDim and threadIdx in host
|
||||
// mode, giving them their "proper" types of dim3 and uint3. This is
|
||||
// incompatible with the types we give in __clang_cuda_builtin_vars.h. As as
|
||||
// hack, force-include the header (nvcc doesn't include it by default) but
|
||||
// redefine dim3 and uint3 to our builtin types. (Thankfully dim3 and uint3 are
|
||||
// only used here for the redeclarations of blockDim and threadIdx.)
|
||||
#pragma push_macro("dim3")
|
||||
#pragma push_macro("uint3")
|
||||
#define dim3 __cuda_builtin_blockDim_t
|
||||
#define uint3 __cuda_builtin_threadIdx_t
|
||||
#include "curand_mtgp32_kernel.h"
|
||||
#pragma pop_macro("dim3")
|
||||
#pragma pop_macro("uint3")
|
||||
#pragma pop_macro("__USE_FAST_MATH__")
|
||||
#pragma pop_macro("__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__")
|
||||
|
||||
#endif // __CUDA__
|
||||
#endif // __CLANG_CUDA_RUNTIME_WRAPPER_H__
|
||||
@@ -0,0 +1,43 @@
|
||||
/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
|
||||
*
|
||||
* Copyright (c) 2014 Chandler Carruth
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
|
||||
#define __CLANG_MAX_ALIGN_T_DEFINED
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
typedef double max_align_t;
|
||||
#elif defined(__APPLE__)
|
||||
typedef long double max_align_t;
|
||||
#else
|
||||
// Define 'max_align_t' to match the GCC definition.
|
||||
typedef struct {
|
||||
long long __clang_max_align_nonce1
|
||||
__attribute__((__aligned__(__alignof__(long long))));
|
||||
long double __clang_max_align_nonce2
|
||||
__attribute__((__aligned__(__alignof__(long double))));
|
||||
} max_align_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,154 @@
|
||||
/*===---- __wmmintrin_aes.h - AES intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __WMMINTRIN_H
|
||||
#error "Never use <__wmmintrin_aes.h> directly; include <wmmintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __WMMINTRIN_AES_H
|
||||
#define __WMMINTRIN_AES_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("aes"), __min_vector_width__(128)))
|
||||
|
||||
/// Performs a single round of AES encryption using the Equivalent
|
||||
/// Inverse Cipher, transforming the state value from the first source
|
||||
/// operand using a 128-bit round key value contained in the second source
|
||||
/// operand, and writes the result to the destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VAESENC </c> instruction.
|
||||
///
|
||||
/// \param __V
|
||||
/// A 128-bit integer vector containing the state value.
|
||||
/// \param __R
|
||||
/// A 128-bit integer vector containing the round key value.
|
||||
/// \returns A 128-bit integer vector containing the encrypted value.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_aesenc_si128(__m128i __V, __m128i __R)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_aesenc128((__v2di)__V, (__v2di)__R);
|
||||
}
|
||||
|
||||
/// Performs the final round of AES encryption using the Equivalent
|
||||
/// Inverse Cipher, transforming the state value from the first source
|
||||
/// operand using a 128-bit round key value contained in the second source
|
||||
/// operand, and writes the result to the destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VAESENCLAST </c> instruction.
|
||||
///
|
||||
/// \param __V
|
||||
/// A 128-bit integer vector containing the state value.
|
||||
/// \param __R
|
||||
/// A 128-bit integer vector containing the round key value.
|
||||
/// \returns A 128-bit integer vector containing the encrypted value.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_aesenclast_si128(__m128i __V, __m128i __R)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_aesenclast128((__v2di)__V, (__v2di)__R);
|
||||
}
|
||||
|
||||
/// Performs a single round of AES decryption using the Equivalent
|
||||
/// Inverse Cipher, transforming the state value from the first source
|
||||
/// operand using a 128-bit round key value contained in the second source
|
||||
/// operand, and writes the result to the destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VAESDEC </c> instruction.
|
||||
///
|
||||
/// \param __V
|
||||
/// A 128-bit integer vector containing the state value.
|
||||
/// \param __R
|
||||
/// A 128-bit integer vector containing the round key value.
|
||||
/// \returns A 128-bit integer vector containing the decrypted value.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_aesdec_si128(__m128i __V, __m128i __R)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_aesdec128((__v2di)__V, (__v2di)__R);
|
||||
}
|
||||
|
||||
/// Performs the final round of AES decryption using the Equivalent
|
||||
/// Inverse Cipher, transforming the state value from the first source
|
||||
/// operand using a 128-bit round key value contained in the second source
|
||||
/// operand, and writes the result to the destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VAESDECLAST </c> instruction.
|
||||
///
|
||||
/// \param __V
|
||||
/// A 128-bit integer vector containing the state value.
|
||||
/// \param __R
|
||||
/// A 128-bit integer vector containing the round key value.
|
||||
/// \returns A 128-bit integer vector containing the decrypted value.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_aesdeclast_si128(__m128i __V, __m128i __R)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_aesdeclast128((__v2di)__V, (__v2di)__R);
|
||||
}
|
||||
|
||||
/// Applies the AES InvMixColumns() transformation to an expanded key
|
||||
/// contained in the source operand, and writes the result to the
|
||||
/// destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VAESIMC </c> instruction.
|
||||
///
|
||||
/// \param __V
|
||||
/// A 128-bit integer vector containing the expanded key.
|
||||
/// \returns A 128-bit integer vector containing the transformed value.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_aesimc_si128(__m128i __V)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_aesimc128((__v2di)__V);
|
||||
}
|
||||
|
||||
/// Generates a round key for AES encryption, operating on 128-bit data
|
||||
/// specified in the first source operand and using an 8-bit round constant
|
||||
/// specified by the second source operand, and writes the result to the
|
||||
/// destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm_aeskeygenassist_si128(__m128i C, const int R);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> AESKEYGENASSIST </c> instruction.
|
||||
///
|
||||
/// \param C
|
||||
/// A 128-bit integer vector that is used to generate the AES encryption key.
|
||||
/// \param R
|
||||
/// An 8-bit round constant used to generate the AES encryption key.
|
||||
/// \returns A 128-bit round key for AES encryption.
|
||||
#define _mm_aeskeygenassist_si128(C, R) \
|
||||
(__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __WMMINTRIN_AES_H */
|
||||
@@ -0,0 +1,62 @@
|
||||
/*===---- __wmmintrin_pclmul.h - PCMUL intrinsics ---------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __WMMINTRIN_H
|
||||
#error "Never use <__wmmintrin_pclmul.h> directly; include <wmmintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __WMMINTRIN_PCLMUL_H
|
||||
#define __WMMINTRIN_PCLMUL_H
|
||||
|
||||
/// Multiplies two 64-bit integer values, which are selected from source
|
||||
/// operands using the immediate-value operand. The multiplication is a
|
||||
/// carry-less multiplication, and the 128-bit integer product is stored in
|
||||
/// the destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VPCLMULQDQ </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// A 128-bit vector of [2 x i64] containing one of the source operands.
|
||||
/// \param __Y
|
||||
/// A 128-bit vector of [2 x i64] containing one of the source operands.
|
||||
/// \param __I
|
||||
/// An immediate value specifying which 64-bit values to select from the
|
||||
/// operands. Bit 0 is used to select a value from operand \a __X, and bit
|
||||
/// 4 is used to select a value from operand \a __Y: \n
|
||||
/// Bit[0]=0 indicates that bits[63:0] of operand \a __X are used. \n
|
||||
/// Bit[0]=1 indicates that bits[127:64] of operand \a __X are used. \n
|
||||
/// Bit[4]=0 indicates that bits[63:0] of operand \a __Y are used. \n
|
||||
/// Bit[4]=1 indicates that bits[127:64] of operand \a __Y are used.
|
||||
/// \returns The 128-bit integer vector containing the result of the carry-less
|
||||
/// multiplication of the selected 64-bit values.
|
||||
#define _mm_clmulepi64_si128(X, Y, I) \
|
||||
((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
|
||||
(__v2di)(__m128i)(Y), (char)(I)))
|
||||
|
||||
#endif /* __WMMINTRIN_PCLMUL_H */
|
||||
@@ -0,0 +1,86 @@
|
||||
/*===---- adxintrin.h - ADX intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __ADXINTRIN_H
|
||||
#define __ADXINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
/* Intrinsics that are available only if __ADX__ defined */
|
||||
static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))
|
||||
_addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
|
||||
unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))
|
||||
_addcarryx_u64(unsigned char __cf, unsigned long long __x,
|
||||
unsigned long long __y, unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Intrinsics that are also available if __ADX__ undefined */
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_addcarry_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
|
||||
unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_addcarry_u64(unsigned char __cf, unsigned long long __x,
|
||||
unsigned long long __y, unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_subborrow_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
|
||||
unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_subborrow_u32(__cf, __x, __y, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_subborrow_u64(unsigned char __cf, unsigned long long __x,
|
||||
unsigned long long __y, unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_subborrow_u64(__cf, __x, __y, __p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __ADXINTRIN_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,193 @@
|
||||
/*===---- ammintrin.h - SSE4a intrinsics -----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __AMMINTRIN_H
|
||||
#define __AMMINTRIN_H
|
||||
|
||||
#include <pmmintrin.h>
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4a"), __min_vector_width__(128)))
|
||||
|
||||
/// Extracts the specified bits from the lower 64 bits of the 128-bit
|
||||
/// integer vector operand at the index \a idx and of the length \a len.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm_extracti_si64(__m128i x, const int len, const int idx);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> EXTRQ </c> instruction.
|
||||
///
|
||||
/// \param x
|
||||
/// The value from which bits are extracted.
|
||||
/// \param len
|
||||
/// Bits [5:0] specify the length; the other bits are ignored. If bits [5:0]
|
||||
/// are zero, the length is interpreted as 64.
|
||||
/// \param idx
|
||||
/// Bits [5:0] specify the index of the least significant bit; the other
|
||||
/// bits are ignored. If the sum of the index and length is greater than 64,
|
||||
/// the result is undefined. If the length and index are both zero, bits
|
||||
/// [63:0] of parameter \a x are extracted. If the length is zero but the
|
||||
/// index is non-zero, the result is undefined.
|
||||
/// \returns A 128-bit integer vector whose lower 64 bits contain the bits
|
||||
/// extracted from the source operand.
|
||||
#define _mm_extracti_si64(x, len, idx) \
|
||||
((__m128i)__builtin_ia32_extrqi((__v2di)(__m128i)(x), \
|
||||
(char)(len), (char)(idx)))
|
||||
|
||||
/// Extracts the specified bits from the lower 64 bits of the 128-bit
|
||||
/// integer vector operand at the index and of the length specified by
|
||||
/// \a __y.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> EXTRQ </c> instruction.
|
||||
///
|
||||
/// \param __x
|
||||
/// The value from which bits are extracted.
|
||||
/// \param __y
|
||||
/// Specifies the index of the least significant bit at [13:8] and the
|
||||
/// length at [5:0]; all other bits are ignored. If bits [5:0] are zero, the
|
||||
/// length is interpreted as 64. If the sum of the index and length is
|
||||
/// greater than 64, the result is undefined. If the length and index are
|
||||
/// both zero, bits [63:0] of parameter \a __x are extracted. If the length
|
||||
/// is zero but the index is non-zero, the result is undefined.
|
||||
/// \returns A 128-bit vector whose lower 64 bits contain the bits extracted
|
||||
/// from the source operand.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_extract_si64(__m128i __x, __m128i __y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_extrq((__v2di)__x, (__v16qi)__y);
|
||||
}
|
||||
|
||||
/// Inserts bits of a specified length from the source integer vector
|
||||
/// \a y into the lower 64 bits of the destination integer vector \a x at
|
||||
/// the index \a idx and of the length \a len.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm_inserti_si64(__m128i x, __m128i y, const int len,
|
||||
/// const int idx);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> INSERTQ </c> instruction.
|
||||
///
|
||||
/// \param x
|
||||
/// The destination operand where bits will be inserted. The inserted bits
|
||||
/// are defined by the length \a len and by the index \a idx specifying the
|
||||
/// least significant bit.
|
||||
/// \param y
|
||||
/// The source operand containing the bits to be extracted. The extracted
|
||||
/// bits are the least significant bits of operand \a y of length \a len.
|
||||
/// \param len
|
||||
/// Bits [5:0] specify the length; the other bits are ignored. If bits [5:0]
|
||||
/// are zero, the length is interpreted as 64.
|
||||
/// \param idx
|
||||
/// Bits [5:0] specify the index of the least significant bit; the other
|
||||
/// bits are ignored. If the sum of the index and length is greater than 64,
|
||||
/// the result is undefined. If the length and index are both zero, bits
|
||||
/// [63:0] of parameter \a y are inserted into parameter \a x. If the length
|
||||
/// is zero but the index is non-zero, the result is undefined.
|
||||
/// \returns A 128-bit integer vector containing the original lower 64-bits of
|
||||
/// destination operand \a x with the specified bitfields replaced by the
|
||||
/// lower bits of source operand \a y. The upper 64 bits of the return value
|
||||
/// are undefined.
|
||||
#define _mm_inserti_si64(x, y, len, idx) \
|
||||
((__m128i)__builtin_ia32_insertqi((__v2di)(__m128i)(x), \
|
||||
(__v2di)(__m128i)(y), \
|
||||
(char)(len), (char)(idx)))
|
||||
|
||||
/// Inserts bits of a specified length from the source integer vector
|
||||
/// \a __y into the lower 64 bits of the destination integer vector \a __x
|
||||
/// at the index and of the length specified by \a __y.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> INSERTQ </c> instruction.
|
||||
///
|
||||
/// \param __x
|
||||
/// The destination operand where bits will be inserted. The inserted bits
|
||||
/// are defined by the length and by the index of the least significant bit
|
||||
/// specified by operand \a __y.
|
||||
/// \param __y
|
||||
/// The source operand containing the bits to be extracted. The extracted
|
||||
/// bits are the least significant bits of operand \a __y with length
|
||||
/// specified by bits [69:64]. These are inserted into the destination at the
|
||||
/// index specified by bits [77:72]; all other bits are ignored. If bits
|
||||
/// [69:64] are zero, the length is interpreted as 64. If the sum of the
|
||||
/// index and length is greater than 64, the result is undefined. If the
|
||||
/// length and index are both zero, bits [63:0] of parameter \a __y are
|
||||
/// inserted into parameter \a __x. If the length is zero but the index is
|
||||
/// non-zero, the result is undefined.
|
||||
/// \returns A 128-bit integer vector containing the original lower 64-bits of
|
||||
/// destination operand \a __x with the specified bitfields replaced by the
|
||||
/// lower bits of source operand \a __y. The upper 64 bits of the return
|
||||
/// value are undefined.
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_insert_si64(__m128i __x, __m128i __y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_insertq((__v2di)__x, (__v2di)__y);
|
||||
}
|
||||
|
||||
/// Stores a 64-bit double-precision value in a 64-bit memory location.
|
||||
/// To minimize caching, the data is flagged as non-temporal (unlikely to be
|
||||
/// used again soon).
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> MOVNTSD </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// The 64-bit memory location used to store the register value.
|
||||
/// \param __a
|
||||
/// The 64-bit double-precision floating-point register value to be stored.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_stream_sd(double *__p, __m128d __a)
|
||||
{
|
||||
__builtin_ia32_movntsd(__p, (__v2df)__a);
|
||||
}
|
||||
|
||||
/// Stores a 32-bit single-precision floating-point value in a 32-bit
|
||||
/// memory location. To minimize caching, the data is flagged as
|
||||
/// non-temporal (unlikely to be used again soon).
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> MOVNTSS </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// The 32-bit memory location used to store the register value.
|
||||
/// \param __a
|
||||
/// The 32-bit single-precision floating-point register value to be stored.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_stream_ss(float *__p, __m128 __a)
|
||||
{
|
||||
__builtin_ia32_movntss(__p, (__v4sf)__a);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __AMMINTRIN_H */
|
||||
@@ -0,0 +1,49 @@
|
||||
/*===---- arm64intr.h - ARM64 Windows intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we're compiling for the windows platform. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <arm64intr.h>
|
||||
#else
|
||||
|
||||
#ifndef __ARM64INTR_H
|
||||
#define __ARM64INTR_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
_ARM64_BARRIER_SY = 0xF,
|
||||
_ARM64_BARRIER_ST = 0xE,
|
||||
_ARM64_BARRIER_LD = 0xD,
|
||||
_ARM64_BARRIER_ISH = 0xB,
|
||||
_ARM64_BARRIER_ISHST = 0xA,
|
||||
_ARM64_BARRIER_ISHLD = 0x9,
|
||||
_ARM64_BARRIER_NSH = 0x7,
|
||||
_ARM64_BARRIER_NSHST = 0x6,
|
||||
_ARM64_BARRIER_NSHLD = 0x5,
|
||||
_ARM64_BARRIER_OSH = 0x3,
|
||||
_ARM64_BARRIER_OSHST = 0x2,
|
||||
_ARM64_BARRIER_OSHLD = 0x1
|
||||
} _ARM64INTR_BARRIER_TYPE;
|
||||
|
||||
#endif /* __ARM64INTR_H */
|
||||
#endif /* _MSC_VER */
|
||||
@@ -0,0 +1,626 @@
|
||||
/*===---- arm_acle.h - ARM Non-Neon intrinsics -----------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __ARM_ACLE_H
|
||||
#define __ARM_ACLE_H
|
||||
|
||||
#ifndef __ARM_ACLE
|
||||
#error "ACLE intrinsics support not enabled."
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* 8 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */
|
||||
/* 8.3 Memory barriers */
|
||||
#if !defined(_MSC_VER)
|
||||
#define __dmb(i) __builtin_arm_dmb(i)
|
||||
#define __dsb(i) __builtin_arm_dsb(i)
|
||||
#define __isb(i) __builtin_arm_isb(i)
|
||||
#endif
|
||||
|
||||
/* 8.4 Hints */
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfi(void) {
|
||||
__builtin_arm_wfi();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfe(void) {
|
||||
__builtin_arm_wfe();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sev(void) {
|
||||
__builtin_arm_sev();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sevl(void) {
|
||||
__builtin_arm_sevl();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __yield(void) {
|
||||
__builtin_arm_yield();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __ARM_32BIT_STATE
|
||||
#define __dbg(t) __builtin_arm_dbg(t)
|
||||
#endif
|
||||
|
||||
/* 8.5 Swap */
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__swp(uint32_t __x, volatile uint32_t *__p) {
|
||||
uint32_t v;
|
||||
do
|
||||
v = __builtin_arm_ldrex(__p);
|
||||
while (__builtin_arm_strex(__x, __p));
|
||||
return v;
|
||||
}
|
||||
|
||||
/* 8.6 Memory prefetch intrinsics */
|
||||
/* 8.6.1 Data prefetch */
|
||||
#define __pld(addr) __pldx(0, 0, 0, addr)
|
||||
|
||||
#if __ARM_32BIT_STATE
|
||||
#define __pldx(access_kind, cache_level, retention_policy, addr) \
|
||||
__builtin_arm_prefetch(addr, access_kind, 1)
|
||||
#else
|
||||
#define __pldx(access_kind, cache_level, retention_policy, addr) \
|
||||
__builtin_arm_prefetch(addr, access_kind, cache_level, retention_policy, 1)
|
||||
#endif
|
||||
|
||||
/* 8.6.2 Instruction prefetch */
|
||||
#define __pli(addr) __plix(0, 0, addr)
|
||||
|
||||
#if __ARM_32BIT_STATE
|
||||
#define __plix(cache_level, retention_policy, addr) \
|
||||
__builtin_arm_prefetch(addr, 0, 0)
|
||||
#else
|
||||
#define __plix(cache_level, retention_policy, addr) \
|
||||
__builtin_arm_prefetch(addr, 0, cache_level, retention_policy, 0)
|
||||
#endif
|
||||
|
||||
/* 8.7 NOP */
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__)) __nop(void) {
|
||||
__builtin_arm_nop();
|
||||
}
|
||||
|
||||
/* 9 DATA-PROCESSING INTRINSICS */
|
||||
/* 9.2 Miscellaneous data-processing intrinsics */
|
||||
/* ROR */
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__ror(uint32_t __x, uint32_t __y) {
|
||||
__y %= 32;
|
||||
if (__y == 0)
|
||||
return __x;
|
||||
return (__x >> __y) | (__x << (32 - __y));
|
||||
}
|
||||
|
||||
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__rorll(uint64_t __x, uint32_t __y) {
|
||||
__y %= 64;
|
||||
if (__y == 0)
|
||||
return __x;
|
||||
return (__x >> __y) | (__x << (64 - __y));
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
|
||||
__rorl(unsigned long __x, uint32_t __y) {
|
||||
#if __SIZEOF_LONG__ == 4
|
||||
return __ror(__x, __y);
|
||||
#else
|
||||
return __rorll(__x, __y);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* CLZ */
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__clz(uint32_t __t) {
|
||||
return __builtin_clz(__t);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
|
||||
__clzl(unsigned long __t) {
|
||||
return __builtin_clzl(__t);
|
||||
}
|
||||
|
||||
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__clzll(uint64_t __t) {
|
||||
return __builtin_clzll(__t);
|
||||
}
|
||||
|
||||
/* REV */
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__rev(uint32_t __t) {
|
||||
return __builtin_bswap32(__t);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
|
||||
__revl(unsigned long __t) {
|
||||
#if __SIZEOF_LONG__ == 4
|
||||
return __builtin_bswap32(__t);
|
||||
#else
|
||||
return __builtin_bswap64(__t);
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__revll(uint64_t __t) {
|
||||
return __builtin_bswap64(__t);
|
||||
}
|
||||
|
||||
/* REV16 */
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__rev16(uint32_t __t) {
|
||||
return __ror(__rev(__t), 16);
|
||||
}
|
||||
|
||||
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__rev16ll(uint64_t __t) {
|
||||
return (((uint64_t)__rev16(__t >> 32)) << 32) | __rev16(__t);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
|
||||
__rev16l(unsigned long __t) {
|
||||
#if __SIZEOF_LONG__ == 4
|
||||
return __rev16(__t);
|
||||
#else
|
||||
return __rev16ll(__t);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* REVSH */
|
||||
static __inline__ int16_t __attribute__((__always_inline__, __nodebug__))
|
||||
__revsh(int16_t __t) {
|
||||
return __builtin_bswap16(__t);
|
||||
}
|
||||
|
||||
/* RBIT */
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__rbit(uint32_t __t) {
|
||||
return __builtin_arm_rbit(__t);
|
||||
}
|
||||
|
||||
static __inline__ uint64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__rbitll(uint64_t __t) {
|
||||
#if __ARM_32BIT_STATE
|
||||
return (((uint64_t)__builtin_arm_rbit(__t)) << 32) |
|
||||
__builtin_arm_rbit(__t >> 32);
|
||||
#else
|
||||
return __builtin_arm_rbit64(__t);
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
|
||||
__rbitl(unsigned long __t) {
|
||||
#if __SIZEOF_LONG__ == 4
|
||||
return __rbit(__t);
|
||||
#else
|
||||
return __rbitll(__t);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* 9.3 16-bit multiplications
|
||||
*/
|
||||
#if __ARM_FEATURE_DSP
|
||||
static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
|
||||
__smulbb(int32_t __a, int32_t __b) {
|
||||
return __builtin_arm_smulbb(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
|
||||
__smulbt(int32_t __a, int32_t __b) {
|
||||
return __builtin_arm_smulbt(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
|
||||
__smultb(int32_t __a, int32_t __b) {
|
||||
return __builtin_arm_smultb(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
|
||||
__smultt(int32_t __a, int32_t __b) {
|
||||
return __builtin_arm_smultt(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
|
||||
__smulwb(int32_t __a, int32_t __b) {
|
||||
return __builtin_arm_smulwb(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
|
||||
__smulwt(int32_t __a, int32_t __b) {
|
||||
return __builtin_arm_smulwt(__a, __b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 9.4 Saturating intrinsics
|
||||
*
|
||||
* FIXME: Change guard to their corrosponding __ARM_FEATURE flag when Q flag
|
||||
* intrinsics are implemented and the flag is enabled.
|
||||
*/
|
||||
/* 9.4.1 Width-specified saturation intrinsics */
|
||||
#if __ARM_FEATURE_SAT
|
||||
#define __ssat(x, y) __builtin_arm_ssat(x, y)
|
||||
#define __usat(x, y) __builtin_arm_usat(x, y)
|
||||
#endif
|
||||
|
||||
/* 9.4.2 Saturating addition and subtraction intrinsics */
|
||||
#if __ARM_FEATURE_DSP
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qadd(int32_t __t, int32_t __v) {
|
||||
return __builtin_arm_qadd(__t, __v);
|
||||
}
|
||||
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qsub(int32_t __t, int32_t __v) {
|
||||
return __builtin_arm_qsub(__t, __v);
|
||||
}
|
||||
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qdbl(int32_t __t) {
|
||||
return __builtin_arm_qadd(__t, __t);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.4.3 Accumultating multiplications */
|
||||
#if __ARM_FEATURE_DSP
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlabb(int32_t __a, int32_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlabb(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlabt(int32_t __a, int32_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlabt(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlatb(int32_t __a, int32_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlatb(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlatt(int32_t __a, int32_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlatt(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlawb(int32_t __a, int32_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlawb(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlawt(int32_t __a, int32_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlawt(__a, __b, __c);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* 9.5.4 Parallel 16-bit saturation */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
#define __ssat16(x, y) __builtin_arm_ssat16(x, y)
|
||||
#define __usat16(x, y) __builtin_arm_usat16(x, y)
|
||||
#endif
|
||||
|
||||
/* 9.5.5 Packing and unpacking */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
typedef int32_t int8x4_t;
|
||||
typedef int32_t int16x2_t;
|
||||
typedef uint32_t uint8x4_t;
|
||||
typedef uint32_t uint16x2_t;
|
||||
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__sxtab16(int16x2_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_sxtab16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__sxtb16(int8x4_t __a) {
|
||||
return __builtin_arm_sxtb16(__a);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uxtab16(int16x2_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_uxtab16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uxtb16(int8x4_t __a) {
|
||||
return __builtin_arm_uxtb16(__a);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.5.6 Parallel selection */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__sel(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_sel(__a, __b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.5.7 Parallel 8-bit addition and subtraction */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qadd8(int8x4_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_qadd8(__a, __b);
|
||||
}
|
||||
static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qsub8(int8x4_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_qsub8(__a, __b);
|
||||
}
|
||||
static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__sadd8(int8x4_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_sadd8(__a, __b);
|
||||
}
|
||||
static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__shadd8(int8x4_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_shadd8(__a, __b);
|
||||
}
|
||||
static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__shsub8(int8x4_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_shsub8(__a, __b);
|
||||
}
|
||||
static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__ssub8(int8x4_t __a, int8x4_t __b) {
|
||||
return __builtin_arm_ssub8(__a, __b);
|
||||
}
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uadd8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_uadd8(__a, __b);
|
||||
}
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uhadd8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_uhadd8(__a, __b);
|
||||
}
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uhsub8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_uhsub8(__a, __b);
|
||||
}
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uqadd8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_uqadd8(__a, __b);
|
||||
}
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uqsub8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_uqsub8(__a, __b);
|
||||
}
|
||||
static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
|
||||
__usub8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_usub8(__a, __b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.5.8 Sum of 8-bit absolute differences */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__usad8(uint8x4_t __a, uint8x4_t __b) {
|
||||
return __builtin_arm_usad8(__a, __b);
|
||||
}
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__usada8(uint8x4_t __a, uint8x4_t __b, uint32_t __c) {
|
||||
return __builtin_arm_usada8(__a, __b, __c);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.5.9 Parallel 16-bit addition and subtraction */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qadd16(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_qadd16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qasx(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_qasx(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qsax(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_qsax(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__qsub16(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_qsub16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__sadd16(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_sadd16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__sasx(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_sasx(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__shadd16(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_shadd16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__shasx(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_shasx(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__shsax(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_shsax(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__shsub16(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_shsub16(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__ssax(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_ssax(__a, __b);
|
||||
}
|
||||
static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__ssub16(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_ssub16(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uadd16(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uadd16(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uasx(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uasx(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uhadd16(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uhadd16(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uhasx(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uhasx(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uhsax(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uhsax(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uhsub16(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uhsub16(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uqadd16(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uqadd16(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uqasx(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uqasx(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uqsax(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uqsax(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__uqsub16(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_uqsub16(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__usax(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_usax(__a, __b);
|
||||
}
|
||||
static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
|
||||
__usub16(uint16x2_t __a, uint16x2_t __b) {
|
||||
return __builtin_arm_usub16(__a, __b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.5.10 Parallel 16-bit multiplications */
|
||||
#if __ARM_FEATURE_SIMD32
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlad(int16x2_t __a, int16x2_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlad(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smladx(int16x2_t __a, int16x2_t __b, int32_t __c) {
|
||||
return __builtin_arm_smladx(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlald(int16x2_t __a, int16x2_t __b, int64_t __c) {
|
||||
return __builtin_arm_smlald(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlaldx(int16x2_t __a, int16x2_t __b, int64_t __c) {
|
||||
return __builtin_arm_smlaldx(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlsd(int16x2_t __a, int16x2_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlsd(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlsdx(int16x2_t __a, int16x2_t __b, int32_t __c) {
|
||||
return __builtin_arm_smlsdx(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlsld(int16x2_t __a, int16x2_t __b, int64_t __c) {
|
||||
return __builtin_arm_smlsld(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smlsldx(int16x2_t __a, int16x2_t __b, int64_t __c) {
|
||||
return __builtin_arm_smlsldx(__a, __b, __c);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smuad(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_smuad(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smuadx(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_smuadx(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smusd(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_smusd(__a, __b);
|
||||
}
|
||||
static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__smusdx(int16x2_t __a, int16x2_t __b) {
|
||||
return __builtin_arm_smusdx(__a, __b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 9.7 CRC32 intrinsics */
|
||||
#if __ARM_FEATURE_CRC32
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32b(uint32_t __a, uint8_t __b) {
|
||||
return __builtin_arm_crc32b(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32h(uint32_t __a, uint16_t __b) {
|
||||
return __builtin_arm_crc32h(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32w(uint32_t __a, uint32_t __b) {
|
||||
return __builtin_arm_crc32w(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32d(uint32_t __a, uint64_t __b) {
|
||||
return __builtin_arm_crc32d(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32cb(uint32_t __a, uint8_t __b) {
|
||||
return __builtin_arm_crc32cb(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32ch(uint32_t __a, uint16_t __b) {
|
||||
return __builtin_arm_crc32ch(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32cw(uint32_t __a, uint32_t __b) {
|
||||
return __builtin_arm_crc32cw(__a, __b);
|
||||
}
|
||||
|
||||
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
|
||||
__crc32cd(uint32_t __a, uint64_t __b) {
|
||||
return __builtin_arm_crc32cd(__a, __b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 10.1 Special register intrinsics */
|
||||
#define __arm_rsr(sysreg) __builtin_arm_rsr(sysreg)
|
||||
#define __arm_rsr64(sysreg) __builtin_arm_rsr64(sysreg)
|
||||
#define __arm_rsrp(sysreg) __builtin_arm_rsrp(sysreg)
|
||||
#define __arm_wsr(sysreg, v) __builtin_arm_wsr(sysreg, v)
|
||||
#define __arm_wsr64(sysreg, v) __builtin_arm_wsr64(sysreg, v)
|
||||
#define __arm_wsrp(sysreg, v) __builtin_arm_wsrp(sysreg, v)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ARM_ACLE_H */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,45 @@
|
||||
/*===---- armintr.h - ARM Windows intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we're compiling for the windows platform. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <armintr.h>
|
||||
#else
|
||||
|
||||
#ifndef __ARMINTR_H
|
||||
#define __ARMINTR_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
_ARM_BARRIER_SY = 0xF,
|
||||
_ARM_BARRIER_ST = 0xE,
|
||||
_ARM_BARRIER_ISH = 0xB,
|
||||
_ARM_BARRIER_ISHST = 0xA,
|
||||
_ARM_BARRIER_NSH = 0x7,
|
||||
_ARM_BARRIER_NSHST = 0x6,
|
||||
_ARM_BARRIER_OSH = 0x3,
|
||||
_ARM_BARRIER_OSHST = 0x2
|
||||
} _ARMINTR_BARRIER_TYPE;
|
||||
|
||||
#endif /* __ARMINTR_H */
|
||||
#endif /* _MSC_VER */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
/*===------------- avx512bitalgintrin.h - BITALG intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512bitalgintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512BITALGINTRIN_H
|
||||
#define __AVX512BITALGINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512bitalg"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_popcnt_epi16(__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpopcntw_512((__v32hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi16(__m512i __A, __mmask32 __U, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectw_512((__mmask32) __U,
|
||||
(__v32hi) _mm512_popcnt_epi16(__B),
|
||||
(__v32hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi16(__mmask32 __U, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_popcnt_epi16((__m512i) _mm512_setzero_si512(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_popcnt_epi8(__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpopcntb_512((__v64qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi8(__m512i __A, __mmask64 __U, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectb_512((__mmask64) __U,
|
||||
(__v64qi) _mm512_popcnt_epi8(__B),
|
||||
(__v64qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi8(__mmask64 __U, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_popcnt_epi8((__m512i) _mm512_setzero_si512(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __mmask64 __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_bitshuffle_epi64_mask(__mmask64 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask64) __builtin_ia32_vpshufbitqmb512_mask((__v64qi) __A,
|
||||
(__v64qi) __B,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __mmask64 __DEFAULT_FN_ATTRS
|
||||
_mm512_bitshuffle_epi64_mask(__m512i __A, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_bitshuffle_epi64_mask((__mmask64) -1,
|
||||
__A,
|
||||
__B);
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,141 @@
|
||||
/*===------------- avx512cdintrin.h - AVX512CD intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512cdintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512CDINTRIN_H
|
||||
#define __AVX512CDINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512cd"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_conflict_epi64 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
|
||||
(__v8di) _mm512_setzero_si512 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_conflict_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
|
||||
(__v8di) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_conflict_epi64 (__mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
|
||||
(__v8di) _mm512_setzero_si512 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_conflict_epi32 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
|
||||
(__v16si) _mm512_setzero_si512 (),
|
||||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_conflict_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
|
||||
(__v16si) __W,
|
||||
(__mmask16) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_conflict_epi32 (__mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
|
||||
(__v16si) _mm512_setzero_si512 (),
|
||||
(__mmask16) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_lzcnt_epi32 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vplzcntd_512 ((__v16si) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_lzcnt_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
|
||||
(__v16si)_mm512_lzcnt_epi32(__A),
|
||||
(__v16si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_lzcnt_epi32 (__mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
|
||||
(__v16si)_mm512_lzcnt_epi32(__A),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_lzcnt_epi64 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vplzcntq_512 ((__v8di) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_lzcnt_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
|
||||
(__v8di)_mm512_lzcnt_epi64(__A),
|
||||
(__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_lzcnt_epi64 (__mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
|
||||
(__v8di)_mm512_lzcnt_epi64(__A),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_broadcastmb_epi64 (__mmask8 __A)
|
||||
{
|
||||
return (__m512i) _mm512_set1_epi64((long long) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_broadcastmw_epi32 (__mmask16 __A)
|
||||
{
|
||||
return (__m512i) _mm512_set1_epi32((int) __A);
|
||||
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,285 @@
|
||||
/*===---- avx512erintrin.h - AVX512ER intrinsics ---------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512erintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512ERINTRIN_H
|
||||
#define __AVX512ERINTRIN_H
|
||||
|
||||
/* exp2a23 */
|
||||
#define _mm512_exp2a23_round_pd(A, R) \
|
||||
(__m512d)__builtin_ia32_exp2pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)_mm512_setzero_pd(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm512_mask_exp2a23_round_pd(S, M, A, R) \
|
||||
(__m512d)__builtin_ia32_exp2pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)(__m512d)(S), (__mmask8)(M), \
|
||||
(int)(R))
|
||||
|
||||
#define _mm512_maskz_exp2a23_round_pd(M, A, R) \
|
||||
(__m512d)__builtin_ia32_exp2pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)_mm512_setzero_pd(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm512_exp2a23_pd(A) \
|
||||
_mm512_exp2a23_round_pd((A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_mask_exp2a23_pd(S, M, A) \
|
||||
_mm512_mask_exp2a23_round_pd((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_maskz_exp2a23_pd(M, A) \
|
||||
_mm512_maskz_exp2a23_round_pd((M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_exp2a23_round_ps(A, R) \
|
||||
(__m512)__builtin_ia32_exp2ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)_mm512_setzero_ps(), \
|
||||
(__mmask16)-1, (int)(R))
|
||||
|
||||
#define _mm512_mask_exp2a23_round_ps(S, M, A, R) \
|
||||
(__m512)__builtin_ia32_exp2ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)(__m512)(S), (__mmask16)(M), \
|
||||
(int)(R))
|
||||
|
||||
#define _mm512_maskz_exp2a23_round_ps(M, A, R) \
|
||||
(__m512)__builtin_ia32_exp2ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)_mm512_setzero_ps(), \
|
||||
(__mmask16)(M), (int)(R))
|
||||
|
||||
#define _mm512_exp2a23_ps(A) \
|
||||
_mm512_exp2a23_round_ps((A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_mask_exp2a23_ps(S, M, A) \
|
||||
_mm512_mask_exp2a23_round_ps((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_maskz_exp2a23_ps(M, A) \
|
||||
_mm512_maskz_exp2a23_round_ps((M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
/* rsqrt28 */
|
||||
#define _mm512_rsqrt28_round_pd(A, R) \
|
||||
(__m512d)__builtin_ia32_rsqrt28pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)_mm512_setzero_pd(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm512_mask_rsqrt28_round_pd(S, M, A, R) \
|
||||
(__m512d)__builtin_ia32_rsqrt28pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)(__m512d)(S), (__mmask8)(M), \
|
||||
(int)(R))
|
||||
|
||||
#define _mm512_maskz_rsqrt28_round_pd(M, A, R) \
|
||||
(__m512d)__builtin_ia32_rsqrt28pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)_mm512_setzero_pd(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm512_rsqrt28_pd(A) \
|
||||
_mm512_rsqrt28_round_pd((A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_mask_rsqrt28_pd(S, M, A) \
|
||||
_mm512_mask_rsqrt28_round_pd((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_maskz_rsqrt28_pd(M, A) \
|
||||
_mm512_maskz_rsqrt28_round_pd((M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_rsqrt28_round_ps(A, R) \
|
||||
(__m512)__builtin_ia32_rsqrt28ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)_mm512_setzero_ps(), \
|
||||
(__mmask16)-1, (int)(R))
|
||||
|
||||
#define _mm512_mask_rsqrt28_round_ps(S, M, A, R) \
|
||||
(__m512)__builtin_ia32_rsqrt28ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)(__m512)(S), (__mmask16)(M), \
|
||||
(int)(R))
|
||||
|
||||
#define _mm512_maskz_rsqrt28_round_ps(M, A, R) \
|
||||
(__m512)__builtin_ia32_rsqrt28ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)_mm512_setzero_ps(), \
|
||||
(__mmask16)(M), (int)(R))
|
||||
|
||||
#define _mm512_rsqrt28_ps(A) \
|
||||
_mm512_rsqrt28_round_ps((A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_mask_rsqrt28_ps(S, M, A) \
|
||||
_mm512_mask_rsqrt28_round_ps((S), (M), A, _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_maskz_rsqrt28_ps(M, A) \
|
||||
_mm512_maskz_rsqrt28_round_ps((M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_rsqrt28_round_ss(A, B, R) \
|
||||
(__m128)__builtin_ia32_rsqrt28ss_round_mask((__v4sf)(__m128)(A), \
|
||||
(__v4sf)(__m128)(B), \
|
||||
(__v4sf)_mm_setzero_ps(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm_mask_rsqrt28_round_ss(S, M, A, B, R) \
|
||||
(__m128)__builtin_ia32_rsqrt28ss_round_mask((__v4sf)(__m128)(A), \
|
||||
(__v4sf)(__m128)(B), \
|
||||
(__v4sf)(__m128)(S), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_maskz_rsqrt28_round_ss(M, A, B, R) \
|
||||
(__m128)__builtin_ia32_rsqrt28ss_round_mask((__v4sf)(__m128)(A), \
|
||||
(__v4sf)(__m128)(B), \
|
||||
(__v4sf)_mm_setzero_ps(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_rsqrt28_ss(A, B) \
|
||||
_mm_rsqrt28_round_ss((A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_mask_rsqrt28_ss(S, M, A, B) \
|
||||
_mm_mask_rsqrt28_round_ss((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_maskz_rsqrt28_ss(M, A, B) \
|
||||
_mm_maskz_rsqrt28_round_ss((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_rsqrt28_round_sd(A, B, R) \
|
||||
(__m128d)__builtin_ia32_rsqrt28sd_round_mask((__v2df)(__m128d)(A), \
|
||||
(__v2df)(__m128d)(B), \
|
||||
(__v2df)_mm_setzero_pd(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm_mask_rsqrt28_round_sd(S, M, A, B, R) \
|
||||
(__m128d)__builtin_ia32_rsqrt28sd_round_mask((__v2df)(__m128d)(A), \
|
||||
(__v2df)(__m128d)(B), \
|
||||
(__v2df)(__m128d)(S), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_maskz_rsqrt28_round_sd(M, A, B, R) \
|
||||
(__m128d)__builtin_ia32_rsqrt28sd_round_mask((__v2df)(__m128d)(A), \
|
||||
(__v2df)(__m128d)(B), \
|
||||
(__v2df)_mm_setzero_pd(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_rsqrt28_sd(A, B) \
|
||||
_mm_rsqrt28_round_sd((A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_mask_rsqrt28_sd(S, M, A, B) \
|
||||
_mm_mask_rsqrt28_round_sd((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_maskz_rsqrt28_sd(M, A, B) \
|
||||
_mm_maskz_rsqrt28_round_sd((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
/* rcp28 */
|
||||
#define _mm512_rcp28_round_pd(A, R) \
|
||||
(__m512d)__builtin_ia32_rcp28pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)_mm512_setzero_pd(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm512_mask_rcp28_round_pd(S, M, A, R) \
|
||||
(__m512d)__builtin_ia32_rcp28pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)(__m512d)(S), (__mmask8)(M), \
|
||||
(int)(R))
|
||||
|
||||
#define _mm512_maskz_rcp28_round_pd(M, A, R) \
|
||||
(__m512d)__builtin_ia32_rcp28pd_mask((__v8df)(__m512d)(A), \
|
||||
(__v8df)_mm512_setzero_pd(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm512_rcp28_pd(A) \
|
||||
_mm512_rcp28_round_pd((A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_mask_rcp28_pd(S, M, A) \
|
||||
_mm512_mask_rcp28_round_pd((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_maskz_rcp28_pd(M, A) \
|
||||
_mm512_maskz_rcp28_round_pd((M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_rcp28_round_ps(A, R) \
|
||||
(__m512)__builtin_ia32_rcp28ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)_mm512_setzero_ps(), \
|
||||
(__mmask16)-1, (int)(R))
|
||||
|
||||
#define _mm512_mask_rcp28_round_ps(S, M, A, R) \
|
||||
(__m512)__builtin_ia32_rcp28ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)(__m512)(S), (__mmask16)(M), \
|
||||
(int)(R))
|
||||
|
||||
#define _mm512_maskz_rcp28_round_ps(M, A, R) \
|
||||
(__m512)__builtin_ia32_rcp28ps_mask((__v16sf)(__m512)(A), \
|
||||
(__v16sf)_mm512_setzero_ps(), \
|
||||
(__mmask16)(M), (int)(R))
|
||||
|
||||
#define _mm512_rcp28_ps(A) \
|
||||
_mm512_rcp28_round_ps((A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_mask_rcp28_ps(S, M, A) \
|
||||
_mm512_mask_rcp28_round_ps((S), (M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm512_maskz_rcp28_ps(M, A) \
|
||||
_mm512_maskz_rcp28_round_ps((M), (A), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_rcp28_round_ss(A, B, R) \
|
||||
(__m128)__builtin_ia32_rcp28ss_round_mask((__v4sf)(__m128)(A), \
|
||||
(__v4sf)(__m128)(B), \
|
||||
(__v4sf)_mm_setzero_ps(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm_mask_rcp28_round_ss(S, M, A, B, R) \
|
||||
(__m128)__builtin_ia32_rcp28ss_round_mask((__v4sf)(__m128)(A), \
|
||||
(__v4sf)(__m128)(B), \
|
||||
(__v4sf)(__m128)(S), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_maskz_rcp28_round_ss(M, A, B, R) \
|
||||
(__m128)__builtin_ia32_rcp28ss_round_mask((__v4sf)(__m128)(A), \
|
||||
(__v4sf)(__m128)(B), \
|
||||
(__v4sf)_mm_setzero_ps(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_rcp28_ss(A, B) \
|
||||
_mm_rcp28_round_ss((A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_mask_rcp28_ss(S, M, A, B) \
|
||||
_mm_mask_rcp28_round_ss((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_maskz_rcp28_ss(M, A, B) \
|
||||
_mm_maskz_rcp28_round_ss((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_rcp28_round_sd(A, B, R) \
|
||||
(__m128d)__builtin_ia32_rcp28sd_round_mask((__v2df)(__m128d)(A), \
|
||||
(__v2df)(__m128d)(B), \
|
||||
(__v2df)_mm_setzero_pd(), \
|
||||
(__mmask8)-1, (int)(R))
|
||||
|
||||
#define _mm_mask_rcp28_round_sd(S, M, A, B, R) \
|
||||
(__m128d)__builtin_ia32_rcp28sd_round_mask((__v2df)(__m128d)(A), \
|
||||
(__v2df)(__m128d)(B), \
|
||||
(__v2df)(__m128d)(S), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_maskz_rcp28_round_sd(M, A, B, R) \
|
||||
(__m128d)__builtin_ia32_rcp28sd_round_mask((__v2df)(__m128d)(A), \
|
||||
(__v2df)(__m128d)(B), \
|
||||
(__v2df)_mm_setzero_pd(), \
|
||||
(__mmask8)(M), (int)(R))
|
||||
|
||||
#define _mm_rcp28_sd(A, B) \
|
||||
_mm_rcp28_round_sd((A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_mask_rcp28_sd(S, M, A, B) \
|
||||
_mm_mask_rcp28_round_sd((S), (M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#define _mm_maskz_rcp28_sd(M, A, B) \
|
||||
_mm_maskz_rcp28_round_sd((M), (A), (B), _MM_FROUND_CUR_DIRECTION)
|
||||
|
||||
#endif /* __AVX512ERINTRIN_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
/*===------------- avx512ifmaintrin.h - IFMA intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512ifmaintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __IFMAINTRIN_H
|
||||
#define __IFMAINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_madd52hi_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpmadd52huq512((__v8di) __X, (__v8di) __Y,
|
||||
(__v8di) __Z);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_madd52hi_epu64 (__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52hi_epu64(__W, __X, __Y),
|
||||
(__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_madd52hi_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52hi_epu64(__X, __Y, __Z),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_madd52lo_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpmadd52luq512((__v8di) __X, (__v8di) __Y,
|
||||
(__v8di) __Z);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_madd52lo_epu64 (__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52lo_epu64(__W, __X, __Y),
|
||||
(__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_madd52lo_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52lo_epu64(__X, __Y, __Z),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,133 @@
|
||||
/*===------------- avx512ifmavlintrin.h - IFMA intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512ifmavlintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __IFMAVLINTRIN_H
|
||||
#define __IFMAVLINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma,avx512vl"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma,avx512vl"), __min_vector_width__(256)))
|
||||
|
||||
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_madd52hi_epu64 (__m128i __X, __m128i __Y, __m128i __Z)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpmadd52huq128((__v2di) __X, (__v2di) __Y,
|
||||
(__v2di) __Z);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_madd52hi_epu64 (__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__M,
|
||||
(__v2di)_mm_madd52hi_epu64(__W, __X, __Y),
|
||||
(__v2di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_madd52hi_epu64 (__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__M,
|
||||
(__v2di)_mm_madd52hi_epu64(__X, __Y, __Z),
|
||||
(__v2di)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_madd52hi_epu64 (__m256i __X, __m256i __Y, __m256i __Z)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpmadd52huq256((__v4di)__X, (__v4di)__Y,
|
||||
(__v4di)__Z);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_madd52hi_epu64 (__m256i __W, __mmask8 __M, __m256i __X, __m256i __Y)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__M,
|
||||
(__v4di)_mm256_madd52hi_epu64(__W, __X, __Y),
|
||||
(__v4di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_madd52hi_epu64 (__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__M,
|
||||
(__v4di)_mm256_madd52hi_epu64(__X, __Y, __Z),
|
||||
(__v4di)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_madd52lo_epu64 (__m128i __X, __m128i __Y, __m128i __Z)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpmadd52luq128((__v2di)__X, (__v2di)__Y,
|
||||
(__v2di)__Z);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_madd52lo_epu64 (__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__M,
|
||||
(__v2di)_mm_madd52lo_epu64(__W, __X, __Y),
|
||||
(__v2di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_madd52lo_epu64 (__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__M,
|
||||
(__v2di)_mm_madd52lo_epu64(__X, __Y, __Z),
|
||||
(__v2di)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_madd52lo_epu64 (__m256i __X, __m256i __Y, __m256i __Z)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpmadd52luq256((__v4di)__X, (__v4di)__Y,
|
||||
(__v4di)__Z);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_madd52lo_epu64 (__m256i __W, __mmask8 __M, __m256i __X, __m256i __Y)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__M,
|
||||
(__v4di)_mm256_madd52lo_epu64(__W, __X, __Y),
|
||||
(__v4di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_madd52lo_epu64 (__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__M,
|
||||
(__v4di)_mm256_madd52lo_epu64(__X, __Y, __Z),
|
||||
(__v4di)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,111 @@
|
||||
/*===------------- avx512pfintrin.h - PF intrinsics ------------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512pfintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512PFINTRIN_H
|
||||
#define __AVX512PFINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512pf")))
|
||||
|
||||
#define _mm512_mask_prefetch_i32gather_pd(index, mask, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfdpd((__mmask8)(mask), (__v8si)(__m256i)(index), \
|
||||
(void const *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i32gather_pd(index, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfdpd((__mmask8) -1, (__v8si)(__m256i)(index), \
|
||||
(void const *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i32gather_ps(index, mask, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfdps((__mmask16)(mask), \
|
||||
(__v16si)(__m512i)(index), (void const *)(addr), \
|
||||
(int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i32gather_ps(index, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfdps((__mmask16) -1, \
|
||||
(__v16si)(__m512i)(index), (void const *)(addr), \
|
||||
(int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i64gather_pd(index, mask, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfqpd((__mmask8)(mask), (__v8di)(__m512i)(index), \
|
||||
(void const *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i64gather_pd(index, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfqpd((__mmask8) -1, (__v8di)(__m512i)(index), \
|
||||
(void const *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i64gather_ps(index, mask, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfqps((__mmask8)(mask), (__v8di)(__m512i)(index), \
|
||||
(void const *)(addr), (int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i64gather_ps(index, addr, scale, hint) \
|
||||
__builtin_ia32_gatherpfqps((__mmask8) -1, (__v8di)(__m512i)(index), \
|
||||
(void const *)(addr), (int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i32scatter_pd(addr, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfdpd((__mmask8)-1, (__v8si)(__m256i)(index), \
|
||||
(void *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i32scatter_pd(addr, mask, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfdpd((__mmask8)(mask), (__v8si)(__m256i)(index), \
|
||||
(void *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i32scatter_ps(addr, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfdps((__mmask16)-1, (__v16si)(__m512i)(index), \
|
||||
(void *)(addr), (int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i32scatter_ps(addr, mask, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfdps((__mmask16)(mask), \
|
||||
(__v16si)(__m512i)(index), (void *)(addr), \
|
||||
(int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i64scatter_pd(addr, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfqpd((__mmask8)-1, (__v8di)(__m512i)(index), \
|
||||
(void *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i64scatter_pd(addr, mask, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfqpd((__mmask8)(mask), (__v8di)(__m512i)(index), \
|
||||
(void *)(addr), (int)(scale), \
|
||||
(int)(hint))
|
||||
|
||||
#define _mm512_prefetch_i64scatter_ps(addr, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfqps((__mmask8)-1, (__v8di)(__m512i)(index), \
|
||||
(void *)(addr), (int)(scale), (int)(hint))
|
||||
|
||||
#define _mm512_mask_prefetch_i64scatter_ps(addr, mask, index, scale, hint) \
|
||||
__builtin_ia32_scatterpfqps((__mmask8)(mask), (__v8di)(__m512i)(index), \
|
||||
(void *)(addr), (int)(scale), (int)(hint))
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,371 @@
|
||||
/*===------------- avx512vbmi2intrin.h - VBMI2 intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vbmi2intrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VBMI2INTRIN_H
|
||||
#define __AVX512VBMI2INTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vbmi2"), __min_vector_width__(512)))
|
||||
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_compress_epi16(__m512i __S, __mmask32 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_compresshi512_mask ((__v32hi) __D,
|
||||
(__v32hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_compress_epi16(__mmask32 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_compresshi512_mask ((__v32hi) __D,
|
||||
(__v32hi) _mm512_setzero_si512(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_compress_epi8(__m512i __S, __mmask64 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_compressqi512_mask ((__v64qi) __D,
|
||||
(__v64qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_compress_epi8(__mmask64 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_compressqi512_mask ((__v64qi) __D,
|
||||
(__v64qi) _mm512_setzero_si512(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_compressstoreu_epi16(void *__P, __mmask32 __U, __m512i __D)
|
||||
{
|
||||
__builtin_ia32_compressstorehi512_mask ((__v32hi *) __P, (__v32hi) __D,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_compressstoreu_epi8(void *__P, __mmask64 __U, __m512i __D)
|
||||
{
|
||||
__builtin_ia32_compressstoreqi512_mask ((__v64qi *) __P, (__v64qi) __D,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_expand_epi16(__m512i __S, __mmask32 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandhi512_mask ((__v32hi) __D,
|
||||
(__v32hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_expand_epi16(__mmask32 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandhi512_mask ((__v32hi) __D,
|
||||
(__v32hi) _mm512_setzero_si512(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_expand_epi8(__m512i __S, __mmask64 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandqi512_mask ((__v64qi) __D,
|
||||
(__v64qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_expand_epi8(__mmask64 __U, __m512i __D)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandqi512_mask ((__v64qi) __D,
|
||||
(__v64qi) _mm512_setzero_si512(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_expandloadu_epi16(__m512i __S, __mmask32 __U, void const *__P)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandloadhi512_mask ((const __v32hi *)__P,
|
||||
(__v32hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_expandloadu_epi16(__mmask32 __U, void const *__P)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandloadhi512_mask ((const __v32hi *)__P,
|
||||
(__v32hi) _mm512_setzero_si512(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_expandloadu_epi8(__m512i __S, __mmask64 __U, void const *__P)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandloadqi512_mask ((const __v64qi *)__P,
|
||||
(__v64qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_expandloadu_epi8(__mmask64 __U, void const *__P)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_expandloadqi512_mask ((const __v64qi *)__P,
|
||||
(__v64qi) _mm512_setzero_si512(),
|
||||
__U);
|
||||
}
|
||||
|
||||
#define _mm512_shldi_epi64(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vpshldq512((__v8di)(__m512i)(A), \
|
||||
(__v8di)(__m512i)(B), (int)(I))
|
||||
|
||||
#define _mm512_mask_shldi_epi64(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectq_512((__mmask8)(U), \
|
||||
(__v8di)_mm512_shldi_epi64((A), (B), (I)), \
|
||||
(__v8di)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_shldi_epi64(U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectq_512((__mmask8)(U), \
|
||||
(__v8di)_mm512_shldi_epi64((A), (B), (I)), \
|
||||
(__v8di)_mm512_setzero_si512())
|
||||
|
||||
#define _mm512_shldi_epi32(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vpshldd512((__v16si)(__m512i)(A), \
|
||||
(__v16si)(__m512i)(B), (int)(I))
|
||||
|
||||
#define _mm512_mask_shldi_epi32(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectd_512((__mmask16)(U), \
|
||||
(__v16si)_mm512_shldi_epi32((A), (B), (I)), \
|
||||
(__v16si)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_shldi_epi32(U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectd_512((__mmask16)(U), \
|
||||
(__v16si)_mm512_shldi_epi32((A), (B), (I)), \
|
||||
(__v16si)_mm512_setzero_si512())
|
||||
|
||||
#define _mm512_shldi_epi16(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vpshldw512((__v32hi)(__m512i)(A), \
|
||||
(__v32hi)(__m512i)(B), (int)(I))
|
||||
|
||||
#define _mm512_mask_shldi_epi16(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectw_512((__mmask32)(U), \
|
||||
(__v32hi)_mm512_shldi_epi16((A), (B), (I)), \
|
||||
(__v32hi)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_shldi_epi16(U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectw_512((__mmask32)(U), \
|
||||
(__v32hi)_mm512_shldi_epi16((A), (B), (I)), \
|
||||
(__v32hi)_mm512_setzero_si512())
|
||||
|
||||
#define _mm512_shrdi_epi64(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vpshrdq512((__v8di)(__m512i)(A), \
|
||||
(__v8di)(__m512i)(B), (int)(I))
|
||||
|
||||
#define _mm512_mask_shrdi_epi64(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectq_512((__mmask8)(U), \
|
||||
(__v8di)_mm512_shrdi_epi64((A), (B), (I)), \
|
||||
(__v8di)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_shrdi_epi64(U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectq_512((__mmask8)(U), \
|
||||
(__v8di)_mm512_shrdi_epi64((A), (B), (I)), \
|
||||
(__v8di)_mm512_setzero_si512())
|
||||
|
||||
#define _mm512_shrdi_epi32(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vpshrdd512((__v16si)(__m512i)(A), \
|
||||
(__v16si)(__m512i)(B), (int)(I))
|
||||
|
||||
#define _mm512_mask_shrdi_epi32(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectd_512((__mmask16)(U), \
|
||||
(__v16si)_mm512_shrdi_epi32((A), (B), (I)), \
|
||||
(__v16si)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_shrdi_epi32(U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectd_512((__mmask16)(U), \
|
||||
(__v16si)_mm512_shrdi_epi32((A), (B), (I)), \
|
||||
(__v16si)_mm512_setzero_si512())
|
||||
|
||||
#define _mm512_shrdi_epi16(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vpshrdw512((__v32hi)(__m512i)(A), \
|
||||
(__v32hi)(__m512i)(B), (int)(I))
|
||||
|
||||
#define _mm512_mask_shrdi_epi16(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectw_512((__mmask32)(U), \
|
||||
(__v32hi)_mm512_shrdi_epi16((A), (B), (I)), \
|
||||
(__v32hi)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_shrdi_epi16(U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectw_512((__mmask32)(U), \
|
||||
(__v32hi)_mm512_shrdi_epi16((A), (B), (I)), \
|
||||
(__v32hi)_mm512_setzero_si512())
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_shldv_epi64(__m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpshldvq512((__v8di)__A, (__v8di)__B,
|
||||
(__v8di)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_shldv_epi64(__m512i __A, __mmask8 __U, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__U,
|
||||
(__v8di)_mm512_shldv_epi64(__A, __B, __C),
|
||||
(__v8di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_shldv_epi64(__mmask8 __U, __m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__U,
|
||||
(__v8di)_mm512_shldv_epi64(__A, __B, __C),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_shldv_epi32(__m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpshldvd512((__v16si)__A, (__v16si)__B,
|
||||
(__v16si)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_shldv_epi32(__m512i __A, __mmask16 __U, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_shldv_epi32(__A, __B, __C),
|
||||
(__v16si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_shldv_epi32(__mmask16 __U, __m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_shldv_epi32(__A, __B, __C),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_shldv_epi16(__m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpshldvw512((__v32hi)__A, (__v32hi)__B,
|
||||
(__v32hi)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_shldv_epi16(__m512i __A, __mmask32 __U, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectw_512(__U,
|
||||
(__v32hi)_mm512_shldv_epi16(__A, __B, __C),
|
||||
(__v32hi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_shldv_epi16(__mmask32 __U, __m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectw_512(__U,
|
||||
(__v32hi)_mm512_shldv_epi16(__A, __B, __C),
|
||||
(__v32hi)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_shrdv_epi64(__m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpshrdvq512((__v8di)__A, (__v8di)__B,
|
||||
(__v8di)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_shrdv_epi64(__m512i __A, __mmask8 __U, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__U,
|
||||
(__v8di)_mm512_shrdv_epi64(__A, __B, __C),
|
||||
(__v8di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_shrdv_epi64(__mmask8 __U, __m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__U,
|
||||
(__v8di)_mm512_shrdv_epi64(__A, __B, __C),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_shrdv_epi32(__m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpshrdvd512((__v16si)__A, (__v16si)__B,
|
||||
(__v16si)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_shrdv_epi32(__m512i __A, __mmask16 __U, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_shrdv_epi32(__A, __B, __C),
|
||||
(__v16si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_shrdv_epi32(__mmask16 __U, __m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_shrdv_epi32(__A, __B, __C),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_shrdv_epi16(__m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpshrdvw512((__v32hi)__A, (__v32hi)__B,
|
||||
(__v32hi)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_shrdv_epi16(__m512i __A, __mmask32 __U, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectw_512(__U,
|
||||
(__v32hi)_mm512_shrdv_epi16(__A, __B, __C),
|
||||
(__v32hi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_shrdv_epi16(__mmask32 __U, __m512i __A, __m512i __B, __m512i __C)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectw_512(__U,
|
||||
(__v32hi)_mm512_shrdv_epi16(__A, __B, __C),
|
||||
(__v32hi)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/*===------------- avx512vbmiintrin.h - VBMI intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vbmiintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __VBMIINTRIN_H
|
||||
#define __VBMIINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vbmi"), __min_vector_width__(512)))
|
||||
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_permutex2var_epi8(__m512i __A, __m512i __I, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpermi2varqi512((__v64qi)__A, (__v64qi)__I,
|
||||
(__v64qi) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_permutex2var_epi8(__m512i __A, __mmask64 __U, __m512i __I,
|
||||
__m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512(__U,
|
||||
(__v64qi)_mm512_permutex2var_epi8(__A, __I, __B),
|
||||
(__v64qi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask2_permutex2var_epi8(__m512i __A, __m512i __I, __mmask64 __U,
|
||||
__m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512(__U,
|
||||
(__v64qi)_mm512_permutex2var_epi8(__A, __I, __B),
|
||||
(__v64qi)__I);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_permutex2var_epi8(__mmask64 __U, __m512i __A, __m512i __I,
|
||||
__m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512(__U,
|
||||
(__v64qi)_mm512_permutex2var_epi8(__A, __I, __B),
|
||||
(__v64qi)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_permutexvar_epi8 (__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_permvarqi512((__v64qi) __B, (__v64qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_permutexvar_epi8 (__mmask64 __M, __m512i __A,
|
||||
__m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
|
||||
(__v64qi)_mm512_permutexvar_epi8(__A, __B),
|
||||
(__v64qi)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_permutexvar_epi8 (__m512i __W, __mmask64 __M, __m512i __A,
|
||||
__m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
|
||||
(__v64qi)_mm512_permutexvar_epi8(__A, __B),
|
||||
(__v64qi)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_multishift_epi64_epi8(__m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpmultishiftqb512((__v64qi)__X, (__v64qi) __Y);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_multishift_epi64_epi8(__m512i __W, __mmask64 __M, __m512i __X,
|
||||
__m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
|
||||
(__v64qi)_mm512_multishift_epi64_epi8(__X, __Y),
|
||||
(__v64qi)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_multishift_epi64_epi8(__mmask64 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
|
||||
(__v64qi)_mm512_multishift_epi64_epi8(__X, __Y),
|
||||
(__v64qi)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,202 @@
|
||||
/*===------------- avx512vbmivlintrin.h - VBMI intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vbmivlintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __VBMIVLINTRIN_H
|
||||
#define __VBMIVLINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vbmi,avx512vl"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vbmi,avx512vl"), __min_vector_width__(256)))
|
||||
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_permutex2var_epi8(__m128i __A, __m128i __I, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpermi2varqi128((__v16qi)__A,
|
||||
(__v16qi)__I,
|
||||
(__v16qi)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_permutex2var_epi8(__m128i __A, __mmask16 __U, __m128i __I,
|
||||
__m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128(__U,
|
||||
(__v16qi)_mm_permutex2var_epi8(__A, __I, __B),
|
||||
(__v16qi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask2_permutex2var_epi8(__m128i __A, __m128i __I, __mmask16 __U,
|
||||
__m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128(__U,
|
||||
(__v16qi)_mm_permutex2var_epi8(__A, __I, __B),
|
||||
(__v16qi)__I);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_permutex2var_epi8(__mmask16 __U, __m128i __A, __m128i __I,
|
||||
__m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128(__U,
|
||||
(__v16qi)_mm_permutex2var_epi8(__A, __I, __B),
|
||||
(__v16qi)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_permutex2var_epi8(__m256i __A, __m256i __I, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpermi2varqi256((__v32qi)__A, (__v32qi)__I,
|
||||
(__v32qi)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_permutex2var_epi8(__m256i __A, __mmask32 __U, __m256i __I,
|
||||
__m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256(__U,
|
||||
(__v32qi)_mm256_permutex2var_epi8(__A, __I, __B),
|
||||
(__v32qi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask2_permutex2var_epi8(__m256i __A, __m256i __I, __mmask32 __U,
|
||||
__m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256(__U,
|
||||
(__v32qi)_mm256_permutex2var_epi8(__A, __I, __B),
|
||||
(__v32qi)__I);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_permutex2var_epi8(__mmask32 __U, __m256i __A, __m256i __I,
|
||||
__m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256(__U,
|
||||
(__v32qi)_mm256_permutex2var_epi8(__A, __I, __B),
|
||||
(__v32qi)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_permutexvar_epi8 (__m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_permvarqi128((__v16qi)__B, (__v16qi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_permutexvar_epi8 (__mmask16 __M, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128((__mmask16)__M,
|
||||
(__v16qi)_mm_permutexvar_epi8(__A, __B),
|
||||
(__v16qi)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_permutexvar_epi8 (__m128i __W, __mmask16 __M, __m128i __A,
|
||||
__m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128((__mmask16)__M,
|
||||
(__v16qi)_mm_permutexvar_epi8(__A, __B),
|
||||
(__v16qi)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_permutexvar_epi8 (__m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_permvarqi256((__v32qi) __B, (__v32qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_permutexvar_epi8 (__mmask32 __M, __m256i __A,
|
||||
__m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256((__mmask32)__M,
|
||||
(__v32qi)_mm256_permutexvar_epi8(__A, __B),
|
||||
(__v32qi)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_permutexvar_epi8 (__m256i __W, __mmask32 __M, __m256i __A,
|
||||
__m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256((__mmask32)__M,
|
||||
(__v32qi)_mm256_permutexvar_epi8(__A, __B),
|
||||
(__v32qi)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_multishift_epi64_epi8(__m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpmultishiftqb128((__v16qi)__X, (__v16qi)__Y);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_multishift_epi64_epi8(__m128i __W, __mmask16 __M, __m128i __X,
|
||||
__m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128((__mmask16)__M,
|
||||
(__v16qi)_mm_multishift_epi64_epi8(__X, __Y),
|
||||
(__v16qi)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_multishift_epi64_epi8(__mmask16 __M, __m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectb_128((__mmask16)__M,
|
||||
(__v16qi)_mm_multishift_epi64_epi8(__X, __Y),
|
||||
(__v16qi)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_multishift_epi64_epi8(__m256i __X, __m256i __Y)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpmultishiftqb256((__v32qi)__X, (__v32qi)__Y);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_multishift_epi64_epi8(__m256i __W, __mmask32 __M, __m256i __X,
|
||||
__m256i __Y)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256((__mmask32)__M,
|
||||
(__v32qi)_mm256_multishift_epi64_epi8(__X, __Y),
|
||||
(__v32qi)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_multishift_epi64_epi8(__mmask32 __M, __m256i __X, __m256i __Y)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectb_256((__mmask32)__M,
|
||||
(__v32qi)_mm256_multishift_epi64_epi8(__X, __Y),
|
||||
(__v32qi)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,159 @@
|
||||
/*===---- avx512vlbitalgintrin.h - BITALG intrinsics -----------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vlbitalgintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VLBITALGINTRIN_H
|
||||
#define __AVX512VLBITALGINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512bitalg"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512bitalg"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_popcnt_epi16(__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpopcntw_256((__v16hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_popcnt_epi16(__m256i __A, __mmask16 __U, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_selectw_256((__mmask16) __U,
|
||||
(__v16hi) _mm256_popcnt_epi16(__B),
|
||||
(__v16hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_popcnt_epi16(__mmask16 __U, __m256i __B)
|
||||
{
|
||||
return _mm256_mask_popcnt_epi16((__m256i) _mm256_setzero_si256(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_popcnt_epi16(__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpopcntw_128((__v8hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_popcnt_epi16(__m128i __A, __mmask8 __U, __m128i __B)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_selectw_128((__mmask8) __U,
|
||||
(__v8hi) _mm_popcnt_epi16(__B),
|
||||
(__v8hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_popcnt_epi16(__mmask8 __U, __m128i __B)
|
||||
{
|
||||
return _mm_mask_popcnt_epi16((__m128i) _mm_setzero_si128(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_popcnt_epi8(__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpopcntb_256((__v32qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_popcnt_epi8(__m256i __A, __mmask32 __U, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_selectb_256((__mmask32) __U,
|
||||
(__v32qi) _mm256_popcnt_epi8(__B),
|
||||
(__v32qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_popcnt_epi8(__mmask32 __U, __m256i __B)
|
||||
{
|
||||
return _mm256_mask_popcnt_epi8((__m256i) _mm256_setzero_si256(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_popcnt_epi8(__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpopcntb_128((__v16qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_popcnt_epi8(__m128i __A, __mmask16 __U, __m128i __B)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_selectb_128((__mmask16) __U,
|
||||
(__v16qi) _mm_popcnt_epi8(__B),
|
||||
(__v16qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_popcnt_epi8(__mmask16 __U, __m128i __B)
|
||||
{
|
||||
return _mm_mask_popcnt_epi8((__m128i) _mm_setzero_si128(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __mmask32 __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_bitshuffle_epi64_mask(__mmask32 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__mmask32) __builtin_ia32_vpshufbitqmb256_mask((__v32qi) __A,
|
||||
(__v32qi) __B,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __mmask32 __DEFAULT_FN_ATTRS256
|
||||
_mm256_bitshuffle_epi64_mask(__m256i __A, __m256i __B)
|
||||
{
|
||||
return _mm256_mask_bitshuffle_epi64_mask((__mmask32) -1,
|
||||
__A,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __mmask16 __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_bitshuffle_epi64_mask(__mmask16 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__mmask16) __builtin_ia32_vpshufbitqmb128_mask((__v16qi) __A,
|
||||
(__v16qi) __B,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __mmask16 __DEFAULT_FN_ATTRS128
|
||||
_mm_bitshuffle_epi64_mask(__m128i __A, __m128i __B)
|
||||
{
|
||||
return _mm_mask_bitshuffle_epi64_mask((__mmask16) -1,
|
||||
__A,
|
||||
__B);
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,249 @@
|
||||
/*===---- avx512vlcdintrin.h - AVX512VL and AVX512CD intrinsics ------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vlcdintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VLCDINTRIN_H
|
||||
#define __AVX512VLCDINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512cd"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512cd"), __min_vector_width__(256)))
|
||||
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_broadcastmb_epi64 (__mmask8 __A)
|
||||
{
|
||||
return (__m128i) _mm_set1_epi64x((long long) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_broadcastmb_epi64 (__mmask8 __A)
|
||||
{
|
||||
return (__m256i) _mm256_set1_epi64x((long long)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_broadcastmw_epi32 (__mmask16 __A)
|
||||
{
|
||||
return (__m128i) _mm_set1_epi32((int)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_broadcastmw_epi32 (__mmask16 __A)
|
||||
{
|
||||
return (__m256i) _mm256_set1_epi32((int)__A);
|
||||
}
|
||||
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_conflict_epi64 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
|
||||
(__v2di) _mm_undefined_si128 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_conflict_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
|
||||
(__v2di) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_conflict_epi64 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
|
||||
(__v2di)
|
||||
_mm_setzero_si128 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_conflict_epi64 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
|
||||
(__v4di) _mm256_undefined_si256 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_conflict_epi64 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
|
||||
(__v4di) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_conflict_epi64 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
|
||||
(__v4di) _mm256_setzero_si256 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_conflict_epi32 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
|
||||
(__v4si) _mm_undefined_si128 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_conflict_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
|
||||
(__v4si) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_conflict_epi32 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
|
||||
(__v4si) _mm_setzero_si128 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_conflict_epi32 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
|
||||
(__v8si) _mm256_undefined_si256 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_conflict_epi32 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
|
||||
(__v8si) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_conflict_epi32 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
|
||||
(__v8si)
|
||||
_mm256_setzero_si256 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_lzcnt_epi32 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vplzcntd_128 ((__v4si) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_lzcnt_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U,
|
||||
(__v4si)_mm_lzcnt_epi32(__A),
|
||||
(__v4si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_lzcnt_epi32 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U,
|
||||
(__v4si)_mm_lzcnt_epi32(__A),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_lzcnt_epi32 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vplzcntd_256 ((__v8si) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_lzcnt_epi32 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U,
|
||||
(__v8si)_mm256_lzcnt_epi32(__A),
|
||||
(__v8si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_lzcnt_epi32 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U,
|
||||
(__v8si)_mm256_lzcnt_epi32(__A),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_lzcnt_epi64 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vplzcntq_128 ((__v2di) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_lzcnt_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U,
|
||||
(__v2di)_mm_lzcnt_epi64(__A),
|
||||
(__v2di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_lzcnt_epi64 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U,
|
||||
(__v2di)_mm_lzcnt_epi64(__A),
|
||||
(__v2di)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_lzcnt_epi64 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vplzcntq_256 ((__v4di) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_lzcnt_epi64 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U,
|
||||
(__v4di)_mm256_lzcnt_epi64(__A),
|
||||
(__v4di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_lzcnt_epi64 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U,
|
||||
(__v4di)_mm256_lzcnt_epi64(__A),
|
||||
(__v4di)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif /* __AVX512VLCDINTRIN_H */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,703 @@
|
||||
/*===------------- avx512vlvbmi2intrin.h - VBMI2 intrinsics -----------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vlvbmi2intrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VLVBMI2INTRIN_H
|
||||
#define __AVX512VLVBMI2INTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vbmi2"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vbmi2"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_compress_epi16(__m128i __S, __mmask8 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_compresshi128_mask ((__v8hi) __D,
|
||||
(__v8hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_compress_epi16(__mmask8 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_compresshi128_mask ((__v8hi) __D,
|
||||
(__v8hi) _mm_setzero_si128(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_compress_epi8(__m128i __S, __mmask16 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_compressqi128_mask ((__v16qi) __D,
|
||||
(__v16qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_compress_epi8(__mmask16 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_compressqi128_mask ((__v16qi) __D,
|
||||
(__v16qi) _mm_setzero_si128(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_compressstoreu_epi16(void *__P, __mmask8 __U, __m128i __D)
|
||||
{
|
||||
__builtin_ia32_compressstorehi128_mask ((__v8hi *) __P, (__v8hi) __D,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_compressstoreu_epi8(void *__P, __mmask16 __U, __m128i __D)
|
||||
{
|
||||
__builtin_ia32_compressstoreqi128_mask ((__v16qi *) __P, (__v16qi) __D,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_expand_epi16(__m128i __S, __mmask8 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandhi128_mask ((__v8hi) __D,
|
||||
(__v8hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_expand_epi16(__mmask8 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandhi128_mask ((__v8hi) __D,
|
||||
(__v8hi) _mm_setzero_si128(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_expand_epi8(__m128i __S, __mmask16 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandqi128_mask ((__v16qi) __D,
|
||||
(__v16qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_expand_epi8(__mmask16 __U, __m128i __D)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandqi128_mask ((__v16qi) __D,
|
||||
(__v16qi) _mm_setzero_si128(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_expandloadu_epi16(__m128i __S, __mmask8 __U, void const *__P)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandloadhi128_mask ((const __v8hi *)__P,
|
||||
(__v8hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_expandloadu_epi16(__mmask8 __U, void const *__P)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandloadhi128_mask ((const __v8hi *)__P,
|
||||
(__v8hi) _mm_setzero_si128(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_expandloadu_epi8(__m128i __S, __mmask16 __U, void const *__P)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandloadqi128_mask ((const __v16qi *)__P,
|
||||
(__v16qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_expandloadu_epi8(__mmask16 __U, void const *__P)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_expandloadqi128_mask ((const __v16qi *)__P,
|
||||
(__v16qi) _mm_setzero_si128(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_compress_epi16(__m256i __S, __mmask16 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_compresshi256_mask ((__v16hi) __D,
|
||||
(__v16hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_compress_epi16(__mmask16 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_compresshi256_mask ((__v16hi) __D,
|
||||
(__v16hi) _mm256_setzero_si256(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_compress_epi8(__m256i __S, __mmask32 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_compressqi256_mask ((__v32qi) __D,
|
||||
(__v32qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_compress_epi8(__mmask32 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_compressqi256_mask ((__v32qi) __D,
|
||||
(__v32qi) _mm256_setzero_si256(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_compressstoreu_epi16(void *__P, __mmask16 __U, __m256i __D)
|
||||
{
|
||||
__builtin_ia32_compressstorehi256_mask ((__v16hi *) __P, (__v16hi) __D,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_compressstoreu_epi8(void *__P, __mmask32 __U, __m256i __D)
|
||||
{
|
||||
__builtin_ia32_compressstoreqi256_mask ((__v32qi *) __P, (__v32qi) __D,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_expand_epi16(__m256i __S, __mmask16 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandhi256_mask ((__v16hi) __D,
|
||||
(__v16hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_expand_epi16(__mmask16 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandhi256_mask ((__v16hi) __D,
|
||||
(__v16hi) _mm256_setzero_si256(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_expand_epi8(__m256i __S, __mmask32 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandqi256_mask ((__v32qi) __D,
|
||||
(__v32qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_expand_epi8(__mmask32 __U, __m256i __D)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandqi256_mask ((__v32qi) __D,
|
||||
(__v32qi) _mm256_setzero_si256(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_expandloadu_epi16(__m256i __S, __mmask16 __U, void const *__P)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandloadhi256_mask ((const __v16hi *)__P,
|
||||
(__v16hi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_expandloadu_epi16(__mmask16 __U, void const *__P)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandloadhi256_mask ((const __v16hi *)__P,
|
||||
(__v16hi) _mm256_setzero_si256(),
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_expandloadu_epi8(__m256i __S, __mmask32 __U, void const *__P)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandloadqi256_mask ((const __v32qi *)__P,
|
||||
(__v32qi) __S,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_expandloadu_epi8(__mmask32 __U, void const *__P)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_expandloadqi256_mask ((const __v32qi *)__P,
|
||||
(__v32qi) _mm256_setzero_si256(),
|
||||
__U);
|
||||
}
|
||||
|
||||
#define _mm256_shldi_epi64(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vpshldq256((__v4di)(__m256i)(A), \
|
||||
(__v4di)(__m256i)(B), (int)(I))
|
||||
|
||||
#define _mm256_mask_shldi_epi64(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectq_256((__mmask8)(U), \
|
||||
(__v4di)_mm256_shldi_epi64((A), (B), (I)), \
|
||||
(__v4di)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_shldi_epi64(U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectq_256((__mmask8)(U), \
|
||||
(__v4di)_mm256_shldi_epi64((A), (B), (I)), \
|
||||
(__v4di)_mm256_setzero_si256())
|
||||
|
||||
#define _mm_shldi_epi64(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vpshldq128((__v2di)(__m128i)(A), \
|
||||
(__v2di)(__m128i)(B), (int)(I))
|
||||
|
||||
#define _mm_mask_shldi_epi64(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectq_128((__mmask8)(U), \
|
||||
(__v2di)_mm_shldi_epi64((A), (B), (I)), \
|
||||
(__v2di)(__m128i)(S))
|
||||
|
||||
#define _mm_maskz_shldi_epi64(U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectq_128((__mmask8)(U), \
|
||||
(__v2di)_mm_shldi_epi64((A), (B), (I)), \
|
||||
(__v2di)_mm_setzero_si128())
|
||||
|
||||
#define _mm256_shldi_epi32(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vpshldd256((__v8si)(__m256i)(A), \
|
||||
(__v8si)(__m256i)(B), (int)(I))
|
||||
|
||||
#define _mm256_mask_shldi_epi32(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectd_256((__mmask8)(U), \
|
||||
(__v8si)_mm256_shldi_epi32((A), (B), (I)), \
|
||||
(__v8si)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_shldi_epi32(U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectd_256((__mmask8)(U), \
|
||||
(__v8si)_mm256_shldi_epi32((A), (B), (I)), \
|
||||
(__v8si)_mm256_setzero_si256())
|
||||
|
||||
#define _mm_shldi_epi32(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vpshldd128((__v4si)(__m128i)(A), \
|
||||
(__v4si)(__m128i)(B), (int)(I))
|
||||
|
||||
#define _mm_mask_shldi_epi32(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \
|
||||
(__v4si)_mm_shldi_epi32((A), (B), (I)), \
|
||||
(__v4si)(__m128i)(S))
|
||||
|
||||
#define _mm_maskz_shldi_epi32(U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \
|
||||
(__v4si)_mm_shldi_epi32((A), (B), (I)), \
|
||||
(__v4si)_mm_setzero_si128())
|
||||
|
||||
#define _mm256_shldi_epi16(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vpshldw256((__v16hi)(__m256i)(A), \
|
||||
(__v16hi)(__m256i)(B), (int)(I))
|
||||
|
||||
#define _mm256_mask_shldi_epi16(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectw_256((__mmask16)(U), \
|
||||
(__v16hi)_mm256_shldi_epi16((A), (B), (I)), \
|
||||
(__v16hi)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_shldi_epi16(U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectw_256((__mmask16)(U), \
|
||||
(__v16hi)_mm256_shldi_epi16((A), (B), (I)), \
|
||||
(__v16hi)_mm256_setzero_si256())
|
||||
|
||||
#define _mm_shldi_epi16(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vpshldw128((__v8hi)(__m128i)(A), \
|
||||
(__v8hi)(__m128i)(B), (int)(I))
|
||||
|
||||
#define _mm_mask_shldi_epi16(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectw_128((__mmask8)(U), \
|
||||
(__v8hi)_mm_shldi_epi16((A), (B), (I)), \
|
||||
(__v8hi)(__m128i)(S))
|
||||
|
||||
#define _mm_maskz_shldi_epi16(U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectw_128((__mmask8)(U), \
|
||||
(__v8hi)_mm_shldi_epi16((A), (B), (I)), \
|
||||
(__v8hi)_mm_setzero_si128())
|
||||
|
||||
#define _mm256_shrdi_epi64(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vpshrdq256((__v4di)(__m256i)(A), \
|
||||
(__v4di)(__m256i)(B), (int)(I))
|
||||
|
||||
#define _mm256_mask_shrdi_epi64(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectq_256((__mmask8)(U), \
|
||||
(__v4di)_mm256_shrdi_epi64((A), (B), (I)), \
|
||||
(__v4di)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_shrdi_epi64(U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectq_256((__mmask8)(U), \
|
||||
(__v4di)_mm256_shrdi_epi64((A), (B), (I)), \
|
||||
(__v4di)_mm256_setzero_si256())
|
||||
|
||||
#define _mm_shrdi_epi64(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vpshrdq128((__v2di)(__m128i)(A), \
|
||||
(__v2di)(__m128i)(B), (int)(I))
|
||||
|
||||
#define _mm_mask_shrdi_epi64(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectq_128((__mmask8)(U), \
|
||||
(__v2di)_mm_shrdi_epi64((A), (B), (I)), \
|
||||
(__v2di)(__m128i)(S))
|
||||
|
||||
#define _mm_maskz_shrdi_epi64(U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectq_128((__mmask8)(U), \
|
||||
(__v2di)_mm_shrdi_epi64((A), (B), (I)), \
|
||||
(__v2di)_mm_setzero_si128())
|
||||
|
||||
#define _mm256_shrdi_epi32(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vpshrdd256((__v8si)(__m256i)(A), \
|
||||
(__v8si)(__m256i)(B), (int)(I))
|
||||
|
||||
#define _mm256_mask_shrdi_epi32(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectd_256((__mmask8)(U), \
|
||||
(__v8si)_mm256_shrdi_epi32((A), (B), (I)), \
|
||||
(__v8si)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_shrdi_epi32(U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectd_256((__mmask8)(U), \
|
||||
(__v8si)_mm256_shrdi_epi32((A), (B), (I)), \
|
||||
(__v8si)_mm256_setzero_si256())
|
||||
|
||||
#define _mm_shrdi_epi32(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vpshrdd128((__v4si)(__m128i)(A), \
|
||||
(__v4si)(__m128i)(B), (int)(I))
|
||||
|
||||
#define _mm_mask_shrdi_epi32(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \
|
||||
(__v4si)_mm_shrdi_epi32((A), (B), (I)), \
|
||||
(__v4si)(__m128i)(S))
|
||||
|
||||
#define _mm_maskz_shrdi_epi32(U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \
|
||||
(__v4si)_mm_shrdi_epi32((A), (B), (I)), \
|
||||
(__v4si)_mm_setzero_si128())
|
||||
|
||||
#define _mm256_shrdi_epi16(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vpshrdw256((__v16hi)(__m256i)(A), \
|
||||
(__v16hi)(__m256i)(B), (int)(I))
|
||||
|
||||
#define _mm256_mask_shrdi_epi16(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectw_256((__mmask16)(U), \
|
||||
(__v16hi)_mm256_shrdi_epi16((A), (B), (I)), \
|
||||
(__v16hi)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_shrdi_epi16(U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectw_256((__mmask16)(U), \
|
||||
(__v16hi)_mm256_shrdi_epi16((A), (B), (I)), \
|
||||
(__v16hi)_mm256_setzero_si256())
|
||||
|
||||
#define _mm_shrdi_epi16(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vpshrdw128((__v8hi)(__m128i)(A), \
|
||||
(__v8hi)(__m128i)(B), (int)(I))
|
||||
|
||||
#define _mm_mask_shrdi_epi16(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectw_128((__mmask8)(U), \
|
||||
(__v8hi)_mm_shrdi_epi16((A), (B), (I)), \
|
||||
(__v8hi)(__m128i)(S))
|
||||
|
||||
#define _mm_maskz_shrdi_epi16(U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectw_128((__mmask8)(U), \
|
||||
(__v8hi)_mm_shrdi_epi16((A), (B), (I)), \
|
||||
(__v8hi)_mm_setzero_si128())
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_shldv_epi64(__m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpshldvq256((__v4di)__A, (__v4di)__B,
|
||||
(__v4di)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_shldv_epi64(__m256i __A, __mmask8 __U, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__U,
|
||||
(__v4di)_mm256_shldv_epi64(__A, __B, __C),
|
||||
(__v4di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_shldv_epi64(__mmask8 __U, __m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__U,
|
||||
(__v4di)_mm256_shldv_epi64(__A, __B, __C),
|
||||
(__v4di)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_shldv_epi64(__m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpshldvq128((__v2di)__A, (__v2di)__B,
|
||||
(__v2di)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_shldv_epi64(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__U,
|
||||
(__v2di)_mm_shldv_epi64(__A, __B, __C),
|
||||
(__v2di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_shldv_epi64(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__U,
|
||||
(__v2di)_mm_shldv_epi64(__A, __B, __C),
|
||||
(__v2di)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_shldv_epi32(__m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpshldvd256((__v8si)__A, (__v8si)__B,
|
||||
(__v8si)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_shldv_epi32(__m256i __A, __mmask8 __U, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_shldv_epi32(__A, __B, __C),
|
||||
(__v8si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_shldv_epi32(__mmask8 __U, __m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_shldv_epi32(__A, __B, __C),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_shldv_epi32(__m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpshldvd128((__v4si)__A, (__v4si)__B,
|
||||
(__v4si)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_shldv_epi32(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_shldv_epi32(__A, __B, __C),
|
||||
(__v4si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_shldv_epi32(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_shldv_epi32(__A, __B, __C),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_shldv_epi16(__m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpshldvw256((__v16hi)__A, (__v16hi)__B,
|
||||
(__v16hi)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_shldv_epi16(__m256i __A, __mmask16 __U, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectw_256(__U,
|
||||
(__v16hi)_mm256_shldv_epi16(__A, __B, __C),
|
||||
(__v16hi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_shldv_epi16(__mmask16 __U, __m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectw_256(__U,
|
||||
(__v16hi)_mm256_shldv_epi16(__A, __B, __C),
|
||||
(__v16hi)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_shldv_epi16(__m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpshldvw128((__v8hi)__A, (__v8hi)__B,
|
||||
(__v8hi)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_shldv_epi16(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectw_128(__U,
|
||||
(__v8hi)_mm_shldv_epi16(__A, __B, __C),
|
||||
(__v8hi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_shldv_epi16(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectw_128(__U,
|
||||
(__v8hi)_mm_shldv_epi16(__A, __B, __C),
|
||||
(__v8hi)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_shrdv_epi64(__m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpshrdvq256((__v4di)__A, (__v4di)__B,
|
||||
(__v4di)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_shrdv_epi64(__m256i __A, __mmask8 __U, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__U,
|
||||
(__v4di)_mm256_shrdv_epi64(__A, __B, __C),
|
||||
(__v4di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_shrdv_epi64(__mmask8 __U, __m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256(__U,
|
||||
(__v4di)_mm256_shrdv_epi64(__A, __B, __C),
|
||||
(__v4di)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_shrdv_epi64(__m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpshrdvq128((__v2di)__A, (__v2di)__B,
|
||||
(__v2di)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_shrdv_epi64(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__U,
|
||||
(__v2di)_mm_shrdv_epi64(__A, __B, __C),
|
||||
(__v2di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_shrdv_epi64(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128(__U,
|
||||
(__v2di)_mm_shrdv_epi64(__A, __B, __C),
|
||||
(__v2di)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_shrdv_epi32(__m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpshrdvd256((__v8si)__A, (__v8si)__B,
|
||||
(__v8si)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_shrdv_epi32(__m256i __A, __mmask8 __U, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_shrdv_epi32(__A, __B, __C),
|
||||
(__v8si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_shrdv_epi32(__mmask8 __U, __m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_shrdv_epi32(__A, __B, __C),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_shrdv_epi32(__m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpshrdvd128((__v4si)__A, (__v4si)__B,
|
||||
(__v4si)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_shrdv_epi32(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_shrdv_epi32(__A, __B, __C),
|
||||
(__v4si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_shrdv_epi32(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_shrdv_epi32(__A, __B, __C),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_shrdv_epi16(__m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpshrdvw256((__v16hi)__A, (__v16hi)__B,
|
||||
(__v16hi)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_shrdv_epi16(__m256i __A, __mmask16 __U, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectw_256(__U,
|
||||
(__v16hi)_mm256_shrdv_epi16(__A, __B, __C),
|
||||
(__v16hi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_shrdv_epi16(__mmask16 __U, __m256i __A, __m256i __B, __m256i __C)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectw_256(__U,
|
||||
(__v16hi)_mm256_shrdv_epi16(__A, __B, __C),
|
||||
(__v16hi)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_shrdv_epi16(__m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpshrdvw128((__v8hi)__A, (__v8hi)__B,
|
||||
(__v8hi)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_shrdv_epi16(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectw_128(__U,
|
||||
(__v8hi)_mm_shrdv_epi16(__A, __B, __C),
|
||||
(__v8hi)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_shrdv_epi16(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectw_128(__U,
|
||||
(__v8hi)_mm_shrdv_epi16(__A, __B, __C),
|
||||
(__v8hi)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,223 @@
|
||||
/*===------------- avx512vlvnniintrin.h - VNNI intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vlvnniintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VLVNNIINTRIN_H
|
||||
#define __AVX512VLVNNIINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vnni"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vnni"), __min_vector_width__(256)))
|
||||
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpdpbusd256((__v8si)__S, (__v8si)__A,
|
||||
(__v8si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_dpbusd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpbusd_epi32(__S, __A, __B),
|
||||
(__v8si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_dpbusd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpbusd_epi32(__S, __A, __B),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpdpbusds256((__v8si)__S, (__v8si)__A,
|
||||
(__v8si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_dpbusds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpbusds_epi32(__S, __A, __B),
|
||||
(__v8si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_dpbusds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpbusds_epi32(__S, __A, __B),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_dpwssd_epi32(__m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpdpwssd256((__v8si)__S, (__v8si)__A,
|
||||
(__v8si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_dpwssd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpwssd_epi32(__S, __A, __B),
|
||||
(__v8si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_dpwssd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpwssd_epi32(__S, __A, __B),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_vpdpwssds256((__v8si)__S, (__v8si)__A,
|
||||
(__v8si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_dpwssds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpwssds_epi32(__S, __A, __B),
|
||||
(__v8si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_dpwssds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256(__U,
|
||||
(__v8si)_mm256_dpwssds_epi32(__S, __A, __B),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpdpbusd128((__v4si)__S, (__v4si)__A,
|
||||
(__v4si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_dpbusd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpbusd_epi32(__S, __A, __B),
|
||||
(__v4si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_dpbusd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpbusd_epi32(__S, __A, __B),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpdpbusds128((__v4si)__S, (__v4si)__A,
|
||||
(__v4si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_dpbusds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpbusds_epi32(__S, __A, __B),
|
||||
(__v4si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_dpbusds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpbusds_epi32(__S, __A, __B),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpdpwssd128((__v4si)__S, (__v4si)__A,
|
||||
(__v4si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_dpwssd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpwssd_epi32(__S, __A, __B),
|
||||
(__v4si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_dpwssd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpwssd_epi32(__S, __A, __B),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_vpdpwssds128((__v4si)__S, (__v4si)__A,
|
||||
(__v4si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_dpwssds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpwssds_epi32(__S, __A, __B),
|
||||
(__v4si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_dpwssds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128(__U,
|
||||
(__v4si)_mm_dpwssds_epi32(__S, __A, __B),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,129 @@
|
||||
/*===------------- avx512vnniintrin.h - VNNI intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vnniintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VNNIINTRIN_H
|
||||
#define __AVX512VNNIINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vnni"), __min_vector_width__(512)))
|
||||
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_dpbusd_epi32(__m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpdpbusd512((__v16si)__S, (__v16si)__A,
|
||||
(__v16si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_dpbusd_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpbusd_epi32(__S, __A, __B),
|
||||
(__v16si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_dpbusd_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpbusd_epi32(__S, __A, __B),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_dpbusds_epi32(__m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpdpbusds512((__v16si)__S, (__v16si)__A,
|
||||
(__v16si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_dpbusds_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpbusds_epi32(__S, __A, __B),
|
||||
(__v16si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_dpbusds_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpbusds_epi32(__S, __A, __B),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_dpwssd_epi32(__m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpdpwssd512((__v16si)__S, (__v16si)__A,
|
||||
(__v16si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_dpwssd_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpwssd_epi32(__S, __A, __B),
|
||||
(__v16si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_dpwssd_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpwssd_epi32(__S, __A, __B),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_dpwssds_epi32(__m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpdpwssds512((__v16si)__S, (__v16si)__A,
|
||||
(__v16si)__B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_dpwssds_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpwssds_epi32(__S, __A, __B),
|
||||
(__v16si)__S);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_dpwssds_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512(__U,
|
||||
(__v16si)_mm512_dpwssds_epi32(__S, __A, __B),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
/*===----- avx512vpopcntdqintrin.h - AVX512VPOPCNTDQ intrinsics-------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error \
|
||||
"Never use <avx512vpopcntdqintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VPOPCNTDQINTRIN_H
|
||||
#define __AVX512VPOPCNTDQINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntdq"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi64(__m512i __A) {
|
||||
return (__m512i)__builtin_ia32_vpopcntq_512((__v8di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi64(__m512i __W, __mmask8 __U, __m512i __A) {
|
||||
return (__m512i)__builtin_ia32_selectq_512(
|
||||
(__mmask8)__U, (__v8di)_mm512_popcnt_epi64(__A), (__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi64(__mmask8 __U, __m512i __A) {
|
||||
return _mm512_mask_popcnt_epi64((__m512i)_mm512_setzero_si512(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi32(__m512i __A) {
|
||||
return (__m512i)__builtin_ia32_vpopcntd_512((__v16si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi32(__m512i __W, __mmask16 __U, __m512i __A) {
|
||||
return (__m512i)__builtin_ia32_selectd_512(
|
||||
(__mmask16)__U, (__v16si)_mm512_popcnt_epi32(__A), (__v16si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi32(__mmask16 __U, __m512i __A) {
|
||||
return _mm512_mask_popcnt_epi32((__m512i)_mm512_setzero_si512(), __U, __A);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,105 @@
|
||||
/*===---- avx512vpopcntdqintrin.h - AVX512VPOPCNTDQ intrinsics -------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error \
|
||||
"Never use <avx512vpopcntdqvlintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VPOPCNTDQVLINTRIN_H
|
||||
#define __AVX512VPOPCNTDQVLINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntdq,avx512vl"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntdq,avx512vl"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_popcnt_epi64(__m128i __A) {
|
||||
return (__m128i)__builtin_ia32_vpopcntq_128((__v2di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_popcnt_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||
return (__m128i)__builtin_ia32_selectq_128(
|
||||
(__mmask8)__U, (__v2di)_mm_popcnt_epi64(__A), (__v2di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_popcnt_epi64(__mmask8 __U, __m128i __A) {
|
||||
return _mm_mask_popcnt_epi64((__m128i)_mm_setzero_si128(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_popcnt_epi32(__m128i __A) {
|
||||
return (__m128i)__builtin_ia32_vpopcntd_128((__v4si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_popcnt_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||
return (__m128i)__builtin_ia32_selectd_128(
|
||||
(__mmask8)__U, (__v4si)_mm_popcnt_epi32(__A), (__v4si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_popcnt_epi32(__mmask8 __U, __m128i __A) {
|
||||
return _mm_mask_popcnt_epi32((__m128i)_mm_setzero_si128(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_popcnt_epi64(__m256i __A) {
|
||||
return (__m256i)__builtin_ia32_vpopcntq_256((__v4di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_popcnt_epi64(__m256i __W, __mmask8 __U, __m256i __A) {
|
||||
return (__m256i)__builtin_ia32_selectq_256(
|
||||
(__mmask8)__U, (__v4di)_mm256_popcnt_epi64(__A), (__v4di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_popcnt_epi64(__mmask8 __U, __m256i __A) {
|
||||
return _mm256_mask_popcnt_epi64((__m256i)_mm256_setzero_si256(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_popcnt_epi32(__m256i __A) {
|
||||
return (__m256i)__builtin_ia32_vpopcntd_256((__v8si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_popcnt_epi32(__m256i __W, __mmask8 __U, __m256i __A) {
|
||||
return (__m256i)__builtin_ia32_selectd_256(
|
||||
(__mmask8)__U, (__v8si)_mm256_popcnt_epi32(__A), (__v8si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_popcnt_epi32(__mmask8 __U, __m256i __A) {
|
||||
return _mm256_mask_popcnt_epi32((__m256i)_mm256_setzero_si256(), __U, __A);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,95 @@
|
||||
/*===---- bmi2intrin.h - BMI2 intrinsics -----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <bmi2intrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __BMI2INTRIN_H
|
||||
#define __BMI2INTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2")))
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_bzhi_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_bzhi_si(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_pdep_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_pdep_si(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_pext_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_pext_si(__X, __Y);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_bzhi_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_bzhi_di(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_pdep_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_pdep_di(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_pext_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_pext_di(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_mulx_u64 (unsigned long long __X, unsigned long long __Y,
|
||||
unsigned long long *__P)
|
||||
{
|
||||
unsigned __int128 __res = (unsigned __int128) __X * __Y;
|
||||
*__P = (unsigned long long) (__res >> 64);
|
||||
return (unsigned long long) __res;
|
||||
}
|
||||
|
||||
#else /* !__x86_64__ */
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P)
|
||||
{
|
||||
unsigned long long __res = (unsigned long long) __X * __Y;
|
||||
*__P = (unsigned int) (__res >> 32);
|
||||
return (unsigned int) __res;
|
||||
}
|
||||
|
||||
#endif /* !__x86_64__ */
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __BMI2INTRIN_H */
|
||||
@@ -0,0 +1,386 @@
|
||||
/*===---- bmiintrin.h - BMI intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <bmiintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __BMIINTRIN_H
|
||||
#define __BMIINTRIN_H
|
||||
|
||||
#define _tzcnt_u16(a) (__tzcnt_u16((a)))
|
||||
|
||||
#define _andn_u32(a, b) (__andn_u32((a), (b)))
|
||||
|
||||
/* _bextr_u32 != __bextr_u32 */
|
||||
#define _blsi_u32(a) (__blsi_u32((a)))
|
||||
|
||||
#define _blsmsk_u32(a) (__blsmsk_u32((a)))
|
||||
|
||||
#define _blsr_u32(a) (__blsr_u32((a)))
|
||||
|
||||
#define _tzcnt_u32(a) (__tzcnt_u32((a)))
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi")))
|
||||
|
||||
/* Allow using the tzcnt intrinsics even for non-BMI targets. Since the TZCNT
|
||||
instruction behaves as BSF on non-BMI targets, there is code that expects
|
||||
to use it as a potentially faster version of BSF. */
|
||||
#define __RELAXED_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
/// Counts the number of trailing zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 16-bit integer whose trailing zeros are to be counted.
|
||||
/// \returns An unsigned 16-bit integer containing the number of trailing zero
|
||||
/// bits in the operand.
|
||||
static __inline__ unsigned short __RELAXED_FN_ATTRS
|
||||
__tzcnt_u16(unsigned short __X)
|
||||
{
|
||||
return __builtin_ia32_tzcnt_u16(__X);
|
||||
}
|
||||
|
||||
/// Performs a bitwise AND of the second operand with the one's
|
||||
/// complement of the first operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> ANDN </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned integer containing one of the operands.
|
||||
/// \param __Y
|
||||
/// An unsigned integer containing one of the operands.
|
||||
/// \returns An unsigned integer containing the bitwise AND of the second
|
||||
/// operand with the one's complement of the first operand.
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__andn_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return ~__X & __Y;
|
||||
}
|
||||
|
||||
/* AMD-specified, double-leading-underscore version of BEXTR */
|
||||
/// Extracts the specified bits from the first operand and returns them
|
||||
/// in the least significant bits of the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BEXTR </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned integer whose bits are to be extracted.
|
||||
/// \param __Y
|
||||
/// An unsigned integer used to specify which bits are extracted. Bits [7:0]
|
||||
/// specify the index of the least significant bit. Bits [15:8] specify the
|
||||
/// number of bits to be extracted.
|
||||
/// \returns An unsigned integer whose least significant bits contain the
|
||||
/// extracted bits.
|
||||
/// \see _bextr_u32
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__bextr_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_bextr_u32(__X, __Y);
|
||||
}
|
||||
|
||||
/* Intel-specified, single-leading-underscore version of BEXTR */
|
||||
/// Extracts the specified bits from the first operand and returns them
|
||||
/// in the least significant bits of the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BEXTR </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned integer whose bits are to be extracted.
|
||||
/// \param __Y
|
||||
/// An unsigned integer used to specify the index of the least significant
|
||||
/// bit for the bits to be extracted. Bits [7:0] specify the index.
|
||||
/// \param __Z
|
||||
/// An unsigned integer used to specify the number of bits to be extracted.
|
||||
/// Bits [7:0] specify the number of bits.
|
||||
/// \returns An unsigned integer whose least significant bits contain the
|
||||
/// extracted bits.
|
||||
/// \see __bextr_u32
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z)
|
||||
{
|
||||
return __builtin_ia32_bextr_u32 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
|
||||
}
|
||||
|
||||
/// Clears all bits in the source except for the least significant bit
|
||||
/// containing a value of 1 and returns the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BLSI </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned integer whose bits are to be cleared.
|
||||
/// \returns An unsigned integer containing the result of clearing the bits from
|
||||
/// the source operand.
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blsi_u32(unsigned int __X)
|
||||
{
|
||||
return __X & -__X;
|
||||
}
|
||||
|
||||
/// Creates a mask whose bits are set to 1, using bit 0 up to and
|
||||
/// including the least significant bit that is set to 1 in the source
|
||||
/// operand and returns the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned integer used to create the mask.
|
||||
/// \returns An unsigned integer containing the newly created mask.
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blsmsk_u32(unsigned int __X)
|
||||
{
|
||||
return __X ^ (__X - 1);
|
||||
}
|
||||
|
||||
/// Clears the least significant bit that is set to 1 in the source
|
||||
/// operand and returns the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BLSR </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned integer containing the operand to be cleared.
|
||||
/// \returns An unsigned integer containing the result of clearing the source
|
||||
/// operand.
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blsr_u32(unsigned int __X)
|
||||
{
|
||||
return __X & (__X - 1);
|
||||
}
|
||||
|
||||
/// Counts the number of trailing zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 32-bit integer whose trailing zeros are to be counted.
|
||||
/// \returns An unsigned 32-bit integer containing the number of trailing zero
|
||||
/// bits in the operand.
|
||||
static __inline__ unsigned int __RELAXED_FN_ATTRS
|
||||
__tzcnt_u32(unsigned int __X)
|
||||
{
|
||||
return __builtin_ia32_tzcnt_u32(__X);
|
||||
}
|
||||
|
||||
/// Counts the number of trailing zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 32-bit integer whose trailing zeros are to be counted.
|
||||
/// \returns An 32-bit integer containing the number of trailing zero bits in
|
||||
/// the operand.
|
||||
static __inline__ int __RELAXED_FN_ATTRS
|
||||
_mm_tzcnt_32(unsigned int __X)
|
||||
{
|
||||
return __builtin_ia32_tzcnt_u32(__X);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#define _andn_u64(a, b) (__andn_u64((a), (b)))
|
||||
|
||||
/* _bextr_u64 != __bextr_u64 */
|
||||
#define _blsi_u64(a) (__blsi_u64((a)))
|
||||
|
||||
#define _blsmsk_u64(a) (__blsmsk_u64((a)))
|
||||
|
||||
#define _blsr_u64(a) (__blsr_u64((a)))
|
||||
|
||||
#define _tzcnt_u64(a) (__tzcnt_u64((a)))
|
||||
|
||||
/// Performs a bitwise AND of the second operand with the one's
|
||||
/// complement of the first operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> ANDN </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer containing one of the operands.
|
||||
/// \param __Y
|
||||
/// An unsigned 64-bit integer containing one of the operands.
|
||||
/// \returns An unsigned 64-bit integer containing the bitwise AND of the second
|
||||
/// operand with the one's complement of the first operand.
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__andn_u64 (unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return ~__X & __Y;
|
||||
}
|
||||
|
||||
/* AMD-specified, double-leading-underscore version of BEXTR */
|
||||
/// Extracts the specified bits from the first operand and returns them
|
||||
/// in the least significant bits of the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BEXTR </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose bits are to be extracted.
|
||||
/// \param __Y
|
||||
/// An unsigned 64-bit integer used to specify which bits are extracted. Bits
|
||||
/// [7:0] specify the index of the least significant bit. Bits [15:8] specify
|
||||
/// the number of bits to be extracted.
|
||||
/// \returns An unsigned 64-bit integer whose least significant bits contain the
|
||||
/// extracted bits.
|
||||
/// \see _bextr_u64
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__bextr_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_bextr_u64(__X, __Y);
|
||||
}
|
||||
|
||||
/* Intel-specified, single-leading-underscore version of BEXTR */
|
||||
/// Extracts the specified bits from the first operand and returns them
|
||||
/// in the least significant bits of the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BEXTR </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose bits are to be extracted.
|
||||
/// \param __Y
|
||||
/// An unsigned integer used to specify the index of the least significant
|
||||
/// bit for the bits to be extracted. Bits [7:0] specify the index.
|
||||
/// \param __Z
|
||||
/// An unsigned integer used to specify the number of bits to be extracted.
|
||||
/// Bits [7:0] specify the number of bits.
|
||||
/// \returns An unsigned 64-bit integer whose least significant bits contain the
|
||||
/// extracted bits.
|
||||
/// \see __bextr_u64
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_bextr_u64(unsigned long long __X, unsigned int __Y, unsigned int __Z)
|
||||
{
|
||||
return __builtin_ia32_bextr_u64 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8)));
|
||||
}
|
||||
|
||||
/// Clears all bits in the source except for the least significant bit
|
||||
/// containing a value of 1 and returns the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BLSI </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose bits are to be cleared.
|
||||
/// \returns An unsigned 64-bit integer containing the result of clearing the
|
||||
/// bits from the source operand.
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blsi_u64(unsigned long long __X)
|
||||
{
|
||||
return __X & -__X;
|
||||
}
|
||||
|
||||
/// Creates a mask whose bits are set to 1, using bit 0 up to and
|
||||
/// including the least significant bit that is set to 1 in the source
|
||||
/// operand and returns the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer used to create the mask.
|
||||
/// \returns An unsigned 64-bit integer containing the newly created mask.
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blsmsk_u64(unsigned long long __X)
|
||||
{
|
||||
return __X ^ (__X - 1);
|
||||
}
|
||||
|
||||
/// Clears the least significant bit that is set to 1 in the source
|
||||
/// operand and returns the result.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> BLSR </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer containing the operand to be cleared.
|
||||
/// \returns An unsigned 64-bit integer containing the result of clearing the
|
||||
/// source operand.
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blsr_u64(unsigned long long __X)
|
||||
{
|
||||
return __X & (__X - 1);
|
||||
}
|
||||
|
||||
/// Counts the number of trailing zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose trailing zeros are to be counted.
|
||||
/// \returns An unsigned 64-bit integer containing the number of trailing zero
|
||||
/// bits in the operand.
|
||||
static __inline__ unsigned long long __RELAXED_FN_ATTRS
|
||||
__tzcnt_u64(unsigned long long __X)
|
||||
{
|
||||
return __builtin_ia32_tzcnt_u64(__X);
|
||||
}
|
||||
|
||||
/// Counts the number of trailing zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose trailing zeros are to be counted.
|
||||
/// \returns An 64-bit integer containing the number of trailing zero bits in
|
||||
/// the operand.
|
||||
static __inline__ long long __RELAXED_FN_ATTRS
|
||||
_mm_tzcnt_64(unsigned long long __X)
|
||||
{
|
||||
return __builtin_ia32_tzcnt_u64(__X);
|
||||
}
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
#undef __RELAXED_FN_ATTRS
|
||||
|
||||
#endif /* __BMIINTRIN_H */
|
||||
@@ -0,0 +1,113 @@
|
||||
/*===---- cetintrin.h - CET intrinsic --------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <cetintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CETINTRIN_H
|
||||
#define __CETINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("shstk")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _incsspd(int __a) {
|
||||
__builtin_ia32_incsspd(__a);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _incsspq(unsigned long long __a) {
|
||||
__builtin_ia32_incsspq(__a);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
|
||||
__builtin_ia32_incsspq(__a);
|
||||
}
|
||||
#else /* __x86_64__ */
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
|
||||
__builtin_ia32_incsspd((int)__a);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd(unsigned int __a) {
|
||||
return __builtin_ia32_rdsspd(__a);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq(unsigned long long __a) {
|
||||
return __builtin_ia32_rdsspq(__a);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS _get_ssp(void) {
|
||||
return __builtin_ia32_rdsspq(0);
|
||||
}
|
||||
#else /* __x86_64__ */
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS _get_ssp(void) {
|
||||
return __builtin_ia32_rdsspd(0);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _saveprevssp() {
|
||||
__builtin_ia32_saveprevssp();
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _rstorssp(void * __p) {
|
||||
__builtin_ia32_rstorssp(__p);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrssd(unsigned int __a, void * __p) {
|
||||
__builtin_ia32_wrssd(__a, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrssq(unsigned long long __a, void * __p) {
|
||||
__builtin_ia32_wrssq(__a, __p);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrussd(unsigned int __a, void * __p) {
|
||||
__builtin_ia32_wrussd(__a, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrussq(unsigned long long __a, void * __p) {
|
||||
__builtin_ia32_wrussq(__a, __p);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _setssbsy() {
|
||||
__builtin_ia32_setssbsy();
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _clrssbsy(void * __p) {
|
||||
__builtin_ia32_clrssbsy(__p);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __CETINTRIN_H */
|
||||
@@ -0,0 +1,42 @@
|
||||
/*===---- cldemoteintrin.h - CLDEMOTE intrinsic ----------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <cldemoteintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLDEMOTEINTRIN_H
|
||||
#define __CLDEMOTEINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("cldemote")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_cldemote(const void * __P) {
|
||||
__builtin_ia32_cldemote(__P);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/*===---- clflushoptintrin.h - CLFLUSHOPT intrinsic ------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLFLUSHOPTINTRIN_H
|
||||
#define __CLFLUSHOPTINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clflushopt")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_clflushopt(void const * __m) {
|
||||
__builtin_ia32_clflushopt(__m);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
/*===---- clwbintrin.h - CLWB intrinsic ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLWBINTRIN_H
|
||||
#define __CLWBINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clwb")))
|
||||
|
||||
/// Writes back to memory the cache line (if modified) that contains the
|
||||
/// linear address specified in \a __p from any level of the cache hierarchy in
|
||||
/// the cache coherence domain
|
||||
///
|
||||
/// \headerfile <immintrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> CLWB </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to the memory location used to identify the cache line to be
|
||||
/// written back.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_clwb(void const *__p) {
|
||||
__builtin_ia32_clwb(__p);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,50 @@
|
||||
/*===----------------------- clzerointrin.h - CLZERO ----------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <clzerointrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLZEROINTRIN_H
|
||||
#define __CLZEROINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("clzero")))
|
||||
|
||||
/// Loads the cache line address and zero's out the cacheline
|
||||
///
|
||||
/// \headerfile <clzerointrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> CLZERO </c> instruction.
|
||||
///
|
||||
/// \param __line
|
||||
/// A pointer to a cacheline which needs to be zeroed out.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_clzero (void * __line)
|
||||
{
|
||||
__builtin_ia32_clzero ((void *)__line);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __CLZEROINTRIN_H */
|
||||
@@ -0,0 +1,312 @@
|
||||
/*===---- cpuid.h - X86 cpu model detection --------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !(__x86_64__ || __i386__)
|
||||
#error this header is for x86 only
|
||||
#endif
|
||||
|
||||
/* Responses identification request with %eax 0 */
|
||||
/* AMD: "AuthenticAMD" */
|
||||
#define signature_AMD_ebx 0x68747541
|
||||
#define signature_AMD_edx 0x69746e65
|
||||
#define signature_AMD_ecx 0x444d4163
|
||||
/* CENTAUR: "CentaurHauls" */
|
||||
#define signature_CENTAUR_ebx 0x746e6543
|
||||
#define signature_CENTAUR_edx 0x48727561
|
||||
#define signature_CENTAUR_ecx 0x736c7561
|
||||
/* CYRIX: "CyrixInstead" */
|
||||
#define signature_CYRIX_ebx 0x69727943
|
||||
#define signature_CYRIX_edx 0x736e4978
|
||||
#define signature_CYRIX_ecx 0x64616574
|
||||
/* INTEL: "GenuineIntel" */
|
||||
#define signature_INTEL_ebx 0x756e6547
|
||||
#define signature_INTEL_edx 0x49656e69
|
||||
#define signature_INTEL_ecx 0x6c65746e
|
||||
/* TM1: "TransmetaCPU" */
|
||||
#define signature_TM1_ebx 0x6e617254
|
||||
#define signature_TM1_edx 0x74656d73
|
||||
#define signature_TM1_ecx 0x55504361
|
||||
/* TM2: "GenuineTMx86" */
|
||||
#define signature_TM2_ebx 0x756e6547
|
||||
#define signature_TM2_edx 0x54656e69
|
||||
#define signature_TM2_ecx 0x3638784d
|
||||
/* NSC: "Geode by NSC" */
|
||||
#define signature_NSC_ebx 0x646f6547
|
||||
#define signature_NSC_edx 0x43534e20
|
||||
#define signature_NSC_ecx 0x79622065
|
||||
/* NEXGEN: "NexGenDriven" */
|
||||
#define signature_NEXGEN_ebx 0x4778654e
|
||||
#define signature_NEXGEN_edx 0x72446e65
|
||||
#define signature_NEXGEN_ecx 0x6e657669
|
||||
/* RISE: "RiseRiseRise" */
|
||||
#define signature_RISE_ebx 0x65736952
|
||||
#define signature_RISE_edx 0x65736952
|
||||
#define signature_RISE_ecx 0x65736952
|
||||
/* SIS: "SiS SiS SiS " */
|
||||
#define signature_SIS_ebx 0x20536953
|
||||
#define signature_SIS_edx 0x20536953
|
||||
#define signature_SIS_ecx 0x20536953
|
||||
/* UMC: "UMC UMC UMC " */
|
||||
#define signature_UMC_ebx 0x20434d55
|
||||
#define signature_UMC_edx 0x20434d55
|
||||
#define signature_UMC_ecx 0x20434d55
|
||||
/* VIA: "VIA VIA VIA " */
|
||||
#define signature_VIA_ebx 0x20414956
|
||||
#define signature_VIA_edx 0x20414956
|
||||
#define signature_VIA_ecx 0x20414956
|
||||
/* VORTEX: "Vortex86 SoC" */
|
||||
#define signature_VORTEX_ebx 0x74726f56
|
||||
#define signature_VORTEX_edx 0x36387865
|
||||
#define signature_VORTEX_ecx 0x436f5320
|
||||
|
||||
/* Features in %ecx for leaf 1 */
|
||||
#define bit_SSE3 0x00000001
|
||||
#define bit_PCLMULQDQ 0x00000002
|
||||
#define bit_PCLMUL bit_PCLMULQDQ /* for gcc compat */
|
||||
#define bit_DTES64 0x00000004
|
||||
#define bit_MONITOR 0x00000008
|
||||
#define bit_DSCPL 0x00000010
|
||||
#define bit_VMX 0x00000020
|
||||
#define bit_SMX 0x00000040
|
||||
#define bit_EIST 0x00000080
|
||||
#define bit_TM2 0x00000100
|
||||
#define bit_SSSE3 0x00000200
|
||||
#define bit_CNXTID 0x00000400
|
||||
#define bit_FMA 0x00001000
|
||||
#define bit_CMPXCHG16B 0x00002000
|
||||
#define bit_xTPR 0x00004000
|
||||
#define bit_PDCM 0x00008000
|
||||
#define bit_PCID 0x00020000
|
||||
#define bit_DCA 0x00040000
|
||||
#define bit_SSE41 0x00080000
|
||||
#define bit_SSE4_1 bit_SSE41 /* for gcc compat */
|
||||
#define bit_SSE42 0x00100000
|
||||
#define bit_SSE4_2 bit_SSE42 /* for gcc compat */
|
||||
#define bit_x2APIC 0x00200000
|
||||
#define bit_MOVBE 0x00400000
|
||||
#define bit_POPCNT 0x00800000
|
||||
#define bit_TSCDeadline 0x01000000
|
||||
#define bit_AESNI 0x02000000
|
||||
#define bit_AES bit_AESNI /* for gcc compat */
|
||||
#define bit_XSAVE 0x04000000
|
||||
#define bit_OSXSAVE 0x08000000
|
||||
#define bit_AVX 0x10000000
|
||||
#define bit_F16C 0x20000000
|
||||
#define bit_RDRND 0x40000000
|
||||
|
||||
/* Features in %edx for leaf 1 */
|
||||
#define bit_FPU 0x00000001
|
||||
#define bit_VME 0x00000002
|
||||
#define bit_DE 0x00000004
|
||||
#define bit_PSE 0x00000008
|
||||
#define bit_TSC 0x00000010
|
||||
#define bit_MSR 0x00000020
|
||||
#define bit_PAE 0x00000040
|
||||
#define bit_MCE 0x00000080
|
||||
#define bit_CX8 0x00000100
|
||||
#define bit_CMPXCHG8B bit_CX8 /* for gcc compat */
|
||||
#define bit_APIC 0x00000200
|
||||
#define bit_SEP 0x00000800
|
||||
#define bit_MTRR 0x00001000
|
||||
#define bit_PGE 0x00002000
|
||||
#define bit_MCA 0x00004000
|
||||
#define bit_CMOV 0x00008000
|
||||
#define bit_PAT 0x00010000
|
||||
#define bit_PSE36 0x00020000
|
||||
#define bit_PSN 0x00040000
|
||||
#define bit_CLFSH 0x00080000
|
||||
#define bit_DS 0x00200000
|
||||
#define bit_ACPI 0x00400000
|
||||
#define bit_MMX 0x00800000
|
||||
#define bit_FXSR 0x01000000
|
||||
#define bit_FXSAVE bit_FXSR /* for gcc compat */
|
||||
#define bit_SSE 0x02000000
|
||||
#define bit_SSE2 0x04000000
|
||||
#define bit_SS 0x08000000
|
||||
#define bit_HTT 0x10000000
|
||||
#define bit_TM 0x20000000
|
||||
#define bit_PBE 0x80000000
|
||||
|
||||
/* Features in %ebx for leaf 7 sub-leaf 0 */
|
||||
#define bit_FSGSBASE 0x00000001
|
||||
#define bit_SGX 0x00000004
|
||||
#define bit_BMI 0x00000008
|
||||
#define bit_HLE 0x00000010
|
||||
#define bit_AVX2 0x00000020
|
||||
#define bit_SMEP 0x00000080
|
||||
#define bit_BMI2 0x00000100
|
||||
#define bit_ENH_MOVSB 0x00000200
|
||||
#define bit_INVPCID 0x00000400
|
||||
#define bit_RTM 0x00000800
|
||||
#define bit_MPX 0x00004000
|
||||
#define bit_AVX512F 0x00010000
|
||||
#define bit_AVX512DQ 0x00020000
|
||||
#define bit_RDSEED 0x00040000
|
||||
#define bit_ADX 0x00080000
|
||||
#define bit_AVX512IFMA 0x00200000
|
||||
#define bit_CLFLUSHOPT 0x00800000
|
||||
#define bit_CLWB 0x01000000
|
||||
#define bit_AVX512PF 0x04000000
|
||||
#define bit_AVX512ER 0x08000000
|
||||
#define bit_AVX512CD 0x10000000
|
||||
#define bit_SHA 0x20000000
|
||||
#define bit_AVX512BW 0x40000000
|
||||
#define bit_AVX512VL 0x80000000
|
||||
|
||||
/* Features in %ecx for leaf 7 sub-leaf 0 */
|
||||
#define bit_PREFTCHWT1 0x00000001
|
||||
#define bit_AVX512VBMI 0x00000002
|
||||
#define bit_PKU 0x00000004
|
||||
#define bit_OSPKE 0x00000010
|
||||
#define bit_WAITPKG 0x00000020
|
||||
#define bit_AVX512VBMI2 0x00000040
|
||||
#define bit_SHSTK 0x00000080
|
||||
#define bit_GFNI 0x00000100
|
||||
#define bit_VAES 0x00000200
|
||||
#define bit_VPCLMULQDQ 0x00000400
|
||||
#define bit_AVX512VNNI 0x00000800
|
||||
#define bit_AVX512BITALG 0x00001000
|
||||
#define bit_AVX512VPOPCNTDQ 0x00004000
|
||||
#define bit_RDPID 0x00400000
|
||||
#define bit_CLDEMOTE 0x02000000
|
||||
#define bit_MOVDIRI 0x08000000
|
||||
#define bit_MOVDIR64B 0x10000000
|
||||
|
||||
/* Features in %edx for leaf 7 sub-leaf 0 */
|
||||
#define bit_AVX5124VNNIW 0x00000004
|
||||
#define bit_AVX5124FMAPS 0x00000008
|
||||
#define bit_PCONFIG 0x00040000
|
||||
#define bit_IBT 0x00100000
|
||||
|
||||
/* Features in %eax for leaf 13 sub-leaf 1 */
|
||||
#define bit_XSAVEOPT 0x00000001
|
||||
#define bit_XSAVEC 0x00000002
|
||||
#define bit_XSAVES 0x00000008
|
||||
|
||||
/* Features in %eax for leaf 0x14 sub-leaf 0 */
|
||||
#define bit_PTWRITE 0x00000010
|
||||
|
||||
/* Features in %ecx for leaf 0x80000001 */
|
||||
#define bit_LAHF_LM 0x00000001
|
||||
#define bit_ABM 0x00000020
|
||||
#define bit_LZCNT bit_ABM /* for gcc compat */
|
||||
#define bit_SSE4a 0x00000040
|
||||
#define bit_PRFCHW 0x00000100
|
||||
#define bit_XOP 0x00000800
|
||||
#define bit_LWP 0x00008000
|
||||
#define bit_FMA4 0x00010000
|
||||
#define bit_TBM 0x00200000
|
||||
#define bit_MWAITX 0x20000000
|
||||
|
||||
/* Features in %edx for leaf 0x80000001 */
|
||||
#define bit_MMXEXT 0x00400000
|
||||
#define bit_LM 0x20000000
|
||||
#define bit_3DNOWP 0x40000000
|
||||
#define bit_3DNOW 0x80000000
|
||||
|
||||
/* Features in %ebx for leaf 0x80000008 */
|
||||
#define bit_CLZERO 0x00000001
|
||||
#define bit_WBNOINVD 0x00000200
|
||||
|
||||
|
||||
#if __i386__
|
||||
#define __cpuid(__leaf, __eax, __ebx, __ecx, __edx) \
|
||||
__asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \
|
||||
: "0"(__leaf))
|
||||
|
||||
#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
|
||||
__asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \
|
||||
: "0"(__leaf), "2"(__count))
|
||||
#else
|
||||
/* x86-64 uses %rbx as the base register, so preserve it. */
|
||||
#define __cpuid(__leaf, __eax, __ebx, __ecx, __edx) \
|
||||
__asm(" xchgq %%rbx,%q1\n" \
|
||||
" cpuid\n" \
|
||||
" xchgq %%rbx,%q1" \
|
||||
: "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
|
||||
: "0"(__leaf))
|
||||
|
||||
#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
|
||||
__asm(" xchgq %%rbx,%q1\n" \
|
||||
" cpuid\n" \
|
||||
" xchgq %%rbx,%q1" \
|
||||
: "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
|
||||
: "0"(__leaf), "2"(__count))
|
||||
#endif
|
||||
|
||||
static __inline int __get_cpuid_max (unsigned int __leaf, unsigned int *__sig)
|
||||
{
|
||||
unsigned int __eax, __ebx, __ecx, __edx;
|
||||
#if __i386__
|
||||
int __cpuid_supported;
|
||||
|
||||
__asm(" pushfl\n"
|
||||
" popl %%eax\n"
|
||||
" movl %%eax,%%ecx\n"
|
||||
" xorl $0x00200000,%%eax\n"
|
||||
" pushl %%eax\n"
|
||||
" popfl\n"
|
||||
" pushfl\n"
|
||||
" popl %%eax\n"
|
||||
" movl $0,%0\n"
|
||||
" cmpl %%eax,%%ecx\n"
|
||||
" je 1f\n"
|
||||
" movl $1,%0\n"
|
||||
"1:"
|
||||
: "=r" (__cpuid_supported) : : "eax", "ecx");
|
||||
if (!__cpuid_supported)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
__cpuid(__leaf, __eax, __ebx, __ecx, __edx);
|
||||
if (__sig)
|
||||
*__sig = __ebx;
|
||||
return __eax;
|
||||
}
|
||||
|
||||
static __inline int __get_cpuid (unsigned int __leaf, unsigned int *__eax,
|
||||
unsigned int *__ebx, unsigned int *__ecx,
|
||||
unsigned int *__edx)
|
||||
{
|
||||
unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0);
|
||||
|
||||
if (__max_leaf == 0 || __max_leaf < __leaf)
|
||||
return 0;
|
||||
|
||||
__cpuid(__leaf, *__eax, *__ebx, *__ecx, *__edx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static __inline int __get_cpuid_count (unsigned int __leaf,
|
||||
unsigned int __subleaf,
|
||||
unsigned int *__eax, unsigned int *__ebx,
|
||||
unsigned int *__ecx, unsigned int *__edx)
|
||||
{
|
||||
unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0);
|
||||
|
||||
if (__max_leaf == 0 || __max_leaf < __leaf)
|
||||
return 0;
|
||||
|
||||
__cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
/*===---- complex - CUDA wrapper for <algorithm> ----------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_WRAPPERS_ALGORITHM
|
||||
#define __CLANG_CUDA_WRAPPERS_ALGORITHM
|
||||
|
||||
// This header defines __device__ overloads of std::min/max.
|
||||
//
|
||||
// Ideally we'd declare these functions only if we're <= C++11. In C++14,
|
||||
// these functions are constexpr, and so are implicitly __host__ __device__.
|
||||
//
|
||||
// However, the compiler being in C++14 mode does not imply that the standard
|
||||
// library supports C++14. There is no macro we can test to check that the
|
||||
// stdlib has constexpr std::min/max. Thus we have to unconditionally define
|
||||
// our device overloads.
|
||||
//
|
||||
// A host+device function cannot be overloaded, and a constexpr function
|
||||
// implicitly become host device if there's no explicitly host or device
|
||||
// overload preceding it. So the simple thing to do would be to declare our
|
||||
// device min/max overloads, and then #include_next <algorithm>. This way our
|
||||
// device overloads would come first, and so if we have a C++14 stdlib, its
|
||||
// min/max won't become host+device and conflict with our device overloads.
|
||||
//
|
||||
// But that also doesn't work. libstdc++ is evil and declares std::min/max in
|
||||
// an internal header that is included *before* <algorithm>. Thus by the time
|
||||
// we're inside of this file, std::min/max may already have been declared, and
|
||||
// thus we can't prevent them from becoming host+device if they're constexpr.
|
||||
//
|
||||
// Therefore we perpetrate the following hack: We mark our __device__ overloads
|
||||
// with __attribute__((enable_if(true, ""))). This causes the signature of the
|
||||
// function to change without changing anything else about it. (Except that
|
||||
// overload resolution will prefer it over the __host__ __device__ version
|
||||
// rather than considering them equally good).
|
||||
|
||||
#include_next <algorithm>
|
||||
|
||||
// We need to define these overloads in exactly the namespace our standard
|
||||
// library uses (including the right inline namespace), otherwise they won't be
|
||||
// picked up by other functions in the standard library (e.g. functions in
|
||||
// <complex>). Thus the ugliness below.
|
||||
#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#else
|
||||
namespace std {
|
||||
#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#pragma push_macro("_CPP14_CONSTEXPR")
|
||||
#if __cplusplus >= 201402L
|
||||
#define _CPP14_CONSTEXPR constexpr
|
||||
#else
|
||||
#define _CPP14_CONSTEXPR
|
||||
#endif
|
||||
|
||||
template <class __T, class __Cmp>
|
||||
__attribute__((enable_if(true, "")))
|
||||
inline _CPP14_CONSTEXPR __host__ __device__ const __T &
|
||||
max(const __T &__a, const __T &__b, __Cmp __cmp) {
|
||||
return __cmp(__a, __b) ? __b : __a;
|
||||
}
|
||||
|
||||
template <class __T>
|
||||
__attribute__((enable_if(true, "")))
|
||||
inline _CPP14_CONSTEXPR __host__ __device__ const __T &
|
||||
max(const __T &__a, const __T &__b) {
|
||||
return __a < __b ? __b : __a;
|
||||
}
|
||||
|
||||
template <class __T, class __Cmp>
|
||||
__attribute__((enable_if(true, "")))
|
||||
inline _CPP14_CONSTEXPR __host__ __device__ const __T &
|
||||
min(const __T &__a, const __T &__b, __Cmp __cmp) {
|
||||
return __cmp(__b, __a) ? __b : __a;
|
||||
}
|
||||
|
||||
template <class __T>
|
||||
__attribute__((enable_if(true, "")))
|
||||
inline _CPP14_CONSTEXPR __host__ __device__ const __T &
|
||||
min(const __T &__a, const __T &__b) {
|
||||
return __a < __b ? __a : __b;
|
||||
}
|
||||
|
||||
#pragma pop_macro("_CPP14_CONSTEXPR")
|
||||
|
||||
#ifdef _LIBCPP_END_NAMESPACE_STD
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
#else
|
||||
#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
#endif
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#endif // __CLANG_CUDA_WRAPPERS_ALGORITHM
|
||||
@@ -0,0 +1,82 @@
|
||||
/*===---- complex - CUDA wrapper for <complex> ------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_WRAPPERS_COMPLEX
|
||||
#define __CLANG_CUDA_WRAPPERS_COMPLEX
|
||||
|
||||
// Wrapper around <complex> that forces its functions to be __host__
|
||||
// __device__.
|
||||
|
||||
// First, include host-only headers we think are likely to be included by
|
||||
// <complex>, so that the pragma below only applies to <complex> itself.
|
||||
#if __cplusplus >= 201103L
|
||||
#include <type_traits>
|
||||
#endif
|
||||
#include <stdexcept>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
// Next, include our <algorithm> wrapper, to ensure that device overloads of
|
||||
// std::min/max are available.
|
||||
#include <algorithm>
|
||||
|
||||
#pragma clang force_cuda_host_device begin
|
||||
|
||||
// When compiling for device, ask libstdc++ to use its own implements of
|
||||
// complex functions, rather than calling builtins (which resolve to library
|
||||
// functions that don't exist when compiling CUDA device code).
|
||||
//
|
||||
// This is a little dicey, because it causes libstdc++ to define a different
|
||||
// set of overloads on host and device.
|
||||
//
|
||||
// // Present only when compiling for host.
|
||||
// __host__ __device__ void complex<float> sin(const complex<float>& x) {
|
||||
// return __builtin_csinf(x);
|
||||
// }
|
||||
//
|
||||
// // Present when compiling for host and for device.
|
||||
// template <typename T>
|
||||
// void __host__ __device__ complex<T> sin(const complex<T>& x) {
|
||||
// return complex<T>(sin(x.real()) * cosh(x.imag()),
|
||||
// cos(x.real()), sinh(x.imag()));
|
||||
// }
|
||||
//
|
||||
// This is safe because when compiling for device, all function calls in
|
||||
// __host__ code to sin() will still resolve to *something*, even if they don't
|
||||
// resolve to the same function as they resolve to when compiling for host. We
|
||||
// don't care that they don't resolve to the right function because we won't
|
||||
// codegen this host code when compiling for device.
|
||||
|
||||
#pragma push_macro("_GLIBCXX_USE_C99_COMPLEX")
|
||||
#pragma push_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
|
||||
#define _GLIBCXX_USE_C99_COMPLEX 0
|
||||
#define _GLIBCXX_USE_C99_COMPLEX_TR1 0
|
||||
|
||||
#include_next <complex>
|
||||
|
||||
#pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
|
||||
#pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX")
|
||||
|
||||
#pragma clang force_cuda_host_device end
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,98 @@
|
||||
/*===---- complex - CUDA wrapper for <new> ------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_WRAPPERS_NEW
|
||||
#define __CLANG_CUDA_WRAPPERS_NEW
|
||||
|
||||
#include_next <new>
|
||||
|
||||
#pragma push_macro("CUDA_NOEXCEPT")
|
||||
#if __cplusplus >= 201103L
|
||||
#define CUDA_NOEXCEPT noexcept
|
||||
#else
|
||||
#define CUDA_NOEXCEPT
|
||||
#endif
|
||||
|
||||
// Device overrides for non-placement new and delete.
|
||||
__device__ inline void *operator new(__SIZE_TYPE__ size) {
|
||||
if (size == 0) {
|
||||
size = 1;
|
||||
}
|
||||
return ::malloc(size);
|
||||
}
|
||||
__device__ inline void *operator new(__SIZE_TYPE__ size,
|
||||
const std::nothrow_t &) CUDA_NOEXCEPT {
|
||||
return ::operator new(size);
|
||||
}
|
||||
|
||||
__device__ inline void *operator new[](__SIZE_TYPE__ size) {
|
||||
return ::operator new(size);
|
||||
}
|
||||
__device__ inline void *operator new[](__SIZE_TYPE__ size,
|
||||
const std::nothrow_t &) {
|
||||
return ::operator new(size);
|
||||
}
|
||||
|
||||
__device__ inline void operator delete(void* ptr) CUDA_NOEXCEPT {
|
||||
if (ptr) {
|
||||
::free(ptr);
|
||||
}
|
||||
}
|
||||
__device__ inline void operator delete(void *ptr,
|
||||
const std::nothrow_t &) CUDA_NOEXCEPT {
|
||||
::operator delete(ptr);
|
||||
}
|
||||
|
||||
__device__ inline void operator delete[](void* ptr) CUDA_NOEXCEPT {
|
||||
::operator delete(ptr);
|
||||
}
|
||||
__device__ inline void operator delete[](void *ptr,
|
||||
const std::nothrow_t &) CUDA_NOEXCEPT {
|
||||
::operator delete(ptr);
|
||||
}
|
||||
|
||||
// Sized delete, C++14 only.
|
||||
#if __cplusplus >= 201402L
|
||||
__device__ inline void operator delete(void *ptr,
|
||||
__SIZE_TYPE__ size) CUDA_NOEXCEPT {
|
||||
::operator delete(ptr);
|
||||
}
|
||||
__device__ inline void operator delete[](void *ptr,
|
||||
__SIZE_TYPE__ size) CUDA_NOEXCEPT {
|
||||
::operator delete(ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Device overrides for placement new and delete.
|
||||
__device__ inline void *operator new(__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
|
||||
return __ptr;
|
||||
}
|
||||
__device__ inline void *operator new[](__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
|
||||
return __ptr;
|
||||
}
|
||||
__device__ inline void operator delete(void *, void *) CUDA_NOEXCEPT {}
|
||||
__device__ inline void operator delete[](void *, void *) CUDA_NOEXCEPT {}
|
||||
|
||||
#pragma pop_macro("CUDA_NOEXCEPT")
|
||||
|
||||
#endif // include guard
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,176 @@
|
||||
/*===---- f16cintrin.h - F16C intrinsics -----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __IMMINTRIN_H
|
||||
#error "Never use <f16cintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __F16CINTRIN_H
|
||||
#define __F16CINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("f16c"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("f16c"), __min_vector_width__(256)))
|
||||
|
||||
/* NOTE: Intel documents the 128-bit versions of these as being in emmintrin.h,
|
||||
* but that's because icc can emulate these without f16c using a library call.
|
||||
* Since we don't do that let's leave these in f16cintrin.h.
|
||||
*/
|
||||
|
||||
/// Converts a 16-bit half-precision float value into a 32-bit float
|
||||
/// value.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VCVTPH2PS </c> instruction.
|
||||
///
|
||||
/// \param __a
|
||||
/// A 16-bit half-precision float value.
|
||||
/// \returns The converted 32-bit float value.
|
||||
static __inline float __DEFAULT_FN_ATTRS128
|
||||
_cvtsh_ss(unsigned short __a)
|
||||
{
|
||||
__v8hi v = {(short)__a, 0, 0, 0, 0, 0, 0, 0};
|
||||
__v4sf r = __builtin_ia32_vcvtph2ps(v);
|
||||
return r[0];
|
||||
}
|
||||
|
||||
/// Converts a 32-bit single-precision float value to a 16-bit
|
||||
/// half-precision float value.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// unsigned short _cvtss_sh(float a, const int imm);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VCVTPS2PH </c> instruction.
|
||||
///
|
||||
/// \param a
|
||||
/// A 32-bit single-precision float value to be converted to a 16-bit
|
||||
/// half-precision float value.
|
||||
/// \param imm
|
||||
/// An immediate value controlling rounding using bits [2:0]: \n
|
||||
/// 000: Nearest \n
|
||||
/// 001: Down \n
|
||||
/// 010: Up \n
|
||||
/// 011: Truncate \n
|
||||
/// 1XX: Use MXCSR.RC for rounding
|
||||
/// \returns The converted 16-bit half-precision float value.
|
||||
#define _cvtss_sh(a, imm) \
|
||||
(unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
|
||||
(imm)))[0])
|
||||
|
||||
/// Converts a 128-bit vector containing 32-bit float values into a
|
||||
/// 128-bit vector containing 16-bit half-precision float values.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm_cvtps_ph(__m128 a, const int imm);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VCVTPS2PH </c> instruction.
|
||||
///
|
||||
/// \param a
|
||||
/// A 128-bit vector containing 32-bit float values.
|
||||
/// \param imm
|
||||
/// An immediate value controlling rounding using bits [2:0]: \n
|
||||
/// 000: Nearest \n
|
||||
/// 001: Down \n
|
||||
/// 010: Up \n
|
||||
/// 011: Truncate \n
|
||||
/// 1XX: Use MXCSR.RC for rounding
|
||||
/// \returns A 128-bit vector containing converted 16-bit half-precision float
|
||||
/// values. The lower 64 bits are used to store the converted 16-bit
|
||||
/// half-precision floating-point values.
|
||||
#define _mm_cvtps_ph(a, imm) \
|
||||
(__m128i)__builtin_ia32_vcvtps2ph((__v4sf)(__m128)(a), (imm))
|
||||
|
||||
/// Converts a 128-bit vector containing 16-bit half-precision float
|
||||
/// values into a 128-bit vector containing 32-bit float values.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VCVTPH2PS </c> instruction.
|
||||
///
|
||||
/// \param __a
|
||||
/// A 128-bit vector containing 16-bit half-precision float values. The lower
|
||||
/// 64 bits are used in the conversion.
|
||||
/// \returns A 128-bit vector of [4 x float] containing converted float values.
|
||||
static __inline __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_cvtph_ps(__m128i __a)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vcvtph2ps((__v8hi)__a);
|
||||
}
|
||||
|
||||
/// Converts a 256-bit vector of [8 x float] into a 128-bit vector
|
||||
/// containing 16-bit half-precision float values.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm256_cvtps_ph(__m256 a, const int imm);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VCVTPS2PH </c> instruction.
|
||||
///
|
||||
/// \param a
|
||||
/// A 256-bit vector containing 32-bit single-precision float values to be
|
||||
/// converted to 16-bit half-precision float values.
|
||||
/// \param imm
|
||||
/// An immediate value controlling rounding using bits [2:0]: \n
|
||||
/// 000: Nearest \n
|
||||
/// 001: Down \n
|
||||
/// 010: Up \n
|
||||
/// 011: Truncate \n
|
||||
/// 1XX: Use MXCSR.RC for rounding
|
||||
/// \returns A 128-bit vector containing the converted 16-bit half-precision
|
||||
/// float values.
|
||||
#define _mm256_cvtps_ph(a, imm) \
|
||||
(__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)(__m256)(a), (imm))
|
||||
|
||||
/// Converts a 128-bit vector containing 16-bit half-precision float
|
||||
/// values into a 256-bit vector of [8 x float].
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VCVTPH2PS </c> instruction.
|
||||
///
|
||||
/// \param __a
|
||||
/// A 128-bit vector containing 16-bit half-precision float values to be
|
||||
/// converted to 32-bit single-precision float values.
|
||||
/// \returns A vector of [8 x float] containing the converted 32-bit
|
||||
/// single-precision float values.
|
||||
static __inline __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_cvtph_ps(__m128i __a)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vcvtph2ps256((__v8hi)__a);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif /* __F16CINTRIN_H */
|
||||
@@ -0,0 +1,166 @@
|
||||
/*===---- float.h - Characteristics of floating point types ----------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_FLOAT_H
|
||||
#define __CLANG_FLOAT_H
|
||||
|
||||
/* If we're on MinGW, fall back to the system's float.h, which might have
|
||||
* additional definitions provided for Windows.
|
||||
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
|
||||
*
|
||||
* Also fall back on Darwin to allow additional definitions and
|
||||
* implementation-defined values.
|
||||
*/
|
||||
#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \
|
||||
__STDC_HOSTED__ && __has_include_next(<float.h>)
|
||||
|
||||
/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
|
||||
* of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
|
||||
* extra indirection.
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
#define _FLOAT_H_
|
||||
#endif
|
||||
|
||||
# include_next <float.h>
|
||||
|
||||
/* Undefine anything that we'll be redefining below. */
|
||||
# undef FLT_EVAL_METHOD
|
||||
# undef FLT_ROUNDS
|
||||
# undef FLT_RADIX
|
||||
# undef FLT_MANT_DIG
|
||||
# undef DBL_MANT_DIG
|
||||
# undef LDBL_MANT_DIG
|
||||
# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
|
||||
# undef DECIMAL_DIG
|
||||
# endif
|
||||
# undef FLT_DIG
|
||||
# undef DBL_DIG
|
||||
# undef LDBL_DIG
|
||||
# undef FLT_MIN_EXP
|
||||
# undef DBL_MIN_EXP
|
||||
# undef LDBL_MIN_EXP
|
||||
# undef FLT_MIN_10_EXP
|
||||
# undef DBL_MIN_10_EXP
|
||||
# undef LDBL_MIN_10_EXP
|
||||
# undef FLT_MAX_EXP
|
||||
# undef DBL_MAX_EXP
|
||||
# undef LDBL_MAX_EXP
|
||||
# undef FLT_MAX_10_EXP
|
||||
# undef DBL_MAX_10_EXP
|
||||
# undef LDBL_MAX_10_EXP
|
||||
# undef FLT_MAX
|
||||
# undef DBL_MAX
|
||||
# undef LDBL_MAX
|
||||
# undef FLT_EPSILON
|
||||
# undef DBL_EPSILON
|
||||
# undef LDBL_EPSILON
|
||||
# undef FLT_MIN
|
||||
# undef DBL_MIN
|
||||
# undef LDBL_MIN
|
||||
# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||
# undef FLT_TRUE_MIN
|
||||
# undef DBL_TRUE_MIN
|
||||
# undef LDBL_TRUE_MIN
|
||||
# undef FLT_DECIMAL_DIG
|
||||
# undef DBL_DECIMAL_DIG
|
||||
# undef LDBL_DECIMAL_DIG
|
||||
# undef FLT_HAS_SUBNORM
|
||||
# undef DBL_HAS_SUBNORM
|
||||
# undef LDBL_HAS_SUBNORM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
||||
|
||||
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
||||
#define FLT_ROUNDS (__builtin_flt_rounds())
|
||||
#define FLT_RADIX __FLT_RADIX__
|
||||
|
||||
#define FLT_MANT_DIG __FLT_MANT_DIG__
|
||||
#define DBL_MANT_DIG __DBL_MANT_DIG__
|
||||
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
|
||||
# define DECIMAL_DIG __DECIMAL_DIG__
|
||||
#endif
|
||||
|
||||
#define FLT_DIG __FLT_DIG__
|
||||
#define DBL_DIG __DBL_DIG__
|
||||
#define LDBL_DIG __LDBL_DIG__
|
||||
|
||||
#define FLT_MIN_EXP __FLT_MIN_EXP__
|
||||
#define DBL_MIN_EXP __DBL_MIN_EXP__
|
||||
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
|
||||
|
||||
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
|
||||
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
|
||||
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
|
||||
|
||||
#define FLT_MAX_EXP __FLT_MAX_EXP__
|
||||
#define DBL_MAX_EXP __DBL_MAX_EXP__
|
||||
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
|
||||
|
||||
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
|
||||
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
|
||||
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
|
||||
|
||||
#define FLT_MAX __FLT_MAX__
|
||||
#define DBL_MAX __DBL_MAX__
|
||||
#define LDBL_MAX __LDBL_MAX__
|
||||
|
||||
#define FLT_EPSILON __FLT_EPSILON__
|
||||
#define DBL_EPSILON __DBL_EPSILON__
|
||||
#define LDBL_EPSILON __LDBL_EPSILON__
|
||||
|
||||
#define FLT_MIN __FLT_MIN__
|
||||
#define DBL_MIN __DBL_MIN__
|
||||
#define LDBL_MIN __LDBL_MIN__
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||
# define FLT_TRUE_MIN __FLT_DENORM_MIN__
|
||||
# define DBL_TRUE_MIN __DBL_DENORM_MIN__
|
||||
# define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
|
||||
# define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
|
||||
# define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
|
||||
# define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
|
||||
# define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
|
||||
# define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
|
||||
# define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# define FLT16_MANT_DIG __FLT16_MANT_DIG__
|
||||
# define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__
|
||||
# define FLT16_DIG __FLT16_DIG__
|
||||
# define FLT16_MIN_EXP __FLT16_MIN_EXP__
|
||||
# define FLT16_MIN_10_EXP __FLT16_MIN_10_EXP__
|
||||
# define FLT16_MAX_EXP __FLT16_MAX_EXP__
|
||||
# define FLT16_MAX_10_EXP __FLT16_MAX_10_EXP__
|
||||
# define FLT16_MAX __FLT16_MAX__
|
||||
# define FLT16_EPSILON __FLT16_EPSILON__
|
||||
# define FLT16_MIN __FLT16_MIN__
|
||||
# define FLT16_TRUE_MIN __FLT16_TRUE_MIN__
|
||||
#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__ */
|
||||
|
||||
#endif /* __CLANG_FLOAT_H */
|
||||
@@ -0,0 +1,232 @@
|
||||
/*===---- fma4intrin.h - FMA4 intrinsics -----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <fma4intrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __FMA4INTRIN_H
|
||||
#define __FMA4INTRIN_H
|
||||
|
||||
#include <pmmintrin.h>
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("fma4"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("fma4"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_macc_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps((__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_macc_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd((__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_macc_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss((__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_macc_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd((__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_msub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps((__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_msub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd((__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_msub_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss((__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_msub_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd((__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_nmacc_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps(-(__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_nmacc_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd(-(__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_nmacc_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss(-(__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_nmacc_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd(-(__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_nmsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps(-(__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_nmsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd(-(__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_nmsub_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss(-(__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_nmsub_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd(-(__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_maddsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddsubps((__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_maddsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsubpd((__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_msubadd_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddsubps((__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_msubadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsubpd((__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_macc_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256((__v8sf)__A, (__v8sf)__B, (__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_macc_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256((__v4df)__A, (__v4df)__B, (__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_msub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256((__v8sf)__A, (__v8sf)__B, -(__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_msub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256((__v4df)__A, (__v4df)__B, -(__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_nmacc_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256(-(__v8sf)__A, (__v8sf)__B, (__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_nmacc_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256(-(__v4df)__A, (__v4df)__B, (__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_nmsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256(-(__v8sf)__A, (__v8sf)__B, -(__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_nmsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256(-(__v4df)__A, (__v4df)__B, -(__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_maddsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddsubps256((__v8sf)__A, (__v8sf)__B, (__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_maddsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddsubpd256((__v4df)__A, (__v4df)__B, (__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_msubadd_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddsubps256((__v8sf)__A, (__v8sf)__B, -(__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_msubadd_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddsubpd256((__v4df)__A, (__v4df)__B, -(__v4df)__C);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif /* __FMA4INTRIN_H */
|
||||
@@ -0,0 +1,230 @@
|
||||
/*===---- fmaintrin.h - FMA intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <fmaintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __FMAINTRIN_H
|
||||
#define __FMAINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("fma"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("fma"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fmadd_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps((__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fmadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd((__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fmadd_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss3((__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fmadd_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd3((__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fmsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps((__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fmsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd((__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fmsub_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss3((__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fmsub_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd3((__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmadd_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps(-(__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd(-(__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmadd_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss3((__v4sf)__A, -(__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmadd_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd3((__v2df)__A, -(__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddps(-(__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddpd(-(__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmsub_ss(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddss3((__v4sf)__A, -(__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fnmsub_sd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsd3((__v2df)__A, -(__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fmaddsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddsubps((__v4sf)__A, (__v4sf)__B, (__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fmaddsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsubpd((__v2df)__A, (__v2df)__B, (__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128 __DEFAULT_FN_ATTRS128
|
||||
_mm_fmsubadd_ps(__m128 __A, __m128 __B, __m128 __C)
|
||||
{
|
||||
return (__m128)__builtin_ia32_vfmaddsubps((__v4sf)__A, (__v4sf)__B, -(__v4sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m128d __DEFAULT_FN_ATTRS128
|
||||
_mm_fmsubadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
||||
{
|
||||
return (__m128d)__builtin_ia32_vfmaddsubpd((__v2df)__A, (__v2df)__B, -(__v2df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmadd_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256((__v8sf)__A, (__v8sf)__B, (__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmadd_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256((__v4df)__A, (__v4df)__B, (__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256((__v8sf)__A, (__v8sf)__B, -(__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256((__v4df)__A, (__v4df)__B, -(__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_fnmadd_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256(-(__v8sf)__A, (__v8sf)__B, (__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_fnmadd_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256(-(__v4df)__A, (__v4df)__B, (__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_fnmsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddps256(-(__v8sf)__A, (__v8sf)__B, -(__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_fnmsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddpd256(-(__v4df)__A, (__v4df)__B, -(__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmaddsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddsubps256((__v8sf)__A, (__v8sf)__B, (__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmaddsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddsubpd256((__v4df)__A, (__v4df)__B, (__v4df)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256 __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmsubadd_ps(__m256 __A, __m256 __B, __m256 __C)
|
||||
{
|
||||
return (__m256)__builtin_ia32_vfmaddsubps256((__v8sf)__A, (__v8sf)__B, -(__v8sf)__C);
|
||||
}
|
||||
|
||||
static __inline__ __m256d __DEFAULT_FN_ATTRS256
|
||||
_mm256_fmsubadd_pd(__m256d __A, __m256d __B, __m256d __C)
|
||||
{
|
||||
return (__m256d)__builtin_ia32_vfmaddsubpd256((__v4df)__A, (__v4df)__B, -(__v4df)__C);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif /* __FMAINTRIN_H */
|
||||
@@ -0,0 +1,105 @@
|
||||
/*===---- fxsrintrin.h - FXSR intrinsic ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __FXSRINTRIN_H
|
||||
#define __FXSRINTRIN_H
|
||||
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fxsr")))
|
||||
|
||||
/// Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXSAVE </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxsave(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxsave(__p);
|
||||
}
|
||||
|
||||
/// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p. The contents of
|
||||
/// this memory region should have been written to by a previous \c _fxsave
|
||||
/// or \c _fxsave64 intrinsic.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXRSTOR </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxrstor(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxrstor(__p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
/// Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXSAVE64 </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxsave64(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxsave64(__p);
|
||||
}
|
||||
|
||||
/// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p. The contents of
|
||||
/// this memory region should have been written to by a previous \c _fxsave
|
||||
/// or \c _fxsave64 intrinsic.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXRSTOR64 </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxrstor64(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxrstor64(__p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,208 @@
|
||||
/*===----------------- gfniintrin.h - GFNI intrinsics ----------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <gfniintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __GFNIINTRIN_H
|
||||
#define __GFNIINTRIN_H
|
||||
|
||||
|
||||
#define _mm_gf2p8affineinv_epi64_epi8(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vgf2p8affineinvqb_v16qi((__v16qi)(__m128i)(A), \
|
||||
(__v16qi)(__m128i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectb_128((__mmask16)(U), \
|
||||
(__v16qi)_mm_gf2p8affineinv_epi64_epi8(A, B, I), \
|
||||
(__v16qi)(__m128i)(S))
|
||||
|
||||
|
||||
#define _mm_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \
|
||||
(__m128i)_mm_mask_gf2p8affineinv_epi64_epi8((__m128i)_mm_setzero_si128(), \
|
||||
U, A, B, I)
|
||||
|
||||
|
||||
#define _mm256_gf2p8affineinv_epi64_epi8(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vgf2p8affineinvqb_v32qi((__v32qi)(__m256i)(A), \
|
||||
(__v32qi)(__m256i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm256_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectb_256((__mmask32)(U), \
|
||||
(__v32qi)_mm256_gf2p8affineinv_epi64_epi8(A, B, I), \
|
||||
(__v32qi)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \
|
||||
(__m256i)_mm256_mask_gf2p8affineinv_epi64_epi8((__m256i)_mm256_setzero_si256(), \
|
||||
U, A, B, I)
|
||||
|
||||
|
||||
#define _mm512_gf2p8affineinv_epi64_epi8(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vgf2p8affineinvqb_v64qi((__v64qi)(__m512i)(A), \
|
||||
(__v64qi)(__m512i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm512_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \
|
||||
(__v64qi)_mm512_gf2p8affineinv_epi64_epi8(A, B, I), \
|
||||
(__v64qi)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_gf2p8affineinv_epi64_epi8(U, A, B, I) \
|
||||
(__m512i)_mm512_mask_gf2p8affineinv_epi64_epi8((__m512i)_mm512_setzero_si512(), \
|
||||
U, A, B, I)
|
||||
|
||||
#define _mm_gf2p8affine_epi64_epi8(A, B, I) \
|
||||
(__m128i)__builtin_ia32_vgf2p8affineqb_v16qi((__v16qi)(__m128i)(A), \
|
||||
(__v16qi)(__m128i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \
|
||||
(__m128i)__builtin_ia32_selectb_128((__mmask16)(U), \
|
||||
(__v16qi)_mm_gf2p8affine_epi64_epi8(A, B, I), \
|
||||
(__v16qi)(__m128i)(S))
|
||||
|
||||
|
||||
#define _mm_maskz_gf2p8affine_epi64_epi8(U, A, B, I) \
|
||||
(__m128i)_mm_mask_gf2p8affine_epi64_epi8((__m128i)_mm_setzero_si128(), \
|
||||
U, A, B, I)
|
||||
|
||||
|
||||
#define _mm256_gf2p8affine_epi64_epi8(A, B, I) \
|
||||
(__m256i)__builtin_ia32_vgf2p8affineqb_v32qi((__v32qi)(__m256i)(A), \
|
||||
(__v32qi)(__m256i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm256_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \
|
||||
(__m256i)__builtin_ia32_selectb_256((__mmask32)(U), \
|
||||
(__v32qi)_mm256_gf2p8affine_epi64_epi8(A, B, I), \
|
||||
(__v32qi)(__m256i)(S))
|
||||
|
||||
#define _mm256_maskz_gf2p8affine_epi64_epi8(U, A, B, I) \
|
||||
(__m256i)_mm256_mask_gf2p8affine_epi64_epi8((__m256i)_mm256_setzero_si256(), \
|
||||
U, A, B, I)
|
||||
|
||||
|
||||
#define _mm512_gf2p8affine_epi64_epi8(A, B, I) \
|
||||
(__m512i)__builtin_ia32_vgf2p8affineqb_v64qi((__v64qi)(__m512i)(A), \
|
||||
(__v64qi)(__m512i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm512_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \
|
||||
(__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \
|
||||
(__v64qi)_mm512_gf2p8affine_epi64_epi8(A, B, I), \
|
||||
(__v64qi)(__m512i)(S))
|
||||
|
||||
#define _mm512_maskz_gf2p8affine_epi64_epi8(U, A, B, I) \
|
||||
(__m512i)_mm512_mask_gf2p8affine_epi64_epi8((__m512i)_mm512_setzero_si512(), \
|
||||
U, A, B, I)
|
||||
|
||||
/* Default attributes for simple form (no masking). */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("gfni"), __min_vector_width__(128)))
|
||||
|
||||
/* Default attributes for YMM unmasked form. */
|
||||
#define __DEFAULT_FN_ATTRS_Y __attribute__((__always_inline__, __nodebug__, __target__("avx,gfni"), __min_vector_width__(256)))
|
||||
|
||||
/* Default attributes for ZMM forms. */
|
||||
#define __DEFAULT_FN_ATTRS_Z __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,gfni"), __min_vector_width__(512)))
|
||||
|
||||
/* Default attributes for VLX forms. */
|
||||
#define __DEFAULT_FN_ATTRS_VL128 __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,avx512vl,gfni"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS_VL256 __attribute__((__always_inline__, __nodebug__, __target__("avx512bw,avx512vl,gfni"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_gf2p8mul_epi8(__m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vgf2p8mulb_v16qi((__v16qi) __A,
|
||||
(__v16qi) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS_VL128
|
||||
_mm_mask_gf2p8mul_epi8(__m128i __S, __mmask16 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_selectb_128(__U,
|
||||
(__v16qi) _mm_gf2p8mul_epi8(__A, __B),
|
||||
(__v16qi) __S);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS_VL128
|
||||
_mm_maskz_gf2p8mul_epi8(__mmask16 __U, __m128i __A, __m128i __B)
|
||||
{
|
||||
return _mm_mask_gf2p8mul_epi8((__m128i)_mm_setzero_si128(),
|
||||
__U, __A, __B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS_Y
|
||||
_mm256_gf2p8mul_epi8(__m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vgf2p8mulb_v32qi((__v32qi) __A,
|
||||
(__v32qi) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS_VL256
|
||||
_mm256_mask_gf2p8mul_epi8(__m256i __S, __mmask32 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_selectb_256(__U,
|
||||
(__v32qi) _mm256_gf2p8mul_epi8(__A, __B),
|
||||
(__v32qi) __S);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS_VL256
|
||||
_mm256_maskz_gf2p8mul_epi8(__mmask32 __U, __m256i __A, __m256i __B)
|
||||
{
|
||||
return _mm256_mask_gf2p8mul_epi8((__m256i)_mm256_setzero_si256(),
|
||||
__U, __A, __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_Z
|
||||
_mm512_gf2p8mul_epi8(__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vgf2p8mulb_v64qi((__v64qi) __A,
|
||||
(__v64qi) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_Z
|
||||
_mm512_mask_gf2p8mul_epi8(__m512i __S, __mmask64 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectb_512(__U,
|
||||
(__v64qi) _mm512_gf2p8mul_epi8(__A, __B),
|
||||
(__v64qi) __S);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_Z
|
||||
_mm512_maskz_gf2p8mul_epi8(__mmask64 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_gf2p8mul_epi8((__m512i)_mm512_setzero_si512(),
|
||||
__U, __A, __B);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
#undef __DEFAULT_FN_ATTRS_Y
|
||||
#undef __DEFAULT_FN_ATTRS_Z
|
||||
#undef __DEFAULT_FN_ATTRS_VL128
|
||||
#undef __DEFAULT_FN_ATTRS_VL256
|
||||
|
||||
#endif /* __GFNIINTRIN_H */
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
/*===---- htmintrin.h - Standard header for PowerPC HTM ---------------===*\
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __HTMINTRIN_H
|
||||
#define __HTMINTRIN_H
|
||||
|
||||
#ifndef __HTM__
|
||||
#error "HTM instruction set not enabled"
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint64_t texasr_t;
|
||||
typedef uint32_t texasru_t;
|
||||
typedef uint32_t texasrl_t;
|
||||
typedef uintptr_t tfiar_t;
|
||||
typedef uintptr_t tfhar_t;
|
||||
|
||||
#define _HTM_STATE(CR0) ((CR0 >> 1) & 0x3)
|
||||
#define _HTM_NONTRANSACTIONAL 0x0
|
||||
#define _HTM_SUSPENDED 0x1
|
||||
#define _HTM_TRANSACTIONAL 0x2
|
||||
|
||||
#define _TEXASR_EXTRACT_BITS(TEXASR,BITNUM,SIZE) \
|
||||
(((TEXASR) >> (63-(BITNUM))) & ((1<<(SIZE))-1))
|
||||
#define _TEXASRU_EXTRACT_BITS(TEXASR,BITNUM,SIZE) \
|
||||
(((TEXASR) >> (31-(BITNUM))) & ((1<<(SIZE))-1))
|
||||
|
||||
#define _TEXASR_FAILURE_CODE(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 7, 8)
|
||||
#define _TEXASRU_FAILURE_CODE(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 7, 8)
|
||||
|
||||
#define _TEXASR_FAILURE_PERSISTENT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 7, 1)
|
||||
#define _TEXASRU_FAILURE_PERSISTENT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 7, 1)
|
||||
|
||||
#define _TEXASR_DISALLOWED(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 8, 1)
|
||||
#define _TEXASRU_DISALLOWED(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 8, 1)
|
||||
|
||||
#define _TEXASR_NESTING_OVERFLOW(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 9, 1)
|
||||
#define _TEXASRU_NESTING_OVERFLOW(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 9, 1)
|
||||
|
||||
#define _TEXASR_FOOTPRINT_OVERFLOW(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 10, 1)
|
||||
#define _TEXASRU_FOOTPRINT_OVERFLOW(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 10, 1)
|
||||
|
||||
#define _TEXASR_SELF_INDUCED_CONFLICT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 11, 1)
|
||||
#define _TEXASRU_SELF_INDUCED_CONFLICT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 11, 1)
|
||||
|
||||
#define _TEXASR_NON_TRANSACTIONAL_CONFLICT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 12, 1)
|
||||
#define _TEXASRU_NON_TRANSACTIONAL_CONFLICT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 12, 1)
|
||||
|
||||
#define _TEXASR_TRANSACTION_CONFLICT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 13, 1)
|
||||
#define _TEXASRU_TRANSACTION_CONFLICT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 13, 1)
|
||||
|
||||
#define _TEXASR_TRANSLATION_INVALIDATION_CONFLICT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 14, 1)
|
||||
#define _TEXASRU_TRANSLATION_INVALIDATION_CONFLICT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 14, 1)
|
||||
|
||||
#define _TEXASR_IMPLEMENTAION_SPECIFIC(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 15, 1)
|
||||
#define _TEXASRU_IMPLEMENTAION_SPECIFIC(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 15, 1)
|
||||
|
||||
#define _TEXASR_INSTRUCTION_FETCH_CONFLICT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 16, 1)
|
||||
#define _TEXASRU_INSTRUCTION_FETCH_CONFLICT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 16, 1)
|
||||
|
||||
#define _TEXASR_ABORT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 31, 1)
|
||||
#define _TEXASRU_ABORT(TEXASRU) \
|
||||
_TEXASRU_EXTRACT_BITS(TEXASRU, 31, 1)
|
||||
|
||||
|
||||
#define _TEXASR_SUSPENDED(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 32, 1)
|
||||
|
||||
#define _TEXASR_PRIVILEGE(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 35, 2)
|
||||
|
||||
#define _TEXASR_FAILURE_SUMMARY(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 36, 1)
|
||||
|
||||
#define _TEXASR_TFIAR_EXACT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 37, 1)
|
||||
|
||||
#define _TEXASR_ROT(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 38, 1)
|
||||
|
||||
#define _TEXASR_TRANSACTION_LEVEL(TEXASR) \
|
||||
_TEXASR_EXTRACT_BITS(TEXASR, 63, 12)
|
||||
|
||||
#endif /* __powerpc */
|
||||
|
||||
#ifdef __s390__
|
||||
|
||||
/* Condition codes generated by tbegin */
|
||||
#define _HTM_TBEGIN_STARTED 0
|
||||
#define _HTM_TBEGIN_INDETERMINATE 1
|
||||
#define _HTM_TBEGIN_TRANSIENT 2
|
||||
#define _HTM_TBEGIN_PERSISTENT 3
|
||||
|
||||
/* The abort codes below this threshold are reserved for machine use. */
|
||||
#define _HTM_FIRST_USER_ABORT_CODE 256
|
||||
|
||||
/* The transaction diagnostic block is it is defined in the Principles
|
||||
of Operation chapter 5-91. */
|
||||
|
||||
struct __htm_tdb {
|
||||
unsigned char format; /* 0 */
|
||||
unsigned char flags;
|
||||
unsigned char reserved1[4];
|
||||
unsigned short nesting_depth;
|
||||
unsigned long long abort_code; /* 8 */
|
||||
unsigned long long conflict_token; /* 16 */
|
||||
unsigned long long atia; /* 24 */
|
||||
unsigned char eaid; /* 32 */
|
||||
unsigned char dxc;
|
||||
unsigned char reserved2[2];
|
||||
unsigned int program_int_id;
|
||||
unsigned long long exception_id; /* 40 */
|
||||
unsigned long long bea; /* 48 */
|
||||
unsigned char reserved3[72]; /* 56 */
|
||||
unsigned long long gprs[16]; /* 128 */
|
||||
} __attribute__((__packed__, __aligned__ (8)));
|
||||
|
||||
|
||||
/* Helper intrinsics to retry tbegin in case of transient failure. */
|
||||
|
||||
static __inline int __attribute__((__always_inline__, __nodebug__))
|
||||
__builtin_tbegin_retry_null (int __retry)
|
||||
{
|
||||
int cc, i = 0;
|
||||
|
||||
while ((cc = __builtin_tbegin(0)) == _HTM_TBEGIN_TRANSIENT
|
||||
&& i++ < __retry)
|
||||
__builtin_tx_assist(i);
|
||||
|
||||
return cc;
|
||||
}
|
||||
|
||||
static __inline int __attribute__((__always_inline__, __nodebug__))
|
||||
__builtin_tbegin_retry_tdb (void *__tdb, int __retry)
|
||||
{
|
||||
int cc, i = 0;
|
||||
|
||||
while ((cc = __builtin_tbegin(__tdb)) == _HTM_TBEGIN_TRANSIENT
|
||||
&& i++ < __retry)
|
||||
__builtin_tx_assist(i);
|
||||
|
||||
return cc;
|
||||
}
|
||||
|
||||
#define __builtin_tbegin_retry(tdb, retry) \
|
||||
(__builtin_constant_p(tdb == 0) && tdb == 0 ? \
|
||||
__builtin_tbegin_retry_null(retry) : \
|
||||
__builtin_tbegin_retry_tdb(tdb, retry))
|
||||
|
||||
static __inline int __attribute__((__always_inline__, __nodebug__))
|
||||
__builtin_tbegin_retry_nofloat_null (int __retry)
|
||||
{
|
||||
int cc, i = 0;
|
||||
|
||||
while ((cc = __builtin_tbegin_nofloat(0)) == _HTM_TBEGIN_TRANSIENT
|
||||
&& i++ < __retry)
|
||||
__builtin_tx_assist(i);
|
||||
|
||||
return cc;
|
||||
}
|
||||
|
||||
static __inline int __attribute__((__always_inline__, __nodebug__))
|
||||
__builtin_tbegin_retry_nofloat_tdb (void *__tdb, int __retry)
|
||||
{
|
||||
int cc, i = 0;
|
||||
|
||||
while ((cc = __builtin_tbegin_nofloat(__tdb)) == _HTM_TBEGIN_TRANSIENT
|
||||
&& i++ < __retry)
|
||||
__builtin_tx_assist(i);
|
||||
|
||||
return cc;
|
||||
}
|
||||
|
||||
#define __builtin_tbegin_retry_nofloat(tdb, retry) \
|
||||
(__builtin_constant_p(tdb == 0) && tdb == 0 ? \
|
||||
__builtin_tbegin_retry_nofloat_null(retry) : \
|
||||
__builtin_tbegin_retry_nofloat_tdb(tdb, retry))
|
||||
|
||||
#endif /* __s390__ */
|
||||
|
||||
#endif /* __HTMINTRIN_H */
|
||||
@@ -0,0 +1,359 @@
|
||||
/*===---- htmxlintrin.h - XL compiler HTM execution intrinsics-------------===*\
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __HTMXLINTRIN_H
|
||||
#define __HTMXLINTRIN_H
|
||||
|
||||
#ifndef __HTM__
|
||||
#error "HTM instruction set not enabled"
|
||||
#endif
|
||||
|
||||
#include <htmintrin.h>
|
||||
|
||||
#ifdef __powerpc__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _TEXASR_PTR(TM_BUF) ((texasr_t *)((char *)(TM_BUF) + 0))
|
||||
#define _TEXASRU_PTR(TM_BUF) ((texasru_t *)((char *)(TM_BUF) + 0))
|
||||
#define _TEXASRL_PTR(TM_BUF) ((texasrl_t *)((char *)(TM_BUF) + 4))
|
||||
#define _TFIAR_PTR(TM_BUF) ((tfiar_t *)((char *)(TM_BUF) + 8))
|
||||
|
||||
typedef char TM_buff_type[16];
|
||||
|
||||
/* This macro can be used to determine whether a transaction was successfully
|
||||
started from the __TM_begin() and __TM_simple_begin() intrinsic functions
|
||||
below. */
|
||||
#define _HTM_TBEGIN_STARTED 1
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_simple_begin (void)
|
||||
{
|
||||
if (__builtin_expect (__builtin_tbegin (0), 1))
|
||||
return _HTM_TBEGIN_STARTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_begin (void* const __TM_buff)
|
||||
{
|
||||
*_TEXASRL_PTR (__TM_buff) = 0;
|
||||
if (__builtin_expect (__builtin_tbegin (0), 1))
|
||||
return _HTM_TBEGIN_STARTED;
|
||||
#ifdef __powerpc64__
|
||||
*_TEXASR_PTR (__TM_buff) = __builtin_get_texasr ();
|
||||
#else
|
||||
*_TEXASRU_PTR (__TM_buff) = __builtin_get_texasru ();
|
||||
*_TEXASRL_PTR (__TM_buff) = __builtin_get_texasr ();
|
||||
#endif
|
||||
*_TFIAR_PTR (__TM_buff) = __builtin_get_tfiar ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_end (void)
|
||||
{
|
||||
if (__builtin_expect (__builtin_tend (0), 1))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern __inline void
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_abort (void)
|
||||
{
|
||||
__builtin_tabort (0);
|
||||
}
|
||||
|
||||
extern __inline void
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_named_abort (unsigned char const __code)
|
||||
{
|
||||
__builtin_tabort (__code);
|
||||
}
|
||||
|
||||
extern __inline void
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_resume (void)
|
||||
{
|
||||
__builtin_tresume ();
|
||||
}
|
||||
|
||||
extern __inline void
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_suspend (void)
|
||||
{
|
||||
__builtin_tsuspend ();
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_user_abort (void* const __TM_buff)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
return _TEXASRU_ABORT (texasru);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_named_user_abort (void* const __TM_buff, unsigned char *__code)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
|
||||
*__code = _TEXASRU_FAILURE_CODE (texasru);
|
||||
return _TEXASRU_ABORT (texasru);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_illegal (void* const __TM_buff)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
return _TEXASRU_DISALLOWED (texasru);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_footprint_exceeded (void* const __TM_buff)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
return _TEXASRU_FOOTPRINT_OVERFLOW (texasru);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_nesting_depth (void* const __TM_buff)
|
||||
{
|
||||
texasrl_t texasrl;
|
||||
|
||||
if (_HTM_STATE (__builtin_ttest ()) == _HTM_NONTRANSACTIONAL)
|
||||
{
|
||||
texasrl = *_TEXASRL_PTR (__TM_buff);
|
||||
if (!_TEXASR_FAILURE_SUMMARY (texasrl))
|
||||
texasrl = 0;
|
||||
}
|
||||
else
|
||||
texasrl = (texasrl_t) __builtin_get_texasr ();
|
||||
|
||||
return _TEXASR_TRANSACTION_LEVEL (texasrl);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_nested_too_deep(void* const __TM_buff)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
return _TEXASRU_NESTING_OVERFLOW (texasru);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_conflict(void* const __TM_buff)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
/* Return TEXASR bits 11 (Self-Induced Conflict) through
|
||||
14 (Translation Invalidation Conflict). */
|
||||
return (_TEXASRU_EXTRACT_BITS (texasru, 14, 4)) ? 1 : 0;
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_is_failure_persistent(void* const __TM_buff)
|
||||
{
|
||||
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
||||
return _TEXASRU_FAILURE_PERSISTENT (texasru);
|
||||
}
|
||||
|
||||
extern __inline long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_failure_address(void* const __TM_buff)
|
||||
{
|
||||
return *_TFIAR_PTR (__TM_buff);
|
||||
}
|
||||
|
||||
extern __inline long long
|
||||
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
||||
__TM_failure_code(void* const __TM_buff)
|
||||
{
|
||||
return *_TEXASR_PTR (__TM_buff);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __powerpc__ */
|
||||
|
||||
#ifdef __s390__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* These intrinsics are being made available for compatibility with
|
||||
the IBM XL compiler. For documentation please see the "z/OS XL
|
||||
C/C++ Programming Guide" publicly available on the web. */
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_simple_begin ()
|
||||
{
|
||||
return __builtin_tbegin_nofloat (0);
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_begin (void* const __tdb)
|
||||
{
|
||||
return __builtin_tbegin_nofloat (__tdb);
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_end ()
|
||||
{
|
||||
return __builtin_tend ();
|
||||
}
|
||||
|
||||
static __inline void __attribute__((__always_inline__))
|
||||
__TM_abort ()
|
||||
{
|
||||
return __builtin_tabort (_HTM_FIRST_USER_ABORT_CODE);
|
||||
}
|
||||
|
||||
static __inline void __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_named_abort (unsigned char const __code)
|
||||
{
|
||||
return __builtin_tabort ((int)_HTM_FIRST_USER_ABORT_CODE + __code);
|
||||
}
|
||||
|
||||
static __inline void __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_non_transactional_store (void* const __addr, long long const __value)
|
||||
{
|
||||
__builtin_non_tx_store ((uint64_t*)__addr, (uint64_t)__value);
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_nesting_depth (void* const __tdb_ptr)
|
||||
{
|
||||
int depth = __builtin_tx_nesting_depth ();
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
if (depth != 0)
|
||||
return depth;
|
||||
|
||||
if (tdb->format != 1)
|
||||
return 0;
|
||||
return tdb->nesting_depth;
|
||||
}
|
||||
|
||||
/* Transaction failure diagnostics */
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_user_abort (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
if (tdb->format != 1)
|
||||
return 0;
|
||||
|
||||
return !!(tdb->abort_code >= _HTM_FIRST_USER_ABORT_CODE);
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_named_user_abort (void* const __tdb_ptr, unsigned char* __code)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
if (tdb->format != 1)
|
||||
return 0;
|
||||
|
||||
if (tdb->abort_code >= _HTM_FIRST_USER_ABORT_CODE)
|
||||
{
|
||||
*__code = tdb->abort_code - _HTM_FIRST_USER_ABORT_CODE;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_illegal (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
return (tdb->format == 1
|
||||
&& (tdb->abort_code == 4 /* unfiltered program interruption */
|
||||
|| tdb->abort_code == 11 /* restricted instruction */));
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_footprint_exceeded (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
return (tdb->format == 1
|
||||
&& (tdb->abort_code == 7 /* fetch overflow */
|
||||
|| tdb->abort_code == 8 /* store overflow */));
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_nested_too_deep (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
return tdb->format == 1 && tdb->abort_code == 13; /* depth exceeded */
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_conflict (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
return (tdb->format == 1
|
||||
&& (tdb->abort_code == 9 /* fetch conflict */
|
||||
|| tdb->abort_code == 10 /* store conflict */));
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_is_failure_persistent (long const __result)
|
||||
{
|
||||
return __result == _HTM_TBEGIN_PERSISTENT;
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_failure_address (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
return tdb->atia;
|
||||
}
|
||||
|
||||
static __inline long __attribute__((__always_inline__, __nodebug__))
|
||||
__TM_failure_code (void* const __tdb_ptr)
|
||||
{
|
||||
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
||||
|
||||
return tdb->abort_code;
|
||||
}
|
||||
|
||||
#endif /* __s390__ */
|
||||
|
||||
#endif /* __HTMXLINTRIN_H */
|
||||
@@ -0,0 +1,78 @@
|
||||
/* ===-------- ia32intrin.h ---------------------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <ia32intrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __IA32INTRIN_H
|
||||
#define __IA32INTRIN_H
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__readeflags(void)
|
||||
{
|
||||
return __builtin_ia32_readeflags_u64();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
__writeeflags(unsigned long long __f)
|
||||
{
|
||||
__builtin_ia32_writeeflags_u64(__f);
|
||||
}
|
||||
|
||||
#else /* !__x86_64__ */
|
||||
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||
__readeflags(void)
|
||||
{
|
||||
return __builtin_ia32_readeflags_u32();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
__writeeflags(unsigned int __f)
|
||||
{
|
||||
__builtin_ia32_writeeflags_u32(__f);
|
||||
}
|
||||
#endif /* !__x86_64__ */
|
||||
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__rdpmc(int __A) {
|
||||
return __builtin_ia32_rdpmc(__A);
|
||||
}
|
||||
|
||||
/* __rdtscp */
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__rdtscp(unsigned int *__A) {
|
||||
return __builtin_ia32_rdtscp(__A);
|
||||
}
|
||||
|
||||
#define _rdtsc() __rdtsc()
|
||||
|
||||
#define _rdpmc(A) __rdpmc(A)
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_wbinvd(void) {
|
||||
__builtin_ia32_wbinvd();
|
||||
}
|
||||
|
||||
#endif /* __IA32INTRIN_H */
|
||||
@@ -0,0 +1,526 @@
|
||||
/*===---- immintrin.h - Intel intrinsics -----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#define __IMMINTRIN_H
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE__)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE2__)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE3__)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSSE3__)
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__SSE4_2__) || defined(__SSE4_1__))
|
||||
#include <smmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AES__) || defined(__PCLMUL__))
|
||||
#include <wmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLFLUSHOPT__)
|
||||
#include <clflushoptintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLWB__)
|
||||
#include <clwbintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX__)
|
||||
#include <avxintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX2__)
|
||||
#include <avx2intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__)
|
||||
#include <f16cintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__VPCLMULQDQ__)
|
||||
#include <vpclmulqdqintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__)
|
||||
#include <bmiintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__)
|
||||
#include <bmi2intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LZCNT__)
|
||||
#include <lzcntintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__)
|
||||
#include <popcntintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA__)
|
||||
#include <fmaintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512F__)
|
||||
#include <avx512fintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VL__)
|
||||
#include <avx512vlintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BW__)
|
||||
#include <avx512bwintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BITALG__)
|
||||
#include <avx512bitalgintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512CD__)
|
||||
#include <avx512cdintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VPOPCNTDQ__)
|
||||
#include <avx512vpopcntdqintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VL__) && defined(__AVX512VPOPCNTDQ__))
|
||||
#include <avx512vpopcntdqvlintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VNNI__)
|
||||
#include <avx512vnniintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VL__) && defined(__AVX512VNNI__))
|
||||
#include <avx512vlvnniintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512DQ__)
|
||||
#include <avx512dqintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VL__) && defined(__AVX512BITALG__))
|
||||
#include <avx512vlbitalgintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VL__) && defined(__AVX512BW__))
|
||||
#include <avx512vlbwintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VL__) && defined(__AVX512CD__))
|
||||
#include <avx512vlcdintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VL__) && defined(__AVX512DQ__))
|
||||
#include <avx512vldqintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512ER__)
|
||||
#include <avx512erintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512IFMA__)
|
||||
#include <avx512ifmaintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512IFMA__) && defined(__AVX512VL__))
|
||||
#include <avx512ifmavlintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VBMI__)
|
||||
#include <avx512vbmiintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VBMI__) && defined(__AVX512VL__))
|
||||
#include <avx512vbmivlintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VBMI2__)
|
||||
#include <avx512vbmi2intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
(defined(__AVX512VBMI2__) && defined(__AVX512VL__))
|
||||
#include <avx512vlvbmi2intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512PF__)
|
||||
#include <avx512pfintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PKU__)
|
||||
#include <pkuintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__VAES__)
|
||||
#include <vaesintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__GFNI__)
|
||||
#include <gfniintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDPID__)
|
||||
/// Returns the value of the IA32_TSC_AUX MSR (0xc0000103).
|
||||
///
|
||||
/// \headerfile <immintrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> RDPID </c> instruction.
|
||||
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("rdpid")))
|
||||
_rdpid_u32(void) {
|
||||
return __builtin_ia32_rdpid();
|
||||
}
|
||||
#endif // __RDPID__
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDRND__)
|
||||
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
||||
_rdrand16_step(unsigned short *__p)
|
||||
{
|
||||
return __builtin_ia32_rdrand16_step(__p);
|
||||
}
|
||||
|
||||
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
||||
_rdrand32_step(unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_rdrand32_step(__p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
||||
_rdrand64_step(unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_rdrand64_step(__p);
|
||||
}
|
||||
#endif
|
||||
#endif /* __RDRND__ */
|
||||
|
||||
/* __bit_scan_forward */
|
||||
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||
_bit_scan_forward(int __A) {
|
||||
return __builtin_ctz(__A);
|
||||
}
|
||||
|
||||
/* __bit_scan_reverse */
|
||||
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
||||
_bit_scan_reverse(int __A) {
|
||||
return 31 - __builtin_clz(__A);
|
||||
}
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__)
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_readfsbase_u32(void)
|
||||
{
|
||||
return __builtin_ia32_rdfsbase32();
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_readfsbase_u64(void)
|
||||
{
|
||||
return __builtin_ia32_rdfsbase64();
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_readgsbase_u32(void)
|
||||
{
|
||||
return __builtin_ia32_rdgsbase32();
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_readgsbase_u64(void)
|
||||
{
|
||||
return __builtin_ia32_rdgsbase64();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_writefsbase_u32(unsigned int __V)
|
||||
{
|
||||
__builtin_ia32_wrfsbase32(__V);
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_writefsbase_u64(unsigned long long __V)
|
||||
{
|
||||
__builtin_ia32_wrfsbase64(__V);
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_writegsbase_u32(unsigned int __V)
|
||||
{
|
||||
__builtin_ia32_wrgsbase32(__V);
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
|
||||
_writegsbase_u64(unsigned long long __V)
|
||||
{
|
||||
__builtin_ia32_wrgsbase64(__V);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __FSGSBASE__ */
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MOVBE__)
|
||||
|
||||
/* The structs used below are to force the load/store to be unaligned. This
|
||||
* is accomplished with the __packed__ attribute. The __may_alias__ prevents
|
||||
* tbaa metadata from being generated based on the struct and the type of the
|
||||
* field inside of it.
|
||||
*/
|
||||
|
||||
static __inline__ short __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
||||
_loadbe_i16(void const * __P) {
|
||||
struct __loadu_i16 {
|
||||
short __v;
|
||||
} __attribute__((__packed__, __may_alias__));
|
||||
return __builtin_bswap16(((struct __loadu_i16*)__P)->__v);
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
||||
_storebe_i16(void * __P, short __D) {
|
||||
struct __storeu_i16 {
|
||||
short __v;
|
||||
} __attribute__((__packed__, __may_alias__));
|
||||
((struct __storeu_i16*)__P)->__v = __builtin_bswap16(__D);
|
||||
}
|
||||
|
||||
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
||||
_loadbe_i32(void const * __P) {
|
||||
struct __loadu_i32 {
|
||||
int __v;
|
||||
} __attribute__((__packed__, __may_alias__));
|
||||
return __builtin_bswap32(((struct __loadu_i32*)__P)->__v);
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
||||
_storebe_i32(void * __P, int __D) {
|
||||
struct __storeu_i32 {
|
||||
int __v;
|
||||
} __attribute__((__packed__, __may_alias__));
|
||||
((struct __storeu_i32*)__P)->__v = __builtin_bswap32(__D);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
||||
_loadbe_i64(void const * __P) {
|
||||
struct __loadu_i64 {
|
||||
long long __v;
|
||||
} __attribute__((__packed__, __may_alias__));
|
||||
return __builtin_bswap64(((struct __loadu_i64*)__P)->__v);
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
||||
_storebe_i64(void * __P, long long __D) {
|
||||
struct __storeu_i64 {
|
||||
long long __v;
|
||||
} __attribute__((__packed__, __may_alias__));
|
||||
((struct __storeu_i64*)__P)->__v = __builtin_bswap64(__D);
|
||||
}
|
||||
#endif
|
||||
#endif /* __MOVBE */
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RTM__)
|
||||
#include <rtmintrin.h>
|
||||
#include <xtestintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHA__)
|
||||
#include <shaintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FXSR__)
|
||||
#include <fxsrintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVE__)
|
||||
#include <xsaveintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEOPT__)
|
||||
#include <xsaveoptintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEC__)
|
||||
#include <xsavecintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVES__)
|
||||
#include <xsavesintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHSTK__)
|
||||
#include <cetintrin.h>
|
||||
#endif
|
||||
|
||||
/* Some intrinsics inside adxintrin.h are available only on processors with ADX,
|
||||
* whereas others are also available at all times. */
|
||||
#include <adxintrin.h>
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDSEED__)
|
||||
#include <rdseedintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WBNOINVD__)
|
||||
#include <wbnoinvdintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLDEMOTE__)
|
||||
#include <cldemoteintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WAITPKG__)
|
||||
#include <waitpkgintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || \
|
||||
defined(__MOVDIRI__) || defined(__MOVDIR64B__)
|
||||
#include <movdirintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PCONFIG__)
|
||||
#include <pconfigintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SGX__)
|
||||
#include <sgxintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PTWRITE__)
|
||||
#include <ptwriteintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__INVPCID__)
|
||||
#include <invpcidintrin.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Define the default attributes for these intrinsics */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Exchange HLE
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ long __DEFAULT_FN_ATTRS
|
||||
_InterlockedExchange_HLEAcquire(long volatile *_Target, long _Value) {
|
||||
__asm__ __volatile__(".byte 0xf2 ; lock ; xchg %0, %1"
|
||||
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
||||
return _Value;
|
||||
}
|
||||
static __inline__ long __DEFAULT_FN_ATTRS
|
||||
_InterlockedExchange_HLERelease(long volatile *_Target, long _Value) {
|
||||
__asm__ __volatile__(".byte 0xf3 ; lock ; xchg %0, %1"
|
||||
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
||||
return _Value;
|
||||
}
|
||||
#endif
|
||||
#if defined(__x86_64__)
|
||||
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
||||
_InterlockedExchange64_HLEAcquire(__int64 volatile *_Target, __int64 _Value) {
|
||||
__asm__ __volatile__(".byte 0xf2 ; lock ; xchg %0, %1"
|
||||
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
||||
return _Value;
|
||||
}
|
||||
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
||||
_InterlockedExchange64_HLERelease(__int64 volatile *_Target, __int64 _Value) {
|
||||
__asm__ __volatile__(".byte 0xf3 ; lock ; xchg %0, %1"
|
||||
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
||||
return _Value;
|
||||
}
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Compare Exchange HLE
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ long __DEFAULT_FN_ATTRS
|
||||
_InterlockedCompareExchange_HLEAcquire(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand) {
|
||||
__asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg %2, %1"
|
||||
: "+a" (_Comparand), "+m" (*_Destination)
|
||||
: "r" (_Exchange) : "memory");
|
||||
return _Comparand;
|
||||
}
|
||||
static __inline__ long __DEFAULT_FN_ATTRS
|
||||
_InterlockedCompareExchange_HLERelease(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand) {
|
||||
__asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg %2, %1"
|
||||
: "+a" (_Comparand), "+m" (*_Destination)
|
||||
: "r" (_Exchange) : "memory");
|
||||
return _Comparand;
|
||||
}
|
||||
#endif
|
||||
#if defined(__x86_64__)
|
||||
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
||||
_InterlockedCompareExchange64_HLEAcquire(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand) {
|
||||
__asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg %2, %1"
|
||||
: "+a" (_Comparand), "+m" (*_Destination)
|
||||
: "r" (_Exchange) : "memory");
|
||||
return _Comparand;
|
||||
}
|
||||
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
||||
_InterlockedCompareExchange64_HLERelease(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand) {
|
||||
__asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg %2, %1"
|
||||
: "+a" (_Comparand), "+m" (*_Destination)
|
||||
: "r" (_Exchange) : "memory");
|
||||
return _Comparand;
|
||||
}
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#endif /* __IMMINTRIN_H */
|
||||
@@ -0,0 +1,619 @@
|
||||
/* ===-------- intrin.h ---------------------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we're compiling for the windows platform. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <intrin.h>
|
||||
#else
|
||||
|
||||
#ifndef __INTRIN_H
|
||||
#define __INTRIN_H
|
||||
|
||||
/* First include the standard intrinsics. */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#include <x86intrin.h>
|
||||
#endif
|
||||
|
||||
#if defined(__arm__)
|
||||
#include <armintr.h>
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__)
|
||||
#include <arm64intr.h>
|
||||
#endif
|
||||
|
||||
/* For the definition of jmp_buf. */
|
||||
#if __STDC_HOSTED__
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__MMX__)
|
||||
/* And the random ones that aren't in those files. */
|
||||
__m64 _m_from_float(float);
|
||||
float _m_to_float(__m64);
|
||||
#endif
|
||||
|
||||
/* Other assorted instruction intrinsics. */
|
||||
void __addfsbyte(unsigned long, unsigned char);
|
||||
void __addfsdword(unsigned long, unsigned long);
|
||||
void __addfsword(unsigned long, unsigned short);
|
||||
void __code_seg(const char *);
|
||||
static __inline__
|
||||
void __cpuid(int[4], int);
|
||||
static __inline__
|
||||
void __cpuidex(int[4], int, int);
|
||||
static __inline__
|
||||
__int64 __emul(int, int);
|
||||
static __inline__
|
||||
unsigned __int64 __emulu(unsigned int, unsigned int);
|
||||
unsigned int __getcallerseflags(void);
|
||||
static __inline__
|
||||
void __halt(void);
|
||||
unsigned char __inbyte(unsigned short);
|
||||
void __inbytestring(unsigned short, unsigned char *, unsigned long);
|
||||
void __incfsbyte(unsigned long);
|
||||
void __incfsdword(unsigned long);
|
||||
void __incfsword(unsigned long);
|
||||
unsigned long __indword(unsigned short);
|
||||
void __indwordstring(unsigned short, unsigned long *, unsigned long);
|
||||
void __int2c(void);
|
||||
void __invlpg(void *);
|
||||
unsigned short __inword(unsigned short);
|
||||
void __inwordstring(unsigned short, unsigned short *, unsigned long);
|
||||
void __lidt(void *);
|
||||
unsigned __int64 __ll_lshift(unsigned __int64, int);
|
||||
__int64 __ll_rshift(__int64, int);
|
||||
static __inline__
|
||||
void __movsb(unsigned char *, unsigned char const *, size_t);
|
||||
static __inline__
|
||||
void __movsd(unsigned long *, unsigned long const *, size_t);
|
||||
static __inline__
|
||||
void __movsw(unsigned short *, unsigned short const *, size_t);
|
||||
static __inline__
|
||||
void __nop(void);
|
||||
void __nvreg_restore_fence(void);
|
||||
void __nvreg_save_fence(void);
|
||||
void __outbyte(unsigned short, unsigned char);
|
||||
void __outbytestring(unsigned short, unsigned char *, unsigned long);
|
||||
void __outdword(unsigned short, unsigned long);
|
||||
void __outdwordstring(unsigned short, unsigned long *, unsigned long);
|
||||
void __outword(unsigned short, unsigned short);
|
||||
void __outwordstring(unsigned short, unsigned short *, unsigned long);
|
||||
unsigned long __readcr0(void);
|
||||
unsigned long __readcr2(void);
|
||||
static __inline__
|
||||
unsigned long __readcr3(void);
|
||||
unsigned long __readcr4(void);
|
||||
unsigned long __readcr8(void);
|
||||
unsigned int __readdr(unsigned int);
|
||||
#ifdef __i386__
|
||||
static __inline__
|
||||
unsigned char __readfsbyte(unsigned long);
|
||||
static __inline__
|
||||
unsigned __int64 __readfsqword(unsigned long);
|
||||
static __inline__
|
||||
unsigned short __readfsword(unsigned long);
|
||||
#endif
|
||||
static __inline__
|
||||
unsigned __int64 __readmsr(unsigned long);
|
||||
unsigned __int64 __readpmc(unsigned long);
|
||||
unsigned long __segmentlimit(unsigned long);
|
||||
void __sidt(void *);
|
||||
static __inline__
|
||||
void __stosb(unsigned char *, unsigned char, size_t);
|
||||
static __inline__
|
||||
void __stosd(unsigned long *, unsigned long, size_t);
|
||||
static __inline__
|
||||
void __stosw(unsigned short *, unsigned short, size_t);
|
||||
void __svm_clgi(void);
|
||||
void __svm_invlpga(void *, int);
|
||||
void __svm_skinit(int);
|
||||
void __svm_stgi(void);
|
||||
void __svm_vmload(size_t);
|
||||
void __svm_vmrun(size_t);
|
||||
void __svm_vmsave(size_t);
|
||||
void __ud2(void);
|
||||
unsigned __int64 __ull_rshift(unsigned __int64, int);
|
||||
void __vmx_off(void);
|
||||
void __vmx_vmptrst(unsigned __int64 *);
|
||||
void __wbinvd(void);
|
||||
void __writecr0(unsigned int);
|
||||
static __inline__
|
||||
void __writecr3(unsigned int);
|
||||
void __writecr4(unsigned int);
|
||||
void __writecr8(unsigned int);
|
||||
void __writedr(unsigned int, unsigned int);
|
||||
void __writefsbyte(unsigned long, unsigned char);
|
||||
void __writefsdword(unsigned long, unsigned long);
|
||||
void __writefsqword(unsigned long, unsigned __int64);
|
||||
void __writefsword(unsigned long, unsigned short);
|
||||
void __writemsr(unsigned long, unsigned __int64);
|
||||
static __inline__
|
||||
void *_AddressOfReturnAddress(void);
|
||||
static __inline__
|
||||
unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask);
|
||||
static __inline__
|
||||
unsigned char _BitScanReverse(unsigned long *_Index, unsigned long _Mask);
|
||||
unsigned char _bittest(long const *, long);
|
||||
unsigned char _bittestandcomplement(long *, long);
|
||||
unsigned char _bittestandreset(long *, long);
|
||||
unsigned char _bittestandset(long *, long);
|
||||
void __cdecl _disable(void);
|
||||
void __cdecl _enable(void);
|
||||
long _InterlockedAddLargeStatistic(__int64 volatile *_Addend, long _Value);
|
||||
unsigned char _interlockedbittestandreset(long volatile *, long);
|
||||
unsigned char _interlockedbittestandset(long volatile *, long);
|
||||
void *_InterlockedCompareExchangePointer_HLEAcquire(void *volatile *, void *,
|
||||
void *);
|
||||
void *_InterlockedCompareExchangePointer_HLERelease(void *volatile *, void *,
|
||||
void *);
|
||||
long _InterlockedExchangeAdd_HLEAcquire(long volatile *, long);
|
||||
long _InterlockedExchangeAdd_HLERelease(long volatile *, long);
|
||||
__int64 _InterlockedExchangeAdd64_HLEAcquire(__int64 volatile *, __int64);
|
||||
__int64 _InterlockedExchangeAdd64_HLERelease(__int64 volatile *, __int64);
|
||||
void __cdecl _invpcid(unsigned int, void *);
|
||||
static __inline__ void
|
||||
__attribute__((__deprecated__("use other intrinsics or C++11 atomics instead")))
|
||||
_ReadBarrier(void);
|
||||
static __inline__ void
|
||||
__attribute__((__deprecated__("use other intrinsics or C++11 atomics instead")))
|
||||
_ReadWriteBarrier(void);
|
||||
unsigned int _rorx_u32(unsigned int, const unsigned int);
|
||||
int _sarx_i32(int, unsigned int);
|
||||
#if __STDC_HOSTED__
|
||||
int __cdecl _setjmp(jmp_buf);
|
||||
#endif
|
||||
unsigned int _shlx_u32(unsigned int, unsigned int);
|
||||
unsigned int _shrx_u32(unsigned int, unsigned int);
|
||||
void _Store_HLERelease(long volatile *, long);
|
||||
void _Store64_HLERelease(__int64 volatile *, __int64);
|
||||
void _StorePointer_HLERelease(void *volatile *, void *);
|
||||
static __inline__ void
|
||||
__attribute__((__deprecated__("use other intrinsics or C++11 atomics instead")))
|
||||
_WriteBarrier(void);
|
||||
unsigned __int32 xbegin(void);
|
||||
void _xend(void);
|
||||
static __inline__
|
||||
#define _XCR_XFEATURE_ENABLED_MASK 0
|
||||
unsigned __int64 __cdecl _xgetbv(unsigned int);
|
||||
void __cdecl _xsetbv(unsigned int, unsigned __int64);
|
||||
|
||||
/* These additional intrinsics are turned on in x64/amd64/x86_64 mode. */
|
||||
#ifdef __x86_64__
|
||||
void __addgsbyte(unsigned long, unsigned char);
|
||||
void __addgsdword(unsigned long, unsigned long);
|
||||
void __addgsqword(unsigned long, unsigned __int64);
|
||||
void __addgsword(unsigned long, unsigned short);
|
||||
static __inline__
|
||||
void __faststorefence(void);
|
||||
void __incgsbyte(unsigned long);
|
||||
void __incgsdword(unsigned long);
|
||||
void __incgsqword(unsigned long);
|
||||
void __incgsword(unsigned long);
|
||||
static __inline__
|
||||
void __movsq(unsigned long long *, unsigned long long const *, size_t);
|
||||
static __inline__
|
||||
unsigned char __readgsbyte(unsigned long);
|
||||
static __inline__
|
||||
unsigned long __readgsdword(unsigned long);
|
||||
static __inline__
|
||||
unsigned __int64 __readgsqword(unsigned long);
|
||||
unsigned short __readgsword(unsigned long);
|
||||
unsigned __int64 __shiftleft128(unsigned __int64 _LowPart,
|
||||
unsigned __int64 _HighPart,
|
||||
unsigned char _Shift);
|
||||
unsigned __int64 __shiftright128(unsigned __int64 _LowPart,
|
||||
unsigned __int64 _HighPart,
|
||||
unsigned char _Shift);
|
||||
static __inline__
|
||||
void __stosq(unsigned __int64 *, unsigned __int64, size_t);
|
||||
unsigned char __vmx_on(unsigned __int64 *);
|
||||
unsigned char __vmx_vmclear(unsigned __int64 *);
|
||||
unsigned char __vmx_vmlaunch(void);
|
||||
unsigned char __vmx_vmptrld(unsigned __int64 *);
|
||||
unsigned char __vmx_vmread(size_t, size_t *);
|
||||
unsigned char __vmx_vmresume(void);
|
||||
unsigned char __vmx_vmwrite(size_t, size_t);
|
||||
void __writegsbyte(unsigned long, unsigned char);
|
||||
void __writegsdword(unsigned long, unsigned long);
|
||||
void __writegsqword(unsigned long, unsigned __int64);
|
||||
void __writegsword(unsigned long, unsigned short);
|
||||
unsigned char _bittest64(__int64 const *, __int64);
|
||||
unsigned char _bittestandcomplement64(__int64 *, __int64);
|
||||
unsigned char _bittestandreset64(__int64 *, __int64);
|
||||
unsigned char _bittestandset64(__int64 *, __int64);
|
||||
long _InterlockedAnd_np(long volatile *_Value, long _Mask);
|
||||
short _InterlockedAnd16_np(short volatile *_Value, short _Mask);
|
||||
__int64 _InterlockedAnd64_np(__int64 volatile *_Value, __int64 _Mask);
|
||||
char _InterlockedAnd8_np(char volatile *_Value, char _Mask);
|
||||
unsigned char _interlockedbittestandreset64(__int64 volatile *, __int64);
|
||||
unsigned char _interlockedbittestandset64(__int64 volatile *, __int64);
|
||||
long _InterlockedCompareExchange_np(long volatile *_Destination, long _Exchange,
|
||||
long _Comparand);
|
||||
unsigned char _InterlockedCompareExchange128(__int64 volatile *_Destination,
|
||||
__int64 _ExchangeHigh,
|
||||
__int64 _ExchangeLow,
|
||||
__int64 *_CompareandResult);
|
||||
unsigned char _InterlockedCompareExchange128_np(__int64 volatile *_Destination,
|
||||
__int64 _ExchangeHigh,
|
||||
__int64 _ExchangeLow,
|
||||
__int64 *_ComparandResult);
|
||||
short _InterlockedCompareExchange16_np(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_np(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
void *_InterlockedCompareExchangePointer_np(void *volatile *_Destination,
|
||||
void *_Exchange, void *_Comparand);
|
||||
long _InterlockedOr_np(long volatile *_Value, long _Mask);
|
||||
short _InterlockedOr16_np(short volatile *_Value, short _Mask);
|
||||
__int64 _InterlockedOr64_np(__int64 volatile *_Value, __int64 _Mask);
|
||||
char _InterlockedOr8_np(char volatile *_Value, char _Mask);
|
||||
long _InterlockedXor_np(long volatile *_Value, long _Mask);
|
||||
short _InterlockedXor16_np(short volatile *_Value, short _Mask);
|
||||
__int64 _InterlockedXor64_np(__int64 volatile *_Value, __int64 _Mask);
|
||||
char _InterlockedXor8_np(char volatile *_Value, char _Mask);
|
||||
unsigned __int64 _rorx_u64(unsigned __int64, const unsigned int);
|
||||
__int64 _sarx_i64(__int64, unsigned int);
|
||||
unsigned __int64 _shlx_u64(unsigned __int64, unsigned int);
|
||||
unsigned __int64 _shrx_u64(unsigned __int64, unsigned int);
|
||||
static __inline__
|
||||
__int64 __mulh(__int64, __int64);
|
||||
static __inline__
|
||||
unsigned __int64 __umulh(unsigned __int64, unsigned __int64);
|
||||
static __inline__
|
||||
__int64 _mul128(__int64, __int64, __int64*);
|
||||
static __inline__
|
||||
unsigned __int64 _umul128(unsigned __int64,
|
||||
unsigned __int64,
|
||||
unsigned __int64*);
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
|
||||
|
||||
static __inline__
|
||||
unsigned char _BitScanForward64(unsigned long *_Index, unsigned __int64 _Mask);
|
||||
static __inline__
|
||||
unsigned char _BitScanReverse64(unsigned long *_Index, unsigned __int64 _Mask);
|
||||
|
||||
static __inline__
|
||||
__int64 _InterlockedDecrement64(__int64 volatile *_Addend);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchange64(__int64 volatile *_Target, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchangeAdd64(__int64 volatile *_Addend, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchangeSub64(__int64 volatile *_Subend, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedIncrement64(__int64 volatile *_Addend);
|
||||
static __inline__
|
||||
__int64 _InterlockedOr64(__int64 volatile *_Value, __int64 _Mask);
|
||||
static __inline__
|
||||
__int64 _InterlockedXor64(__int64 volatile *_Value, __int64 _Mask);
|
||||
static __inline__
|
||||
__int64 _InterlockedAnd64(__int64 volatile *_Value, __int64 _Mask);
|
||||
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Exchange Add
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedExchangeAdd8_acq(char volatile *_Addend, char _Value);
|
||||
char _InterlockedExchangeAdd8_nf(char volatile *_Addend, char _Value);
|
||||
char _InterlockedExchangeAdd8_rel(char volatile *_Addend, char _Value);
|
||||
short _InterlockedExchangeAdd16_acq(short volatile *_Addend, short _Value);
|
||||
short _InterlockedExchangeAdd16_nf(short volatile *_Addend, short _Value);
|
||||
short _InterlockedExchangeAdd16_rel(short volatile *_Addend, short _Value);
|
||||
long _InterlockedExchangeAdd_acq(long volatile *_Addend, long _Value);
|
||||
long _InterlockedExchangeAdd_nf(long volatile *_Addend, long _Value);
|
||||
long _InterlockedExchangeAdd_rel(long volatile *_Addend, long _Value);
|
||||
__int64 _InterlockedExchangeAdd64_acq(__int64 volatile *_Addend, __int64 _Value);
|
||||
__int64 _InterlockedExchangeAdd64_nf(__int64 volatile *_Addend, __int64 _Value);
|
||||
__int64 _InterlockedExchangeAdd64_rel(__int64 volatile *_Addend, __int64 _Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Increment
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
short _InterlockedIncrement16_acq(short volatile *_Value);
|
||||
short _InterlockedIncrement16_nf(short volatile *_Value);
|
||||
short _InterlockedIncrement16_rel(short volatile *_Value);
|
||||
long _InterlockedIncrement_acq(long volatile *_Value);
|
||||
long _InterlockedIncrement_nf(long volatile *_Value);
|
||||
long _InterlockedIncrement_rel(long volatile *_Value);
|
||||
__int64 _InterlockedIncrement64_acq(__int64 volatile *_Value);
|
||||
__int64 _InterlockedIncrement64_nf(__int64 volatile *_Value);
|
||||
__int64 _InterlockedIncrement64_rel(__int64 volatile *_Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Decrement
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
short _InterlockedDecrement16_acq(short volatile *_Value);
|
||||
short _InterlockedDecrement16_nf(short volatile *_Value);
|
||||
short _InterlockedDecrement16_rel(short volatile *_Value);
|
||||
long _InterlockedDecrement_acq(long volatile *_Value);
|
||||
long _InterlockedDecrement_nf(long volatile *_Value);
|
||||
long _InterlockedDecrement_rel(long volatile *_Value);
|
||||
__int64 _InterlockedDecrement64_acq(__int64 volatile *_Value);
|
||||
__int64 _InterlockedDecrement64_nf(__int64 volatile *_Value);
|
||||
__int64 _InterlockedDecrement64_rel(__int64 volatile *_Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked And
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedAnd8_acq(char volatile *_Value, char _Mask);
|
||||
char _InterlockedAnd8_nf(char volatile *_Value, char _Mask);
|
||||
char _InterlockedAnd8_rel(char volatile *_Value, char _Mask);
|
||||
short _InterlockedAnd16_acq(short volatile *_Value, short _Mask);
|
||||
short _InterlockedAnd16_nf(short volatile *_Value, short _Mask);
|
||||
short _InterlockedAnd16_rel(short volatile *_Value, short _Mask);
|
||||
long _InterlockedAnd_acq(long volatile *_Value, long _Mask);
|
||||
long _InterlockedAnd_nf(long volatile *_Value, long _Mask);
|
||||
long _InterlockedAnd_rel(long volatile *_Value, long _Mask);
|
||||
__int64 _InterlockedAnd64_acq(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedAnd64_nf(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedAnd64_rel(__int64 volatile *_Value, __int64 _Mask);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Bit Counting and Testing
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
unsigned char _interlockedbittestandset_acq(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandset_nf(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandset_rel(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandreset_acq(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandreset_nf(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandreset_rel(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Or
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedOr8_acq(char volatile *_Value, char _Mask);
|
||||
char _InterlockedOr8_nf(char volatile *_Value, char _Mask);
|
||||
char _InterlockedOr8_rel(char volatile *_Value, char _Mask);
|
||||
short _InterlockedOr16_acq(short volatile *_Value, short _Mask);
|
||||
short _InterlockedOr16_nf(short volatile *_Value, short _Mask);
|
||||
short _InterlockedOr16_rel(short volatile *_Value, short _Mask);
|
||||
long _InterlockedOr_acq(long volatile *_Value, long _Mask);
|
||||
long _InterlockedOr_nf(long volatile *_Value, long _Mask);
|
||||
long _InterlockedOr_rel(long volatile *_Value, long _Mask);
|
||||
__int64 _InterlockedOr64_acq(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedOr64_nf(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedOr64_rel(__int64 volatile *_Value, __int64 _Mask);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Xor
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedXor8_acq(char volatile *_Value, char _Mask);
|
||||
char _InterlockedXor8_nf(char volatile *_Value, char _Mask);
|
||||
char _InterlockedXor8_rel(char volatile *_Value, char _Mask);
|
||||
short _InterlockedXor16_acq(short volatile *_Value, short _Mask);
|
||||
short _InterlockedXor16_nf(short volatile *_Value, short _Mask);
|
||||
short _InterlockedXor16_rel(short volatile *_Value, short _Mask);
|
||||
long _InterlockedXor_acq(long volatile *_Value, long _Mask);
|
||||
long _InterlockedXor_nf(long volatile *_Value, long _Mask);
|
||||
long _InterlockedXor_rel(long volatile *_Value, long _Mask);
|
||||
__int64 _InterlockedXor64_acq(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedXor64_nf(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedXor64_rel(__int64 volatile *_Value, __int64 _Mask);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Exchange
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedExchange8_acq(char volatile *_Target, char _Value);
|
||||
char _InterlockedExchange8_nf(char volatile *_Target, char _Value);
|
||||
char _InterlockedExchange8_rel(char volatile *_Target, char _Value);
|
||||
short _InterlockedExchange16_acq(short volatile *_Target, short _Value);
|
||||
short _InterlockedExchange16_nf(short volatile *_Target, short _Value);
|
||||
short _InterlockedExchange16_rel(short volatile *_Target, short _Value);
|
||||
long _InterlockedExchange_acq(long volatile *_Target, long _Value);
|
||||
long _InterlockedExchange_nf(long volatile *_Target, long _Value);
|
||||
long _InterlockedExchange_rel(long volatile *_Target, long _Value);
|
||||
__int64 _InterlockedExchange64_acq(__int64 volatile *_Target, __int64 _Value);
|
||||
__int64 _InterlockedExchange64_nf(__int64 volatile *_Target, __int64 _Value);
|
||||
__int64 _InterlockedExchange64_rel(__int64 volatile *_Target, __int64 _Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Compare Exchange
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedCompareExchange8_acq(char volatile *_Destination,
|
||||
char _Exchange, char _Comparand);
|
||||
char _InterlockedCompareExchange8_nf(char volatile *_Destination,
|
||||
char _Exchange, char _Comparand);
|
||||
char _InterlockedCompareExchange8_rel(char volatile *_Destination,
|
||||
char _Exchange, char _Comparand);
|
||||
short _InterlockedCompareExchange16_acq(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
short _InterlockedCompareExchange16_nf(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
short _InterlockedCompareExchange16_rel(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
long _InterlockedCompareExchange_acq(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand);
|
||||
long _InterlockedCompareExchange_nf(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand);
|
||||
long _InterlockedCompareExchange_rel(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_acq(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_nf(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_rel(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* movs, stos
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsb(unsigned char *__dst, unsigned char const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsb" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsd(unsigned long *__dst, unsigned long const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsl" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsw(unsigned short *__dst, unsigned short const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsw" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__stosd(unsigned long *__dst, unsigned long __x, size_t __n) {
|
||||
__asm__ __volatile__("rep stosl" : "+D"(__dst), "+c"(__n) : "a"(__x)
|
||||
: "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__stosw(unsigned short *__dst, unsigned short __x, size_t __n) {
|
||||
__asm__ __volatile__("rep stosw" : "+D"(__dst), "+c"(__n) : "a"(__x)
|
||||
: "memory");
|
||||
}
|
||||
#endif
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsq(unsigned long long *__dst, unsigned long long const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsq" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__stosq(unsigned __int64 *__dst, unsigned __int64 __x, size_t __n) {
|
||||
__asm__ __volatile__("rep stosq" : "+D"(__dst), "+c"(__n) : "a"(__x)
|
||||
: "memory");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Misc
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__cpuid(int __info[4], int __level) {
|
||||
__asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3])
|
||||
: "a"(__level), "c"(0));
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__cpuidex(int __info[4], int __level, int __ecx) {
|
||||
__asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3])
|
||||
: "a"(__level), "c"(__ecx));
|
||||
}
|
||||
static __inline__ unsigned __int64 __cdecl __DEFAULT_FN_ATTRS
|
||||
_xgetbv(unsigned int __xcr_no) {
|
||||
unsigned int __eax, __edx;
|
||||
__asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no));
|
||||
return ((unsigned __int64)__edx << 32) | __eax;
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__halt(void) {
|
||||
__asm__ volatile ("hlt");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__nop(void) {
|
||||
__asm__ volatile ("nop");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* MS AArch64 specific
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__aarch64__)
|
||||
unsigned __int64 __getReg(int);
|
||||
long _InterlockedAdd(long volatile *Addend, long Value);
|
||||
__int64 _ReadStatusReg(int);
|
||||
void _WriteStatusReg(int, __int64);
|
||||
|
||||
static inline unsigned short _byteswap_ushort (unsigned short val) {
|
||||
return __builtin_bswap16(val);
|
||||
}
|
||||
static inline unsigned long _byteswap_ulong (unsigned long val) {
|
||||
return __builtin_bswap32(val);
|
||||
}
|
||||
static inline unsigned __int64 _byteswap_uint64 (unsigned __int64 val) {
|
||||
return __builtin_bswap64(val);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Privileged intrinsics
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
|
||||
__readmsr(unsigned long __register) {
|
||||
// Loads the contents of a 64-bit model specific register (MSR) specified in
|
||||
// the ECX register into registers EDX:EAX. The EDX register is loaded with
|
||||
// the high-order 32 bits of the MSR and the EAX register is loaded with the
|
||||
// low-order 32 bits. If less than 64 bits are implemented in the MSR being
|
||||
// read, the values returned to EDX:EAX in unimplemented bit locations are
|
||||
// undefined.
|
||||
unsigned long __edx;
|
||||
unsigned long __eax;
|
||||
__asm__ ("rdmsr" : "=d"(__edx), "=a"(__eax) : "c"(__register));
|
||||
return (((unsigned __int64)__edx) << 32) | (unsigned __int64)__eax;
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __DEFAULT_FN_ATTRS
|
||||
__readcr3(void) {
|
||||
unsigned long __cr3_val;
|
||||
__asm__ __volatile__ ("mov %%cr3, %0" : "=q"(__cr3_val) : : "memory");
|
||||
return __cr3_val;
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__writecr3(unsigned int __cr3_val) {
|
||||
__asm__ ("mov %0, %%cr3" : : "q"(__cr3_val) : "memory");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __INTRIN_H */
|
||||
#endif /* _MSC_VER */
|
||||
@@ -0,0 +1,106 @@
|
||||
/*===---- inttypes.h - Standard header for integer printf macros ----------===*\
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __CLANG_INTTYPES_H
|
||||
#define __CLANG_INTTYPES_H
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
#error MSVC does not have inttypes.h prior to Visual Studio 2013
|
||||
#endif
|
||||
|
||||
#include_next <inttypes.h>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
/* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x".
|
||||
* This triggers format warnings, so fix it up here. */
|
||||
#undef PRId32
|
||||
#undef PRIdLEAST32
|
||||
#undef PRIdFAST32
|
||||
#undef PRIi32
|
||||
#undef PRIiLEAST32
|
||||
#undef PRIiFAST32
|
||||
#undef PRIo32
|
||||
#undef PRIoLEAST32
|
||||
#undef PRIoFAST32
|
||||
#undef PRIu32
|
||||
#undef PRIuLEAST32
|
||||
#undef PRIuFAST32
|
||||
#undef PRIx32
|
||||
#undef PRIxLEAST32
|
||||
#undef PRIxFAST32
|
||||
#undef PRIX32
|
||||
#undef PRIXLEAST32
|
||||
#undef PRIXFAST32
|
||||
|
||||
#undef SCNd32
|
||||
#undef SCNdLEAST32
|
||||
#undef SCNdFAST32
|
||||
#undef SCNi32
|
||||
#undef SCNiLEAST32
|
||||
#undef SCNiFAST32
|
||||
#undef SCNo32
|
||||
#undef SCNoLEAST32
|
||||
#undef SCNoFAST32
|
||||
#undef SCNu32
|
||||
#undef SCNuLEAST32
|
||||
#undef SCNuFAST32
|
||||
#undef SCNx32
|
||||
#undef SCNxLEAST32
|
||||
#undef SCNxFAST32
|
||||
|
||||
#define PRId32 "d"
|
||||
#define PRIdLEAST32 "d"
|
||||
#define PRIdFAST32 "d"
|
||||
#define PRIi32 "i"
|
||||
#define PRIiLEAST32 "i"
|
||||
#define PRIiFAST32 "i"
|
||||
#define PRIo32 "o"
|
||||
#define PRIoLEAST32 "o"
|
||||
#define PRIoFAST32 "o"
|
||||
#define PRIu32 "u"
|
||||
#define PRIuLEAST32 "u"
|
||||
#define PRIuFAST32 "u"
|
||||
#define PRIx32 "x"
|
||||
#define PRIxLEAST32 "x"
|
||||
#define PRIxFAST32 "x"
|
||||
#define PRIX32 "X"
|
||||
#define PRIXLEAST32 "X"
|
||||
#define PRIXFAST32 "X"
|
||||
|
||||
#define SCNd32 "d"
|
||||
#define SCNdLEAST32 "d"
|
||||
#define SCNdFAST32 "d"
|
||||
#define SCNi32 "i"
|
||||
#define SCNiLEAST32 "i"
|
||||
#define SCNiFAST32 "i"
|
||||
#define SCNo32 "o"
|
||||
#define SCNoLEAST32 "o"
|
||||
#define SCNoFAST32 "o"
|
||||
#define SCNu32 "u"
|
||||
#define SCNuLEAST32 "u"
|
||||
#define SCNuFAST32 "u"
|
||||
#define SCNx32 "x"
|
||||
#define SCNxLEAST32 "x"
|
||||
#define SCNxFAST32 "x"
|
||||
#endif
|
||||
|
||||
#endif /* __CLANG_INTTYPES_H */
|
||||
@@ -0,0 +1,37 @@
|
||||
/*===------------- invpcidintrin.h - INVPCID intrinsic ---------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <invpcidintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __INVPCIDINTRIN_H
|
||||
#define __INVPCIDINTRIN_H
|
||||
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("invpcid")))
|
||||
_invpcid(unsigned int __type, void *__descriptor) {
|
||||
__builtin_ia32_invpcid(__type, __descriptor);
|
||||
}
|
||||
|
||||
#endif /* __INVPCIDINTRIN_H */
|
||||
@@ -0,0 +1,43 @@
|
||||
/*===---- iso646.h - Standard header for alternate spellings of operators---===
|
||||
*
|
||||
* Copyright (c) 2008 Eli Friedman
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __ISO646_H
|
||||
#define __ISO646_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define and &&
|
||||
#define and_eq &=
|
||||
#define bitand &
|
||||
#define bitor |
|
||||
#define compl ~
|
||||
#define not !
|
||||
#define not_eq !=
|
||||
#define or ||
|
||||
#define or_eq |=
|
||||
#define xor ^
|
||||
#define xor_eq ^=
|
||||
#endif
|
||||
|
||||
#endif /* __ISO646_H */
|
||||
@@ -0,0 +1,118 @@
|
||||
/*===---- limits.h - Standard header for integer sizes --------------------===*\
|
||||
*
|
||||
* Copyright (c) 2009 Chris Lattner
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __CLANG_LIMITS_H
|
||||
#define __CLANG_LIMITS_H
|
||||
|
||||
/* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
|
||||
Avert this #include_next madness. */
|
||||
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
|
||||
#define _GCC_LIMITS_H_
|
||||
#endif
|
||||
|
||||
/* System headers include a number of constants from POSIX in <limits.h>.
|
||||
Include it if we're hosted. */
|
||||
#if __STDC_HOSTED__ && __has_include_next(<limits.h>)
|
||||
#include_next <limits.h>
|
||||
#endif
|
||||
|
||||
/* Many system headers try to "help us out" by defining these. No really, we
|
||||
know how big each datatype is. */
|
||||
#undef SCHAR_MIN
|
||||
#undef SCHAR_MAX
|
||||
#undef UCHAR_MAX
|
||||
#undef SHRT_MIN
|
||||
#undef SHRT_MAX
|
||||
#undef USHRT_MAX
|
||||
#undef INT_MIN
|
||||
#undef INT_MAX
|
||||
#undef UINT_MAX
|
||||
#undef LONG_MIN
|
||||
#undef LONG_MAX
|
||||
#undef ULONG_MAX
|
||||
|
||||
#undef CHAR_BIT
|
||||
#undef CHAR_MIN
|
||||
#undef CHAR_MAX
|
||||
|
||||
/* C90/99 5.2.4.2.1 */
|
||||
#define SCHAR_MAX __SCHAR_MAX__
|
||||
#define SHRT_MAX __SHRT_MAX__
|
||||
#define INT_MAX __INT_MAX__
|
||||
#define LONG_MAX __LONG_MAX__
|
||||
|
||||
#define SCHAR_MIN (-__SCHAR_MAX__-1)
|
||||
#define SHRT_MIN (-__SHRT_MAX__ -1)
|
||||
#define INT_MIN (-__INT_MAX__ -1)
|
||||
#define LONG_MIN (-__LONG_MAX__ -1L)
|
||||
|
||||
#define UCHAR_MAX (__SCHAR_MAX__*2 +1)
|
||||
#define USHRT_MAX (__SHRT_MAX__ *2 +1)
|
||||
#define UINT_MAX (__INT_MAX__ *2U +1U)
|
||||
#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)
|
||||
|
||||
#ifndef MB_LEN_MAX
|
||||
#define MB_LEN_MAX 1
|
||||
#endif
|
||||
|
||||
#define CHAR_BIT __CHAR_BIT__
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__ /* -funsigned-char */
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX __SCHAR_MAX__
|
||||
#endif
|
||||
|
||||
/* C99 5.2.4.2.1: Added long long.
|
||||
C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>.
|
||||
*/
|
||||
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
|
||||
|
||||
#undef LLONG_MIN
|
||||
#undef LLONG_MAX
|
||||
#undef ULLONG_MAX
|
||||
|
||||
#define LLONG_MAX __LONG_LONG_MAX__
|
||||
#define LLONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||
#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||
#endif
|
||||
|
||||
/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad
|
||||
that we don't have something like #pragma poison that could be used to
|
||||
deprecate a macro - the code should just use LLONG_MAX and friends.
|
||||
*/
|
||||
#if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)
|
||||
|
||||
#undef LONG_LONG_MIN
|
||||
#undef LONG_LONG_MAX
|
||||
#undef ULONG_LONG_MAX
|
||||
|
||||
#define LONG_LONG_MAX __LONG_LONG_MAX__
|
||||
#define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||
#define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||
#endif
|
||||
|
||||
#endif /* __CLANG_LIMITS_H */
|
||||
@@ -0,0 +1,150 @@
|
||||
/*===---- lwpintrin.h - LWP intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <lwpintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __LWPINTRIN_H
|
||||
#define __LWPINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("lwp")))
|
||||
|
||||
/// Parses the LWPCB at the specified address and enables
|
||||
/// profiling if valid.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> LLWPCB </c> instruction.
|
||||
///
|
||||
/// \param __addr
|
||||
/// Address to the new Lightweight Profiling Control Block (LWPCB). If the
|
||||
/// LWPCB is valid, writes the address into the LWP_CBADDR MSR and enables
|
||||
/// Lightweight Profiling.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__llwpcb (void *__addr)
|
||||
{
|
||||
__builtin_ia32_llwpcb(__addr);
|
||||
}
|
||||
|
||||
/// Flushes the LWP state to memory and returns the address of the LWPCB.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> SLWPCB </c> instruction.
|
||||
///
|
||||
/// \return
|
||||
/// Address to the current Lightweight Profiling Control Block (LWPCB).
|
||||
/// If LWP is not currently enabled, returns NULL.
|
||||
static __inline__ void* __DEFAULT_FN_ATTRS
|
||||
__slwpcb (void)
|
||||
{
|
||||
return __builtin_ia32_slwpcb();
|
||||
}
|
||||
|
||||
/// Inserts programmed event record into the LWP event ring buffer
|
||||
/// and advances the ring buffer pointer.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> LWPINS </c> instruction.
|
||||
///
|
||||
/// \param DATA2
|
||||
/// A 32-bit value is zero-extended and inserted into the 64-bit Data2 field.
|
||||
/// \param DATA1
|
||||
/// A 32-bit value is inserted into the 32-bit Data1 field.
|
||||
/// \param FLAGS
|
||||
/// A 32-bit immediate value is inserted into the 32-bit Flags field.
|
||||
/// \returns If the ring buffer is full and LWP is running in Synchronized Mode,
|
||||
/// the event record overwrites the last record in the buffer, the MissedEvents
|
||||
/// counter in the LWPCB is incremented, the head pointer is not advanced, and
|
||||
/// 1 is returned. Otherwise 0 is returned.
|
||||
#define __lwpins32(DATA2, DATA1, FLAGS) \
|
||||
(__builtin_ia32_lwpins32((unsigned int) (DATA2), (unsigned int) (DATA1), \
|
||||
(unsigned int) (FLAGS)))
|
||||
|
||||
/// Decrements the LWP programmed value sample event counter. If the result is
|
||||
/// negative, inserts an event record into the LWP event ring buffer in memory
|
||||
/// and advances the ring buffer pointer.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> LWPVAL </c> instruction.
|
||||
///
|
||||
/// \param DATA2
|
||||
/// A 32-bit value is zero-extended and inserted into the 64-bit Data2 field.
|
||||
/// \param DATA1
|
||||
/// A 32-bit value is inserted into the 32-bit Data1 field.
|
||||
/// \param FLAGS
|
||||
/// A 32-bit immediate value is inserted into the 32-bit Flags field.
|
||||
#define __lwpval32(DATA2, DATA1, FLAGS) \
|
||||
(__builtin_ia32_lwpval32((unsigned int) (DATA2), (unsigned int) (DATA1), \
|
||||
(unsigned int) (FLAGS)))
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
/// Inserts programmed event record into the LWP event ring buffer
|
||||
/// and advances the ring buffer pointer.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> LWPINS </c> instruction.
|
||||
///
|
||||
/// \param DATA2
|
||||
/// A 64-bit value is inserted into the 64-bit Data2 field.
|
||||
/// \param DATA1
|
||||
/// A 32-bit value is inserted into the 32-bit Data1 field.
|
||||
/// \param FLAGS
|
||||
/// A 32-bit immediate value is inserted into the 32-bit Flags field.
|
||||
/// \returns If the ring buffer is full and LWP is running in Synchronized Mode,
|
||||
/// the event record overwrites the last record in the buffer, the MissedEvents
|
||||
/// counter in the LWPCB is incremented, the head pointer is not advanced, and
|
||||
/// 1 is returned. Otherwise 0 is returned.
|
||||
#define __lwpins64(DATA2, DATA1, FLAGS) \
|
||||
(__builtin_ia32_lwpins64((unsigned long long) (DATA2), (unsigned int) (DATA1), \
|
||||
(unsigned int) (FLAGS)))
|
||||
|
||||
/// Decrements the LWP programmed value sample event counter. If the result is
|
||||
/// negative, inserts an event record into the LWP event ring buffer in memory
|
||||
/// and advances the ring buffer pointer.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> LWPVAL </c> instruction.
|
||||
///
|
||||
/// \param DATA2
|
||||
/// A 64-bit value is and inserted into the 64-bit Data2 field.
|
||||
/// \param DATA1
|
||||
/// A 32-bit value is inserted into the 32-bit Data1 field.
|
||||
/// \param FLAGS
|
||||
/// A 32-bit immediate value is inserted into the 32-bit Flags field.
|
||||
#define __lwpval64(DATA2, DATA1, FLAGS) \
|
||||
(__builtin_ia32_lwpval64((unsigned long long) (DATA2), (unsigned int) (DATA1), \
|
||||
(unsigned int) (FLAGS)))
|
||||
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __LWPINTRIN_H */
|
||||
@@ -0,0 +1,118 @@
|
||||
/*===---- lzcntintrin.h - LZCNT intrinsics ---------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <lzcntintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __LZCNTINTRIN_H
|
||||
#define __LZCNTINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("lzcnt")))
|
||||
|
||||
#ifndef _MSC_VER
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 16-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 16-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
#define __lzcnt16(X) __builtin_ia32_lzcnt_u16((unsigned short)(X))
|
||||
#endif // _MSC_VER
|
||||
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 32-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 32-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see _lzcnt_u32
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__lzcnt32(unsigned int __X)
|
||||
{
|
||||
return __builtin_ia32_lzcnt_u32(__X);
|
||||
}
|
||||
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 32-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 32-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see __lzcnt32
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_lzcnt_u32(unsigned int __X)
|
||||
{
|
||||
return __builtin_ia32_lzcnt_u32(__X);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
#ifndef _MSC_VER
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 64-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see _lzcnt_u64
|
||||
#define __lzcnt64(X) __builtin_ia32_lzcnt_u64((unsigned long long)(X))
|
||||
#endif // _MSC_VER
|
||||
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 64-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see __lzcnt64
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_lzcnt_u64(unsigned long long __X)
|
||||
{
|
||||
return __builtin_ia32_lzcnt_u64(__X);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __LZCNTINTRIN_H */
|
||||
@@ -0,0 +1,171 @@
|
||||
/*===---- mm3dnow.h - 3DNow! intrinsics ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef _MM3DNOW_H_INCLUDED
|
||||
#define _MM3DNOW_H_INCLUDED
|
||||
|
||||
#include <mmintrin.h>
|
||||
#include <prfchwintrin.h>
|
||||
|
||||
typedef float __v2sf __attribute__((__vector_size__(8)));
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("3dnow"), __min_vector_width__(64)))
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("3dnow")))
|
||||
_m_femms(void) {
|
||||
__builtin_ia32_femms();
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pavgusb(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pavgusb((__v8qi)__m1, (__v8qi)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pf2id(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pf2id((__v2sf)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfacc(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfacc((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfadd(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfadd((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfcmpeq(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfcmpeq((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfcmpge(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfcmpge((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfcmpgt(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfcmpgt((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfmax(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfmax((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfmin(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfmin((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfmul(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfmul((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfrcp(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pfrcp((__v2sf)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfrcpit1(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfrcpit1((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfrcpit2(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfrcpit2((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfrsqrt(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pfrsqrt((__v2sf)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfrsqrtit1(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfrsqit1((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfsub(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfsub((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfsubr(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfsubr((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pi2fd(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pi2fd((__v2si)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pmulhrw(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pmulhrw((__v4hi)__m1, (__v4hi)__m2);
|
||||
}
|
||||
|
||||
/* Handle the 3dnowa instructions here. */
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("3dnowa"), __min_vector_width__(64)))
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pf2iw(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pf2iw((__v2sf)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfnacc(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfnacc((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pfpnacc(__m64 __m1, __m64 __m2) {
|
||||
return (__m64)__builtin_ia32_pfpnacc((__v2sf)__m1, (__v2sf)__m2);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pi2fw(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pi2fw((__v2si)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pswapdsf(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pswapdsf((__v2sf)__m);
|
||||
}
|
||||
|
||||
static __inline__ __m64 __DEFAULT_FN_ATTRS
|
||||
_m_pswapdsi(__m64 __m) {
|
||||
return (__m64)__builtin_ia32_pswapdsi((__v2si)__m);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
/*===---- mm_malloc.h - Allocating and Freeing Aligned Memory Blocks -------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __MM_MALLOC_H
|
||||
#define __MM_MALLOC_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#ifndef __cplusplus
|
||||
extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
|
||||
#else
|
||||
// Some systems (e.g. those with GNU libc) declare posix_memalign with an
|
||||
// exception specifier. Via an "egregious workaround" in
|
||||
// Sema::CheckEquivalentExceptionSpec, Clang accepts the following as a valid
|
||||
// redeclaration of glibc's declaration.
|
||||
extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !(defined(_WIN32) && defined(_mm_malloc))
|
||||
static __inline__ void *__attribute__((__always_inline__, __nodebug__,
|
||||
__malloc__))
|
||||
_mm_malloc(size_t __size, size_t __align)
|
||||
{
|
||||
if (__align == 1) {
|
||||
return malloc(__size);
|
||||
}
|
||||
|
||||
if (!(__align & (__align - 1)) && __align < sizeof(void *))
|
||||
__align = sizeof(void *);
|
||||
|
||||
void *__mallocedMemory;
|
||||
#if defined(__MINGW32__)
|
||||
__mallocedMemory = __mingw_aligned_malloc(__size, __align);
|
||||
#elif defined(_WIN32)
|
||||
__mallocedMemory = _aligned_malloc(__size, __align);
|
||||
#else
|
||||
if (posix_memalign(&__mallocedMemory, __align, __size))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
return __mallocedMemory;
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_mm_free(void *__p)
|
||||
{
|
||||
free(__p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MM_MALLOC_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,171 @@
|
||||
/*===---- module.modulemap - intrinsics module map -------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
module _Builtin_intrinsics [system] [extern_c] {
|
||||
explicit module altivec {
|
||||
requires altivec
|
||||
header "altivec.h"
|
||||
}
|
||||
|
||||
explicit module arm {
|
||||
requires arm
|
||||
|
||||
explicit module acle {
|
||||
header "arm_acle.h"
|
||||
export *
|
||||
}
|
||||
|
||||
explicit module neon {
|
||||
requires neon
|
||||
header "arm_neon.h"
|
||||
header "arm_fp16.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
|
||||
explicit module intel {
|
||||
requires x86
|
||||
export *
|
||||
|
||||
header "immintrin.h"
|
||||
textual header "f16cintrin.h"
|
||||
textual header "avxintrin.h"
|
||||
textual header "avx2intrin.h"
|
||||
textual header "avx512fintrin.h"
|
||||
textual header "avx512erintrin.h"
|
||||
textual header "fmaintrin.h"
|
||||
|
||||
header "x86intrin.h"
|
||||
textual header "bmiintrin.h"
|
||||
textual header "bmi2intrin.h"
|
||||
textual header "lzcntintrin.h"
|
||||
textual header "xopintrin.h"
|
||||
textual header "fma4intrin.h"
|
||||
textual header "mwaitxintrin.h"
|
||||
textual header "clzerointrin.h"
|
||||
textual header "wbnoinvdintrin.h"
|
||||
textual header "cldemoteintrin.h"
|
||||
textual header "waitpkgintrin.h"
|
||||
textual header "movdirintrin.h"
|
||||
textual header "pconfigintrin.h"
|
||||
textual header "sgxintrin.h"
|
||||
textual header "ptwriteintrin.h"
|
||||
textual header "invpcidintrin.h"
|
||||
|
||||
textual header "__wmmintrin_aes.h"
|
||||
textual header "__wmmintrin_pclmul.h"
|
||||
|
||||
explicit module mm_malloc {
|
||||
requires !freestanding
|
||||
header "mm_malloc.h"
|
||||
export * // note: for <stdlib.h> dependency
|
||||
}
|
||||
|
||||
explicit module cpuid {
|
||||
requires gnuinlineasm
|
||||
header "cpuid.h"
|
||||
}
|
||||
|
||||
explicit module mmx {
|
||||
header "mmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse {
|
||||
export mm_malloc
|
||||
export mmx
|
||||
export sse2 // note: for hackish <emmintrin.h> dependency
|
||||
header "xmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse2 {
|
||||
export sse
|
||||
header "emmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse3 {
|
||||
export sse2
|
||||
header "pmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module ssse3 {
|
||||
export sse3
|
||||
header "tmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse4_1 {
|
||||
export ssse3
|
||||
header "smmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse4_2 {
|
||||
export sse4_1
|
||||
header "nmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse4a {
|
||||
export sse3
|
||||
header "ammintrin.h"
|
||||
}
|
||||
|
||||
explicit module popcnt {
|
||||
header "popcntintrin.h"
|
||||
}
|
||||
|
||||
explicit module mm3dnow {
|
||||
header "mm3dnow.h"
|
||||
}
|
||||
|
||||
explicit module aes_pclmul {
|
||||
header "wmmintrin.h"
|
||||
export aes
|
||||
export pclmul
|
||||
}
|
||||
}
|
||||
|
||||
explicit module systemz {
|
||||
requires systemz
|
||||
export *
|
||||
|
||||
header "s390intrin.h"
|
||||
|
||||
explicit module htm {
|
||||
requires htm
|
||||
header "htmintrin.h"
|
||||
header "htmxlintrin.h"
|
||||
}
|
||||
|
||||
explicit module zvector {
|
||||
requires zvector, vx
|
||||
header "vecintrin.h"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module _Builtin_stddef_max_align_t [system] [extern_c] {
|
||||
header "__stddef_max_align_t.h"
|
||||
}
|
||||
|
||||
module opencl_c {
|
||||
requires opencl
|
||||
header "opencl-c.h"
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*===------------------------- movdirintrin.h ------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <movdirintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _MOVDIRINTRIN_H
|
||||
#define _MOVDIRINTRIN_H
|
||||
|
||||
/* Move doubleword as direct store */
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("movdiri")))
|
||||
_directstoreu_u32 (void *__dst, unsigned int __value)
|
||||
{
|
||||
__builtin_ia32_directstore_u32((unsigned int *)__dst, (unsigned int)__value);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
/* Move quadword as direct store */
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("movdiri")))
|
||||
_directstoreu_u64 (void *__dst, unsigned long __value)
|
||||
{
|
||||
__builtin_ia32_directstore_u64((unsigned long *)__dst, __value);
|
||||
}
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
/*
|
||||
* movdir64b - Move 64 bytes as direct store.
|
||||
* The destination must be 64 byte aligned, and the store is atomic.
|
||||
* The source address has no alignment requirement, and the load from
|
||||
* the source address is not atomic.
|
||||
*/
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("movdir64b")))
|
||||
_movdir64b (void *__dst __attribute__((align_value(64))), const void *__src)
|
||||
{
|
||||
__builtin_ia32_movdir64b(__dst, __src);
|
||||
}
|
||||
|
||||
#endif /* _MOVDIRINTRIN_H */
|
||||
@@ -0,0 +1,583 @@
|
||||
/*===---- msa.h - MIPS MSA intrinsics --------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef _MSA_H
|
||||
#define _MSA_H 1
|
||||
|
||||
#if defined(__mips_msa)
|
||||
typedef signed char v16i8 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef signed char v16i8_b __attribute__((vector_size(16), aligned(1)));
|
||||
typedef unsigned char v16u8 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef unsigned char v16u8_b __attribute__((vector_size(16), aligned(1)));
|
||||
typedef short v8i16 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef short v8i16_h __attribute__((vector_size(16), aligned(2)));
|
||||
typedef unsigned short v8u16 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef unsigned short v8u16_h __attribute__((vector_size(16), aligned(2)));
|
||||
typedef int v4i32 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef int v4i32_w __attribute__((vector_size(16), aligned(4)));
|
||||
typedef unsigned int v4u32 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef unsigned int v4u32_w __attribute__((vector_size(16), aligned(4)));
|
||||
typedef long long v2i64 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef long long v2i64_d __attribute__((vector_size(16), aligned(8)));
|
||||
typedef unsigned long long v2u64 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef unsigned long long v2u64_d __attribute__((vector_size(16), aligned(8)));
|
||||
typedef float v4f32 __attribute__((vector_size(16), aligned(16)));
|
||||
typedef float v4f32_w __attribute__((vector_size(16), aligned(4)));
|
||||
typedef double v2f64 __attribute__ ((vector_size(16), aligned(16)));
|
||||
typedef double v2f64_d __attribute__ ((vector_size(16), aligned(8)));
|
||||
|
||||
#define __msa_sll_b __builtin_msa_sll_b
|
||||
#define __msa_sll_h __builtin_msa_sll_h
|
||||
#define __msa_sll_w __builtin_msa_sll_w
|
||||
#define __msa_sll_d __builtin_msa_sll_d
|
||||
#define __msa_slli_b __builtin_msa_slli_b
|
||||
#define __msa_slli_h __builtin_msa_slli_h
|
||||
#define __msa_slli_w __builtin_msa_slli_w
|
||||
#define __msa_slli_d __builtin_msa_slli_d
|
||||
#define __msa_sra_b __builtin_msa_sra_b
|
||||
#define __msa_sra_h __builtin_msa_sra_h
|
||||
#define __msa_sra_w __builtin_msa_sra_w
|
||||
#define __msa_sra_d __builtin_msa_sra_d
|
||||
#define __msa_srai_b __builtin_msa_srai_b
|
||||
#define __msa_srai_h __builtin_msa_srai_h
|
||||
#define __msa_srai_w __builtin_msa_srai_w
|
||||
#define __msa_srai_d __builtin_msa_srai_d
|
||||
#define __msa_srar_b __builtin_msa_srar_b
|
||||
#define __msa_srar_h __builtin_msa_srar_h
|
||||
#define __msa_srar_w __builtin_msa_srar_w
|
||||
#define __msa_srar_d __builtin_msa_srar_d
|
||||
#define __msa_srari_b __builtin_msa_srari_b
|
||||
#define __msa_srari_h __builtin_msa_srari_h
|
||||
#define __msa_srari_w __builtin_msa_srari_w
|
||||
#define __msa_srari_d __builtin_msa_srari_d
|
||||
#define __msa_srl_b __builtin_msa_srl_b
|
||||
#define __msa_srl_h __builtin_msa_srl_h
|
||||
#define __msa_srl_w __builtin_msa_srl_w
|
||||
#define __msa_srl_d __builtin_msa_srl_d
|
||||
#define __msa_srli_b __builtin_msa_srli_b
|
||||
#define __msa_srli_h __builtin_msa_srli_h
|
||||
#define __msa_srli_w __builtin_msa_srli_w
|
||||
#define __msa_srli_d __builtin_msa_srli_d
|
||||
#define __msa_srlr_b __builtin_msa_srlr_b
|
||||
#define __msa_srlr_h __builtin_msa_srlr_h
|
||||
#define __msa_srlr_w __builtin_msa_srlr_w
|
||||
#define __msa_srlr_d __builtin_msa_srlr_d
|
||||
#define __msa_srlri_b __builtin_msa_srlri_b
|
||||
#define __msa_srlri_h __builtin_msa_srlri_h
|
||||
#define __msa_srlri_w __builtin_msa_srlri_w
|
||||
#define __msa_srlri_d __builtin_msa_srlri_d
|
||||
#define __msa_bclr_b __builtin_msa_bclr_b
|
||||
#define __msa_bclr_h __builtin_msa_bclr_h
|
||||
#define __msa_bclr_w __builtin_msa_bclr_w
|
||||
#define __msa_bclr_d __builtin_msa_bclr_d
|
||||
#define __msa_bclri_b __builtin_msa_bclri_b
|
||||
#define __msa_bclri_h __builtin_msa_bclri_h
|
||||
#define __msa_bclri_w __builtin_msa_bclri_w
|
||||
#define __msa_bclri_d __builtin_msa_bclri_d
|
||||
#define __msa_bset_b __builtin_msa_bset_b
|
||||
#define __msa_bset_h __builtin_msa_bset_h
|
||||
#define __msa_bset_w __builtin_msa_bset_w
|
||||
#define __msa_bset_d __builtin_msa_bset_d
|
||||
#define __msa_bseti_b __builtin_msa_bseti_b
|
||||
#define __msa_bseti_h __builtin_msa_bseti_h
|
||||
#define __msa_bseti_w __builtin_msa_bseti_w
|
||||
#define __msa_bseti_d __builtin_msa_bseti_d
|
||||
#define __msa_bneg_b __builtin_msa_bneg_b
|
||||
#define __msa_bneg_h __builtin_msa_bneg_h
|
||||
#define __msa_bneg_w __builtin_msa_bneg_w
|
||||
#define __msa_bneg_d __builtin_msa_bneg_d
|
||||
#define __msa_bnegi_b __builtin_msa_bnegi_b
|
||||
#define __msa_bnegi_h __builtin_msa_bnegi_h
|
||||
#define __msa_bnegi_w __builtin_msa_bnegi_w
|
||||
#define __msa_bnegi_d __builtin_msa_bnegi_d
|
||||
#define __msa_binsl_b __builtin_msa_binsl_b
|
||||
#define __msa_binsl_h __builtin_msa_binsl_h
|
||||
#define __msa_binsl_w __builtin_msa_binsl_w
|
||||
#define __msa_binsl_d __builtin_msa_binsl_d
|
||||
#define __msa_binsli_b __builtin_msa_binsli_b
|
||||
#define __msa_binsli_h __builtin_msa_binsli_h
|
||||
#define __msa_binsli_w __builtin_msa_binsli_w
|
||||
#define __msa_binsli_d __builtin_msa_binsli_d
|
||||
#define __msa_binsr_b __builtin_msa_binsr_b
|
||||
#define __msa_binsr_h __builtin_msa_binsr_h
|
||||
#define __msa_binsr_w __builtin_msa_binsr_w
|
||||
#define __msa_binsr_d __builtin_msa_binsr_d
|
||||
#define __msa_binsri_b __builtin_msa_binsri_b
|
||||
#define __msa_binsri_h __builtin_msa_binsri_h
|
||||
#define __msa_binsri_w __builtin_msa_binsri_w
|
||||
#define __msa_binsri_d __builtin_msa_binsri_d
|
||||
#define __msa_addv_b __builtin_msa_addv_b
|
||||
#define __msa_addv_h __builtin_msa_addv_h
|
||||
#define __msa_addv_w __builtin_msa_addv_w
|
||||
#define __msa_addv_d __builtin_msa_addv_d
|
||||
#define __msa_addvi_b __builtin_msa_addvi_b
|
||||
#define __msa_addvi_h __builtin_msa_addvi_h
|
||||
#define __msa_addvi_w __builtin_msa_addvi_w
|
||||
#define __msa_addvi_d __builtin_msa_addvi_d
|
||||
#define __msa_subv_b __builtin_msa_subv_b
|
||||
#define __msa_subv_h __builtin_msa_subv_h
|
||||
#define __msa_subv_w __builtin_msa_subv_w
|
||||
#define __msa_subv_d __builtin_msa_subv_d
|
||||
#define __msa_subvi_b __builtin_msa_subvi_b
|
||||
#define __msa_subvi_h __builtin_msa_subvi_h
|
||||
#define __msa_subvi_w __builtin_msa_subvi_w
|
||||
#define __msa_subvi_d __builtin_msa_subvi_d
|
||||
#define __msa_max_s_b __builtin_msa_max_s_b
|
||||
#define __msa_max_s_h __builtin_msa_max_s_h
|
||||
#define __msa_max_s_w __builtin_msa_max_s_w
|
||||
#define __msa_max_s_d __builtin_msa_max_s_d
|
||||
#define __msa_maxi_s_b __builtin_msa_maxi_s_b
|
||||
#define __msa_maxi_s_h __builtin_msa_maxi_s_h
|
||||
#define __msa_maxi_s_w __builtin_msa_maxi_s_w
|
||||
#define __msa_maxi_s_d __builtin_msa_maxi_s_d
|
||||
#define __msa_max_u_b __builtin_msa_max_u_b
|
||||
#define __msa_max_u_h __builtin_msa_max_u_h
|
||||
#define __msa_max_u_w __builtin_msa_max_u_w
|
||||
#define __msa_max_u_d __builtin_msa_max_u_d
|
||||
#define __msa_maxi_u_b __builtin_msa_maxi_u_b
|
||||
#define __msa_maxi_u_h __builtin_msa_maxi_u_h
|
||||
#define __msa_maxi_u_w __builtin_msa_maxi_u_w
|
||||
#define __msa_maxi_u_d __builtin_msa_maxi_u_d
|
||||
#define __msa_min_s_b __builtin_msa_min_s_b
|
||||
#define __msa_min_s_h __builtin_msa_min_s_h
|
||||
#define __msa_min_s_w __builtin_msa_min_s_w
|
||||
#define __msa_min_s_d __builtin_msa_min_s_d
|
||||
#define __msa_mini_s_b __builtin_msa_mini_s_b
|
||||
#define __msa_mini_s_h __builtin_msa_mini_s_h
|
||||
#define __msa_mini_s_w __builtin_msa_mini_s_w
|
||||
#define __msa_mini_s_d __builtin_msa_mini_s_d
|
||||
#define __msa_min_u_b __builtin_msa_min_u_b
|
||||
#define __msa_min_u_h __builtin_msa_min_u_h
|
||||
#define __msa_min_u_w __builtin_msa_min_u_w
|
||||
#define __msa_min_u_d __builtin_msa_min_u_d
|
||||
#define __msa_mini_u_b __builtin_msa_mini_u_b
|
||||
#define __msa_mini_u_h __builtin_msa_mini_u_h
|
||||
#define __msa_mini_u_w __builtin_msa_mini_u_w
|
||||
#define __msa_mini_u_d __builtin_msa_mini_u_d
|
||||
#define __msa_max_a_b __builtin_msa_max_a_b
|
||||
#define __msa_max_a_h __builtin_msa_max_a_h
|
||||
#define __msa_max_a_w __builtin_msa_max_a_w
|
||||
#define __msa_max_a_d __builtin_msa_max_a_d
|
||||
#define __msa_min_a_b __builtin_msa_min_a_b
|
||||
#define __msa_min_a_h __builtin_msa_min_a_h
|
||||
#define __msa_min_a_w __builtin_msa_min_a_w
|
||||
#define __msa_min_a_d __builtin_msa_min_a_d
|
||||
#define __msa_ceq_b __builtin_msa_ceq_b
|
||||
#define __msa_ceq_h __builtin_msa_ceq_h
|
||||
#define __msa_ceq_w __builtin_msa_ceq_w
|
||||
#define __msa_ceq_d __builtin_msa_ceq_d
|
||||
#define __msa_ceqi_b __builtin_msa_ceqi_b
|
||||
#define __msa_ceqi_h __builtin_msa_ceqi_h
|
||||
#define __msa_ceqi_w __builtin_msa_ceqi_w
|
||||
#define __msa_ceqi_d __builtin_msa_ceqi_d
|
||||
#define __msa_clt_s_b __builtin_msa_clt_s_b
|
||||
#define __msa_clt_s_h __builtin_msa_clt_s_h
|
||||
#define __msa_clt_s_w __builtin_msa_clt_s_w
|
||||
#define __msa_clt_s_d __builtin_msa_clt_s_d
|
||||
#define __msa_clti_s_b __builtin_msa_clti_s_b
|
||||
#define __msa_clti_s_h __builtin_msa_clti_s_h
|
||||
#define __msa_clti_s_w __builtin_msa_clti_s_w
|
||||
#define __msa_clti_s_d __builtin_msa_clti_s_d
|
||||
#define __msa_clt_u_b __builtin_msa_clt_u_b
|
||||
#define __msa_clt_u_h __builtin_msa_clt_u_h
|
||||
#define __msa_clt_u_w __builtin_msa_clt_u_w
|
||||
#define __msa_clt_u_d __builtin_msa_clt_u_d
|
||||
#define __msa_clti_u_b __builtin_msa_clti_u_b
|
||||
#define __msa_clti_u_h __builtin_msa_clti_u_h
|
||||
#define __msa_clti_u_w __builtin_msa_clti_u_w
|
||||
#define __msa_clti_u_d __builtin_msa_clti_u_d
|
||||
#define __msa_cle_s_b __builtin_msa_cle_s_b
|
||||
#define __msa_cle_s_h __builtin_msa_cle_s_h
|
||||
#define __msa_cle_s_w __builtin_msa_cle_s_w
|
||||
#define __msa_cle_s_d __builtin_msa_cle_s_d
|
||||
#define __msa_clei_s_b __builtin_msa_clei_s_b
|
||||
#define __msa_clei_s_h __builtin_msa_clei_s_h
|
||||
#define __msa_clei_s_w __builtin_msa_clei_s_w
|
||||
#define __msa_clei_s_d __builtin_msa_clei_s_d
|
||||
#define __msa_cle_u_b __builtin_msa_cle_u_b
|
||||
#define __msa_cle_u_h __builtin_msa_cle_u_h
|
||||
#define __msa_cle_u_w __builtin_msa_cle_u_w
|
||||
#define __msa_cle_u_d __builtin_msa_cle_u_d
|
||||
#define __msa_clei_u_b __builtin_msa_clei_u_b
|
||||
#define __msa_clei_u_h __builtin_msa_clei_u_h
|
||||
#define __msa_clei_u_w __builtin_msa_clei_u_w
|
||||
#define __msa_clei_u_d __builtin_msa_clei_u_d
|
||||
#define __msa_ld_b __builtin_msa_ld_b
|
||||
#define __msa_ld_h __builtin_msa_ld_h
|
||||
#define __msa_ld_w __builtin_msa_ld_w
|
||||
#define __msa_ld_d __builtin_msa_ld_d
|
||||
#define __msa_st_b __builtin_msa_st_b
|
||||
#define __msa_st_h __builtin_msa_st_h
|
||||
#define __msa_st_w __builtin_msa_st_w
|
||||
#define __msa_st_d __builtin_msa_st_d
|
||||
#define __msa_sat_s_b __builtin_msa_sat_s_b
|
||||
#define __msa_sat_s_h __builtin_msa_sat_s_h
|
||||
#define __msa_sat_s_w __builtin_msa_sat_s_w
|
||||
#define __msa_sat_s_d __builtin_msa_sat_s_d
|
||||
#define __msa_sat_u_b __builtin_msa_sat_u_b
|
||||
#define __msa_sat_u_h __builtin_msa_sat_u_h
|
||||
#define __msa_sat_u_w __builtin_msa_sat_u_w
|
||||
#define __msa_sat_u_d __builtin_msa_sat_u_d
|
||||
#define __msa_add_a_b __builtin_msa_add_a_b
|
||||
#define __msa_add_a_h __builtin_msa_add_a_h
|
||||
#define __msa_add_a_w __builtin_msa_add_a_w
|
||||
#define __msa_add_a_d __builtin_msa_add_a_d
|
||||
#define __msa_adds_a_b __builtin_msa_adds_a_b
|
||||
#define __msa_adds_a_h __builtin_msa_adds_a_h
|
||||
#define __msa_adds_a_w __builtin_msa_adds_a_w
|
||||
#define __msa_adds_a_d __builtin_msa_adds_a_d
|
||||
#define __msa_adds_s_b __builtin_msa_adds_s_b
|
||||
#define __msa_adds_s_h __builtin_msa_adds_s_h
|
||||
#define __msa_adds_s_w __builtin_msa_adds_s_w
|
||||
#define __msa_adds_s_d __builtin_msa_adds_s_d
|
||||
#define __msa_adds_u_b __builtin_msa_adds_u_b
|
||||
#define __msa_adds_u_h __builtin_msa_adds_u_h
|
||||
#define __msa_adds_u_w __builtin_msa_adds_u_w
|
||||
#define __msa_adds_u_d __builtin_msa_adds_u_d
|
||||
#define __msa_ave_s_b __builtin_msa_ave_s_b
|
||||
#define __msa_ave_s_h __builtin_msa_ave_s_h
|
||||
#define __msa_ave_s_w __builtin_msa_ave_s_w
|
||||
#define __msa_ave_s_d __builtin_msa_ave_s_d
|
||||
#define __msa_ave_u_b __builtin_msa_ave_u_b
|
||||
#define __msa_ave_u_h __builtin_msa_ave_u_h
|
||||
#define __msa_ave_u_w __builtin_msa_ave_u_w
|
||||
#define __msa_ave_u_d __builtin_msa_ave_u_d
|
||||
#define __msa_aver_s_b __builtin_msa_aver_s_b
|
||||
#define __msa_aver_s_h __builtin_msa_aver_s_h
|
||||
#define __msa_aver_s_w __builtin_msa_aver_s_w
|
||||
#define __msa_aver_s_d __builtin_msa_aver_s_d
|
||||
#define __msa_aver_u_b __builtin_msa_aver_u_b
|
||||
#define __msa_aver_u_h __builtin_msa_aver_u_h
|
||||
#define __msa_aver_u_w __builtin_msa_aver_u_w
|
||||
#define __msa_aver_u_d __builtin_msa_aver_u_d
|
||||
#define __msa_subs_s_b __builtin_msa_subs_s_b
|
||||
#define __msa_subs_s_h __builtin_msa_subs_s_h
|
||||
#define __msa_subs_s_w __builtin_msa_subs_s_w
|
||||
#define __msa_subs_s_d __builtin_msa_subs_s_d
|
||||
#define __msa_subs_u_b __builtin_msa_subs_u_b
|
||||
#define __msa_subs_u_h __builtin_msa_subs_u_h
|
||||
#define __msa_subs_u_w __builtin_msa_subs_u_w
|
||||
#define __msa_subs_u_d __builtin_msa_subs_u_d
|
||||
#define __msa_subsuu_s_b __builtin_msa_subsuu_s_b
|
||||
#define __msa_subsuu_s_h __builtin_msa_subsuu_s_h
|
||||
#define __msa_subsuu_s_w __builtin_msa_subsuu_s_w
|
||||
#define __msa_subsuu_s_d __builtin_msa_subsuu_s_d
|
||||
#define __msa_subsus_u_b __builtin_msa_subsus_u_b
|
||||
#define __msa_subsus_u_h __builtin_msa_subsus_u_h
|
||||
#define __msa_subsus_u_w __builtin_msa_subsus_u_w
|
||||
#define __msa_subsus_u_d __builtin_msa_subsus_u_d
|
||||
#define __msa_asub_s_b __builtin_msa_asub_s_b
|
||||
#define __msa_asub_s_h __builtin_msa_asub_s_h
|
||||
#define __msa_asub_s_w __builtin_msa_asub_s_w
|
||||
#define __msa_asub_s_d __builtin_msa_asub_s_d
|
||||
#define __msa_asub_u_b __builtin_msa_asub_u_b
|
||||
#define __msa_asub_u_h __builtin_msa_asub_u_h
|
||||
#define __msa_asub_u_w __builtin_msa_asub_u_w
|
||||
#define __msa_asub_u_d __builtin_msa_asub_u_d
|
||||
#define __msa_mulv_b __builtin_msa_mulv_b
|
||||
#define __msa_mulv_h __builtin_msa_mulv_h
|
||||
#define __msa_mulv_w __builtin_msa_mulv_w
|
||||
#define __msa_mulv_d __builtin_msa_mulv_d
|
||||
#define __msa_maddv_b __builtin_msa_maddv_b
|
||||
#define __msa_maddv_h __builtin_msa_maddv_h
|
||||
#define __msa_maddv_w __builtin_msa_maddv_w
|
||||
#define __msa_maddv_d __builtin_msa_maddv_d
|
||||
#define __msa_msubv_b __builtin_msa_msubv_b
|
||||
#define __msa_msubv_h __builtin_msa_msubv_h
|
||||
#define __msa_msubv_w __builtin_msa_msubv_w
|
||||
#define __msa_msubv_d __builtin_msa_msubv_d
|
||||
#define __msa_div_s_b __builtin_msa_div_s_b
|
||||
#define __msa_div_s_h __builtin_msa_div_s_h
|
||||
#define __msa_div_s_w __builtin_msa_div_s_w
|
||||
#define __msa_div_s_d __builtin_msa_div_s_d
|
||||
#define __msa_div_u_b __builtin_msa_div_u_b
|
||||
#define __msa_div_u_h __builtin_msa_div_u_h
|
||||
#define __msa_div_u_w __builtin_msa_div_u_w
|
||||
#define __msa_div_u_d __builtin_msa_div_u_d
|
||||
#define __msa_hadd_s_h __builtin_msa_hadd_s_h
|
||||
#define __msa_hadd_s_w __builtin_msa_hadd_s_w
|
||||
#define __msa_hadd_s_d __builtin_msa_hadd_s_d
|
||||
#define __msa_hadd_u_h __builtin_msa_hadd_u_h
|
||||
#define __msa_hadd_u_w __builtin_msa_hadd_u_w
|
||||
#define __msa_hadd_u_d __builtin_msa_hadd_u_d
|
||||
#define __msa_hsub_s_h __builtin_msa_hsub_s_h
|
||||
#define __msa_hsub_s_w __builtin_msa_hsub_s_w
|
||||
#define __msa_hsub_s_d __builtin_msa_hsub_s_d
|
||||
#define __msa_hsub_u_h __builtin_msa_hsub_u_h
|
||||
#define __msa_hsub_u_w __builtin_msa_hsub_u_w
|
||||
#define __msa_hsub_u_d __builtin_msa_hsub_u_d
|
||||
#define __msa_mod_s_b __builtin_msa_mod_s_b
|
||||
#define __msa_mod_s_h __builtin_msa_mod_s_h
|
||||
#define __msa_mod_s_w __builtin_msa_mod_s_w
|
||||
#define __msa_mod_s_d __builtin_msa_mod_s_d
|
||||
#define __msa_mod_u_b __builtin_msa_mod_u_b
|
||||
#define __msa_mod_u_h __builtin_msa_mod_u_h
|
||||
#define __msa_mod_u_w __builtin_msa_mod_u_w
|
||||
#define __msa_mod_u_d __builtin_msa_mod_u_d
|
||||
#define __msa_dotp_s_h __builtin_msa_dotp_s_h
|
||||
#define __msa_dotp_s_w __builtin_msa_dotp_s_w
|
||||
#define __msa_dotp_s_d __builtin_msa_dotp_s_d
|
||||
#define __msa_dotp_u_h __builtin_msa_dotp_u_h
|
||||
#define __msa_dotp_u_w __builtin_msa_dotp_u_w
|
||||
#define __msa_dotp_u_d __builtin_msa_dotp_u_d
|
||||
#define __msa_dpadd_s_h __builtin_msa_dpadd_s_h
|
||||
#define __msa_dpadd_s_w __builtin_msa_dpadd_s_w
|
||||
#define __msa_dpadd_s_d __builtin_msa_dpadd_s_d
|
||||
#define __msa_dpadd_u_h __builtin_msa_dpadd_u_h
|
||||
#define __msa_dpadd_u_w __builtin_msa_dpadd_u_w
|
||||
#define __msa_dpadd_u_d __builtin_msa_dpadd_u_d
|
||||
#define __msa_dpsub_s_h __builtin_msa_dpsub_s_h
|
||||
#define __msa_dpsub_s_w __builtin_msa_dpsub_s_w
|
||||
#define __msa_dpsub_s_d __builtin_msa_dpsub_s_d
|
||||
#define __msa_dpsub_u_h __builtin_msa_dpsub_u_h
|
||||
#define __msa_dpsub_u_w __builtin_msa_dpsub_u_w
|
||||
#define __msa_dpsub_u_d __builtin_msa_dpsub_u_d
|
||||
#define __msa_sld_b __builtin_msa_sld_b
|
||||
#define __msa_sld_h __builtin_msa_sld_h
|
||||
#define __msa_sld_w __builtin_msa_sld_w
|
||||
#define __msa_sld_d __builtin_msa_sld_d
|
||||
#define __msa_sldi_b __builtin_msa_sldi_b
|
||||
#define __msa_sldi_h __builtin_msa_sldi_h
|
||||
#define __msa_sldi_w __builtin_msa_sldi_w
|
||||
#define __msa_sldi_d __builtin_msa_sldi_d
|
||||
#define __msa_splat_b __builtin_msa_splat_b
|
||||
#define __msa_splat_h __builtin_msa_splat_h
|
||||
#define __msa_splat_w __builtin_msa_splat_w
|
||||
#define __msa_splat_d __builtin_msa_splat_d
|
||||
#define __msa_splati_b __builtin_msa_splati_b
|
||||
#define __msa_splati_h __builtin_msa_splati_h
|
||||
#define __msa_splati_w __builtin_msa_splati_w
|
||||
#define __msa_splati_d __builtin_msa_splati_d
|
||||
#define __msa_pckev_b __builtin_msa_pckev_b
|
||||
#define __msa_pckev_h __builtin_msa_pckev_h
|
||||
#define __msa_pckev_w __builtin_msa_pckev_w
|
||||
#define __msa_pckev_d __builtin_msa_pckev_d
|
||||
#define __msa_pckod_b __builtin_msa_pckod_b
|
||||
#define __msa_pckod_h __builtin_msa_pckod_h
|
||||
#define __msa_pckod_w __builtin_msa_pckod_w
|
||||
#define __msa_pckod_d __builtin_msa_pckod_d
|
||||
#define __msa_ilvl_b __builtin_msa_ilvl_b
|
||||
#define __msa_ilvl_h __builtin_msa_ilvl_h
|
||||
#define __msa_ilvl_w __builtin_msa_ilvl_w
|
||||
#define __msa_ilvl_d __builtin_msa_ilvl_d
|
||||
#define __msa_ilvr_b __builtin_msa_ilvr_b
|
||||
#define __msa_ilvr_h __builtin_msa_ilvr_h
|
||||
#define __msa_ilvr_w __builtin_msa_ilvr_w
|
||||
#define __msa_ilvr_d __builtin_msa_ilvr_d
|
||||
#define __msa_ilvev_b __builtin_msa_ilvev_b
|
||||
#define __msa_ilvev_h __builtin_msa_ilvev_h
|
||||
#define __msa_ilvev_w __builtin_msa_ilvev_w
|
||||
#define __msa_ilvev_d __builtin_msa_ilvev_d
|
||||
#define __msa_ilvod_b __builtin_msa_ilvod_b
|
||||
#define __msa_ilvod_h __builtin_msa_ilvod_h
|
||||
#define __msa_ilvod_w __builtin_msa_ilvod_w
|
||||
#define __msa_ilvod_d __builtin_msa_ilvod_d
|
||||
#define __msa_vshf_b __builtin_msa_vshf_b
|
||||
#define __msa_vshf_h __builtin_msa_vshf_h
|
||||
#define __msa_vshf_w __builtin_msa_vshf_w
|
||||
#define __msa_vshf_d __builtin_msa_vshf_d
|
||||
#define __msa_and_v __builtin_msa_and_v
|
||||
#define __msa_andi_b __builtin_msa_andi_b
|
||||
#define __msa_or_v __builtin_msa_or_v
|
||||
#define __msa_ori_b __builtin_msa_ori_b
|
||||
#define __msa_nor_v __builtin_msa_nor_v
|
||||
#define __msa_nori_b __builtin_msa_nori_b
|
||||
#define __msa_xor_v __builtin_msa_xor_v
|
||||
#define __msa_xori_b __builtin_msa_xori_b
|
||||
#define __msa_bmnz_v __builtin_msa_bmnz_v
|
||||
#define __msa_bmnzi_b __builtin_msa_bmnzi_b
|
||||
#define __msa_bmz_v __builtin_msa_bmz_v
|
||||
#define __msa_bmzi_b __builtin_msa_bmzi_b
|
||||
#define __msa_bsel_v __builtin_msa_bsel_v
|
||||
#define __msa_bseli_b __builtin_msa_bseli_b
|
||||
#define __msa_shf_b __builtin_msa_shf_b
|
||||
#define __msa_shf_h __builtin_msa_shf_h
|
||||
#define __msa_shf_w __builtin_msa_shf_w
|
||||
#define __msa_test_bnz_v __builtin_msa_bnz_v
|
||||
#define __msa_test_bz_v __builtin_msa_bz_v
|
||||
#define __msa_fill_b __builtin_msa_fill_b
|
||||
#define __msa_fill_h __builtin_msa_fill_h
|
||||
#define __msa_fill_w __builtin_msa_fill_w
|
||||
#define __msa_fill_d __builtin_msa_fill_d
|
||||
#define __msa_pcnt_b __builtin_msa_pcnt_b
|
||||
#define __msa_pcnt_h __builtin_msa_pcnt_h
|
||||
#define __msa_pcnt_w __builtin_msa_pcnt_w
|
||||
#define __msa_pcnt_d __builtin_msa_pcnt_d
|
||||
#define __msa_nloc_b __builtin_msa_nloc_b
|
||||
#define __msa_nloc_h __builtin_msa_nloc_h
|
||||
#define __msa_nloc_w __builtin_msa_nloc_w
|
||||
#define __msa_nloc_d __builtin_msa_nloc_d
|
||||
#define __msa_nlzc_b __builtin_msa_nlzc_b
|
||||
#define __msa_nlzc_h __builtin_msa_nlzc_h
|
||||
#define __msa_nlzc_w __builtin_msa_nlzc_w
|
||||
#define __msa_nlzc_d __builtin_msa_nlzc_d
|
||||
#define __msa_copy_s_b __builtin_msa_copy_s_b
|
||||
#define __msa_copy_s_h __builtin_msa_copy_s_h
|
||||
#define __msa_copy_s_w __builtin_msa_copy_s_w
|
||||
#define __msa_copy_s_d __builtin_msa_copy_s_d
|
||||
#define __msa_copy_u_b __builtin_msa_copy_u_b
|
||||
#define __msa_copy_u_h __builtin_msa_copy_u_h
|
||||
#define __msa_copy_u_w __builtin_msa_copy_u_w
|
||||
#define __msa_copy_u_d __builtin_msa_copy_u_d
|
||||
#define __msa_insert_b __builtin_msa_insert_b
|
||||
#define __msa_insert_h __builtin_msa_insert_h
|
||||
#define __msa_insert_w __builtin_msa_insert_w
|
||||
#define __msa_insert_d __builtin_msa_insert_d
|
||||
#define __msa_insve_b __builtin_msa_insve_b
|
||||
#define __msa_insve_h __builtin_msa_insve_h
|
||||
#define __msa_insve_w __builtin_msa_insve_w
|
||||
#define __msa_insve_d __builtin_msa_insve_d
|
||||
#define __msa_test_bnz_b __builtin_msa_bnz_b
|
||||
#define __msa_test_bnz_h __builtin_msa_bnz_h
|
||||
#define __msa_test_bnz_w __builtin_msa_bnz_w
|
||||
#define __msa_test_bnz_d __builtin_msa_bnz_d
|
||||
#define __msa_test_bz_b __builtin_msa_bz_b
|
||||
#define __msa_test_bz_h __builtin_msa_bz_h
|
||||
#define __msa_test_bz_w __builtin_msa_bz_w
|
||||
#define __msa_test_bz_d __builtin_msa_bz_d
|
||||
#define __msa_ldi_b __builtin_msa_ldi_b
|
||||
#define __msa_ldi_h __builtin_msa_ldi_h
|
||||
#define __msa_ldi_w __builtin_msa_ldi_w
|
||||
#define __msa_ldi_d __builtin_msa_ldi_d
|
||||
#define __msa_fcaf_w __builtin_msa_fcaf_w
|
||||
#define __msa_fcaf_d __builtin_msa_fcaf_d
|
||||
#define __msa_fcor_w __builtin_msa_fcor_w
|
||||
#define __msa_fcor_d __builtin_msa_fcor_d
|
||||
#define __msa_fcun_w __builtin_msa_fcun_w
|
||||
#define __msa_fcun_d __builtin_msa_fcun_d
|
||||
#define __msa_fcune_w __builtin_msa_fcune_w
|
||||
#define __msa_fcune_d __builtin_msa_fcune_d
|
||||
#define __msa_fcueq_w __builtin_msa_fcueq_w
|
||||
#define __msa_fcueq_d __builtin_msa_fcueq_d
|
||||
#define __msa_fceq_w __builtin_msa_fceq_w
|
||||
#define __msa_fceq_d __builtin_msa_fceq_d
|
||||
#define __msa_fcne_w __builtin_msa_fcne_w
|
||||
#define __msa_fcne_d __builtin_msa_fcne_d
|
||||
#define __msa_fclt_w __builtin_msa_fclt_w
|
||||
#define __msa_fclt_d __builtin_msa_fclt_d
|
||||
#define __msa_fcult_w __builtin_msa_fcult_w
|
||||
#define __msa_fcult_d __builtin_msa_fcult_d
|
||||
#define __msa_fcle_w __builtin_msa_fcle_w
|
||||
#define __msa_fcle_d __builtin_msa_fcle_d
|
||||
#define __msa_fcule_w __builtin_msa_fcule_w
|
||||
#define __msa_fcule_d __builtin_msa_fcule_d
|
||||
#define __msa_fsaf_w __builtin_msa_fsaf_w
|
||||
#define __msa_fsaf_d __builtin_msa_fsaf_d
|
||||
#define __msa_fsor_w __builtin_msa_fsor_w
|
||||
#define __msa_fsor_d __builtin_msa_fsor_d
|
||||
#define __msa_fsun_w __builtin_msa_fsun_w
|
||||
#define __msa_fsun_d __builtin_msa_fsun_d
|
||||
#define __msa_fsune_w __builtin_msa_fsune_w
|
||||
#define __msa_fsune_d __builtin_msa_fsune_d
|
||||
#define __msa_fsueq_w __builtin_msa_fsueq_w
|
||||
#define __msa_fsueq_d __builtin_msa_fsueq_d
|
||||
#define __msa_fseq_w __builtin_msa_fseq_w
|
||||
#define __msa_fseq_d __builtin_msa_fseq_d
|
||||
#define __msa_fsne_w __builtin_msa_fsne_w
|
||||
#define __msa_fsne_d __builtin_msa_fsne_d
|
||||
#define __msa_fslt_w __builtin_msa_fslt_w
|
||||
#define __msa_fslt_d __builtin_msa_fslt_d
|
||||
#define __msa_fsult_w __builtin_msa_fsult_w
|
||||
#define __msa_fsult_d __builtin_msa_fsult_d
|
||||
#define __msa_fsle_w __builtin_msa_fsle_w
|
||||
#define __msa_fsle_d __builtin_msa_fsle_d
|
||||
#define __msa_fsule_w __builtin_msa_fsule_w
|
||||
#define __msa_fsule_d __builtin_msa_fsule_d
|
||||
#define __msa_fadd_w __builtin_msa_fadd_w
|
||||
#define __msa_fadd_d __builtin_msa_fadd_d
|
||||
#define __msa_fsub_w __builtin_msa_fsub_w
|
||||
#define __msa_fsub_d __builtin_msa_fsub_d
|
||||
#define __msa_fmul_w __builtin_msa_fmul_w
|
||||
#define __msa_fmul_d __builtin_msa_fmul_d
|
||||
#define __msa_fdiv_w __builtin_msa_fdiv_w
|
||||
#define __msa_fdiv_d __builtin_msa_fdiv_d
|
||||
#define __msa_fmadd_w __builtin_msa_fmadd_w
|
||||
#define __msa_fmadd_d __builtin_msa_fmadd_d
|
||||
#define __msa_fmsub_w __builtin_msa_fmsub_w
|
||||
#define __msa_fmsub_d __builtin_msa_fmsub_d
|
||||
#define __msa_fexp2_w __builtin_msa_fexp2_w
|
||||
#define __msa_fexp2_d __builtin_msa_fexp2_d
|
||||
#define __msa_fexdo_h __builtin_msa_fexdo_h
|
||||
#define __msa_fexdo_w __builtin_msa_fexdo_w
|
||||
#define __msa_ftq_h __builtin_msa_ftq_h
|
||||
#define __msa_ftq_w __builtin_msa_ftq_w
|
||||
#define __msa_fmin_w __builtin_msa_fmin_w
|
||||
#define __msa_fmin_d __builtin_msa_fmin_d
|
||||
#define __msa_fmin_a_w __builtin_msa_fmin_a_w
|
||||
#define __msa_fmin_a_d __builtin_msa_fmin_a_d
|
||||
#define __msa_fmax_w __builtin_msa_fmax_w
|
||||
#define __msa_fmax_d __builtin_msa_fmax_d
|
||||
#define __msa_fmax_a_w __builtin_msa_fmax_a_w
|
||||
#define __msa_fmax_a_d __builtin_msa_fmax_a_d
|
||||
#define __msa_mul_q_h __builtin_msa_mul_q_h
|
||||
#define __msa_mul_q_w __builtin_msa_mul_q_w
|
||||
#define __msa_mulr_q_h __builtin_msa_mulr_q_h
|
||||
#define __msa_mulr_q_w __builtin_msa_mulr_q_w
|
||||
#define __msa_madd_q_h __builtin_msa_madd_q_h
|
||||
#define __msa_madd_q_w __builtin_msa_madd_q_w
|
||||
#define __msa_maddr_q_h __builtin_msa_maddr_q_h
|
||||
#define __msa_maddr_q_w __builtin_msa_maddr_q_w
|
||||
#define __msa_msub_q_h __builtin_msa_msub_q_h
|
||||
#define __msa_msub_q_w __builtin_msa_msub_q_w
|
||||
#define __msa_msubr_q_h __builtin_msa_msubr_q_h
|
||||
#define __msa_msubr_q_w __builtin_msa_msubr_q_w
|
||||
#define __msa_fclass_w __builtin_msa_fclass_w
|
||||
#define __msa_fclass_d __builtin_msa_fclass_d
|
||||
#define __msa_fsqrt_w __builtin_msa_fsqrt_w
|
||||
#define __msa_fsqrt_d __builtin_msa_fsqrt_d
|
||||
#define __msa_frcp_w __builtin_msa_frcp_w
|
||||
#define __msa_frcp_d __builtin_msa_frcp_d
|
||||
#define __msa_frint_w __builtin_msa_frint_w
|
||||
#define __msa_frint_d __builtin_msa_frint_d
|
||||
#define __msa_frsqrt_w __builtin_msa_frsqrt_w
|
||||
#define __msa_frsqrt_d __builtin_msa_frsqrt_d
|
||||
#define __msa_flog2_w __builtin_msa_flog2_w
|
||||
#define __msa_flog2_d __builtin_msa_flog2_d
|
||||
#define __msa_fexupl_w __builtin_msa_fexupl_w
|
||||
#define __msa_fexupl_d __builtin_msa_fexupl_d
|
||||
#define __msa_fexupr_w __builtin_msa_fexupr_w
|
||||
#define __msa_fexupr_d __builtin_msa_fexupr_d
|
||||
#define __msa_ffql_w __builtin_msa_ffql_w
|
||||
#define __msa_ffql_d __builtin_msa_ffql_d
|
||||
#define __msa_ffqr_w __builtin_msa_ffqr_w
|
||||
#define __msa_ffqr_d __builtin_msa_ffqr_d
|
||||
#define __msa_ftint_s_w __builtin_msa_ftint_s_w
|
||||
#define __msa_ftint_s_d __builtin_msa_ftint_s_d
|
||||
#define __msa_ftint_u_w __builtin_msa_ftint_u_w
|
||||
#define __msa_ftint_u_d __builtin_msa_ftint_u_d
|
||||
#define __msa_ftrunc_s_w __builtin_msa_ftrunc_s_w
|
||||
#define __msa_ftrunc_s_d __builtin_msa_ftrunc_s_d
|
||||
#define __msa_ftrunc_u_w __builtin_msa_ftrunc_u_w
|
||||
#define __msa_ftrunc_u_d __builtin_msa_ftrunc_u_d
|
||||
#define __msa_ffint_s_w __builtin_msa_ffint_s_w
|
||||
#define __msa_ffint_s_d __builtin_msa_ffint_s_d
|
||||
#define __msa_ffint_u_w __builtin_msa_ffint_u_w
|
||||
#define __msa_ffint_u_d __builtin_msa_ffint_u_d
|
||||
#define __msa_cfcmsa __builtin_msa_cfcmsa
|
||||
#define __msa_move_v __builtin_msa_move_v
|
||||
#define __msa_cast_to_vector_float __builtin_msa_cast_to_vector_float
|
||||
#define __msa_cast_to_vector_double __builtin_msa_cast_to_vector_double
|
||||
#define __msa_cast_to_scalar_float __builtin_msa_cast_to_scalar_float
|
||||
#define __msa_cast_to_scalar_double __builtin_msa_cast_to_scalar_double
|
||||
#endif /* defined(__mips_msa) */
|
||||
#endif /* _MSA_H */
|
||||
@@ -0,0 +1,47 @@
|
||||
/*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __MWAITXINTRIN_H
|
||||
#define __MWAITXINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx")))
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_monitorx(void const * __p, unsigned __extensions, unsigned __hints)
|
||||
{
|
||||
__builtin_ia32_monitorx((void *)__p, __extensions, __hints);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
|
||||
{
|
||||
__builtin_ia32_mwaitx(__extensions, __hints, __clock);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __MWAITXINTRIN_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user