Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
800794931f | ||
|
|
578fa2d470 | ||
|
|
e4b1a6c9ad | ||
|
|
ae91575ad5 | ||
|
|
b61520b6be | ||
|
|
870607d1b7 | ||
|
|
7363032ded | ||
|
|
a1103da9a2 | ||
|
|
3244cdefe4 | ||
|
|
56d12bac07 | ||
|
|
905a655674 | ||
|
|
1f3d3fcbf2 | ||
|
|
1562c5fe97 | ||
|
|
acfd961a20 | ||
|
|
593203cc2d | ||
|
|
c66ffcaa60 | ||
|
|
5b0607ad57 | ||
|
|
29dd82134b | ||
|
|
a6582330c2 | ||
|
|
34950db33a | ||
|
|
5b0b109840 | ||
|
|
cda4cf1919 | ||
|
|
51f12d4729 | ||
|
|
afb90364a5 | ||
|
|
fee2afe0cb | ||
|
|
de6729720c | ||
|
|
6c1ee46e7c | ||
|
|
fa07e8cab8 | ||
|
|
fc2dfcdc2b | ||
|
|
ecc2b5017b | ||
|
|
291d69079a | ||
|
|
695ca92ef3 | ||
|
|
11eb5f6031 | ||
|
|
a4b8d4a3d0 | ||
|
|
eb8f09d6fc | ||
|
|
5443670bf6 | ||
|
|
9f33b2be06 | ||
|
|
9b33e7afd2 | ||
|
|
819aedb442 | ||
|
|
17fa6e82bb | ||
|
|
e363c4e733 | ||
|
|
f816f353d0 | ||
|
|
8c47331b86 | ||
|
|
a9fe3d3eda | ||
|
|
8990cc91bd | ||
|
|
a617ac32c0 | ||
|
|
e3deefcc07 | ||
|
|
c61b24be1b | ||
|
|
532a1cc415 | ||
|
|
13bbc328d2 | ||
|
|
0c236df6f3 | ||
|
|
93189eacda | ||
|
|
a3aa2d8e43 | ||
|
|
0d29bfc3b8 | ||
|
|
0a0c0cfffd | ||
|
|
614793fe96 | ||
|
|
6c798e906b | ||
|
|
d5757f95b6 | ||
|
|
9eb89a70a1 | ||
|
|
901306395b | ||
|
|
766d120e8f | ||
|
|
926df8ac78 | ||
|
|
7b4a2c22cf | ||
|
|
bb86c822c0 | ||
|
|
23e5fa2902 | ||
|
|
3920a980af | ||
|
|
daa8de0e71 | ||
|
|
94a55e6992 | ||
|
|
01b7dcc4f3 | ||
|
|
e3f3be419b | ||
|
|
cf5be6f9af | ||
|
|
f7d807bcb2 | ||
|
|
17721d46a7 | ||
|
|
c57032c25a | ||
|
|
4a779d690e | ||
|
|
608c019c37 | ||
|
|
39a3e87e06 | ||
|
|
e81584bc2f | ||
|
|
15617d1aa2 | ||
|
|
cdae188cfa | ||
|
|
28abd2346c | ||
|
|
fe449425b8 | ||
|
|
5f82bedf51 | ||
|
|
930a8ac459 | ||
|
|
9f2f9614ce | ||
|
|
1b589beb48 | ||
|
|
133f52ef71 | ||
|
|
289dee276c | ||
|
|
3c50949440 | ||
|
|
dce4f47c84 | ||
|
|
bdcc53d143 | ||
|
|
43c883a36f | ||
|
|
fc0061622d | ||
|
|
70edad3b58 | ||
|
|
49e29dee45 | ||
|
|
d79241c534 | ||
|
|
24c0859fe6 | ||
|
|
cd018d7236 | ||
|
|
dda1fed6e2 | ||
|
|
68f1fa283d | ||
|
|
3567ff9210 | ||
|
|
b03916b5a2 | ||
|
|
aef82ba8fb | ||
|
|
67418a3927 | ||
|
|
a16218e05e | ||
|
|
f4b0106831 | ||
|
|
271f14581e | ||
|
|
c9c58f2117 | ||
|
|
3828b23773 | ||
|
|
14f1996e4b | ||
|
|
767d72d5f2 | ||
|
|
dfae972074 | ||
|
|
a5cec89a24 | ||
|
|
2851deb075 | ||
|
|
eead26e0ea | ||
|
|
be20c01707 | ||
|
|
846a6b9d61 | ||
|
|
42f637060e | ||
|
|
f18f9ce733 | ||
|
|
6730b2afc4 | ||
|
|
d5270e18bb | ||
|
|
076d80e333 | ||
|
|
388557c960 | ||
|
|
1cc5d59e67 | ||
|
|
1f84ca8586 | ||
|
|
5c4edbf519 | ||
|
|
6eed3eb16e | ||
|
|
798d1c1d25 | ||
|
|
fff2e0f6e0 | ||
|
|
b5eed25cdd | ||
|
|
f71d3e4fc8 | ||
|
|
1f045f3c58 | ||
|
|
1292561053 | ||
|
|
9d67ce7bbf | ||
|
|
be0accfd0b | ||
|
|
decc2ff04c | ||
|
|
5536c11647 | ||
|
|
23536d20c2 | ||
|
|
d1a7e57185 | ||
|
|
67bebc4b07 | ||
|
|
f0fcca77fb | ||
|
|
09cd83ec21 | ||
|
|
9253096652 | ||
|
|
6e78c34376 | ||
|
|
c6ab6e511b | ||
|
|
19218b2409 | ||
|
|
2231ed62b7 | ||
|
|
79b02724ed | ||
|
|
906539d21a | ||
|
|
550dff8be6 | ||
|
|
644f052aa1 | ||
|
|
b11d5f3922 | ||
|
|
a7149514a6 | ||
|
|
271aa76219 | ||
|
|
bfc11336af | ||
|
|
1c173b4055 | ||
|
|
bbe4feee98 | ||
|
|
4e93800b99 | ||
|
|
e1406d749b | ||
|
|
0bbe11b64e | ||
|
|
4af9535743 | ||
|
|
e479a834a8 | ||
|
|
32129f8d30 | ||
|
|
9c07dcffe7 | ||
|
|
4e8f066a53 | ||
|
|
89399c10e8 | ||
|
|
c892749430 | ||
|
|
05a6b0767f | ||
|
|
2fe0b4fa48 | ||
|
|
b88b4b5451 | ||
|
|
90f437c7cb | ||
|
|
c4b3140192 | ||
|
|
4b07dc6a2d | ||
|
|
8ebc4e3e28 | ||
|
|
ced8b40f7c | ||
|
|
53e20c928d | ||
|
|
a0ff9e16ff | ||
|
|
c91bc704ae | ||
|
|
50f2fbc696 | ||
|
|
9341ffede5 | ||
|
|
117b26d00a | ||
|
|
e69fe7cc1e | ||
|
|
3a81dbe970 | ||
|
|
62731728d6 | ||
|
|
82f5485c0f | ||
|
|
341ef8c45d | ||
|
|
58ac8e3f3d | ||
|
|
c5d4f158da | ||
|
|
d4509034be | ||
|
|
7ee36d1a36 | ||
|
|
6af3fa61fa | ||
|
|
6d1c92ad9f | ||
|
|
fdf44d201a | ||
|
|
aebb7d7a49 | ||
|
|
32bde766e3 | ||
|
|
922d7f935a | ||
|
|
1ef7d35a9e | ||
|
|
6d201d9216 | ||
|
|
ac6379a476 | ||
|
|
7a03af8136 | ||
|
|
293622b567 | ||
|
|
572e5144e2 | ||
|
|
a0a386174e | ||
|
|
4a9089b4c3 | ||
|
|
c9896d283d | ||
|
|
1b5475fdc6 | ||
|
|
abe945845e | ||
|
|
2750ae9962 | ||
|
|
20b09d04ca | ||
|
|
55c1b772bd | ||
|
|
0a9ece3019 | ||
|
|
14512e7a6e | ||
|
|
c97b61a28c | ||
|
|
05ba861ff1 | ||
|
|
637e1c8aa7 | ||
|
|
3908b8d261 | ||
|
|
9d6ebf2c2a | ||
|
|
e4ea425127 | ||
|
|
752ee7f8a4 | ||
|
|
30d16425db | ||
|
|
a625f5a3b2 | ||
|
|
64247187d6 | ||
|
|
b4277f37ac | ||
|
|
c49eff027c | ||
|
|
0fcb306c91 | ||
|
|
67a6f40c6c | ||
|
|
aad183b993 | ||
|
|
3759bb572d | ||
|
|
28f5fa9d07 | ||
|
|
dcb283e279 | ||
|
|
e087eefe5a | ||
|
|
6ac6171b54 | ||
|
|
b37b536253 | ||
|
|
658f94ab6c | ||
|
|
8ddad2a3f5 | ||
|
|
36d36e5b6e | ||
|
|
02d0038a99 | ||
|
|
113239e8aa | ||
|
|
53e8e0047d | ||
|
|
2080cc0543 | ||
|
|
bdae2bdd04 | ||
|
|
8a72fb41fd | ||
|
|
627ac7ba2c | ||
|
|
71a9563cd8 | ||
|
|
f8bcaa2001 | ||
|
|
d439076261 | ||
|
|
5db1005e8d | ||
|
|
8c881fb01a | ||
|
|
eb5f9fc707 | ||
|
|
7c7e3eed8b | ||
|
|
9e2ca6d4e4 | ||
|
|
d7eb0d2a44 | ||
|
|
2f7f118105 | ||
|
|
90ae80b5fe | ||
|
|
d8e955002f | ||
|
|
d29232b282 | ||
|
|
272f5feb2a | ||
|
|
7723b92932 | ||
|
|
8251272aaf | ||
|
|
ee1c56c6bc | ||
|
|
c819f3bacd | ||
|
|
570d59289c | ||
|
|
c9ee19a5d2 | ||
|
|
f59c6d3ef1 | ||
|
|
b2234567b7 | ||
|
|
619b0e5ea2 | ||
|
|
9ef2018879 | ||
|
|
8de6a5fdf8 | ||
|
|
baa030dd36 | ||
|
|
8b63714aca | ||
|
|
dac55b1974 | ||
|
|
be3e00be56 | ||
|
|
403818c7c0 | ||
|
|
1bc8b94bbd | ||
|
|
8918ed32db | ||
|
|
6008fdf64e | ||
|
|
cbf9a336f8 | ||
|
|
0ee27e4af1 | ||
|
|
66e3f8af2b | ||
|
|
957ae983df | ||
|
|
df51d78be8 | ||
|
|
e22d74ec07 | ||
|
|
b498e2b87e | ||
|
|
825c513d9c | ||
|
|
f4a0f38636 | ||
|
|
02192dc3f9 | ||
|
|
3e73c5a634 | ||
|
|
d1e3beabdd | ||
|
|
152c872700 | ||
|
|
b913e0a97b | ||
|
|
55a256fcb0 | ||
|
|
a0f0ca62ff | ||
|
|
d89ec96e80 | ||
|
|
899a643c43 | ||
|
|
989676fbba | ||
|
|
4b3a9c2676 | ||
|
|
a22f547b77 | ||
|
|
68b7b1b968 | ||
|
|
9f50ecb447 | ||
|
|
24cd595d3a | ||
|
|
45ba72c2d8 | ||
|
|
4210192399 | ||
|
|
6e4ee61697 | ||
|
|
b45ccb2224 | ||
|
|
015e18081e | ||
|
|
0c3bb6145d | ||
|
|
873f706e93 | ||
|
|
7f0d043f7b | ||
|
|
427315af93 | ||
|
|
287ec6bc07 | ||
|
|
81b52c81c7 | ||
|
|
b41ff99cc1 | ||
|
|
80c27d148c | ||
|
|
af4c9b36b4 | ||
|
|
90a8af975d | ||
|
|
4473277560 | ||
|
|
e8a2beb7bc | ||
|
|
a285434d5c | ||
|
|
a7079386b3 | ||
|
|
b662f1feff | ||
|
|
50f6aa3805 | ||
|
|
32e691b022 | ||
|
|
53a97b3713 | ||
|
|
d30ade7cdc | ||
|
|
0868a94c1a | ||
|
|
a4e1f187cd | ||
|
|
0698545830 | ||
|
|
5135ebb7a9 | ||
|
|
c59e62d8ee | ||
|
|
d6119cc78d | ||
|
|
90441b555e | ||
|
|
4859243b1e | ||
|
|
c85363d7aa | ||
|
|
edbb4e8bd1 | ||
|
|
789e95377f | ||
|
|
ec3454c6b3 | ||
|
|
e422002bc6 | ||
|
|
0decdea616 | ||
|
|
304dd18bd8 | ||
|
|
3f9b1e6cba | ||
|
|
0a5fc42010 | ||
|
|
c35929c30c | ||
|
|
d6779e2015 | ||
|
|
9748b95235 | ||
|
|
50dd06d0a3 | ||
|
|
6edfd43b46 | ||
|
|
8ef1e35f29 | ||
|
|
0e5f92e7e3 | ||
|
|
1d2627ce85 | ||
|
|
072e4e8944 | ||
|
|
fde9583d4a | ||
|
|
b38761a0c9 | ||
|
|
91b2ff7594 | ||
|
|
887e4b9ff0 | ||
|
|
ed9b98619c | ||
|
|
35c5d21d74 | ||
|
|
d3c96f59a7 | ||
|
|
f7bf75cc29 | ||
|
|
ee2263634f | ||
|
|
7c52285bef | ||
|
|
17bef2e44d | ||
|
|
cf5a9a05a2 | ||
|
|
d411a39530 | ||
|
|
1a4dc8597e | ||
|
|
594c845c99 | ||
|
|
837a7f8815 | ||
|
|
61639aaf51 | ||
|
|
839f3f7a4f | ||
|
|
154ff43b58 | ||
|
|
56eb2e91c9 | ||
|
|
3025376c8a | ||
|
|
378f347f32 | ||
|
|
4bc3bdf2a2 | ||
|
|
c3fdfe39fc | ||
|
|
b7b2d00bce | ||
|
|
277d9e676e | ||
|
|
d862de67f8 | ||
|
|
aad7cb8338 | ||
|
|
0f824ee323 | ||
|
|
a98b5be8a7 | ||
|
|
cd201a8374 | ||
|
|
3c43580d94 | ||
|
|
10640cc96c | ||
|
|
063062906b | ||
|
|
3d6eac638f | ||
|
|
6e38e40638 | ||
|
|
d0ea94ced1 | ||
|
|
e6aef89c36 | ||
|
|
b3532cad72 | ||
|
|
3cdb284dda | ||
|
|
26783d69ab | ||
|
|
35fd78f551 | ||
|
|
c13cf1318e | ||
|
|
cb086e9e27 | ||
|
|
fefaedee4f | ||
|
|
96d6d02241 | ||
|
|
8c6d2c895f | ||
|
|
71e2533140 | ||
|
|
60615a1d92 | ||
|
|
cf5d981190 | ||
|
|
6831b56259 | ||
|
|
8bfd38b889 | ||
|
|
57891fac6a | ||
|
|
67c1d27c96 | ||
|
|
9f08568d8c | ||
|
|
dbd4afb54a | ||
|
|
ba2367fb91 | ||
|
|
0492251bc9 | ||
|
|
5388de9126 | ||
|
|
a66fbf5caf | ||
|
|
6f901d9ab8 | ||
|
|
6ece03e38a | ||
|
|
6e73a58d30 | ||
|
|
2332d4f62f | ||
|
|
d0dbeef7c6 | ||
|
|
2ab71d16d3 | ||
|
|
3a5ea4a391 | ||
|
|
9eda3259af | ||
|
|
bb6666c125 | ||
|
|
9a28d653cb | ||
|
|
6ed9e0f9db | ||
|
|
8ef78b0828 | ||
|
|
b9aadc2f62 | ||
|
|
7c49cc78d4 | ||
|
|
ae21628afe | ||
|
|
fa9d847118 | ||
|
|
db88a22c93 | ||
|
|
78e20297f7 | ||
|
|
bef3cdc648 | ||
|
|
86ae9b0e15 | ||
|
|
9ad8a13e8f | ||
|
|
5c21ca5bec | ||
|
|
008d038f9e | ||
|
|
90acc22d8b | ||
|
|
fa843a9ea1 | ||
|
|
610e2eab46 | ||
|
|
e397c9e8d3 | ||
|
|
aace53ceda | ||
|
|
fb0af88f48 | ||
|
|
f7e053197e | ||
|
|
3f4fed0d88 | ||
|
|
31052e3432 | ||
|
|
832fcd64be | ||
|
|
98db4d3046 | ||
|
|
b68a7e7f51 | ||
|
|
876486e63e | ||
|
|
b1ab195e3f | ||
|
|
3a7c0f10f9 | ||
|
|
481f68c2b0 | ||
|
|
6c8ae90341 | ||
|
|
8bf3602ea6 | ||
|
|
114a7dcd70 | ||
|
|
e6ab9de32f | ||
|
|
a55b29811c | ||
|
|
0319c4eb8f | ||
|
|
0cfd45a5c8 | ||
|
|
26bafeea69 | ||
|
|
60443356ff | ||
|
|
4a08d4b584 | ||
|
|
7a776ea326 | ||
|
|
970b0cce01 | ||
|
|
17f18161a1 | ||
|
|
a9bac4107b | ||
|
|
9808e020f3 | ||
|
|
33c19dcd5e | ||
|
|
69efc70169 | ||
|
|
7acf2de0d9 | ||
|
|
e63d793a90 | ||
|
|
9d87771341 | ||
|
|
db15739c60 | ||
|
|
469af0da0e | ||
|
|
2071bfcf0c | ||
|
|
8770945360 | ||
|
|
ec35eb0286 | ||
|
|
d1f518dab0 | ||
|
|
c1f0b9d37c | ||
|
|
05a61154a3 | ||
|
|
8a4cb2be0d | ||
|
|
dfa6fd0192 | ||
|
|
488ed9e52f | ||
|
|
3ce37e26a3 | ||
|
|
580720036c | ||
|
|
872244a8b5 | ||
|
|
8105038576 | ||
|
|
852392131d | ||
|
|
35e595e57b | ||
|
|
efd2d3f673 | ||
|
|
b3cc487a84 | ||
|
|
1bef971a55 | ||
|
|
502da96c8f | ||
|
|
4cb241b02b | ||
|
|
76d3f4dc57 | ||
|
|
5d670c5dca | ||
|
|
892ba6ff39 | ||
|
|
2bffb487c7 | ||
|
|
165f7fd28a | ||
|
|
2720391971 | ||
|
|
a37d69cf0b | ||
|
|
32947abb8e | ||
|
|
99c0863f47 | ||
|
|
21d7bf823e | ||
|
|
7e64f9e7fa | ||
|
|
558d4a0d79 | ||
|
|
2c31adfce1 | ||
|
|
ad265eb05f | ||
|
|
90aa2efd65 | ||
|
|
c5a799cd37 | ||
|
|
b9fe049361 | ||
|
|
de6dfc1219 | ||
|
|
bc2df82748 | ||
|
|
b40903be53 | ||
|
|
097a5dcc16 | ||
|
|
02bdca66c5 | ||
|
|
3a8022b079 | ||
|
|
9696aec1e8 | ||
|
|
2892258183 | ||
|
|
d267ae2a9e | ||
|
|
503e2e2da7 | ||
|
|
8506eaeb4d | ||
|
|
75ef03f919 | ||
|
|
a8a31ce57d | ||
|
|
48c4670690 | ||
|
|
fddb490299 | ||
|
|
c3b291fa69 | ||
|
|
07d4ea79b9 | ||
|
|
e8a45f636f | ||
|
|
8fefc7c80a | ||
|
|
fce5fb5822 | ||
|
|
f6553e08c8 | ||
|
|
5406fccd5d | ||
|
|
1950e3028e | ||
|
|
f93aac0af5 | ||
|
|
8b92ac387d | ||
|
|
b96174019a | ||
|
|
d1fb8eb0bd | ||
|
|
6066aafbc0 | ||
|
|
aa8decf2f2 | ||
|
|
b55e153af2 | ||
|
|
2d45f07b39 | ||
|
|
0add4062f0 | ||
|
|
b87561e9b7 | ||
|
|
d971145475 | ||
|
|
87c1c05675 | ||
|
|
5a7c52e13d | ||
|
|
3aec5fc02f | ||
|
|
c2386dbdae | ||
|
|
28b6ba0cee | ||
|
|
852bc04c36 | ||
|
|
16ae9a4832 | ||
|
|
c48d4e8820 | ||
|
|
13671e8f1a | ||
|
|
a5e86253cb | ||
|
|
3d44cb5b7a | ||
|
|
dff9a579c0 | ||
|
|
e677b4a701 | ||
|
|
07ea5d3baf | ||
|
|
d119c19dd3 | ||
|
|
1ac7c3080c | ||
|
|
f5b6020ae5 | ||
|
|
a36a5762b3 | ||
|
|
a721de1983 | ||
|
|
dd34312db0 | ||
|
|
db40f66965 | ||
|
|
eed9c10fbb | ||
|
|
246f85a99b | ||
|
|
a3bb8e2375 | ||
|
|
b77e220f1b | ||
|
|
94b8a9b68d | ||
|
|
8e9824b6ae | ||
|
|
4c6a2dcee6 | ||
|
|
574aba75b3 | ||
|
|
c4eb67c760 | ||
|
|
d37d6d9940 | ||
|
|
fed14bffc5 | ||
|
|
b663c2bb62 | ||
|
|
4b45e29c81 | ||
|
|
0d2bbcf44d | ||
|
|
a714a0cbfa | ||
|
|
07c1dcbb40 | ||
|
|
5f37c89eb6 | ||
|
|
7290eeb430 | ||
|
|
7ecd06bb73 | ||
|
|
7eb1af9d12 | ||
|
|
20ef1bab95 | ||
|
|
607541cdab | ||
|
|
39bbcbddec | ||
|
|
3dea890136 | ||
|
|
64c6efec84 | ||
|
|
bfe33678a5 | ||
|
|
a46b2bc3f7 | ||
|
|
5785dbe19b | ||
|
|
9bc6062432 | ||
|
|
416d81d7b8 | ||
|
|
903bf14134 | ||
|
|
859c898514 | ||
|
|
7ec50b62a6 | ||
|
|
529ed1bd9c | ||
|
|
752ff668b8 | ||
|
|
e27f1c1e50 | ||
|
|
b62e2d3bf6 | ||
|
|
99d5c8e163 | ||
|
|
ee077ad4bc | ||
|
|
fa82a16413 | ||
|
|
5f668108c6 | ||
|
|
fe069d4772 | ||
|
|
dfb7457acc | ||
|
|
3b00158de4 | ||
|
|
b088b0e1bf | ||
|
|
6d37e15774 | ||
|
|
db38462ce1 | ||
|
|
b0917072ec | ||
|
|
8f46375bbd | ||
|
|
4d3dd95676 | ||
|
|
39a25fd855 | ||
|
|
dcd5cdb551 | ||
|
|
2d14a6f409 | ||
|
|
0ee1c388e4 | ||
|
|
fece5e1992 | ||
|
|
5f8aa3d167 | ||
|
|
b1dd5db65a | ||
|
|
609159bf08 | ||
|
|
f9cef47292 | ||
|
|
5f430613ca | ||
|
|
65295f494c | ||
|
|
f9c1fbc8fa | ||
|
|
8629802739 | ||
|
|
1fb2c7f413 | ||
|
|
d1ff5bf7b7 | ||
|
|
1573a6c6ab | ||
|
|
aac5b07775 | ||
|
|
facb5cd25b | ||
|
|
4b29171a4c | ||
|
|
9090fd4251 | ||
|
|
79779442d8 | ||
|
|
8ad2befce1 | ||
|
|
6114d33b9e | ||
|
|
bc50bac086 | ||
|
|
608a5e8dd9 | ||
|
|
bda501591d | ||
|
|
c68e72873a | ||
|
|
8c86d5a5d3 | ||
|
|
b0961491c5 | ||
|
|
588d25f92e | ||
|
|
1bc27317b7 | ||
|
|
cc1ef8c7dd | ||
|
|
95f453c6bb | ||
|
|
e6c725bc68 | ||
|
|
99c358f230 | ||
|
|
44be27bf19 | ||
|
|
94e329ea4c | ||
|
|
73a6454681 | ||
|
|
bce61f9d89 | ||
|
|
ad1271db3d | ||
|
|
b9a69e17a8 | ||
|
|
a7d222f1e0 | ||
|
|
e3652a6c09 | ||
|
|
ae0142710d | ||
|
|
cc31a74309 | ||
|
|
c7c3d15443 | ||
|
|
7402ec4e44 | ||
|
|
2070a1fdb4 | ||
|
|
1cc4f415b0 | ||
|
|
8cf55d6de0 | ||
|
|
bd5f291b5b | ||
|
|
067b6c956e | ||
|
|
522a0bcc9b | ||
|
|
129585a2ad | ||
|
|
78d7d2e574 | ||
|
|
9ca9407a4e | ||
|
|
846b3a9934 | ||
|
|
0fabc2654e | ||
|
|
06d76804f9 | ||
|
|
9a5e193e3e | ||
|
|
f644a820d8 | ||
|
|
facdf1261c | ||
|
|
3a826418bd | ||
|
|
01e277a994 | ||
|
|
ad194c1551 | ||
|
|
7c630ce2fb | ||
|
|
b77caa8e1a | ||
|
|
184a43a9ef | ||
|
|
0e27bd0ae8 | ||
|
|
1f7f8bccba | ||
|
|
e756e20b02 | ||
|
|
58b7ea36e9 | ||
|
|
f957f46151 | ||
|
|
3429d3e0fb | ||
|
|
bab4432eda | ||
|
|
02a31b9ef8 | ||
|
|
ec4d5c4fda | ||
|
|
b0d66941f0 | ||
|
|
bf0f9da925 | ||
|
|
1ca49df973 | ||
|
|
a294083635 | ||
|
|
9e3fe8ba3b | ||
|
|
a37de47cfe | ||
|
|
9257cad10a | ||
|
|
6fd9b19f61 | ||
|
|
8988853d79 | ||
|
|
230e7bcd86 | ||
|
|
eac1d0cd73 | ||
|
|
f1d7e40302 | ||
|
|
18b28f67db | ||
|
|
682d2ccb50 | ||
|
|
c27aa7247e | ||
|
|
d363ebcb75 | ||
|
|
6f6d508e9a | ||
|
|
3a9ebc9484 | ||
|
|
32c834c7bd | ||
|
|
5428ceffdb | ||
|
|
1a1a9105e4 | ||
|
|
0c1829d096 | ||
|
|
441c92abbf | ||
|
|
f51958cc5c | ||
|
|
1ee0b3ca62 | ||
|
|
3abbf405f9 | ||
|
|
9395eccf98 | ||
|
|
d986851869 | ||
|
|
26a56fa72c | ||
|
|
ae2ec95bee | ||
|
|
f2e36dd223 | ||
|
|
fbbc01cd3d | ||
|
|
41b015d9ef | ||
|
|
68c7bbca0f | ||
|
|
67dac5b626 | ||
|
|
ceaf0884a0 | ||
|
|
ae62b6b0f2 | ||
|
|
94c5a173c9 | ||
|
|
abe152b8af | ||
|
|
b2b91eece2 | ||
|
|
8134951b52 | ||
|
|
07dbbd2fb6 | ||
|
|
0a3212af03 | ||
|
|
895bd755b7 | ||
|
|
1e9fc02118 | ||
|
|
3020907c41 | ||
|
|
c910e1f645 | ||
|
|
6b2cd74c61 | ||
|
|
c35f343857 | ||
|
|
8e2a48bcf6 | ||
|
|
03d130cce5 | ||
|
|
5b2a1ddfac | ||
|
|
6f4685d46f | ||
|
|
90d72f8dd9 | ||
|
|
93529bb9d0 | ||
|
|
8e7d7cd868 | ||
|
|
e61729aca2 | ||
|
|
03daba5aa9 | ||
|
|
4ab3ece12c | ||
|
|
b5bbfdf78f | ||
|
|
f83f6804b2 | ||
|
|
ebeb2756d8 | ||
|
|
dddea4e368 | ||
|
|
173516cf97 | ||
|
|
902603c8c1 | ||
|
|
55182accb2 | ||
|
|
ab8e7afb01 | ||
|
|
f8d7765d22 | ||
|
|
d86baad3a6 | ||
|
|
e7357c2c01 | ||
|
|
3afa6af001 | ||
|
|
00d1b273ad | ||
|
|
530753feb7 | ||
|
|
e7b76ea6d9 | ||
|
|
3b446526bd | ||
|
|
db945a8757 | ||
|
|
f6d7c840ea | ||
|
|
9ee431eca2 | ||
|
|
643c293466 | ||
|
|
f883f05299 | ||
|
|
72fdc1333e | ||
|
|
8cc11076f1 | ||
|
|
a55b9f8a6f | ||
|
|
d32fc2ab96 | ||
|
|
4ff0bd406c | ||
|
|
6e0797b11b | ||
|
|
3a709a3973 | ||
|
|
8712dfde94 | ||
|
|
d1ca2ec15d | ||
|
|
a379d7936a | ||
|
|
a2426c370d | ||
|
|
534f957323 | ||
|
|
9c03365189 | ||
|
|
ad4c65f312 | ||
|
|
9b71bda5c5 | ||
|
|
bf6b3bbdb5 | ||
|
|
0f715949d4 | ||
|
|
9a0311e69d | ||
|
|
96506fd585 | ||
|
|
8e58877119 | ||
|
|
a5336d60f1 | ||
|
|
4e53b1aa53 | ||
|
|
32fe90502e | ||
|
|
e4a333627a | ||
|
|
9cc348328f | ||
|
|
e084511dc0 | ||
|
|
4227298c8d | ||
|
|
b0331d8336 | ||
|
|
7dfc8e6080 | ||
|
|
79b1698901 | ||
|
|
904352a030 | ||
|
|
2f006d8252 | ||
|
|
695258eb80 | ||
|
|
7151e780da | ||
|
|
fd5d25f5c3 | ||
|
|
e3f4689072 | ||
|
|
fcb1f15089 | ||
|
|
1c01d56ab5 | ||
|
|
ea904ec73e | ||
|
|
b2d27a2415 | ||
|
|
4f5eff30f9 | ||
|
|
2e5354ece4 | ||
|
|
15dbebbe2b | ||
|
|
a120065569 | ||
|
|
37ec3a2e09 | ||
|
|
13d88656fa | ||
|
|
5d0a31b2ba | ||
|
|
d506c8ce1d | ||
|
|
ea022d49b4 | ||
|
|
41fa10a216 | ||
|
|
b4638e3a6f | ||
|
|
5b3ba15a73 | ||
|
|
2b948de8a0 | ||
|
|
421bbf9e62 | ||
|
|
e8c56d7f94 | ||
|
|
a0df18d86f | ||
|
|
4326e69a77 | ||
|
|
d7410359f0 | ||
|
|
9639e32c2c | ||
|
|
b6946242ca | ||
|
|
2a72da064e | ||
|
|
bff92fba54 | ||
|
|
4a14f27b81 | ||
|
|
b625276b5e | ||
|
|
4745be5b97 | ||
|
|
ca3b5f30bd | ||
|
|
15e53335d4 | ||
|
|
0740b26a77 | ||
|
|
c1ccef36d9 | ||
|
|
ea687117a4 | ||
|
|
7681ea0694 | ||
|
|
d6744dcef7 | ||
|
|
6c93af818a | ||
|
|
61f76046a2 | ||
|
|
e464957bb0 | ||
|
|
31bfb98e95 | ||
|
|
2b76179243 | ||
|
|
6154a26060 | ||
|
|
16add3cc79 | ||
|
|
f2296e8aef | ||
|
|
a409306fed | ||
|
|
981fac5ce4 | ||
|
|
7b1da542ce | ||
|
|
cc3cff6048 | ||
|
|
ba56b8d823 | ||
|
|
8ee98f8b66 | ||
|
|
01876a91ad | ||
|
|
41ab55d382 | ||
|
|
4fab8dfd55 | ||
|
|
ffeb58261e | ||
|
|
0bc72bb554 | ||
|
|
ce2d10135b | ||
|
|
7d584a256a | ||
|
|
c27b70ec8a | ||
|
|
b3990a2f2a | ||
|
|
1e2d84e3d7 | ||
|
|
339b5635a3 | ||
|
|
3faac6e8db | ||
|
|
06a4bbb7c7 | ||
|
|
27b5808d62 | ||
|
|
ea5f29857f | ||
|
|
a1c4838146 | ||
|
|
a202ec46e4 | ||
|
|
da9991f236 | ||
|
|
010748022a | ||
|
|
2de04eeaa8 | ||
|
|
6d87ef3f5f | ||
|
|
cbc86b10a5 | ||
|
|
413aad098e | ||
|
|
73c018f151 | ||
|
|
ef402a1656 | ||
|
|
f1a94acc0e | ||
|
|
cd0e089842 | ||
|
|
79f53a7baa | ||
|
|
fdd1a0234a | ||
|
|
68890ee767 | ||
|
|
a8e1cebfce | ||
|
|
38dee7497b | ||
|
|
9d8fae0226 | ||
|
|
dfee935d4b | ||
|
|
36040b6f03 | ||
|
|
3a31fd2931 | ||
|
|
7902b2b000 | ||
|
|
29985989d1 | ||
|
|
a3c9bd9fe5 | ||
|
|
2dd58264fe | ||
|
|
73d7e708ba | ||
|
|
dda81883fd | ||
|
|
deab2341e7 | ||
|
|
acbc9bc9b5 | ||
|
|
bd065a69f5 | ||
|
|
90e320fe0b | ||
|
|
63787f5e49 | ||
|
|
36bcaf5da5 | ||
|
|
4ee25cdb1e | ||
|
|
eb997d8142 | ||
|
|
e0d2cc8423 | ||
|
|
cc08130cba | ||
|
|
3a9ea226ec | ||
|
|
20b8b4ba63 | ||
|
|
d081063542 | ||
|
|
e741416a0c | ||
|
|
2dcd0cd410 | ||
|
|
bb924d03cc | ||
|
|
3e200cc5fd | ||
|
|
184332d75a | ||
|
|
9255e5bcd7 | ||
|
|
9cc9d2c32d | ||
|
|
a5733f9368 | ||
|
|
b621febfd1 | ||
|
|
a1cb08360e | ||
|
|
9b9f863f94 | ||
|
|
3dc05eff4d |
+1
-1
@@ -11,4 +11,4 @@
|
||||
*.jpg binary
|
||||
*.png binary
|
||||
*.pdf binary
|
||||
*.rc text working-tree-encoding=UTF-16LE-BOM eol=CRLF
|
||||
*.rc text working-tree-encoding=UTF-8 eol=CRLF
|
||||
|
||||
+467
-157
@@ -3,221 +3,531 @@
|
||||
|
||||
name: continuous
|
||||
|
||||
permissions: read-all
|
||||
|
||||
on: [push, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
################################################################################
|
||||
################################################################################
|
||||
# GPU tests
|
||||
################################################################################
|
||||
###############################################################################
|
||||
|
||||
########################################
|
||||
# Linux DG2
|
||||
########################################
|
||||
linux-DG2-JIT-INTERNAL-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
project: embree
|
||||
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
|
||||
artifact-out: linux-DG2-JIT-INTERNAL-build
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
################################################################################
|
||||
################################################################################
|
||||
# CPU tests
|
||||
################################################################################
|
||||
################################################################################
|
||||
linux-DG2-JIT-INTERNAL-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-DG2-JIT-INTERNAL-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env
|
||||
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
|
||||
artifact-in: linux-DG2-JIT-INTERNAL-build
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
linux-DG2-JIT-PUBLIC-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
|
||||
artifact-out: linux-DG2-JIT-PUBLIC-build
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
linux-DG2-JIT-PUBLIC-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-DG2-JIT-PUBLIC-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
artifact-in: linux-DG2-JIT-PUBLIC-build
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
linux-DG2-JIT-PUBLIC-ICX-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-out: linux-DG2-JIT-PUBLIC-ICX-build
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
linux-DG2-JIT-PUBLIC-ICX-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-DG2-JIT-PUBLIC-ICX-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: linux-DG2-JIT-PUBLIC-ICX-build
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
# ########################################
|
||||
# # Linux ATS-M
|
||||
# ########################################
|
||||
|
||||
linux-ATSM-JIT-PUBLIC-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-DG2-JIT-PUBLIC-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "atsm" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
artifact-in: linux-DG2-JIT-PUBLIC-build
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
########################################
|
||||
# Linux
|
||||
# Linux PVC
|
||||
########################################
|
||||
|
||||
continuous-linux-x64-Debug-ICC2019_4-ISPC1_12_0-AVX512-TBB2021_2_0:
|
||||
linux-PVC-JIT-INTERNAL-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/fedora:27
|
||||
image: embree/ubuntu:22.04
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
|
||||
artifact-out: linux-PVC-JIT-INTERNAL-build
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
# TODO: move to nightly
|
||||
linux-PVC-JIT-INTERNAL-test-1T:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-PVC-JIT-INTERNAL-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "pvc" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
|
||||
artifact-in: linux-PVC-JIT-INTERNAL-build
|
||||
cmd: |
|
||||
export NEOReadDebugKeys=1
|
||||
export UseKmdMigration=0
|
||||
export EnableImplicitScaling=0
|
||||
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
linux-PVC-JIT-INTERNAL-test-2T:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-PVC-JIT-INTERNAL-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "pvc" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
|
||||
artifact-in: linux-PVC-JIT-INTERNAL-build
|
||||
cmd: |
|
||||
export NEOReadDebugKeys=1
|
||||
export UseKmdMigration=0
|
||||
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
linux-PVC-JIT-INTERNAL-test-flat:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["linux-PVC-JIT-INTERNAL-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "pvc" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
|
||||
artifact-in: linux-PVC-JIT-INTERNAL-build
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
|
||||
# linux-PVC-JIT-PUBLIC:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
# with:
|
||||
# image: embree/ubuntu:22.04
|
||||
# runs-on: '[ "Linux", "docker", "build" ]'
|
||||
# artifact-out: linux-PVC-JIT-PUBLIC
|
||||
# artifact-path: ./build .ctest_conf
|
||||
# cmd: |
|
||||
# scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB intensity:4
|
||||
# scripts/test.py build --debug
|
||||
# scripts/test.py build
|
||||
#
|
||||
# linux-PVC-JIT-PUBLIC-test:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
# needs: ["linux-PVC-JIT-PUBLIC"]
|
||||
# with:
|
||||
# image: embree/ubuntu:22.04
|
||||
# options: --device=/dev/dri:/dev/dri
|
||||
# runs-on: '[ "Linux", "docker", "pvc" ]'
|
||||
# artifact-in: linux-PVC-JIT-PUBLIC
|
||||
# cmd: |
|
||||
# scripts/test.py test --debug
|
||||
# scripts/test.py test
|
||||
|
||||
|
||||
########################################
|
||||
# Windows DG2
|
||||
########################################
|
||||
|
||||
windows-DG2-JIT-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
with:
|
||||
force-delete: true
|
||||
runs-on: '[ "Windows", "NAS", "build" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
|
||||
artifact-out: windows-DG2-JIT-build
|
||||
artifact-path: ./build/*.zip
|
||||
cmd: |
|
||||
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
windows-DG2-JIT-INTERNAL-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
needs: ["windows-DG2-JIT-build"]
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
|
||||
artifact-in: windows-DG2-JIT-build
|
||||
cmd: |
|
||||
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
windows-DG2-JIT-PUBLIC-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
needs: ["windows-DG2-JIT-build"]
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
|
||||
artifact-in: windows-DG2-JIT-build
|
||||
cmd: |
|
||||
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
windows-DG2-JIT-ICX-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "dg2" ]'
|
||||
project: embree
|
||||
dpcpp-version: oneAPI/compiler/2024.1
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
|
||||
artifact-out: windows-DG2-JIT-ICX-build
|
||||
artifact-path: ./build/*.zip
|
||||
cmd: |
|
||||
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
windows-DG2-JIT-ICX-INTERNAL-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
needs: ["windows-DG2-JIT-ICX-build"]
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "dg2" ]'
|
||||
project: embree
|
||||
dpcpp-version: oneAPI/compiler/2024.1
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
|
||||
artifact-in: windows-DG2-JIT-ICX-build
|
||||
cmd: |
|
||||
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
windows-DG2-JIT-ICX-PUBLIC-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
needs: ["windows-DG2-JIT-ICX-build"]
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "dg2" ]'
|
||||
project: embree
|
||||
dpcpp-version: oneAPI/compiler/2024.1
|
||||
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
|
||||
artifact-in: windows-DG2-JIT-ICX-build
|
||||
cmd: |
|
||||
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
|
||||
cmake --build build --config Release --target test_package
|
||||
|
||||
# ################################################################################
|
||||
# ################################################################################
|
||||
# # CPU tests
|
||||
# ################################################################################
|
||||
# ################################################################################
|
||||
|
||||
# ########################################
|
||||
# # Linux
|
||||
# ########################################
|
||||
|
||||
linux-fedora29-CLANG4:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/fedora:29
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-fedora29-CLANG4 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-ICC2019_4-ISPC1_12_0-AVX512-TBB2021_2_0:
|
||||
linux-fedora29-CLANG5-INT-ADDRSANITIZER:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/fedora:27
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-CLANG4_0_0-ISPC1_17_0-AVX512-TBB2021_2_0:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
with:
|
||||
image: embree/fedora:26
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd128 tasking:TBB2021.2.0 GLFW:OFF intensity:2
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
|
||||
continuous-linux-x64-Debug-CLANG5_0_0-ISPC1_17_0-AVX2-INT-ADDRSANITIZER:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
with:
|
||||
image: embree/fedora:26
|
||||
image: embree/fedora:29
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.17.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-fedora29-CLANG5-INT-ADDRSANITIZER -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
continuous-ubuntu20_04-x64-Debug-GCC-ISPC1_12_0-AVX2-TBB-NAMESPACE:
|
||||
linux-fedora29-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:20.04
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:TBB intensity:1 api_namespace:myembree
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-ICX2022_1_2-ISPC1_17_0-AVX512-INT:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:20.04
|
||||
image: embree/fedora:29
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug threads:4 compiler:ICX2022.1.2 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd256 tasking:INT intensity:2
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-fedora29-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
#continuous-ubuntu17_10-x64-Debug-GCC-ISPC1_12_0-AVX2-TBB-NAMESPACE:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
# with:
|
||||
# image: embree/ubuntu:17.10
|
||||
# runs-on: '[ "Linux", "docker" ]'
|
||||
# cmd: |
|
||||
# python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1 api_namespace:myembree
|
||||
# python scripts/test.py build
|
||||
# python scripts/test.py test
|
||||
|
||||
continuous-centos7_4-x64-Debug-GCC-ISPC1_17_0-AVX2-TBB:
|
||||
linux-fedora32-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
with:
|
||||
image: embree/centos:7.4
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 frequency_level:simd128 tasking:TBB intensity:1
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
|
||||
continuous-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/fedora:32
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512 tasking:TBB COMPACT_POLYS:ON MIN_WIDTH:ON intensity:2
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-fedora32-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
linux-ubuntu20_04-GCC-NAMESPACE:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:20.04
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-ubuntu20_04-GCC-NAMESPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
linux-ubuntu20_04-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:20.04
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset linux-ubuntu20_04-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
|
||||
########################################
|
||||
# Windows
|
||||
########################################
|
||||
continuous-windows-x64-RelWithDebInfo-V140-ISPC1_9_2-SSE2-TBB2020_2:
|
||||
windows-V142:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
with:
|
||||
force-delete: true
|
||||
runs-on: '[ "Windows", "NAS", "build" ]'
|
||||
dpcpp-version: none
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 threads:4 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2020.2 intensity:2
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
cmake --preset windows-V142 -D CMAKE_BUILD_TYPE=RelWithDebInfo -D EMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --target test_package
|
||||
|
||||
# continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1_12_0-SSE2-TBB2020_2:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build" ]'
|
||||
# cmd: |
|
||||
# python scripts/test.py configure platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:2
|
||||
# python scripts/test.py build
|
||||
# python scripts/test.py test
|
||||
|
||||
continuous-windows-x64-RelWithDebInfo-V141-ISPC1_17_0-SSE2-TBB2020_2:
|
||||
windows-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "build" ]'
|
||||
force-delete: true
|
||||
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
dpcpp-version: oneAPI/compiler/2024.1
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2 maxinstancelevelcount:8
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
|
||||
# continuous-windows-x64-RelWithDebInfo-ICX2022_0_0-ISPC1_16_1-AVX512-INT:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# cmd: |
|
||||
# python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:ICX2022.0.0 ispc:ispc1.16.1 isa:AVX512 tasking:INT threads:16 intensity:2
|
||||
# python scripts/test.py build
|
||||
# python scripts/test.py test
|
||||
|
||||
cmake --preset windows-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
########################################
|
||||
# MacOS
|
||||
########################################
|
||||
|
||||
continuous-macosx-ARM-Debug-CLANG-ISPC1_17_0-NEON-TBB_HOMEBREW:
|
||||
macosx-ARM-CLANG-NEON-AVX2:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
runs-on: '[ "macOS", "arm" ]'
|
||||
runs-on: '[ "macOS", "build", "arm" ]'
|
||||
cmd: |
|
||||
scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:NEON tasking:TBB_HOMEBREW intensity:2
|
||||
scripts/test.py build
|
||||
scripts/test.py test
|
||||
cmake --preset macos-ARM-CLANG-NEON-AVX2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
continuous-macosx-ARM-Debug-CLANG-ISPC1_17_0-NEON-AVX2-TBB_HOMEBREW:
|
||||
macosx-ARM-CLANG-NEON:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
runs-on: '[ "macOS", "arm" ]'
|
||||
runs-on: '[ "macOS", "build", "arm" ]'
|
||||
cmd: |
|
||||
scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:NEON2X tasking:TBB_HOMEBREW intensity:2
|
||||
scripts/test.py build
|
||||
scripts/test.py test
|
||||
cmake --preset macos-ARM-CLANG-NEON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
# continuous-macosx-x64-Debug-ICC2020_1-ISPC1_14_1-SSE2-TBB2021_1_1:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "macOS", "embree" ]'
|
||||
# cmd: |
|
||||
# scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.14.1 isa:SSE2 tasking:TBB2021.1.1 intensity:2
|
||||
# scripts/test.py build
|
||||
# scripts/test.py test
|
||||
|
||||
continuous-macosx-x64-Debug-CLANG-ISPC1_17_0-SSE2-TBB2020_2:
|
||||
macosx-x64-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
runs-on: '[ "macOS", "embree" ]'
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
cmd: |
|
||||
scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2
|
||||
scripts/test.py build
|
||||
scripts/test.py test
|
||||
|
||||
|
||||
continuous-linux-x64-Debug-GCC-ISPC1_17_0-SSE2-TBB-KLOCWORK:
|
||||
cmake --preset macos-x64-CLANG -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
macosx-ARM-CLANG-NEON-AVX2-universal-binaries:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_static_analysis.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
image: embree/centos:7.4
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
runs-on: '[ "macOS", "build", "arm" ]'
|
||||
cmd: |
|
||||
export CI_PROJECT_DIR=$GITHUB_WORKSPACE
|
||||
export CI_JOB_ID=$GITHUB_RUN_ID
|
||||
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
scripts/klocwork_gen_report.sh
|
||||
scripts/store_files.sh $GITHUB_REPOSITORY $GITHUB_RUN_ID klocwork "klocwork/report.log"
|
||||
cmake --preset macos-ARM-CLANG-NEON-AVX2-UB -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DEMBREE_BUILD_GLFW_FROM_SOURCE=ON -DEMBREE_ISPC_SUPPORT=OFF
|
||||
cmake --build build --config RelWithDebInfo --target build
|
||||
cmake --build build --config RelWithDebInfo --target test_package
|
||||
|
||||
########################################
|
||||
# Coverity
|
||||
########################################
|
||||
|
||||
static-analysis:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
|
||||
with:
|
||||
project: Embree
|
||||
submodules: true
|
||||
coverity: true
|
||||
prebuild: >
|
||||
module load cmake/3.25.3 &&
|
||||
export NAS_LINUX=$STORAGE_PATH/packages/apps &&
|
||||
cmake --preset linux-coverity
|
||||
build: sh scripts/coverity.sh
|
||||
|
||||
success:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- linux-DG2-JIT-INTERNAL-test
|
||||
- linux-DG2-JIT-PUBLIC-test
|
||||
- linux-ATSM-JIT-PUBLIC-test
|
||||
- linux-DG2-JIT-PUBLIC-ICX-test
|
||||
- linux-PVC-JIT-INTERNAL-test-1T
|
||||
- linux-PVC-JIT-INTERNAL-test-2T
|
||||
- linux-PVC-JIT-INTERNAL-test-flat
|
||||
- windows-DG2-JIT-INTERNAL-test
|
||||
- windows-DG2-JIT-PUBLIC-test
|
||||
- windows-DG2-JIT-ICX-INTERNAL-test
|
||||
- windows-DG2-JIT-ICX-PUBLIC-test
|
||||
- linux-fedora29-CLANG4
|
||||
- linux-fedora29-CLANG5-INT-ADDRSANITIZER
|
||||
- linux-fedora29-ICX
|
||||
- linux-fedora32-ICX
|
||||
- linux-ubuntu20_04-GCC-NAMESPACE
|
||||
- linux-ubuntu20_04-ICX
|
||||
- windows-V142
|
||||
- windows-ICX
|
||||
- macosx-ARM-CLANG-NEON-AVX2
|
||||
- macosx-ARM-CLANG-NEON
|
||||
- macosx-x64-CLANG
|
||||
- macosx-ARM-CLANG-NEON-AVX2-universal-binaries
|
||||
- static-analysis
|
||||
|
||||
|
||||
if: failure() || cancelled()
|
||||
steps:
|
||||
- name: Failure
|
||||
run: |
|
||||
echo "::notice title=Success::Workflow failed"
|
||||
exit 1
|
||||
@@ -0,0 +1 @@
|
||||
DPCPP_VERSION=
|
||||
@@ -0,0 +1 @@
|
||||
DPCPP_VERSION=intel-llvm/nightly-2024-03-17
|
||||
@@ -0,0 +1 @@
|
||||
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-029525/artifacts/linux/ubuntu/22.04
|
||||
@@ -0,0 +1 @@
|
||||
GFX_DRIVER_VERSION=linux-latest
|
||||
@@ -0,0 +1 @@
|
||||
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-16477/artifacts/Windows
|
||||
@@ -0,0 +1 @@
|
||||
GFX_DRIVER_VERSION=windows-101.5445
|
||||
@@ -0,0 +1,688 @@
|
||||
## Copyright 2022 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
name: integrate
|
||||
|
||||
permissions: read-all
|
||||
|
||||
# same as nightly...
|
||||
on:
|
||||
schedule:
|
||||
- cron: '00 00 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
#####################################################################
|
||||
# Integration Tests
|
||||
####################################################################
|
||||
|
||||
# TODO: investigate windows integration tests not working
|
||||
#####################################################################
|
||||
## Windows
|
||||
#####################################################################
|
||||
# integrate-windows-ICX:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-out: integrate-windows-ICX
|
||||
# artifact-path: ./build/embree-*.zip
|
||||
# dpcpp-version: oneAPI/compiler/2024.1
|
||||
# cmd: |
|
||||
# cmake --preset integrate-windows-icx
|
||||
# cmake --build build --config Release --target package -j8
|
||||
# cmake --build build --config Release --target post_package
|
||||
#
|
||||
# integrate-windows-ICX-test:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
# needs: ["integrate-windows-ICX"]
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-in: integrate-windows-ICX
|
||||
# dpcpp-version: oneAPI/compiler/2024.1
|
||||
# cmd: |
|
||||
# cd build
|
||||
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
|
||||
# cd ..\tests\integration\test_embree_release
|
||||
# cmake --preset test-windows-icx
|
||||
# cmake --build build --config Release
|
||||
# .\build\test.exe
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# integrate-windows-v142:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-out: integrate-windows-v142
|
||||
# artifact-path: ./build/embree-*.zip
|
||||
# cmd: |
|
||||
# cmake --preset integrate-windows-v142
|
||||
# cmake --build build --config Release --target package -j8
|
||||
# cmake --build build --config Release --target post_package
|
||||
#
|
||||
# integrate-windows-v142-test-v142:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
|
||||
# needs: ["integrate-windows-v142"]
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-in: integrate-windows-v142
|
||||
# cmd: |
|
||||
# cd build
|
||||
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
|
||||
# cd ..\tests\integration\test_embree_release
|
||||
# cmake --preset test-windows-v142
|
||||
# cmake --build build --config Release
|
||||
# .\build\Release\test.exe
|
||||
#
|
||||
# integrate-windows-v142-test-ICX:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
# needs: ["integrate-windows-v142"]
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-in: integrate-windows-v142
|
||||
# dpcpp-version: oneAPI/compiler/2024.1
|
||||
# cmd: |
|
||||
# cd build
|
||||
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
|
||||
# cd ..\tests\integration\test_embree_release
|
||||
# cmake --preset test-windows-icx
|
||||
# cmake --build build --config Release
|
||||
# .\build\test.exe
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#####################################################################
|
||||
## Windows STATIC
|
||||
#####################################################################
|
||||
# integrate-static-windows-ICX:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-out: integrate-static-windows-ICX
|
||||
# artifact-path: ./build/embree-*.zip
|
||||
# dpcpp-version: oneAPI/compiler/2024.1
|
||||
# cmd: |
|
||||
# cmake --preset integrate-static-windows-icx
|
||||
# cmake --build build --config Release --target package -j8
|
||||
# cmake --build build --config Release --target post_package
|
||||
#
|
||||
# integrate-static-windows-ICX-test:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
# needs: ["integrate-static-windows-ICX"]
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-in: integrate-static-windows-ICX
|
||||
# dpcpp-version: oneAPI/compiler/2024.1
|
||||
# cmd: |
|
||||
# cd build
|
||||
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
|
||||
# cd ..\tests\integration\test_embree_release
|
||||
# cmake --preset test-windows-icx
|
||||
# cmake --build build --config Release
|
||||
# .\build\test.exe
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# integrate-static-windows-v142:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-out: integrate-static-windows-v142
|
||||
# artifact-path: ./build/embree-*.zip
|
||||
# cmd: |
|
||||
# cmake --preset integrate-windows-v142
|
||||
# cmake --build build --config Release --target package -j8
|
||||
# cmake --build build --config Release --target post_package
|
||||
#
|
||||
# integrate-static-windows-v142-test-v142:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
|
||||
# needs: ["integrate-static-windows-v142"]
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-in: integrate-static-windows-v142
|
||||
# cmd: |
|
||||
# cd build
|
||||
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
|
||||
# cd ..\tests\integration\test_embree_release
|
||||
# cmake --preset test-windows-v142
|
||||
# cmake --build build --config Release
|
||||
# .\build\Release\test.exe
|
||||
#
|
||||
# integrate-static-windows-v142-test-ICX:
|
||||
# secrets: inherit
|
||||
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
# needs: ["integrate-static-windows-v142"]
|
||||
# with:
|
||||
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
# artifact-in: integrate-static-windows-v142
|
||||
# dpcpp-version: oneAPI/compiler/2024.1
|
||||
# cmd: |
|
||||
# cd build
|
||||
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
|
||||
# cd ..\tests\integration\test_embree_release
|
||||
# cmake --preset test-windows-icx
|
||||
# cmake --build build --config Release
|
||||
# .\build\test.exe
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
# Linux
|
||||
####################################################################
|
||||
integrate-linux-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-out: integrate-linux-GCC
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-linux-GCC-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-linux-GCC" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-linux-GCC
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-linux-GCC-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-linux-GCC" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-linux-GCC
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-linux-GCC-test-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-linux-GCC" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-linux-GCC
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
integrate-linux-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-out: integrate-linux-ICX
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-linux-ICX-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-linux-ICX" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-linux-ICX-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-linux-ICX" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-linux-ICX-test-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-linux-ICX" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
integrate-static-linux-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-out: integrate-static-linux-CLANG
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-static-linux-CLANG-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-static-linux-CLANG" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-static-linux-CLANG
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-static-linux-CLANG-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-static-linux-CLANG" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-static-linux-CLANG
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-static-linux-CLANG-test-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-static-linux-CLANG" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-static-linux-CLANG
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
# Linux STATIC
|
||||
####################################################################
|
||||
integrate-static-linux-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-out: integrate-static-linux-GCC
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-static-linux-GCC-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-static-linux-GCC" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-static-linux-GCC
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-static-linux-GCC-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-static-linux-GCC" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-static-linux-GCC
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-static-linux-GCC-test-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-static-linux-GCC" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-static-linux-GCC
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
integrate-static-linux-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-out: integrate-static-linux-ICX
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-static-linux-ICX-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-static-linux-ICX" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-static-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-static-linux-ICX-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-static-linux-ICX" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-static-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-static-linux-ICX-test-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-static-linux-ICX" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-static-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
integrate-linux-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-out: integrate-linux-CLANG
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-linux-CLANG-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-linux-CLANG" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-linux-CLANG
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-linux-CLANG-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
|
||||
needs: [ "integrate-linux-CLANG" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-in: integrate-linux-CLANG
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-linux-CLANG-test-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-linux-CLANG" ]
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-in: integrate-linux-CLANG
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
# Linux SYCL
|
||||
####################################################################
|
||||
integrate-sycl-linux-ICX:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: icx/compiler_ppkg-rel/20240110
|
||||
artifact-out: integrate-sycl-linux-ICX
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-sycl-linux-icx -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
integrate-sycl-linux-ICX-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-sycl-linux-ICX" ]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: icx/compiler_ppkg-rel/20240110
|
||||
artifact-in: integrate-sycl-linux-ICX
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-sycl-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
integrate-sycl-linux-DPCPP:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: intel-llvm/nightly-2023-09-22-rk
|
||||
artifact-out: integrate-sycl-linux-DPCPP
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
istegrate-sycl-linux-DPCPP-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [ "integrate-sycl-linux-DPCPP" ]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: icx/compiler_ppkg-rel/20240110
|
||||
artifact-in: integrate-sycl-linux-DPCPP
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
# MacOS
|
||||
####################################################################
|
||||
integrate-macos-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-out: integrate-macos-GCC
|
||||
artifact-path: ./build/*.zip
|
||||
cmd: |
|
||||
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
# cmake --build build --config Release --target post_package_notarize TODO: reactivate this when notarization problems are solved
|
||||
|
||||
integrate-macos-GCC-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
needs: [ "integrate-macos-GCC" ]
|
||||
with:
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-in: integrate-macos-GCC
|
||||
cmd: |
|
||||
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-macos-GCC-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
needs: [ "integrate-macos-GCC" ]
|
||||
with:
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-in: integrate-macos-GCC
|
||||
cmd: |
|
||||
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# TODO: cant find tbb/tbb.h ???
|
||||
integrate-macos-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-out: integrate-macos-CLANG
|
||||
artifact-path: ./build/*.zip
|
||||
cmd: |
|
||||
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
# cmake --build build --config Release --target post_package_notarize TODO: reactivate this when notarization problems are solved
|
||||
|
||||
integrate-macos-CLANG-test-GCC:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
needs: [ "integrate-macos-CLANG" ]
|
||||
with:
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-in: integrate-macos-CLANG
|
||||
cmd: |
|
||||
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-gcc
|
||||
cmake --build build --config Release --target test_integration
|
||||
|
||||
integrate-macos-CLANG-test-CLANG:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
needs: [ "integrate-macos-CLANG" ]
|
||||
with:
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-in: integrate-macos-CLANG
|
||||
cmd: |
|
||||
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-clang
|
||||
cmake --build build --config Release --target test_integration
|
||||
+852
-452
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,179 @@
|
||||
## Copyright 2022 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
name: performance
|
||||
|
||||
permissions: read-all
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '00 01 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
perf-linux-SYCL-DPCPP-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: intel/2023.0
|
||||
artifact-out: perf-linux-SYCL-DPCPP
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset perf-linux-icx-sycl -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
perf-linux-DG2-A770-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["perf-linux-SYCL-DPCPP-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2", "perf", "A770" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
artifact-in: perf-linux-SYCL-DPCPP
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
cd build
|
||||
ls *.tar.gz
|
||||
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
|
||||
cd bin
|
||||
source ../embree-vars.sh
|
||||
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
|
||||
|
||||
perf-linux-PVC-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["perf-linux-SYCL-DPCPP-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "pvc", "perf" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
artifact-in: perf-linux-SYCL-DPCPP
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
# Run it on single tile (disable implicit scaling)
|
||||
export EnableImplicitScaling=0
|
||||
export NEOReadDebugKeys=1
|
||||
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
|
||||
cd build
|
||||
ls *.tar.gz
|
||||
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
|
||||
cd bin
|
||||
source ../embree-vars.sh
|
||||
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
perf-linux-x86-ICX-ISPC-build:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: embree/rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
dpcpp-version: intel/2024.1.0
|
||||
artifact-out: perf-linux-x86-ICX-ISPC-build
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset perf-linux-icx -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
perf-linux-i9-12900k-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
|
||||
needs: ["perf-linux-x86-ICX-ISPC-build"]
|
||||
with:
|
||||
runs-on: '[ "Linux", "perf", "vis-perf-i9-12900k-1" ]'
|
||||
artifact-in: perf-linux-x86-ICX-ISPC-build
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
cd build
|
||||
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
|
||||
cd bin
|
||||
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
|
||||
|
||||
|
||||
perf-linux-x8380-1-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
|
||||
needs: ["perf-linux-x86-ICX-ISPC-build"]
|
||||
with:
|
||||
runs-on: '[ "Linux", "perf", "vis-perf-x8380-1" ]'
|
||||
artifact-in: perf-linux-x86-ICX-ISPC-build
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
cd build
|
||||
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
|
||||
cd bin
|
||||
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
|
||||
|
||||
|
||||
perf-linux-x8280-1-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
|
||||
needs: ["perf-linux-x86-ICX-ISPC-build"]
|
||||
with:
|
||||
runs-on: '[ "Linux", "perf", "vis-perf-x8280-1" ]'
|
||||
artifact-in: perf-linux-x86-ICX-ISPC-build
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
cd build
|
||||
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
|
||||
cd bin
|
||||
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
|
||||
|
||||
|
||||
perf-linux-a3970x-1-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
|
||||
needs: ["perf-linux-x86-ICX-ISPC-build"]
|
||||
with:
|
||||
runs-on: '[ "Linux", "perf", "vis-perf-a3970x-1" ]'
|
||||
artifact-in: perf-linux-x86-ICX-ISPC-build
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
cd build
|
||||
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
|
||||
cd bin
|
||||
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
|
||||
|
||||
linux-DG2-A770-buildbench:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["perf-linux-SYCL-DPCPP-build"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2", "perf", "A770" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
artifact-in: perf-linux-SYCL-DPCPP
|
||||
setup-benny: true
|
||||
cmd: |
|
||||
cd build
|
||||
ls *.tar.gz
|
||||
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
|
||||
git clone https://github.com/intel-innersource/libraries.graphics.renderkit.embree.models.git embree-models
|
||||
ls -al
|
||||
source embree-vars.sh
|
||||
echo "bin/embree_buildbench --legacy"
|
||||
bin/embree_buildbench --legacy
|
||||
echo "bin/embree_buildbench_sycl --legacy"
|
||||
bin/embree_buildbench_sycl --legacy
|
||||
echo "bin/embree_buildbench --legacy -c embree-models/crown/crown.ecs"
|
||||
bin/embree_buildbench --legacy -c embree-models/crown/crown.ecs
|
||||
echo "bin/embree_buildbench_sycl --legacy -c embree-models/crown/crown.ecs"
|
||||
bin/embree_buildbench_sycl --legacy -c embree-models/crown/crown.ecs
|
||||
+234
-36
@@ -3,9 +3,11 @@
|
||||
|
||||
name: release
|
||||
|
||||
permissions: read-all
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 04 * * *'
|
||||
- cron: '00 00 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -13,73 +15,269 @@ jobs:
|
||||
#####################################################################
|
||||
# Release Builds
|
||||
####################################################################
|
||||
|
||||
release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP:
|
||||
release-windows:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
|
||||
artifact-out: release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-path: ./build/*.zip
|
||||
artifact-out: release-windows
|
||||
artifact-path: ./build/embree-*.zip
|
||||
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
|
||||
shell: cmd
|
||||
cmd: |
|
||||
python scripts/test.py configure platform:x64 build:Release compiler:ICC19-VC141 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP
|
||||
python scripts/test.py build
|
||||
python scripts/test.py test
|
||||
cmake --preset release-windows -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
cmake --build build --target test_package
|
||||
|
||||
release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP:
|
||||
release-macosx:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
runs-on: '[ "macOS", "embree", "sign", "avx2" ]'
|
||||
artifact-out: release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-path: ./build/*.zip
|
||||
project: embree
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
cmd: |
|
||||
scripts/test.py configure platform:x64 build:Release compiler:ICC2021.1.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2021.2.0 intensity:4 package:ZIP
|
||||
scripts/test.py build
|
||||
scripts/test.py test
|
||||
source scripts/cmake-presets/macos-env.sh
|
||||
cmake --preset release-macos -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
cmake --build build --target test_package
|
||||
rm build/embree-*-testing.zip
|
||||
notarize-package: build/embree-*.zip
|
||||
artifact-out: release-macosx
|
||||
artifact-path: ./build/*.zip
|
||||
|
||||
release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP:
|
||||
verify-package-macosx:
|
||||
needs: release-macosx
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
image: embree/centos:7.4
|
||||
project: embree
|
||||
runs-on: '[ "macOS", "build", "x86_64" ]'
|
||||
artifact-in: release-macosx
|
||||
cmd: |
|
||||
mkdir package
|
||||
tar -xzvf build/embree-* -C ./package
|
||||
sign-path-verify: ./package
|
||||
|
||||
release-macosx-arm:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
project: embree
|
||||
runs-on: '[ "macOS13", "test", "arm" ]'
|
||||
cmd: |
|
||||
source scripts/cmake-presets/macos-env.sh
|
||||
cmake --preset release-macos-arm -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
cmake --build build --target test_package
|
||||
rm build/embree-*-testing.zip
|
||||
notarize-package: build/embree-*.zip
|
||||
artifact-out: release-macosx-arm
|
||||
artifact-path: ./build/*.zip
|
||||
|
||||
verify-package-macosx-arm:
|
||||
needs: release-macosx-arm
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
|
||||
with:
|
||||
project: embree
|
||||
runs-on: '[ "macOS13", "test", "arm" ]'
|
||||
artifact-in: release-macosx-arm
|
||||
cmd: |
|
||||
mkdir package
|
||||
tar -xzvf build/embree-* -C ./package
|
||||
sign-path-verify: ./package
|
||||
|
||||
release-linux:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "avx512" ]'
|
||||
artifact-out: release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-out: release-linux
|
||||
artifact-path: ./build/*.tar.gz
|
||||
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
|
||||
pre-cmd: |
|
||||
yum -y install epel-release
|
||||
dnf makecache --refresh
|
||||
dnf config-manager --set-enabled powertools
|
||||
dnf -y update
|
||||
dnf -y install ninja-build
|
||||
cmd: |
|
||||
scripts/test.py configure platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP
|
||||
scripts/test.py build
|
||||
scripts/test.py test
|
||||
module load cmake/3.25.3
|
||||
cmake --preset release-linux -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
cmake --build build --target test_package
|
||||
|
||||
|
||||
#####################################################################
|
||||
# DPC++ Release Builds
|
||||
####################################################################
|
||||
release-windows-sycl:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
|
||||
with:
|
||||
runs-on: '[ "Windows", "NAS", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/gfx-windows-internal.env
|
||||
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
|
||||
artifact-out: release-windows-sycl
|
||||
artifact-path: ./build/*.zip
|
||||
shell: cmd
|
||||
cmd: |
|
||||
cmake --preset release-windows-sycl -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
cmake --build build --target test_package
|
||||
|
||||
release-linux-sycl:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
with:
|
||||
image: rockylinux:8.7
|
||||
runs-on: '[ "Linux", "docker", "build" ]'
|
||||
project: embree
|
||||
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
|
||||
artifact-out: release-linux-sycl
|
||||
artifact-path: ./build/*.tar.gz
|
||||
pre-cmd: |
|
||||
yum -y install epel-release
|
||||
dnf makecache --refresh
|
||||
dnf config-manager --set-enabled powertools
|
||||
dnf -y update
|
||||
dnf -y install ninja-build
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset release-linux-sycl -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release --target build
|
||||
|
||||
release-linux-sycl-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["release-linux-sycl"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
|
||||
artifact-in: release-linux-sycl
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --target test_package
|
||||
|
||||
release-linux-sycl-pvc-test:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: ["release-linux-sycl"]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
options: --device=/dev/dri:/dev/dri
|
||||
runs-on: '[ "Linux", "docker", "pvc" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
|
||||
artifact-in: release-linux-sycl
|
||||
cmd: |
|
||||
module load cmake/3.25.3
|
||||
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
|
||||
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
|
||||
cmake --build build --target test_package
|
||||
|
||||
#####################################################################
|
||||
# Release binaries scans
|
||||
#####################################################################
|
||||
binary-analysis:
|
||||
needs:
|
||||
- release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
- release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
- release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
- release-windows
|
||||
- release-macosx
|
||||
- release-linux
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
|
||||
with:
|
||||
project: embree
|
||||
artifact-in-linux: release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-in-macos: release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-in-windows: release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-in-windows: release-windows
|
||||
artifact-in-macos: release-macosx
|
||||
artifact-in-linux: release-linux
|
||||
path: "build/*.zip build/*.gz"
|
||||
|
||||
antivirus-scan:
|
||||
needs:
|
||||
- release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
- release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
- release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
- release-windows
|
||||
- release-macosx
|
||||
- release-linux
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
|
||||
with:
|
||||
project: embree
|
||||
artifact-in-linux: release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-in-macos: release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-in-windows: release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
|
||||
artifact-in-windows: release-windows
|
||||
artifact-in-macos: release-macosx
|
||||
artifact-in-linux: release-linux
|
||||
path: "build/*.zip build/*.gz"
|
||||
|
||||
binary-analysis-dpcpp:
|
||||
needs:
|
||||
- release-windows-sycl
|
||||
- release-linux-sycl-test
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
|
||||
with:
|
||||
project: embree
|
||||
artifact-in-windows: release-windows-sycl
|
||||
artifact-in-linux: release-linux-sycl
|
||||
path: "build/*.zip build/*.gz"
|
||||
artifact-out-name: "binary-analysis-dpcpp"
|
||||
|
||||
antivirus-scan-dpcpp:
|
||||
needs:
|
||||
- release-windows-sycl
|
||||
- release-linux-sycl-test
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
|
||||
with:
|
||||
project: embree
|
||||
artifact-in-windows: release-windows-sycl
|
||||
artifact-in-linux: release-linux-sycl
|
||||
path: "build/*.zip build/*.gz"
|
||||
artifact-out-name: "antivirus-scan-dpcpp"
|
||||
|
||||
binary-analysis-arm:
|
||||
needs:
|
||||
- release-macosx-arm
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
|
||||
with:
|
||||
project: embree
|
||||
artifact-in-macos: release-macosx-arm
|
||||
path: "build/*.zip"
|
||||
artifact-out-name: "binary-analysis-arm"
|
||||
|
||||
antivirus-scan-arm:
|
||||
needs:
|
||||
- release-macosx-arm
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
|
||||
with:
|
||||
project: embree
|
||||
artifact-in-macos: release-macosx-arm
|
||||
path: "build/*.zip"
|
||||
artifact-out-name: "antivirus-scan-arm"
|
||||
|
||||
#####################################################################
|
||||
# Testing package
|
||||
#####################################################################
|
||||
test-package:
|
||||
secrets: inherit
|
||||
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
|
||||
needs: [release-linux]
|
||||
with:
|
||||
image: embree/ubuntu:22.04
|
||||
runs-on: '[ "Linux", "docker", "dg2" ]'
|
||||
project: embree
|
||||
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
|
||||
artifact-in: release-linux
|
||||
artifact-out: release-testing-PACKAGE-ZIP
|
||||
artifact-path: ./build/*.tar.gz
|
||||
cmd: |
|
||||
rm build/embree-4.3.2.x86_64.linux.tar.gz
|
||||
mv build/embree-4.3.2.x86_64.linux-testing.tar.gz build/embree-4.3.2-testing.tar.gz
|
||||
+2
-1
@@ -7,5 +7,6 @@ x64
|
||||
.DS_Store
|
||||
kernels/config.h
|
||||
kernels/hash.h
|
||||
include/embree3/rtcore_config.h
|
||||
include/embree4/rtcore_config.h
|
||||
build
|
||||
out
|
||||
|
||||
+37
-728
@@ -1,747 +1,35 @@
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
variables:
|
||||
COMMON: "platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 tasking:TBB2019.9"
|
||||
# Retry mechanism knobs in case of sporadic errors
|
||||
GET_SOURCES_ATTEMPTS: 10
|
||||
ARTIFACT_DOWNLOAD_ATTEMPTS: 10
|
||||
EXECUTOR_JOB_SECTION_ATTEMPTS: 3
|
||||
|
||||
|
||||
####################################################################
|
||||
# Stages
|
||||
####################################################################
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- benchmark
|
||||
- release
|
||||
- scan
|
||||
- protex
|
||||
|
||||
|
||||
####################################################################
|
||||
# Templates
|
||||
####################################################################
|
||||
|
||||
.build:
|
||||
stage: build
|
||||
script: "python scripts/test.py build"
|
||||
after_script: [sleep 5] # required to get job log
|
||||
retry: 1
|
||||
artifacts:
|
||||
paths:
|
||||
- build/
|
||||
- .ctest_conf
|
||||
expire_in: 1 day
|
||||
|
||||
.test:
|
||||
stage: test
|
||||
script: "python scripts/test.py test"
|
||||
after_script: [sleep 5] # required to get job log
|
||||
retry: 1
|
||||
|
||||
.build_and_test:
|
||||
stage: build
|
||||
script:
|
||||
- "python scripts/test.py build"
|
||||
- "python scripts/test.py test"
|
||||
after_script: [sleep 5] # required to get job log
|
||||
retry: 1
|
||||
|
||||
#####################################################################
|
||||
# Continuous Test
|
||||
####################################################################
|
||||
|
||||
continuous-linux-WebAssembly:
|
||||
stage: build
|
||||
script:
|
||||
- source /emsdk/emsdk_env.sh
|
||||
- mkdir build
|
||||
- cd build
|
||||
- emcmake cmake -DCMAKE_BUILD_TYPE=Release -DEMBREE_TUTORIALS=OFF -DEMBREE_TASKING_SYSTEM=INTERNAL ..
|
||||
- emmake make -j
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-macosx-ARM-Debug-CLANG-ISPC1.17.0-NEON-TBB_HOMEBREW:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ISPC_SUPPORT:ON ispc:ispc1.17.0 isa:NEON tasking:TBB_HOMEBREW intensity:2"]
|
||||
tags: [embree, mac-arm]
|
||||
only: [pushes]
|
||||
|
||||
continuous-macosx-ARM-Debug-CLANG-ISPC1.17.0-NEON-AVX2-TBB_HOMEBREW:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ISPC_SUPPORT:ON ispc:ispc1.17.0 isa:NEON2X tasking:TBB_HOMEBREW intensity:2"]
|
||||
tags: [embree, mac-arm]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-macosx-x64-Debug-ICC2020.1-ISPC1.14.1-SSE2-TBB2021.1.1:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.14.1 isa:SSE2 tasking:TBB2021.1.1 intensity:2"]
|
||||
# tags: [embree, mac]
|
||||
# only: [pushes]
|
||||
#
|
||||
continuous-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-SSE2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts/test.py configure platform:x64 threads:4 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2021.2.0 intensity:2"]
|
||||
tags: [embree, win10, v120]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1.12.0-SSE2-TBB2021.2.0:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["python scripts\\test.py configure platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2021.2.0 intensity:2"]
|
||||
# tags: [embree, win10, v140]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-windows-x64-RelWithDebInfo-V141-ISPC1.17.0-SSE2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.17.0 isa:SSE2 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:8"]
|
||||
tags: [embree, win10, v141]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-windows-x64-RelWithDebInfo-ICX2022.0.0-ISPC1.16.1-AVX512:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICX2022.0.0 ispc:ispc1.16.1 isa:AVX512 tasking:INT threads:16 intensity:2"]
|
||||
# tags: [embree, win10, avx512vl]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-macosx-x64-Debug-CLANG-ISPC1.17.0-SSE2-TBB2020.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2"]
|
||||
tags: [embree, mac]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-ICC2019.4-ISPC1.12.0-AVX512-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:27
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX512-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd128 tasking:TBB2021.2.0 GLFW:OFF intensity:2"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-x64-Debug-CLANG5.0.0-ISPC1.17.0-AVX2-INT-ADDRSANITIZER:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.17.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-ubuntu20.04-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:TBB intensity:1 api_namespace:myembree"]
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-ICX2022.1.2-ISPC1.17.0-AVX512-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts/test.py configure platform:x64 build:Debug threads:4 compiler:ICX2022.1.2 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2"]
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-ubuntu17.10-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1 api_namespace:myembree"]
|
||||
# image: $DOCKER_REGISTRY/embree/ubuntu:17.10
|
||||
# tags: [embree, docker]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-centos7.4-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 frequency_level:simd128 tasking:TBB intensity:1"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512 tasking:TBB COMPACT_POLYS:ON MIN_WIDTH:ON intensity:2"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:32
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-x64-Debug-GCC-ISPC1.17.0-SSE2-TBB-KLOCWORK:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker]
|
||||
dependencies: []
|
||||
artifacts:
|
||||
paths: [klocwork/*]
|
||||
|
||||
continuous-kw-gen-report:
|
||||
stage: scan
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
needs: ["continuous-linux-x64-Debug-GCC-ISPC1.17.0-SSE2-TBB-KLOCWORK"]
|
||||
script:
|
||||
- scripts/klocwork_gen_report.sh
|
||||
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID klocwork "klocwork/report.log"
|
||||
tags: [embree, docker]
|
||||
artifacts:
|
||||
paths: [klocwork/*]
|
||||
|
||||
continuous-linux-x64-PROTEX:
|
||||
stage: protex
|
||||
image: amd64/openjdk:8
|
||||
script: "scripts/source_scan_protex.sh"
|
||||
tags: [embree, docker]
|
||||
dependencies: []
|
||||
needs: []
|
||||
|
||||
#####################################################################
|
||||
# Intensive Nightly Tests
|
||||
####################################################################
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-SSE2-INT:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:INT intensity:2"]
|
||||
tags: [embree, win10, v120]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-AVX-TBB2019.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX tasking:TBB2019.2 intensity:4"]
|
||||
tags: [embree, win10, v120, avx]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-Win32-RelWithDebInfo-V140-ISPC1.12.0-SSE2-TBB2020.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:2"]
|
||||
tags: [embree, win10, v140]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.12.0-AVX2-PPL:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:PPL intensity:2"]
|
||||
tags: [embree, win10, v140, avx2]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V141-ISPC1.13.0-AVX2-TBB2019.9-STATIC:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2019.9 intensity:2 STATIC_LIB:ON"]
|
||||
tags: [embree, win10, v141]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V142-ISPC1.13.0-AVX2-TBB2020.2-STATIC:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V142 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 intensity:2"]
|
||||
tags: [embree, win10, v142]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-LLVM-CLANG-ISPC1.13.0-AVX2-TBB2019.9-NAMESPACE:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:LLVM_CLANG ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 intensity:4 api_namespace:myembree"]
|
||||
tags: [embree, win10, llvm_clang]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.13.0-AVX2-TBB2019.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICC17-VC14 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2019.2 intensity:4"]
|
||||
tags: [embree, win10, icc17]
|
||||
only: [web, schedules]
|
||||
|
||||
#nightly-windows-x64-RelWithDebInfo-ICC18-ISPC1.13.0-AVX512-TBB2020.2:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICC18-VC14 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2020.2 intensity:2"]
|
||||
# tags: [embree, win10, icc18, avx512vl]
|
||||
# only: [web, schedules]
|
||||
#
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-ICC19-ISPC1.13.0-AVX512-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICC19-VC14 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2019.9 intensity:2"]
|
||||
tags: [embree, win10, icc19, avx512vl]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.14.1-AVX2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["python scripts\\test.py configure platform:x64 build:Release compiler:V142 ispc:ispc1.14.1 isa:AVX2 tasking:TBB2021.2.0 intensity:2"]
|
||||
tags: [embree, win10, v142]
|
||||
only: [web, schedules]
|
||||
|
||||
# CLANG compilation and testing of different ISAs
|
||||
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2020.2-NAMESPACE:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:4 api_namespace:myembree maxinstancelevelcount:4"]
|
||||
tags: [embree, mac]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.13.0-AVX-INT:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.13.0 isa:AVX tasking:INT intensity:4"]
|
||||
tags: [embree, mac] # avx
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.13.0-SSE2-TBB2019.9-STATIC:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.13.0 isa:SSE2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"]
|
||||
tags: [embree, mac] # avx2
|
||||
only: [web, schedules]
|
||||
|
||||
# ICC compilation and testing of different ISAs
|
||||
|
||||
#nightly-macosx-x64-Debug-ICC15-ISPC1.13.0-AVX-INT:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC15 ispc:ispc1.13.0 isa:AVX tasking:INT intensity:4"]
|
||||
# tags: [embree, mac, icc15]
|
||||
# only: [web, schedules]
|
||||
#
|
||||
|
||||
#nightly-macosx-x64-Debug-ICC2019.4-ISPC1.13.0-AVX2-TBB2020.2:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd256 tasking:TBB2020.2 intensity:4"]
|
||||
# tags: [embree, mac]
|
||||
# only: [web, schedules]
|
||||
|
||||
#nightly-macosx-x64-Debug-ICC2020.1-ISPC1.13.0-AVX2-TBB2019.9:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2019.9 intensity:4"]
|
||||
# tags: [embree, mac]
|
||||
# only: [web, schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-ICC2021.1.1-ISPC1.13.0-AVX2-TBB2021.1.1:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2021.1.1 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2021.1.1 intensity:4"]
|
||||
tags: [embree, mac]
|
||||
only: [web, schedules]
|
||||
|
||||
|
||||
# CLANG compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-SSE2-TBB-NAMESPACE:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:8"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG5.0.0-ISPC1.15.0-AVX2-INT-ADDRSANITIZER:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.15.0 isa:AVX tasking:INT intensity:2 addrsanitizer:ON"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.16.1-AVX2-TBB2021.2.0-STATIC:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.16.1 isa:AVX2 frequency_level:simd128 tasking:TBB2021.2.0 intensity:4 STATIC_LIB:ON"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker] # avx2
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.16.1-AVX512-TBB2020.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.16.1 isa:AVX512 frequency_level:simd256 tasking:TBB2020.2 intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [web, schedules]
|
||||
|
||||
|
||||
# GCC compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.16.1-SSE2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.16.1 isa:SSE2 tasking:TBB2021.2.0 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.16.1-AVX-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.16.1 isa:AVX tasking:TBB2019.9 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker] # avx
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker] # avx2
|
||||
only: [web, schedules]
|
||||
|
||||
|
||||
# ICC compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-Debug-ICC2015.3-ISPC1.16.1-SSE2-TBB2019.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2015.3 ispc:ispc1.16.1 isa:SSE2 tasking:TBB2019.2 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-ICC2016.3-ISPC1.16.1-AVX-TBB2019.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2016.3 ispc:ispc1.16.1 isa:AVX tasking:TBB2019.2 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker] # avx
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-avx512vl-x64-Debug-ICC2017.1-ISPC1.16.1-AVX512-TBB2019.2:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2017.1 ispc:ispc1.16.1 isa:AVX512 frequency_level:simd256 tasking:TBB2019.2 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-avx512vl-x64-Debug-ICC2018.0-ISPC1.16.1-AVX512-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2018.0 ispc:ispc1.16.1 isa:AVX512 tasking:TBB2019.9 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-ICC2019.4-ISPC1.16.1-AVX2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.16.1 isa:AVX2 tasking:TBB2021.2.0 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker] # avx2
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-ICC2020.1-ISPC1.17.0-AVX2-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 intensity:4"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker] # avx2
|
||||
only: [web, schedules]
|
||||
|
||||
# Testing on different Linux distributions
|
||||
|
||||
nightly-ubuntu20.04-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-ubuntu20.04-x64-Release-GCC-ISPC1.14.1-AVX2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Release compiler:GCC ispc:ispc1.14.1 isa:AVX2 tasking:TBB2021.2.0 intensity:2"]
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-ubuntu16.04-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB MIN_WIDTH:ON intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:16.04
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-centos7.4-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB COMPACT_POLYS:ON intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
#nightly-centos7.0-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
|
||||
# extends: .build_and_test
|
||||
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB intensity:3"]
|
||||
# image: $DOCKER_REGISTRY/embree/centos:7.0
|
||||
# tags: [embree, docker]
|
||||
# only: [web, schedules]
|
||||
|
||||
nightly-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isas:AVX512 tasking:TBB intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:32
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-fedora28-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:28
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-fedora27-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:27
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-fedora26-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-fedora25-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
|
||||
# Compilation test of disabled features
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-AVX2-TBB2019.9-NO-ISPC:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 ISPC_SUPPORT:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-NO-TUTORIALS:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TUTORIALS:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-BACKFACECULLING:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 BACKFACE_CULLING:ON intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-IGNORE-INVALID-RAYS:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 IGNORE_INVALID_RAYS:ON intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-NO-FILTER-FUNCTION:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 FILTER_FUNCTION:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-RAYMASKS:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 RAY_MASK:ON intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-NO-PACKETS:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 RAY_PACKETS:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-STATCOUNTER:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 STAT_COUNTER:ON intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
|
||||
# Compilation test of individual ISAs
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-SSE2-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:SSE2 tasking:TBB2019.9 intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-SSE42-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:SSE42 tasking:TBB2021.2.0 intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-AVX-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:AVX tasking:TBB2019.9 intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-AVX2-TBB2021.2.0:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:AVX2 tasking:TBB2021.2.0 intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-AVX512-TBB2019.9:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:AVX512 tasking:TBB2019.9 intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
|
||||
# Compilation test of individual primitive types enabled
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-TRI:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-QUAD:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 TRI:OFF QUAD:ON GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-GRID:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:OFF QUAD:OFF GRID:ON CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-CURVE:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:ON SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-SUBDIV:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:ON USERGEOM:OFF INSTANCE:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-USERGEOM:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:ON INSTANCE:OFF intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-INSTANCE:
|
||||
extends: .build_and_test
|
||||
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:ON intensity:0"]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
tags: [embree, docker]
|
||||
only: [web, schedules]
|
||||
|
||||
#####################################################################
|
||||
# Release Builds
|
||||
####################################################################
|
||||
|
||||
release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP:
|
||||
stage: release
|
||||
needs: []
|
||||
script:
|
||||
- "python scripts/test.py configure platform:x64 build:Release compiler:ICC19-VC141 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP"
|
||||
- "python scripts/test.py build"
|
||||
- "python scripts/test.py test"
|
||||
tags: [embree, win10, icc17, avx512vl]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$env:CI_JOB_NAME"
|
||||
paths: [build/*.zip]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP-manual:
|
||||
extends: release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP
|
||||
only: [pushes]
|
||||
when: manual
|
||||
|
||||
release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP:
|
||||
stage: release
|
||||
needs: []
|
||||
script:
|
||||
- "scripts/test.py configure platform:x64 build:Release compiler:ICC2021.1.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2021.2.0 intensity:4 package:ZIP"
|
||||
- "scripts/test.py build"
|
||||
- "scripts/test.py test"
|
||||
tags: [embree, mac, sign]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.zip]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP-manual:
|
||||
extends: release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP
|
||||
only: [pushes]
|
||||
when: manual
|
||||
|
||||
release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP:
|
||||
stage: release
|
||||
needs: []
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script:
|
||||
- "scripts/test.py configure platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP"
|
||||
- "scripts/test.py build"
|
||||
- "scripts/test.py test"
|
||||
- tar xzf build/embree-*.x86_64.linux.tar.gz
|
||||
- mv embree*.x86_64.linux embree
|
||||
- mkdir ospray_build
|
||||
- cd ospray_build
|
||||
- cmake ../scripts/ospray
|
||||
- cmake --build .
|
||||
- cd ospray/build
|
||||
- LD_LIBRARY_PATH="$CI_PROJECT_DIR/ospray_build/install/lib:$LD_LIBRARY_PATH" PATH="$CI_PROJECT_DIR/ospray_build/ospray/build/:$PATH" ../src/ospray/scripts/tests/run_tests.sh "$CI_PROJECT_DIR/ospray_build/ospray/src/ospray"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.tar.gz]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP-manual:
|
||||
extends: release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP
|
||||
only: [pushes]
|
||||
when: manual
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Release binaries scans
|
||||
####################################################################
|
||||
|
||||
scan-bdba-bin:
|
||||
stage: scan
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
tags: [docker]
|
||||
needs: [release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP]
|
||||
script:
|
||||
- scripts/bdba.sh "build/embree-*"
|
||||
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID bdba "embree-*.pdf"
|
||||
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID bdba "embree-*.csv"
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
paths:
|
||||
- embree-*.pdf
|
||||
- embree-*.csv
|
||||
|
||||
av:
|
||||
stage: scan
|
||||
tags: [docker]
|
||||
image: $DOCKER_REGISTRY/clamav:ubuntu20.04
|
||||
needs: [release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP]
|
||||
script:
|
||||
- freshclam | tee -a /tmp/av_scan.log
|
||||
- clamscan -va --max-filesize=512M --max-scansize=2048M --alert-broken --alert-exceeds-max build/embree* | tee -a /tmp/av_scan.log
|
||||
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID av /tmp/av_scan.log
|
||||
only: [web, schedules]
|
||||
|
||||
#####################################################################
|
||||
# Preliminary benchmark setup
|
||||
####################################################################
|
||||
|
||||
.benchmark:
|
||||
stage: benchmark
|
||||
tags:
|
||||
- vis-perf-x8280-1
|
||||
script:
|
||||
- "scripts/test.py configure platform:x64 build:Release compiler:GCC ispc:ispc1.17.0 isas:AVX512 tasking:TBB2021.2.0 intensity:0 --benchmark"
|
||||
- "scripts/test.py configure platform:x64 build:Release compiler:GCC ispc:ispc1.17.0 isas:AVX512 tasking:TBB2021.2.0 intensity:0 EMBREE_USE_GOOGLE_BENCHMARK:ON EMBREE_GOOGLE_BENCHMARK_DIR:/NAS/packages/apps/google-benchmark/vis-perf-x8280-1/lib64/cmake/benchmark"
|
||||
- "scripts/test.py build"
|
||||
- "scripts/test.py test"
|
||||
- "chmod +x scripts/run-benchmark.sh"
|
||||
- "scripts/run-benchmark.sh"
|
||||
- "scripts/test.py run-benchmark.sh"
|
||||
needs: []
|
||||
|
||||
benchmark_nightly:
|
||||
@@ -752,3 +40,24 @@ benchmark_manual:
|
||||
extends: .benchmark
|
||||
except: [schedules]
|
||||
when: manual
|
||||
|
||||
.benchmark_gpu:
|
||||
stage: benchmark
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
tags: [docker-gpu, dg2, perf]
|
||||
before_script:
|
||||
- git config --global --add safe.directory $CI_PROJECT_DIR
|
||||
script:
|
||||
- "scripts/run-benchmark-gpu.sh"
|
||||
- "scripts/record-benchmark-gpu.sh"
|
||||
needs: []
|
||||
|
||||
benchmark_gpu_nightly:
|
||||
extends: .benchmark_gpu
|
||||
only: [schedules]
|
||||
|
||||
benchmark_gpu_manual:
|
||||
extends: .benchmark_gpu
|
||||
except: [schedules]
|
||||
when: manual
|
||||
|
||||
|
||||
+79
-2
@@ -1,6 +1,83 @@
|
||||
Version History
|
||||
---------------
|
||||
|
||||
### Embree 4.3.2
|
||||
- MacOS universal binary compilation now works.
|
||||
- Some bugfixes for AVX512 on MacOS x86 machines.
|
||||
- Embree now uses level zero raytracing extension to build BVH which enables forward-compatibility.
|
||||
|
||||
### Embree 4.3.1
|
||||
- Add missing EMBREE_GEOMETRY types to embree-config.cmake
|
||||
- User defined thread count now takes precedence for internal task scheduler
|
||||
- Fixed static linking issue with ze_wrapper library
|
||||
- Better error reporting for SYCL platform and driver problems in embree_info and tutorial apps.
|
||||
- Patch to glfw source is not applied by default anymore.
|
||||
- Known issue: Running Embree on Intel® Data Center GPU Max Series with 2 tiles (e.g. Intel® Data Center GPU Max 1550) requires setting the environment variable ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE.
|
||||
- Known issue: Embree build using Apple Clang 15 and ARM support (via the SEE2NEON library) may cause "EXEC_BAD_INSTRUCTION" runtime exceptions. Please use Apple Clang <= 14 on macOS.
|
||||
|
||||
### Embree 4.3.0
|
||||
- Added instance array primitive for reducing memony requirements in scenes
|
||||
with large amounts of similar instances.
|
||||
- Properly checks driver if L0 RTAS extension can get loaded.
|
||||
- Added varying version of rtcGetGeometryTransform for ISPC.
|
||||
- Fixed signature of RTCMemoryMonitorFunction for ISPC.
|
||||
- Add support for ARM64 Windows platform in CMake.
|
||||
|
||||
### Embree 4.2.0
|
||||
- SYCL version of Embree with GPU support is no longer in beta phase.
|
||||
- Improved BVH build performance on many core machines for applications that oversubscribe threads.
|
||||
- Added rtcGetGeometryTransformFromScene API function that can get used inside SYCL kernels.
|
||||
- No longer linking to ze_loader in SYCL mode to avoid Intel(R) oneAPI Level Zero dependency
|
||||
for CPU rendering.
|
||||
- Releasing test package to test Embree.
|
||||
|
||||
### Embree 4.1.0
|
||||
- Added support for Intel® Data Center GPU Max Series.
|
||||
- Added ARM64 Linux support.
|
||||
- Added EMBREE_BACKFACE_CULLING_SPHERES cmake option. The new cmake option defaults to OFF.
|
||||
|
||||
### Embree 4.0.1
|
||||
- Improved performance for Tiger Lake, Comet Lake, Cannon Lake, Kaby Lake,
|
||||
and Skylake client CPUs by using 256 bit SIMD instructions by default.
|
||||
- Fixed broken motion blur of RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE geometry type.
|
||||
- Fixed bvh build retry issue for TBB 2020.3
|
||||
- Added support for Intel® Data Center GPU Flex Series
|
||||
- Fixed issue on systems without a SYCL platform.
|
||||
|
||||
### Embree 4.0.0
|
||||
- This Embree release adds support for Intel® Arc™ GPUs through SYCL.
|
||||
- The SYCL support of Embree is in beta phase. Current functionality, quality,
|
||||
and GPU performance may not reflect that of the final product. Please read the
|
||||
documentation section "Embree SYCL Known Issues" for known limitations.
|
||||
- Embree CPU support in this release as at Gold level, incorporating the same quality
|
||||
and performance as previous releases.
|
||||
- A small number of API changes were required to get optimal experience and
|
||||
performance on the CPU and GPU. See documentation section "Upgrading from Embree 3 to
|
||||
Embree 4" for details.
|
||||
- rtcIntersect and rtcOccluded function arguments changed slightly.
|
||||
- RTCIntersectContext is renamed to RTCRayQuery context and most members moved to
|
||||
new RTCIntersectArguments and RTCOccludedArguments structures.
|
||||
- rtcFilterIntersection and rtcFilterOcclusion API calls got replaced by
|
||||
rtcInvokeIntersectFilterFromGeometry and rtcInvokeOccludedFilterFromGeometry API calls.
|
||||
- rtcSetGeometryEnableFilterFunctionFromArguments enables argument filter functions for some geometry.
|
||||
- RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER ray query flag enables argument filter functions for each geometry.
|
||||
- User geometry callbacks have to return if a valid hit was found.
|
||||
- Ray masking is enabled by default now as required by most users.
|
||||
- The default ray mask for geometries got changed from 0xFFFFFFFF to 0x1.
|
||||
- Removed ray stream API as rarely used with minimal performance benefits over packet tracing.
|
||||
- Introduced rtcForwardIntersect/rtcForwardOccluded API calls to trace tail recursive rays from user geometry callback.
|
||||
- The rtcGetGeometryUserDataFromScene API call got added to be used in SYCL code.
|
||||
- Added support for user geometry callback function pointer passed through ray query context
|
||||
- Feature flags enable reducing code complexity for optimal performance on the GPU.
|
||||
- Fixed compilation issues for ARM AArch64 processor under Linux.
|
||||
- Setting default frequency level to SIMD256 for ARM on all platforms.
|
||||
This allows using double pumped NEON execution by enabling EMBREE_ISA_NEON2X in cmake under Linux.
|
||||
- Fixed missing end caps of motion blurred line segments.
|
||||
- EMBREE_ISPC_SUPPORT is turned OFF by default.
|
||||
- Embree drops support of the deprecated Intel(R) Compiler. It is replaced by
|
||||
the Intel(R) oneAPI DPC++/C++ Compiler on Windows and Linux and the
|
||||
Intel(R) C++ Classic Compiler on MacOS (latest tested versions is 2023.0.0).
|
||||
|
||||
### Embree 3.13.5
|
||||
- Fixed bug in bounding flat Catmull Rom curves of subdivision level 4.
|
||||
- Improved self intersection avoidance for
|
||||
@@ -125,7 +202,7 @@ Version History
|
||||
- For sphere geometries the intersection filter gets now invoked for
|
||||
front and back hit.
|
||||
- Fixed some bugs for quaternion motion blur.
|
||||
- RTCIntersectContext always non-const in Embree API
|
||||
- RTCRayQueryContext always non-const in Embree API
|
||||
- Made RTCHit aligned to 16 bytes in Embree API
|
||||
|
||||
### New Features in Embree 3.7.0
|
||||
@@ -398,7 +475,7 @@ Version History
|
||||
when modifying only the tessellation rate and vertex array.
|
||||
|
||||
### New Features in Embree 2.16.2
|
||||
- Fixed bug that caused NULL intersection context in intersection
|
||||
- Fixed bug that caused NULL ray query context in intersection
|
||||
filter when instancing was used.
|
||||
- Fixed an issue where uv's where outside the triangle (or quad) for
|
||||
very small triangles (or quads). In robust mode we improved the uv
|
||||
|
||||
+131
-37
@@ -1,10 +1,11 @@
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
|
||||
SET(EMBREE_VERSION_MAJOR 3)
|
||||
SET(EMBREE_VERSION_MINOR 13)
|
||||
SET(EMBREE_VERSION_PATCH 5)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
|
||||
|
||||
SET(EMBREE_VERSION_MAJOR 4)
|
||||
SET(EMBREE_VERSION_MINOR 3)
|
||||
SET(EMBREE_VERSION_PATCH 2)
|
||||
SET(EMBREE_VERSION_NOTE "")
|
||||
|
||||
SET(EMBREE_VERSION ${EMBREE_VERSION_MAJOR}.${EMBREE_VERSION_MINOR}.${EMBREE_VERSION_PATCH})
|
||||
@@ -12,6 +13,9 @@ MATH(EXPR EMBREE_VERSION_NUMBER "10000*${EMBREE_VERSION_MAJOR} + 100*${EMBREE_VE
|
||||
SET(CPACK_RPM_PACKAGE_RELEASE 1)
|
||||
|
||||
PROJECT(embree${EMBREE_VERSION_MAJOR})
|
||||
SET(EMBREE_PROJECT_COMPILATION ON)
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
# We use our own strip tool on macOS to sign during install. This is required as CMake modifies RPATH of the binary during install.
|
||||
IF (APPLE AND EMBREE_SIGN_FILE)
|
||||
@@ -68,7 +72,13 @@ IF(COMMAND cmake_policy)
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
if(POLICY CMP0135)
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0057)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
endif()
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
|
||||
MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH)
|
||||
@@ -81,9 +91,7 @@ MARK_AS_ADVANCED(CLEAR CMAKE_CXX_COMPILER)
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/common/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
IF (BUILD_TESTING)
|
||||
INCLUDE(test)
|
||||
ENDIF()
|
||||
INCLUDE(test)
|
||||
|
||||
set(BUILD_DOC OFF CACHE INTERNAL "build documentation (internal only)")
|
||||
IF (BUILD_DOC)
|
||||
@@ -111,7 +119,7 @@ ELSE()
|
||||
SET(EMBREE_LIB_TYPE SHARED)
|
||||
ENDIF()
|
||||
|
||||
OPTION(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." ON)
|
||||
OPTION(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." OFF)
|
||||
IF (EMSCRIPTEN)
|
||||
SET(EMBREE_ISPC_SUPPORT OFF CACHE BOOL "Build Embree with support for ISPC applications." FORCE)
|
||||
ENDIF()
|
||||
@@ -126,7 +134,7 @@ ENDIF()
|
||||
##############################################################################
|
||||
# Configurations (add configurations also to common/cmake/embree-config.cmake)
|
||||
|
||||
OPTION(EMBREE_ZIP_MODE "Create Embree ZIP package" OFF)
|
||||
OPTION(EMBREE_ZIP_MODE "Create Embree ZIP package" ON)
|
||||
MARK_AS_ADVANCED(EMBREE_ZIP_MODE)
|
||||
|
||||
OPTION(EMBREE_INSTALL_DEPENDENCIES "Install Embree dependencies in binary packages and install" OFF)
|
||||
@@ -135,23 +143,89 @@ MARK_AS_ADVANCED(EMBREE_INSTALL_DEPENDENCIES)
|
||||
OPTION(EMBREE_STAT_COUNTERS "Enables statistic counters.")
|
||||
OPTION(EMBREE_STACK_PROTECTOR "When enabled Embree compiles with stack protection against return address overrides." OFF)
|
||||
|
||||
OPTION(EMBREE_RAY_MASK "Enables ray mask support.")
|
||||
IF (NOT APPLE)
|
||||
OPTION(EMBREE_SYCL_SUPPORT "Enables SYCL GPU support." OFF)
|
||||
ENDIF()
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_LARGEGRF "Enables SYCL large GRF support." OFF "EMBREE_SYCL_SUPPORT" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_DBG "Enables DPC++ debug info." OFF "EMBREE_SYCL_SUPPORT" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_GEOMETRY_CALLBACK "Enabled geometry callbacks which are disabled by default for SYCL." OFF "EMBREE_SYCL_SUPPORT" OFF)
|
||||
|
||||
MARK_AS_ADVANCED(EMBREE_SYCL_LARGEGRF)
|
||||
MARK_AS_ADVANCED(EMBREE_SYCL_DBG)
|
||||
MARK_AS_ADVANCED(EMBREE_SYCL_GEOMETRY_CALLBACK)
|
||||
|
||||
IF (EMBREE_SYCL_GEOMETRY_CALLBACK)
|
||||
message(WARNING "Enabling EMBREE_SYCL_GEOMETRY_CALLBACK is experimental and may result in poor performance.")
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
ADD_DEFINITIONS("-DEMBREE_SYCL_SUPPORT") # FIXME: only use define from rtcore_config.h
|
||||
ENDIF()
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_RT_SIMULATION "Using hardware simulation" OFF "EMBREE_SYCL_SUPPORT" OFF)
|
||||
MARK_AS_ADVANCED(EMBREE_SYCL_RT_SIMULATION)
|
||||
IF (EMBREE_SYCL_RT_SIMULATION AND NOT EMBREE_SYCL_RT_VALIDATION_API AND EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
|
||||
MESSAGE(FATAL_ERROR "Using EMBREE_SYCL_RT_SIMULATION requires EMBREE_SYCL_RT_VALIDATION_API=ON and EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS=OFF")
|
||||
ENDIF()
|
||||
IF (EMBREE_SYCL_RT_SIMULATION)
|
||||
ADD_DEFINITIONS("-DEMBREE_SYCL_RT_SIMULATION")
|
||||
ENDIF()
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_RT_VALIDATION_API "Use rt_validation API instead of IGC provided rt_production API" OFF "EMBREE_SYCL_SUPPORT" OFF)
|
||||
IF (EMBREE_SYCL_RT_VALIDATION_API)
|
||||
ADD_DEFINITIONS("-DEMBREE_SYCL_RT_VALIDATION_API")
|
||||
ENDIF()
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS "Using L0 allocated Dispatch Globals" ON "EMBREE_SYCL_RT_VALIDATION_API" OFF)
|
||||
IF (EMBREE_SYCL_RT_VALIDATION_API AND NOT EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
|
||||
ADD_DEFINITIONS("-DEMBREE_SYCL_ALLOC_DISPATCH_GLOBALS")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(EMBREE_SYCL_RT_VALIDATION_API)
|
||||
MARK_AS_ADVANCED(EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
|
||||
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
SET(EMBREE_SYCL_AOT_DEVICES "none" CACHE STRING "SYCL devices to use for AOT compilation")
|
||||
SET_PROPERTY(CACHE EMBREE_SYCL_AOT_DEVICES PROPERTY STRINGS none dg2 pvc XE_HPG_CORE XE_HPC_CORE)
|
||||
|
||||
SET(EMBREE_SYCL_AOT_DEVICE_REVISION 0)
|
||||
IF (EMBREE_SYCL_AOT_DEVICES STREQUAL "dg2")
|
||||
SET(EMBREE_SYCL_AOT_DEVICE_REVISION 4) # FIXME: bug workaround should get removed
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_L0_RTAS_BUILDER "Enable Level Zero RTAS builder" ON "EMBREE_SYCL_SUPPORT" OFF)
|
||||
IF (EMBREE_SYCL_L0_RTAS_BUILDER)
|
||||
ADD_DEFINITIONS("-DEMBREE_SYCL_L0_RTAS_BUILDER")
|
||||
ENDIF()
|
||||
|
||||
OPTION(EMBREE_RAY_MASK "Enables ray mask support." ON)
|
||||
OPTION(EMBREE_BACKFACE_CULLING "Enables backface culling.")
|
||||
OPTION(EMBREE_BACKFACE_CULLING_CURVES "Enables backface culling for curve primitives." OFF)
|
||||
OPTION(EMBREE_BACKFACE_CULLING_SPHERES "Enables backface culling for sphere primitives." OFF)
|
||||
|
||||
OPTION(EMBREE_FILTER_FUNCTION "Enables filter functions." ON)
|
||||
OPTION(EMBREE_IGNORE_INVALID_RAYS "Ignores invalid rays." OFF) # FIXME: enable by default?
|
||||
OPTION(EMBREE_COMPACT_POLYS "Enables double indexed poly layout." OFF)
|
||||
|
||||
OPTION(EMBREE_GEOMETRY_TRIANGLE "Enables support for triangle geometries." ON)
|
||||
OPTION(EMBREE_GEOMETRY_QUAD "Enables support for quad geometries." ON)
|
||||
OPTION(EMBREE_GEOMETRY_CURVE "Enables support for curve geometries." ON)
|
||||
OPTION(EMBREE_GEOMETRY_SUBDIVISION "Enables support for subdiv geometries." ON)
|
||||
OPTION(EMBREE_GEOMETRY_USER "Enables support for user geometries." ON)
|
||||
OPTION(EMBREE_GEOMETRY_INSTANCE "Enables support for instances." ON)
|
||||
OPTION(EMBREE_GEOMETRY_INSTANCE_ARRAY "Enables support for instance arrays." ON)
|
||||
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT 1 CACHE STRING "Maximum number of instance levels.")
|
||||
|
||||
IF (NOT EMBREE_GEOMETRY_INSTANCE AND NOT EMBREE_GEOMETRY_INSTANCE_ARRAY AND NOT EMBREE_MAX_INSTANCE_LEVEL_COUNT EQUAL 1)
|
||||
message(FATAL_ERROR "EMBREE_MAX_INSTANCE_LEVEL_COUNT must be 1 when EMBREE_GEOMETRY_INSTANCE and EMBREE_GEOMETRY_INSTANCE_ARRAY are disabled")
|
||||
ENDIF()
|
||||
|
||||
OPTION(EMBREE_GEOMETRY_GRID "Enables support for grid geometries." ON)
|
||||
OPTION(EMBREE_GEOMETRY_POINT "Enables support for point geometries." ON)
|
||||
|
||||
OPTION(EMBREE_RAY_PACKETS "Enabled support for ray packets." ON)
|
||||
|
||||
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT 1 CACHE STRING "Maximum number of instance levels.")
|
||||
|
||||
SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR 2.0 CACHE STRING "Self intersection avoidance factor for flat curves. Specify floating point value in range 0 to inf.")
|
||||
OPTION(EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE "Enables self intersection avoidance for ray oriented discs." ON)
|
||||
OPTION(EMBREE_MIN_WIDTH "Enables min-width feature to enlarge curve and point thickness to pixel width." OFF)
|
||||
@@ -161,10 +235,10 @@ OPTION(EMBREE_MIN_WIDTH "Enables min-width feature to enlarge curve and point th
|
||||
##############################################################
|
||||
|
||||
# detect ARM compilation
|
||||
IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64"))
|
||||
IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_OSX_ARCHITECTURES STREQUAL "") OR ("arm64" IN_LIST CMAKE_OSX_ARCHITECTURES))
|
||||
MESSAGE(STATUS "Building for Apple silicon")
|
||||
SET(EMBREE_ARM ON)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
MESSAGE(STATUS "Building for AArch64")
|
||||
SET(EMBREE_ARM ON)
|
||||
ENDIF()
|
||||
@@ -201,8 +275,27 @@ ENDIF()
|
||||
##############################################################
|
||||
# Compiler
|
||||
##############################################################
|
||||
|
||||
# TODO: fixme, define relwithassert also for icc, msvc, ... or remove when debug build with dpcpp is useable
|
||||
IF(EMBREE_SYCL_SUPPORT)
|
||||
SET(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;RelWithAssert")
|
||||
ELSE()
|
||||
SET(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
# Validate build type
|
||||
IF (CMAKE_BUILD_TYPE)
|
||||
string(FIND "${CONFIGURATION_TYPES}" "${CMAKE_BUILD_TYPE}" MATCHED_CONFIG)
|
||||
IF (${MATCHED_CONFIG} EQUAL -1)
|
||||
message(FATAL_ERROR "CMAKE_BUILD_TYPE (${CMAKE_BUILD_TYPE}) allows only the following values: ${CONFIGURATION_TYPES}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
message(DEBUG "CMAKE_GENERATOR_TOOLSET: ${CMAKE_GENERATOR_TOOLSET}")
|
||||
message(DEBUG "CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
|
||||
message(DEBUG "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag(-fsycl COMPILER_HAS_SYCL_SUPPORT)
|
||||
|
||||
IF (WIN32)
|
||||
IF (NOT DEFAULT_CMAKE_CONFIGURATION_TYPES_SET)
|
||||
@@ -211,28 +304,24 @@ IF (WIN32)
|
||||
ENDIF()
|
||||
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
#message ("CMAKE_GENERATOR_TOOLSET: ${CMAKE_GENERATOR_TOOLSET}")
|
||||
#message ("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
|
||||
#message ("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
|
||||
|
||||
IF (${CMAKE_CXX_COMPILER} MATCHES ".*dpcpp")
|
||||
message(FATAL_ERROR "DPCPP compiler not supported on Windows yet. Use ICX instead.")
|
||||
ENDIF()
|
||||
|
||||
IF (${CMAKE_CXX_COMPILER_ID} MATCHES "IntelLLVM" OR
|
||||
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND ${CMAKE_CXX_COMPILER} MATCHES ".*icx"))
|
||||
MESSAGE("-- DPCPP detected")
|
||||
IF ((${CMAKE_CXX_COMPILER_ID} MATCHES "IntelLLVM") OR
|
||||
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND COMPILER_HAS_SYCL_SUPPORT))
|
||||
MESSAGE("-- DPCPP compiler detected")
|
||||
INCLUDE(dpcpp)
|
||||
ELSEIF(${CMAKE_GENERATOR_TOOLSET} MATCHES "^LLVM")
|
||||
MESSAGE("-- CLANG detected")
|
||||
set(EMBREE_SYCL_SUPPORT OFF)
|
||||
MESSAGE("-- CLANG compiler detected")
|
||||
INCLUDE(clang)
|
||||
ELSEIF(${CMAKE_GENERATOR_TOOLSET} MATCHES "^Intel")
|
||||
MESSAGE("-- Intel Compiler detected")
|
||||
set(EMBREE_SYCL_SUPPORT OFF)
|
||||
MESSAGE("-- Intel compiler detected")
|
||||
INCLUDE (intel)
|
||||
ELSEIF(${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} MATCHES "GNU")
|
||||
MESSAGE("-- GNU-like Compiler detected")
|
||||
set(EMBREE_SYCL_SUPPORT OFF)
|
||||
MESSAGE("-- GNU-like compiler detected")
|
||||
INCLUDE(gnu)
|
||||
ELSE()
|
||||
set(EMBREE_SYCL_SUPPORT OFF)
|
||||
IF (EMBREE_ISA_AVX512)
|
||||
MESSAGE(FATAL_ERROR "Microsoft Visual C++ Compiler does not support AVX512. Please use Intel Compiler or Clang.")
|
||||
ENDIF()
|
||||
@@ -255,6 +344,9 @@ ELSE (WIN32)
|
||||
IF(${_LOWER_CXX_COMPILER_ID} MATCHES "clang" AND ${CXX_COMPILER_NAME} MATCHES "dpcpp")
|
||||
STRING(REPLACE "clang" "dpcpp" _LOWER_CXX_COMPILER_ID ${_LOWER_CXX_COMPILER_ID})
|
||||
ENDIF()
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
SET(_LOWER_CXX_COMPILER_ID "dpcpp")
|
||||
ENDIF()
|
||||
STRING(TOUPPER "${_LOWER_CXX_COMPILER_ID}" _UPPER_CXX_COMPILER_ID)
|
||||
MESSAGE("-- ${_UPPER_CXX_COMPILER_ID} detected")
|
||||
INCLUDE(${_LOWER_CXX_COMPILER_ID} OPTIONAL RESULT_VARIABLE COMPILER_FOUND)
|
||||
@@ -283,11 +375,6 @@ IF(DEFINED EMBREE_ISA_AVX512SKX)
|
||||
SET(EMBREE_ISA_AVX512 ${EMBREE_ISA_AVX512SKX} CACHE BOOL "")
|
||||
ENDIF()
|
||||
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_ARM_NEON "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_arm_neon.cpp")
|
||||
IF (COMPILER_SUPPORTS_ARM_NEON)
|
||||
SET(EMBREE_ARM ON)
|
||||
ENDIF()
|
||||
|
||||
IF (CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
|
||||
SET(EMBREE_MAX_ISA "DEFAULT" CACHE STRING "Selects highest ISA to support.")
|
||||
ELSEIF (EMSCRIPTEN)
|
||||
@@ -326,6 +413,9 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
|
||||
ELSE()
|
||||
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." ${COMPILER_SUPPORTS_AVX512})
|
||||
ENDIF()
|
||||
# Don't use OPTION, but still set them to OFF, so that embree-config.cmake is consisten with its definitions
|
||||
SET(EMBREE_ISA_NEON OFF)
|
||||
SET(EMBREE_ISA_NEON2X OFF)
|
||||
ENDIF()
|
||||
|
||||
ELSEIF (EMBREE_MAX_ISA STREQUAL "DEFAULT")
|
||||
@@ -560,11 +650,13 @@ include(package)
|
||||
CONFIGURE_FILE(
|
||||
"${PROJECT_SOURCE_DIR}/kernels/config.h.in"
|
||||
"${PROJECT_SOURCE_DIR}/kernels/config.h"
|
||||
)
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
|
||||
|
||||
CONFIGURE_FILE(
|
||||
"${PROJECT_SOURCE_DIR}/kernels/rtcore_config.h.in"
|
||||
"${PROJECT_SOURCE_DIR}/include/embree3/rtcore_config.h"
|
||||
"${PROJECT_SOURCE_DIR}/include/embree4/rtcore_config.h"
|
||||
)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
@@ -594,6 +686,8 @@ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
ADD_SUBDIRECTORY(common)
|
||||
ADD_SUBDIRECTORY(kernels)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
|
||||
IF (EMBREE_TUTORIALS)
|
||||
ADD_SUBDIRECTORY(tutorials)
|
||||
ENDIF()
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"version": 4,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 11,
|
||||
"patch": 0
|
||||
},
|
||||
"include": [
|
||||
"scripts/cmake-presets/os.json",
|
||||
"scripts/cmake-presets/package.json",
|
||||
"scripts/cmake-presets/compiler.json",
|
||||
"scripts/cmake-presets/tbb.json",
|
||||
"scripts/cmake-presets/continuous.json",
|
||||
"scripts/cmake-presets/nightly.json",
|
||||
"scripts/cmake-presets/release.json",
|
||||
"scripts/cmake-presets/integrate.json",
|
||||
"scripts/cmake-presets/performance.json"
|
||||
],
|
||||
"configurePresets": [
|
||||
|
||||
{
|
||||
"name": "package-linux-icx-ispc1_19_0-tbb2021_9_0-perf",
|
||||
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"EMBREE_MAX_ISA": "AVX512",
|
||||
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
|
||||
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"name": "package-linux-icx-sycl-ispc1_19_0-tbb2021_9_0-perf",
|
||||
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"EMBREE_SYCL_SUPPORT": "ON",
|
||||
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
|
||||
"EMBREE_SYCL_AOT_DEVICES": "none",
|
||||
"EMBREE_MAX_ISA": "AVX512",
|
||||
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
|
||||
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
"name": "package-windows-v141-ispc1_19_0-tbb2021_9_0",
|
||||
"inherits": ["package-windows", "env", "v141", "ispc1_19_0", "tbb2021_9_0"],
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"EMBREE_MAX_ISA": "SSE2"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "package-windows-v140-ispc1_19_0-tbb2021_9_0",
|
||||
"inherits": ["package-windows", "env", "v140", "ispc1_19_0", "tbb2021_9_0"],
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"EMBREE_MAX_ISA": "SSE2"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"name": "package-windows-icx-sycl-ispc1_19_0-tbb2021_9_0",
|
||||
"inherits": ["package-windows", "env", "icx-windows", "ispc1_19_0", "tbb2021_9_0"],
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"EMBREE_SYCL_SUPPORT": "ON",
|
||||
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
|
||||
"EMBREE_SYCL_AOT_DEVICES": "none",
|
||||
"EMBREE_MAX_ISA": "AVX512"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"name": "linux-coverity",
|
||||
"inherits": ["package-linux", "env", "gcc", "tasking_internal"],
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"EMBREE_MAX_ISA": "SSE2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set(CTEST_PROJECT_NAME "Embree")
|
||||
set(TEST_MODELS_HASH 866df160e2cc1074d68677e1e6e4135f8c324995)
|
||||
set(TEST_MODELS_HASH 05b5a61035485d3090868f9abf5cc057d1e31101)
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace embree
|
||||
template<typename Index, class UnaryPredicate>
|
||||
__forceinline bool parallel_any_of (Index first, Index last, UnaryPredicate pred)
|
||||
{
|
||||
bool ret = false;
|
||||
std::atomic_bool ret;
|
||||
ret = false;
|
||||
|
||||
#if defined(TASKING_TBB)
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "../tasking/taskscheduler.h"
|
||||
#include "../sys/array.h"
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
#include "../math/range.h"
|
||||
|
||||
namespace embree
|
||||
@@ -14,14 +14,17 @@ namespace embree
|
||||
template<typename Index, typename Func>
|
||||
__forceinline void parallel_for( const Index N, const Func& func)
|
||||
{
|
||||
#if defined(TASKING_INTERNAL)
|
||||
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
|
||||
if (N) {
|
||||
TaskScheduler::TaskGroupContext context;
|
||||
TaskScheduler::spawn(Index(0),N,Index(1),[&] (const range<Index>& r) {
|
||||
assert(r.size() == 1);
|
||||
func(r.begin());
|
||||
});
|
||||
if (!TaskScheduler::wait())
|
||||
throw std::runtime_error("task cancelled");
|
||||
},&context);
|
||||
TaskScheduler::wait();
|
||||
if (context.cancellingException != nullptr) {
|
||||
std::rethrow_exception(context.cancellingException);
|
||||
}
|
||||
}
|
||||
#elif defined(TASKING_TBB)
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
@@ -53,10 +56,13 @@ namespace embree
|
||||
__forceinline void parallel_for( const Index first, const Index last, const Index minStepSize, const Func& func)
|
||||
{
|
||||
assert(first <= last);
|
||||
#if defined(TASKING_INTERNAL)
|
||||
TaskScheduler::spawn(first,last,minStepSize,func);
|
||||
if (!TaskScheduler::wait())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
|
||||
TaskScheduler::TaskGroupContext context;
|
||||
TaskScheduler::spawn(first,last,minStepSize,func,&context);
|
||||
TaskScheduler::wait();
|
||||
if (context.cancellingException != nullptr) {
|
||||
std::rethrow_exception(context.cancellingException);
|
||||
}
|
||||
|
||||
#elif defined(TASKING_TBB)
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
|
||||
@@ -175,8 +175,8 @@ namespace embree
|
||||
/* calculate all left and right ranges that are on the wrong global side */
|
||||
size_t numMisplacedRangesLeft = 0;
|
||||
size_t numMisplacedRangesRight = 0;
|
||||
size_t numMisplacedItemsLeft = 0;
|
||||
size_t numMisplacedItemsRight = 0;
|
||||
size_t numMisplacedItemsLeft MAYBE_UNUSED = 0;
|
||||
size_t numMisplacedItemsRight MAYBE_UNUSED = 0;
|
||||
|
||||
for (size_t i=0; i<numTasks; i++)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace embree
|
||||
template<typename Index, typename Value, typename Func, typename Reduction>
|
||||
__forceinline Value parallel_reduce( const Index first, const Index last, const Index minStepSize, const Value& identity, const Func& func, const Reduction& reduction )
|
||||
{
|
||||
#if defined(TASKING_INTERNAL)
|
||||
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
|
||||
|
||||
/* fast path for small number of iterations */
|
||||
Index taskCount = (last-first+minStepSize-1)/minStepSize;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#===============================================================================
|
||||
|
||||
# We use INTERFACE libraries, which are only supported in 3.x
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# These two are used to automatically find the root and include directories.
|
||||
set(_TBB_INCLUDE_SUBDIR "include")
|
||||
|
||||
@@ -8,10 +8,19 @@ MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
ENDMACRO()
|
||||
|
||||
IF (EMBREE_ARM)
|
||||
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__")
|
||||
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__")
|
||||
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
|
||||
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
|
||||
IF ("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES)
|
||||
# set ARM an x86 flags for macOS universal binary build
|
||||
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__ -msse -msse2 -mno-sse4.2")
|
||||
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__ -msse4.2")
|
||||
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mavx")
|
||||
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
|
||||
ELSE ()
|
||||
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__")
|
||||
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__")
|
||||
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
|
||||
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
|
||||
ENDIF ()
|
||||
ELSE ()
|
||||
# for `thread` keyword
|
||||
_SET_IF_EMPTY(FLAGS_SSE2 "-msse -msse2 -mno-sse4.2")
|
||||
@@ -86,7 +95,7 @@ ELSE()
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules
|
||||
@@ -142,4 +151,5 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF(APPLE)
|
||||
|
||||
|
||||
ENDIF()
|
||||
|
||||
+244
-89
@@ -13,99 +13,253 @@ _SET_IF_EMPTY(FLAGS_AVX "-mavx")
|
||||
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
|
||||
|
||||
IF (WIN32)
|
||||
|
||||
SET(COMMON_CXX_FLAGS "")
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /EHsc") # catch C++ exceptions only and extern "C" functions never throw a C++ exception
|
||||
# SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP") # compile source files in parallel
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR") # enable runtime type information (on by default)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /w") # disable all warnings
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Gy") # package individual functions
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS") # protects against return address overrides
|
||||
ELSE()
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS-") # do not protect against return address overrides
|
||||
ENDIF()
|
||||
MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi") # inline intrinsic functions
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
|
||||
|
||||
SET(SECURE_LINKER_FLAGS "")
|
||||
SET(SECURE_LINKER_FLAGS "${SECURE_LINKER_FLAGS} /NXCompat") # compatible with data execution prevention (on by default)
|
||||
SET(SECURE_LINKER_FLAGS "${SECURE_LINKER_FLAGS} /DynamicBase") # random rebase of executable at load time
|
||||
IF (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
SET(SECURE_LINKER_FLAGS "${SECURE_LINKER_FLAGS} /SafeSEH") # invoke known exception handlers (Win32 only, x64 exception handlers are safe by design)
|
||||
ENDIF()
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SECURE_LINKER_FLAGS}")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SECURE_LINKER_FLAGS}")
|
||||
|
||||
INCLUDE(msvc_post)
|
||||
|
||||
# workaround for file encoding problems of kernels/embree.rc found here https://gitlab.kitware.com/cmake/cmake/-/issues/18311
|
||||
set(CMAKE_NINJA_CMCLDEPS_RC OFF)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # dpcpp has fp-model fast as default
|
||||
|
||||
ELSE()
|
||||
|
||||
IF (NOT WIN32)
|
||||
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
|
||||
OPTION(EMBREE_ADDRESS_SANITIZER "Enabled CLANG address sanitizer." OFF)
|
||||
IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
|
||||
SET(CMAKE_CXX_FLAGS "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
|
||||
IF (NOT APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
|
||||
GET_FILENAME_COMPONENT(SYCL_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
|
||||
GET_FILENAME_COMPONENT(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
|
||||
IF (NOT SYCL_COMPILER_NAME STREQUAL "clang++")
|
||||
SET(SYCL_ONEAPI TRUE)
|
||||
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx")
|
||||
SET(SYCL_ONEAPI_ICX TRUE)
|
||||
ELSE()
|
||||
SET(SYCL_ONEAPI_ICX FALSE)
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features
|
||||
SET(STORE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
SET(STORE_CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS})
|
||||
IF (NOT EMBREE_SYCL_SUPPORT)
|
||||
# if EMBREE_SYCL_SUPPORT is off we don't want the -fsycl flags
|
||||
SET(CMAKE_CXX_FLAGS ${STORE_CMAKE_CXX_FLAGS})
|
||||
SET(CMAKE_CXX_LINK_FLAGS ${STORE_CMAKE_CXX_LINK_FLAGS})
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(SYCL_ONEAPI FALSE)
|
||||
ADD_DEFINITIONS(-D__INTEL_LLVM_COMPILER)
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sycl") # makes dpcpp compiler compatible with clang++
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "-fsycl -fsycl-unnamed-lambda -Xclang -fsycl-allow-func-ptr")
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-mismatched-tags -Wno-pessimizing-move -Wno-reorder -Wno-unneeded-internal-declaration -Wno-delete-non-abstract-non-virtual-dtor -Wno-dangling-field -Wno-unknown-pragmas -Wno-logical-op-parentheses")
|
||||
|
||||
IF (SYCL_ONEAPI_ICX AND WIN32)
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /debug:none") # FIXME: debug information generation takes forever in SYCL
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /DNDEBUG") # FIXME: debug information generation takes forever in SYCL
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -g0") # FIXME: debug information generation takes forever in SYCL
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -UDEBUG -DNDEBUG") # FIXME: assertion still not working in SYCL
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-bitwise-instead-of-logical") # disables "use of bitwise '&' with boolean operands" warning
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-bitwise-instead-of-logical") # disables "use of bitwise '&' with boolean operands" warning
|
||||
|
||||
IF (WIN32)
|
||||
SET(SYCL_COMPILER_LIB_DIR "${SYCL_COMPILER_DIR}/../lib")
|
||||
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
file(GLOB SYCL_LIB RELATIVE ${SYCL_COMPILER_LIB_DIR}
|
||||
${SYCL_COMPILER_LIB_DIR}/sycld.lib
|
||||
${SYCL_COMPILER_LIB_DIR}/sycl[0-9]d.lib
|
||||
${SYCL_COMPILER_LIB_DIR}/sycl[0-9][0-9]d.lib)
|
||||
ELSE()
|
||||
file(GLOB SYCL_LIB RELATIVE ${SYCL_COMPILER_LIB_DIR}
|
||||
${SYCL_COMPILER_LIB_DIR}/sycl.lib
|
||||
${SYCL_COMPILER_LIB_DIR}/sycl[0-9].lib
|
||||
${SYCL_COMPILER_LIB_DIR}/sycl[0-9][0-9].lib)
|
||||
ENDIF()
|
||||
LIST(GET SYCL_LIB 0 SYCL_LIB)
|
||||
GET_FILENAME_COMPONENT(SYCL_LIB_NAME ${SYCL_LIB} NAME_WE)
|
||||
ELSE()
|
||||
SET(SYCL_LIB_NAME "sycl")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_LINK_FLAGS_SYCL "-fsycl")
|
||||
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableOCLNoInlineAttr=0") # enabled __noinline
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "ControlKernelTotalSize=0")
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "SubroutineThreshold=110000") # Minimal kernel size to enable subroutines
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableUnmaskedFunctions=1") # enables unmasked functions
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "ByPassAllocaSizeHeuristic=64") # puts small arrays into registers
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableIndirectCallOptimization=0") # Enables inlining indirect calls by comparing function addresses
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "FunctionControl=0") # 0 = default, 1 = inline, 2 = subroutine, 3 = stackcall, 4 = keep indirect calls
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "forceGlobalRA=1") # "force global register allocator
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "TotalGRFNum=128") # Total GRF used for register allocation
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "GRFNumToUse=64") # "Set the number of general registers to use (64 to totalGRFNum)
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "ReplaceIndirectCallWithJmpi=1") # Replace indirect call with jmpi instruction (HW WA)
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "DisableUniformAnalysis=1") # Setting this to 1/true adds a compiler switch to disable uniform_analysis
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "DisableLoopUnroll=1") # Setting this to 1/true adds a compiler switch to disable loop unrolling
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableStatelessToStatefull=0") # Enable Stateless To Statefull transformation for global and constant address space in OpenCL kernels
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableRecursionOpenCL=1") # Enable recursion with OpenCL user functions
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableAdvMemOpt=0") # Enable advanced memory optimization
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "UniformMemOptLimit=512") # "Limit of uniform memory optimization in bits
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "EnablePreemption=0") # Enable generating preeemptable code (SKL+)
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "AllowSubroutineAndInirectdCalls=1") # Allow subroutine in the presence of indirect calls
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "AllocaRAPressureThreshold=0") # The threshold for the register pressure potential (this reduces amount of spilling!)
|
||||
#LIST(APPEND CMAKE_IGC_OPTIONS "AssumeInt64Support=0") # Architecture with partial int64 still promote uniform arrays to registers
|
||||
LIST(APPEND CMAKE_IGC_OPTIONS "VISAOptions=-scratchAllocForStackInKB 128 ") # this works around some IGC bug in spill compression
|
||||
|
||||
IF (CMAKE_BUILD_TYPE STREQUAL "Debug") # to allow printf inside indirectly callable function
|
||||
LIST(APPEND CMAKE_IGC_OPTIONS "ForceInlineStackCallWithImplArg=0")
|
||||
LIST(APPEND CMAKE_IGC_OPTIONS "EnableGlobalStateBuffer=1")
|
||||
ENDIF()
|
||||
|
||||
STRING(REPLACE ";" "," CMAKE_IGC_OPTIONS "${CMAKE_IGC_OPTIONS}")
|
||||
|
||||
IF (EMBREE_SYCL_AOT_DEVICE_REVISION GREATER 0)
|
||||
SET(CMAKE_OCL_OPTIONS "${CMAKE_OCL_OPTIONS} -revision_id ${EMBREE_SYCL_AOT_DEVICE_REVISION}") # Enable this to override the stepping/RevId
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_OCL_OPTIONS "${CMAKE_OCL_OPTIONS} -cl-intel-greater-than-4GB-buffer-required") # enables support for buffers larger than 4GB
|
||||
IF (EMBREE_SYCL_LARGEGRF)
|
||||
SET(CMAKE_OCL_OPTIONS "${CMAKE_OCL_OPTIONS} -internal_options -cl-intel-256-GRF-per-thread") # large GRF mode
|
||||
ENDIF()
|
||||
SET(CMAKE_OCL_OTHER_OPTIONS "${CMAKE_OCL_OTHER_OPTIONS} -cl-intel-force-global-mem-allocation -cl-intel-no-local-to-generic")
|
||||
#SET(CMAKE_OCL_OTHER_OPTIONS "${CMAKE_OCL_OTHER_OPTIONS} -cl-intel-private-memory-minimal-size-per-thread 8192")
|
||||
|
||||
IF (EMBREE_SYCL_AOT_DEVICES STREQUAL "none")
|
||||
SET(CMAKE_CXX_FLAGS_SYCL_AOT "-fsycl-targets=spir64")
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS_SYCL_AOT "-fsycl-targets=spir64,spir64_gen")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_LINK_FLAGS_SYCL_AOT "${CMAKE_CXX_FLAGS_SYCL_AOT} -Xsycl-target-backend=spir64 \"${CMAKE_OCL_OPTIONS} -options \\\"${CMAKE_OCL_OTHER_OPTIONS} -igc_opts='${CMAKE_IGC_OPTIONS}'\\\"\"")
|
||||
|
||||
IF (NOT EMBREE_SYCL_AOT_DEVICES STREQUAL "none")
|
||||
SET(CMAKE_LINK_FLAGS_SYCL_AOT "${CMAKE_LINK_FLAGS_SYCL_AOT} -Xsycl-target-backend=spir64_gen \"-device ${EMBREE_SYCL_AOT_DEVICES} ${CMAKE_OCL_OPTIONS} -options \\\"${CMAKE_OCL_OTHER_OPTIONS} -igc_opts='${CMAKE_IGC_OPTIONS}'\\\"\"")
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_SYCL_DBG)
|
||||
SET(CMAKE_CXX_FLAGS_SYCL_AOT "-g")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} ${CMAKE_CXX_FLAGS_SYCL_AOT}")
|
||||
SET(CMAKE_LINK_FLAGS_SYCL "${CMAKE_LINK_FLAGS_SYCL} ${CMAKE_LINK_FLAGS_SYCL_AOT}")
|
||||
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pessimizing-move") # disabled: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
|
||||
|
||||
IF (SYCL_ONEAPI_ICX AND WIN32)
|
||||
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # disable warning from SYCL header
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../include/sycl\" -I\"${SYCL_COMPILER_DIR}/../include/\"") # disable warning from SYCL header
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||
IF (SYCL_ONEAPI_ICX AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # disable warning from SYCL header
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../include/\"") # disable warning from SYCL header
|
||||
ENDIF()
|
||||
|
||||
# enable C++17 features
|
||||
IF (SYCL_ONEAPI_ICX AND WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||
ENDIF()
|
||||
ENDIF(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
IF(SYCL_ONEAPI_ICX)
|
||||
IF (WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qno-intel-lib")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qno-intel-lib")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qimf-use-svml:false")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qimf-use-svml:false")
|
||||
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} /Qno-intel-lib")
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} /Qno-intel-lib")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-intel")
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -static-intel")
|
||||
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fimf-use-svml=false")
|
||||
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fimf-use-svml=false")
|
||||
IF (NOT EMBREE_SYCL_SUPPORT)
|
||||
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -no-intel-lib")
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -no-intel-lib")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-intel-lib")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-intel-lib")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
IF (SYCL_ONEAPI_ICX AND WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS") # protects against return address overrides
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
IF (SYCL_ONEAPI_ICX AND WIN32)
|
||||
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-")
|
||||
ELSE()
|
||||
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
IF (SYCL_ONEAPI_ICX AND WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # makes dpcpp compiler compatible with clang++
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") # catch C++ exceptions only and extern "C" functions never throw a C++ exception
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR") # enable runtime type information (on by default)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Gy") # package individual functions
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
|
||||
ENDIF()
|
||||
MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") # makes dpcpp compiler compatible with clang++
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32)
|
||||
|
||||
IF (NOT EMBREE_SYCL_SUPPORT)
|
||||
IF (SYCL_ONEAPI_ICX)
|
||||
IF (${MSVC_VERSION} VERSION_GREATER_EQUAL 1916)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++14")
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++11")
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Oi")
|
||||
ELSE()
|
||||
IF (${MSVC_VERSION} VERSION_GREATER_EQUAL 1916)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(msvc_post)
|
||||
|
||||
# workaround for file encoding problems of kernels/embree.rc found here https://gitlab.kitware.com/cmake/cmake/-/issues/18311
|
||||
set(CMAKE_NINJA_CMCLDEPS_RC OFF)
|
||||
|
||||
ELSE()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
|
||||
|
||||
OPTION(EMBREE_ADDRESS_SANITIZER "Enabled CLANG address sanitizer." OFF)
|
||||
|
||||
IF (EMBREE_ADDRESS_SANITIZER)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-intel") # links intel runtime statically
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel") # links intel runtime statically
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") # dpcpp has fp-model fast as default
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
|
||||
@@ -121,18 +275,19 @@ ELSE()
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations
|
||||
|
||||
IF (APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # link against libc++ which supports C++11 features
|
||||
ELSE(APPLE)
|
||||
IF (NOT EMBREE_ADDRESS_SANITIZER) # for address sanitizer this causes link errors
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable
|
||||
ENDIF()
|
||||
ENDIF(APPLE)
|
||||
IF(EMBREE_SYCL_SUPPORT)
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHASSERT "")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHASSERT "${CMAKE_CXX_FLAGS_RELWITHASSERT} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHASSERT "${CMAKE_CXX_FLAGS_RELWITHASSERT} -O3") # enable full optimizations
|
||||
ENDIF(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
IF (NOT EMBREE_ADDRESS_SANITIZER) # for address sanitizer this causes link errors
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
@@ -22,10 +22,13 @@ SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@)
|
||||
SET(EMBREE_ISA_AVX512 @EMBREE_ISA_AVX512@)
|
||||
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512@) # just for compatibility
|
||||
SET(EMBREE_ISA_NEON @EMBREE_ISA_NEON@)
|
||||
SET(EMBREE_ISA_NEON2X @EMBREE_ISA_NEON2X@)
|
||||
|
||||
SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@)
|
||||
SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@)
|
||||
SET(EMBREE_STATIC_LIB @EMBREE_STATIC_LIB@)
|
||||
SET(EMBREE_SYCL_SUPPORT @EMBREE_SYCL_SUPPORT@)
|
||||
SET(EMBREE_SYCL_GEOMETRY_CALLBACK @EMBREE_SYCL_GEOMETRY_CALLBACK@)
|
||||
SET(EMBREE_TUTORIALS @EMBREE_TUTORIALS@)
|
||||
|
||||
SET(EMBREE_RAY_MASK @EMBREE_RAY_MASK@)
|
||||
@@ -42,6 +45,9 @@ SET(EMBREE_GEOMETRY_QUAD @EMBREE_GEOMETRY_QUAD@)
|
||||
SET(EMBREE_GEOMETRY_CURVE @EMBREE_GEOMETRY_CURVE@)
|
||||
SET(EMBREE_GEOMETRY_SUBDIVISION @EMBREE_GEOMETRY_SUBDIVISION@)
|
||||
SET(EMBREE_GEOMETRY_USER @EMBREE_GEOMETRY_USER@)
|
||||
SET(EMBREE_GEOMETRY_INSTANCE @EMBREE_GEOMETRY_INSTANCE@)
|
||||
SET(EMBREE_GEOMETRY_INSTANCE_ARRAY @EMBREE_GEOMETRY_INSTANCE_ARRAY@)
|
||||
SET(EMBREE_GEOMETRY_GRID @EMBREE_GEOMETRY_GRID@)
|
||||
SET(EMBREE_GEOMETRY_POINT @EMBREE_GEOMETRY_POINT@)
|
||||
|
||||
SET(EMBREE_RAY_PACKETS @EMBREE_RAY_PACKETS@)
|
||||
@@ -50,11 +56,13 @@ SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR @EMBREE_CURVE_SELF_INTERSECT
|
||||
SET(EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE @EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE@)
|
||||
SET(EMBREE_MIN_WIDTH @EMBREE_MIN_WIDTH@)
|
||||
|
||||
IF (EMBREE_TASKING_SYSTEM STREQUAL "TBB")
|
||||
FIND_PACKAGE(TBB REQUIRED ${EMBREE_TBB_COMPONENT})
|
||||
IF (EMBREE_STATIC_LIB AND (EMBREE_TASKING_SYSTEM STREQUAL "TBB"))
|
||||
INCLUDE(CMakeFindDependencyMacro)
|
||||
FIND_DEPENDENCY(TBB)
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/sys-targets.cmake")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/math-targets.cmake")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/simd-targets.cmake")
|
||||
@@ -79,4 +87,26 @@ IF (EMBREE_STATIC_LIB)
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
|
||||
SET(EMBREE_SYCL_AOT_DEVICES @EMBREE_SYCL_AOT_DEVICES@)
|
||||
SET(EMBREE_SYCL_LARGEGRF @EMBREE_SYCL_LARGEGRF@)
|
||||
SET(EMBREE_SYCL_RT_VALIDATION_API @EMBREE_SYCL_RT_VALIDATION_API@)
|
||||
IF (EMBREE_SYCL_RT_VALIDATION_API)
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_rthwif_sycl-targets.cmake")
|
||||
ENDIF()
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_rthwif-targets.cmake")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/ze_wrapper-targets.cmake")
|
||||
ENDIF()
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_sycl-targets.cmake")
|
||||
|
||||
ENDIF()
|
||||
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake")
|
||||
|
||||
|
||||
SET(EMBREE_TESTING_ONLY_SYCL_TESTS @EMBREE_TESTING_ONLY_SYCL_TESTS@)
|
||||
SET(EMBREE_TESTING_INTENSITY @EMBREE_TESTING_INTENSITY@)
|
||||
SET(EMBREE_TESTING_MEMCHECK @EMBREE_TESTING_MEMCHECK@)
|
||||
SET(EMBREE_TESTING_BENCHMARK @EMBREE_TESTING_BENCHMARK@)
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INSTALL(TARGETS TBB EXPORT TBB-targets)
|
||||
INSTALL(EXPORT TBB-targets DESTINATION "${EMBREE_CMAKEEXPORT_DIR}" COMPONENT devel)
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_INSTALL_DEPENDENCIES)
|
||||
IF (TARGET TBB::${EMBREE_TBB_COMPONENT})
|
||||
GET_TARGET_PROPERTY(LIB_PATH TBB::${EMBREE_TBB_COMPONENT} IMPORTED_LOCATION_RELEASE)
|
||||
@@ -13,9 +8,15 @@ IF (EMBREE_INSTALL_DEPENDENCIES)
|
||||
INSTALL(FILES "${LIB_PATH}" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
|
||||
GET_TARGET_PROPERTY(IMPLIB_PATH TBB::${EMBREE_TBB_COMPONENT} IMPORTED_IMPLIB_RELEASE)
|
||||
INSTALL(FILES "${IMPLIB_PATH}" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
|
||||
# Include tbbmalloc.dll even though we don't use or need tbb_malloc.dll because it is searched for by tbb.dll.
|
||||
GET_FILENAME_COMPONENT(LIB_FOLDER ${LIB_PATH} DIRECTORY)
|
||||
FILE(GLOB TBB_MALLOC_FILES LIST_DIRECTORIES false "${LIB_FOLDER}/tbbmalloc.dll" "${LIB_FOLDER}/tbbmalloc?.dll")
|
||||
INSTALL(FILES "${TBB_MALLOC_FILES}" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
|
||||
|
||||
ELSE()
|
||||
GET_FILENAME_COMPONENT(LIB_DIR "${LIB_PATH}" DIRECTORY)
|
||||
FILE(GLOB LIB_FILES ${LIB_DIR}/libtbb.*)
|
||||
FILE(GLOB LIB_FILES ${LIB_DIR}/libtbb.* ${LIB_DIR}/libtbbmalloc.so*)
|
||||
INSTALL(FILES ${LIB_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
|
||||
@@ -39,8 +39,6 @@ IF (NOT EMBREE_ISPC_EXECUTABLE)
|
||||
FIND_PROGRAM(EMBREE_ISPC_EXECUTABLE ispc PATHS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")
|
||||
IF (NOT EMBREE_ISPC_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "Intel SPMD Compiler (ISPC) not found. Disable EMBREE_ISPC_SUPPORT or install ISPC.")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Found Intel SPMD Compiler (ISPC): ${EMBREE_ISPC_EXECUTABLE}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@@ -51,6 +49,8 @@ EXECUTE_PROCESS(COMMAND ${EMBREE_ISPC_EXECUTABLE} --version
|
||||
|
||||
IF (NOT ${ISPC_RESULT} STREQUAL "0")
|
||||
MESSAGE(FATAL_ERROR "Error executing ISPC executable '${EMBREE_ISPC_EXECUTABLE}': ${ISPC_RESULT}")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Found working Intel SPMD Compiler (ISPC): ${EMBREE_ISPC_EXECUTABLE}")
|
||||
ENDIF()
|
||||
|
||||
STRING(REGEX MATCH "([0-9]+[.][0-9]+[.][0-9]+)" DUMMY "${ISPC_OUTPUT}")
|
||||
|
||||
@@ -22,6 +22,9 @@ MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
|
||||
STRING(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) # disable native runtime checks
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
|
||||
|
||||
+171
-27
@@ -19,22 +19,130 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Install SYCL specific files
|
||||
##############################################################
|
||||
|
||||
# SYCL library
|
||||
IF (EMBREE_SYCL_SUPPORT AND EMBREE_INSTALL_DEPENDENCIES)
|
||||
GET_FILENAME_COMPONENT(DPCPP_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
|
||||
|
||||
IF (WIN32)
|
||||
|
||||
FILE(GLOB LIB_SYCL_LIB_FILES LIST_DIRECTORIES FALSE
|
||||
"${DPCPP_COMPILER_DIR}/../lib/sycl.lib"
|
||||
"${DPCPP_COMPILER_DIR}/../lib/sycl?.lib")
|
||||
INSTALL(FILES ${LIB_SYCL_LIB_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
|
||||
FILE(GLOB LIB_SYCL_DLL_FILES LIST_DIRECTORIES FALSE
|
||||
"${DPCPP_COMPILER_DIR}/../bin/sycl.dll"
|
||||
"${DPCPP_COMPILER_DIR}/../bin/sycl?.dll")
|
||||
INSTALL(FILES ${LIB_SYCL_DLL_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_level_zero.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib OPTIONAL)
|
||||
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/libmmd.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/pi_win_proxy_loader.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
|
||||
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
|
||||
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so"
|
||||
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?"
|
||||
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?"
|
||||
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?"
|
||||
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?-?")
|
||||
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../lib/libpi_level_zero.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so")
|
||||
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
|
||||
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so"
|
||||
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so.?")
|
||||
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Install MSVC runtime
|
||||
##############################################################
|
||||
|
||||
IF (WIN32)
|
||||
IF(SYCL_ONEAPI_ICX AND EMBREE_INSTALL_DEPENDENCIES)
|
||||
GET_FILENAME_COMPONENT(DPCPP_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}//libmmd.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS TRUE)
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
LIST(FILTER CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS INCLUDE REGEX ".*msvcp[0-9]+\.dll|.*vcruntime[0-9]+\.dll|.*vcruntime[0-9]+_[0-9]+\.dll")
|
||||
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
|
||||
|
||||
ELSE()
|
||||
|
||||
IF(SYCL_ONEAPI_ICX AND EMBREE_INSTALL_DEPENDENCIES)
|
||||
|
||||
GET_FILENAME_COMPONENT(DPCPP_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so")
|
||||
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
|
||||
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so")
|
||||
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
|
||||
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so"
|
||||
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so.?")
|
||||
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Install Headers
|
||||
##############################################################
|
||||
|
||||
INSTALL(DIRECTORY include/embree3 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel)
|
||||
INSTALL(DIRECTORY include/embree4 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel)
|
||||
IF (NOT WIN32)
|
||||
INSTALL(DIRECTORY man/man3 DESTINATION "${CMAKE_INSTALL_MANDIR}" COMPONENT devel)
|
||||
ENDIF()
|
||||
@@ -57,6 +165,9 @@ INSTALL(FILES "${PROJECT_SOURCE_DIR}/README.md" DESTINATION "${CMAKE_INSTALL_DOC
|
||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/readme.pdf" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
|
||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
|
||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-TBB.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
|
||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-OIDN.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
|
||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-DPCPP.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
|
||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-oneAPI-DPCPP.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
|
||||
|
||||
##############################################################
|
||||
# Install scripts to set embree paths
|
||||
@@ -130,7 +241,11 @@ INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION "$
|
||||
##############################################################
|
||||
|
||||
SET(CPACK_PACKAGE_NAME "Intel(R) Embree Ray Tracing Kernels")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}${EMBREE_VERSION_NOTE}")
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.sycl")
|
||||
SET(EMBREE_VERSION_SUFFIX)
|
||||
ENDIF()
|
||||
#SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png")
|
||||
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
SET(CPACK_STRIP_FILES TRUE)
|
||||
@@ -142,14 +257,25 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Embree implements high performan
|
||||
SET(CPACK_PACKAGE_VENDOR "Intel Corporation")
|
||||
SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)
|
||||
|
||||
|
||||
SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
SET(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
|
||||
|
||||
SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Library")
|
||||
SET(CPACK_COMPONENT_LIB_DESCRIPTION "The Embree library including documentation.")
|
||||
SET(CPACK_COMPONENT_LIB_GROUP "embree")
|
||||
|
||||
SET(CPACK_COMPONENT_DEVEL_DISPLAY_NAME "Development")
|
||||
SET(CPACK_COMPONENT_DEVEL_DESCRIPTION "Header Files for C and ISPC required to develop applications with Embree.")
|
||||
SET(CPACK_COMPONENT_DEVEL_GROUP "embree")
|
||||
|
||||
SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
|
||||
SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Tutorials demonstrating how to use Embree.")
|
||||
SET(CPACK_COMPONENT_EXAMPLES_GROUP "embree")
|
||||
|
||||
SET(CPACK_COMPONENT_TESTING_DISPLAY_NAME "Testing")
|
||||
SET(CPACK_COMPONENT_TESTING_DESCRIPTION "Models and reference images for tests")
|
||||
SET(CPACK_COMPONENT_TESTING_GROUP "embree-testing")
|
||||
|
||||
# dependencies between components
|
||||
#SET(CPACK_COMPONENT_DEVEL_DEPENDS lib)
|
||||
@@ -162,7 +288,6 @@ SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
|
||||
|
||||
# Windows specific settings
|
||||
IF(WIN32)
|
||||
|
||||
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET(ARCH x64)
|
||||
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME} x64")
|
||||
@@ -171,18 +296,10 @@ IF(WIN32)
|
||||
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME} Win32")
|
||||
ENDIF()
|
||||
|
||||
IF (MSVC12)
|
||||
SET(VCVER vc12)
|
||||
ELSEIF(MSVC14) # also for VC15, which is toolset v141
|
||||
SET(VCVER vc14)
|
||||
ENDIF()
|
||||
|
||||
SET(CPACK_GENERATOR ZIP)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.${VCVER}.windows")
|
||||
SET(CPACK_MONOLITHIC_INSTALL 1)
|
||||
IF (EMBREE_TESTING_PACKAGE)
|
||||
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_win.bat" ${CMAKE_BUILD_TYPE} "${CPACK_PACKAGE_FILE_NAME}.zip")
|
||||
ENDIF()
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.windows")
|
||||
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
|
||||
SET(PACKAGE_EXT "zip")
|
||||
|
||||
# MacOSX specific settings
|
||||
ELSEIF(APPLE)
|
||||
@@ -191,25 +308,52 @@ ELSEIF(APPLE)
|
||||
SET(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/README.txt")
|
||||
|
||||
SET(CPACK_GENERATOR ZIP)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
|
||||
SET(CPACK_MONOLITHIC_INSTALL 1)
|
||||
IF (EMBREE_TESTING_PACKAGE)
|
||||
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_macosx.sh" ${CMAKE_BUILD_TYPE} "${CPACK_PACKAGE_FILE_NAME}.zip" "${EMBREE_SIGN_FILE}")
|
||||
IF (EMBREE_ARM)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.arm64.macosx")
|
||||
ELSE()
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
|
||||
ENDIF()
|
||||
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
|
||||
SET(PACKAGE_EXT "zip")
|
||||
|
||||
add_custom_target(
|
||||
post_package_notarize "${PROJECT_SOURCE_DIR}/scripts/package_post_build_notarize_macosx.sh" ${PACKAGE_BASE_NAME} ${EMBREE_SIGN_FILE}
|
||||
)
|
||||
|
||||
# Linux specific settings
|
||||
ELSE()
|
||||
|
||||
SET(CPACK_GENERATOR TGZ)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
|
||||
SET(CPACK_MONOLITHIC_INSTALL 1)
|
||||
IF (EMBREE_TESTING_PACKAGE)
|
||||
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_linux.sh"
|
||||
${EMBREE_ZIP_MODE} ${EMBREE_LIBRARY_NAME} ${EMBREE_VERSION} ${EMBREE_VERSION_MAJOR} "${EMBREE_SIGN_FILE}")
|
||||
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
|
||||
SET(PACKAGE_EXT "tar.gz")
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
SET(EMBREE_VERSION_SYCL_SUFFIX ".sycl")
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_TESTING_PACKAGE)
|
||||
SET_TESTS_PROPERTIES(BuildPackage PROPERTIES TIMEOUT 1200)
|
||||
ENDIF()
|
||||
|
||||
add_custom_target(
|
||||
build ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target package -j8
|
||||
COMMAND ${CMAKE_COMMAND} -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_build.cmake
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
test_package ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
|
||||
COMMAND cd embree_install/testing && ${CMAKE_COMMAND} -B build -DEMBREE_TESTING_INTENSITY=${EMBREE_TESTING_INTENSITY}
|
||||
COMMAND ctest --test-dir ${CMAKE_CURRENT_BINARY_DIR}/embree_install/testing/build -VV -C ${CMAKE_BUILD_TYPE} --output-log ctest.output
|
||||
COMMAND ${CMAKE_COMMAND} -DWHAT="CHECK" -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
|
||||
)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
set(INTEGRATE_BINARY "./build/Release/test.exe")
|
||||
else()
|
||||
set(INTEGRATE_BINARY "./build/test")
|
||||
endif()
|
||||
|
||||
add_custom_target(
|
||||
test_integration ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
|
||||
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} -B build --preset ${EMBREE_TESTING_INTEGRATION_PRESET} -Dembree_DIR="${CMAKE_CURRENT_BINARY_DIR}/embree_install/lib/cmake/embree-${EMBREE_VERSION}"
|
||||
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} --build build --config Release
|
||||
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${INTEGRATE_BINARY}
|
||||
)
|
||||
+559
-116
@@ -1,126 +1,569 @@
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
|
||||
|
||||
INCLUDE(CTest)
|
||||
INCLUDE(CTest)
|
||||
|
||||
IF (WIN32)
|
||||
IF(${CMAKE_CXX_COMPILER} MATCHES ".*icx")
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
if (EMBREE_TESTING_INSTALL_TESTS)
|
||||
SET(EMBREE_INSTALL_CTESTTESTFILE "${CMAKE_CURRENT_BINARY_DIR}/embree-addtests.cmake")
|
||||
file(WRITE "${EMBREE_INSTALL_CTESTTESTFILE}" "")
|
||||
endif()
|
||||
|
||||
if (NOT EMBREE_TESTING_PACKAGE_TEST_PROJECT)
|
||||
IF (WIN32)
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
ELSE()
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
ENDIF()
|
||||
else()
|
||||
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${EMBREE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
|
||||
FIND_PATH(EMBREE_TESTING_MODEL_DIR
|
||||
NAMES test-models-intensity2.txt
|
||||
PATHS "${PROJECT_SOURCE_DIR}/models"
|
||||
DOC "Path to the folder containing the Embree models for regression testing."
|
||||
NO_DEFAULT_PATHS)
|
||||
if (NOT EMBREE_TESTING_PACKAGE_TEST_PROJECT)
|
||||
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing, 4 = very intensive testing.")
|
||||
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3 4)
|
||||
SET(EMBREE_TESTING_ONLY_SYCL_TESTS OFF CACHE BOOL "Run only tests with the sycl support.")
|
||||
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
|
||||
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
|
||||
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
|
||||
SET(EMBREE_TESTING_PACKAGE OFF CACHE BOOL "Packages release as test.")
|
||||
SET(EMBREE_TESTING_KLOCWORK OFF CACHE BOOL "Runs Kocwork as test.")
|
||||
SET(EMBREE_TESTING_SDE OFF CACHE STRING "Uses SDE to run tests for specified CPU.")
|
||||
SET_PROPERTY(CACHE EMBREE_TESTING_SDE PROPERTY STRINGS OFF pnr nhm wsm snb ivb hsw bdw knl skl skx cnl)
|
||||
endif()
|
||||
|
||||
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing.")
|
||||
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3)
|
||||
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
|
||||
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
|
||||
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
|
||||
SET(EMBREE_TESTING_PACKAGE OFF CACHE BOOL "Packages release as test.")
|
||||
SET(EMBREE_TESTING_KLOCWORK OFF CACHE BOOL "Runs Kocwork as test.")
|
||||
SET(EMBREE_TESTING_SDE OFF CACHE STRING "Uses SDE to run tests for specified CPU.")
|
||||
SET_PROPERTY(CACHE EMBREE_TESTING_SDE PROPERTY STRINGS OFF pnr nhm wsm snb ivb hsw bdw knl skl skx cnl)
|
||||
FUNCTION (SET_EMBREE_TEST_PROPERTIES testname)
|
||||
SET(variants "_cpp;_ispc;_sycl")
|
||||
foreach(v ${variants})
|
||||
if (v STREQUAL "_cpp")
|
||||
SET(v "")
|
||||
endif()
|
||||
set(testnamedef "EMBREE_TEST_${testname}${v}_DEFINED")
|
||||
if(${testnamedef})
|
||||
SET_TESTS_PROPERTIES(${testname}${v} ${ARGN})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
SET(EMBREE_MODEL_DIR "none")
|
||||
IF (EMBREE_TESTING_MODEL_DIR)
|
||||
SET(EMBREE_MODEL_DIR "${EMBREE_TESTING_MODEL_DIR}")
|
||||
ENDIF()
|
||||
|
||||
MACRO (ADD_EMBREE_NORMAL_CPP_TEST name reference executable args)
|
||||
IF (BUILD_TESTING)
|
||||
ADD_TEST(NAME ${name}
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND ${executable} --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_NORMAL_ISPC_TEST name reference executable args)
|
||||
IF (BUILD_TESTING AND EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
|
||||
ADD_TEST(NAME ${name}_ispc
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND ${executable}_ispc --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_NORMAL_TEST name reference executable args)
|
||||
ADD_EMBREE_NORMAL_CPP_TEST(${name} ${reference} ${executable} "${args}")
|
||||
ADD_EMBREE_NORMAL_ISPC_TEST(${name} ${reference} ${executable} "${args}")
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_TEST name)
|
||||
ADD_EMBREE_NORMAL_TEST(${name} ${name} ${name} "")
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_TEST2 name exe args)
|
||||
ADD_EMBREE_NORMAL_TEST(${name} ${exe} ${exe} "${args}")
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_MODEL_TEST name reference executable args model)
|
||||
IF (BUILD_TESTING)
|
||||
ADD_TEST(NAME ${name}
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND ${executable} -c "${EMBREE_MODEL_DIR}/${model}" --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
|
||||
IF (BUILD_TESTING)
|
||||
ADD_TEST(NAME ${name}_ispc
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND COMMAND ${executable}_ispc -c "${EMBREE_MODEL_DIR}/${model}" --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_MODELS_TEST model_list_file name reference executable)
|
||||
IF (BUILD_TESTING)
|
||||
|
||||
SET(full_model_list_file "${EMBREE_TESTING_MODEL_DIR}/${model_list_file}")
|
||||
|
||||
IF(NOT EXISTS "${full_model_list_file}")
|
||||
MESSAGE(FATAL_ERROR "File ${EMBREE_TESTING_MODEL_DIR}/${model_list_file} does not exist!")
|
||||
ENDIF()
|
||||
|
||||
FILE(READ "${full_model_list_file}" models)
|
||||
STRING(REGEX REPLACE "\n" ";" models "${models}")
|
||||
|
||||
FOREACH (model ${models})
|
||||
IF (model MATCHES "^#")
|
||||
CONTINUE()
|
||||
ENDIF()
|
||||
STRING(REGEX REPLACE " .*" "" modelname "${model}")
|
||||
STRING(REGEX REPLACE "/" "_" modelname "${modelname}")
|
||||
STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
|
||||
ADD_EMBREE_MODEL_TEST(${name}_${modelname} ${reference}_${modelname} ${executable} "${ARGN}" ${model})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
# add klocwork test
|
||||
IF (EMBREE_TESTING_KLOCWORK)
|
||||
ADD_TEST(NAME Klocwork-Build WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/klocwork_build.sh")
|
||||
ADD_TEST(NAME Klocwork-Check WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/klocwork_check.sh")
|
||||
SET_TESTS_PROPERTIES(Klocwork-Build PROPERTIES TIMEOUT 2400)
|
||||
SET_TESTS_PROPERTIES(Klocwork-Check PROPERTIES TIMEOUT 300)
|
||||
ENDIF()
|
||||
|
||||
# add valgrind test
|
||||
IF (EMBREE_TESTING_MEMCHECK)
|
||||
find_program( EMBREE_MEMORYCHECK_COMMAND valgrind )
|
||||
set( EMBREE_MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1" )
|
||||
IF (NOT EMBREE_MEMORYCHECK_COMMAND)
|
||||
MESSAGE(FATAL_ERROR "valgrind not found")
|
||||
ENDIF()
|
||||
FUNCTION(ADD_MEMCHECK_TEST name binary)
|
||||
set(memcheck_command "${EMBREE_MEMORYCHECK_COMMAND} ${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
|
||||
separate_arguments(memcheck_command)
|
||||
add_test(NAME ${name} COMMAND ${memcheck_command} "${MY_PROJECT_BINARY_DIR}/${binary}" ${ARGN})
|
||||
if (EMBREE_TESTING_INSTALL_TESTS)
|
||||
file(APPEND "${EMBREE_INSTALL_CTESTTESTFILE}" "SET_EMBREE_TEST_PROPERTIES(${testname} ${ARGN}) \n")
|
||||
endif()
|
||||
ENDFUNCTION()
|
||||
ENDIF()
|
||||
|
||||
MACRO (ADD_EMBREE_GENERIC_TEST testname executable)
|
||||
ADD_TEST(NAME ${testname}
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND ${executable} ${ARGN})
|
||||
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
|
||||
SET(${testnamedef} "1" CACHE INTERNAL "")
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_GENERIC_CPP_TEST testname executable)
|
||||
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
|
||||
ADD_TEST(NAME ${testname}
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND ${executable} ${ARGN})
|
||||
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
|
||||
SET(${testnamedef} "1" CACHE INTERNAL "")
|
||||
endif()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_GENERIC_ISPC_TEST testname executable)
|
||||
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
|
||||
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
|
||||
ADD_TEST(NAME ${testname}_ispc
|
||||
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
|
||||
COMMAND ${executable}_ispc ${ARGN})
|
||||
SET(testnamedef EMBREE_TEST_${testname}_ispc_DEFINED)
|
||||
SET(${testnamedef} "1" CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
endif()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_GENERIC_SYCL_TEST testname executable)
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
ADD_TEST(NAME ${testname}_sycl
|
||||
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
|
||||
COMMAND ${executable}_sycl ${ARGN})
|
||||
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
|
||||
SET(${testnamedef} 1 CACHE INTERNAL "")
|
||||
SET_TESTS_PROPERTIES(${testname}_sycl PROPERTIES TIMEOUT 50)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Checks if the current cmake configuration is compatible with <condition>
|
||||
# condition may be a triple of CMAKE_VARIABLE_NAME op VALUE
|
||||
# supported operators for op are: ==, !=, <, <=, >, >=
|
||||
FUNCTION (EMBREE_TESTING_CHECK_OPTION out condition)
|
||||
# parse condition into list
|
||||
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" tokens "${condition}")
|
||||
LIST(LENGTH tokens token_count)
|
||||
IF (NOT ${token_count} EQUAL 3)
|
||||
message(FATAL_ERROR "illegal embree_opitons condition: ${condition}")
|
||||
ENDIF()
|
||||
|
||||
# we require every condition to follow the scheme "variable_name op value"
|
||||
LIST(GET tokens 0 option)
|
||||
LIST(GET tokens 1 comp)
|
||||
LIST(GET tokens 2 value)
|
||||
|
||||
STRING(STRIP ${option} option)
|
||||
STRING(STRIP ${comp} comp)
|
||||
STRING(STRIP ${value} value)
|
||||
|
||||
SET(${out} 0 PARENT_SCOPE)
|
||||
if ("${comp}" STREQUAL "==")
|
||||
if ("${${option}}" STREQUAL "${value}")
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
endif()
|
||||
elseif ("${comp}" STREQUAL "!=")
|
||||
if (NOT ("${${option}}" STREQUAL "${value}"))
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
endif()
|
||||
elseif ("${comp}" STREQUAL ">")
|
||||
if ("${${option}}" GREATER "${value}")
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
endif()
|
||||
elseif ("${comp}" STREQUAL ">=")
|
||||
if ("${${option}}" GREATER_EQUAL "${value}")
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
endif()
|
||||
elseif ("${comp}" STREQUAL "<")
|
||||
if ("${${option}}" LESS "${value}")
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
endif()
|
||||
elseif ("${comp}" STREQUAL "<=")
|
||||
if ("${${option}}" LESS_EQUAL "${value}")
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Could not parse embree_option condition: ${condition}")
|
||||
endif()
|
||||
|
||||
ENDFUNCTION()
|
||||
|
||||
# Checks multiple options from a list with EMBREE_TESTING_CHECK_OPTION
|
||||
FUNCTION (EMBREE_TESTING_CHECK_OPTIONS_LIST out conditions)
|
||||
SET(${out} 1 PARENT_SCOPE)
|
||||
FOREACH (c ${conditions})
|
||||
EMBREE_TESTING_CHECK_OPTION(myout ${c})
|
||||
|
||||
IF (myout EQUAL 0)
|
||||
SET(${out} 0 PARENT_SCOPE)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDFUNCTION()
|
||||
|
||||
|
||||
# looks for ifile in multiple possible locations and outputs a file with absolute path in ofile
|
||||
FUNCTION (EMBREE_FIND_TEST_FILE ifile ofile errmsgflavor)
|
||||
if (EXISTS "${ifile}") # abs path, use get_filename_component because it could also be relative to cwd
|
||||
get_filename_component(absifile "${ifile}" ABSOLUTE)
|
||||
SET(${ofile} ${absifile} PARENT_SCOPE)
|
||||
elseif(EXISTS "${PROJECT_SOURCE_DIR}/tests/${ifile}") # testing dir
|
||||
set(${ofile} "${PROJECT_SOURCE_DIR}/tests/${ifile}" PARENT_SCOPE)
|
||||
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ifile}") # relative to source folder
|
||||
set(${ofile} "${CMAKE_CURRENT_SOURCE_DIR}/${ifile}" PARENT_SCOPE)
|
||||
else()
|
||||
set(${ofile} "" PARENT_SCOPE)
|
||||
if (errmsgflavor)
|
||||
message(FATAL_ERROR
|
||||
"Could not find ${errmsgflavor} \"${ifile}\"\n"
|
||||
"looked for:\n"
|
||||
" ${inputfile}\n"
|
||||
" ${PROJECT_SOURCE_DIR}/tests/${ifile}\n"
|
||||
" ${CMAKE_CURRENT_SOURCE_DIR}/${ifile}\n"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
ENDFUNCTION()
|
||||
|
||||
|
||||
FUNCTION (EMBREE_ADD_TEST_PARSE_SUBLIST args keyword sublist)
|
||||
SET(myargs ${args})
|
||||
SET(mysublist "")
|
||||
SET(keywords "ECS;XML;NO_REFERENCE;REFERENCE;REFERENCE_SUFFIX;INTENSITY;CONDITION_FILE;CONDITION;ARGS;NO_CPP;NO_ISPC;NO_SYCL;GEN_REFERENCE;")
|
||||
|
||||
list(FIND nargs ${keyword} istart)
|
||||
if (NOT(istart EQUAL -1))
|
||||
list(LENGTH myargs iend)
|
||||
foreach(k ${keywords})
|
||||
list(FIND myargs ${k} i)
|
||||
if (NOT(i EQUAL -1) AND (i GREATER istart) AND (i LESS iend))
|
||||
SET(iend ${i})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
MATH(EXPR i "${istart}+1")
|
||||
while (i LESS iend)
|
||||
list(GET myargs ${i} elem)
|
||||
list(APPEND mysublist ${elem})
|
||||
MATH(EXPR i "${i}+1")
|
||||
endwhile()
|
||||
endif()
|
||||
|
||||
SET(${sublist} ${mysublist} PARENT_SCOPE)
|
||||
ENDFUNCTION()
|
||||
|
||||
FUNCTION (EMBREE_ADD_TEST_PARSE_FLAG args keyword value)
|
||||
SET(myargs ${args})
|
||||
SET(${value} OFF PARENT_SCOPE)
|
||||
list(FIND nargs ${keyword} i)
|
||||
if (NOT(i EQUAL -1))
|
||||
SET(${value} ON PARENT_SCOPE)
|
||||
endif()
|
||||
ENDFUNCTION()
|
||||
|
||||
# ADD_EMBREE_TEST_ECS(testname exename [ECS <file> | XML <file>] [NO_REFERENCE | REFERENCE <path> | REFERENCE_SUFFIX <suffix>] [INTENSITY <i>] [CONDITION <conds>] [ARGS <args>] [GEN_REFERENCE])
|
||||
# [ECS <file> | XML <inputfile> | OPTIONS <inputfile>]
|
||||
# - looks for file and calls the test command with either "-c <inputfile>.ecs" or "-i <inputfile>.xml"
|
||||
#
|
||||
# [NO_REFERENCE | REFERENCE <path> | REFERENCE_SUFFIX <suffix>]
|
||||
# - if not found a reference is will be expected in the same folder as *.ecs with name *.ecs.exename.exr
|
||||
# - NO_REFERENCE: don't look for a reference (no --compare in test command)
|
||||
# - REFERENCE <path>: use the reference located in <path>. Same rules aplly as for finding ecs files: absolute or relative to CMAKE_CURRENT_SOURCE_DIR path, must not be located outside the embree root dir.
|
||||
# - REFERENCE_SUFFIX <suffix>: use the default reference location and name with a suffix before the last file extension, e.g. *.ecs.exename<suffix>.exr
|
||||
# - if this argument is not specified, looks for
|
||||
# 1. <inputfile>.exename.exr, or
|
||||
# 2. <testname>.exr, if no <inputfile> was given
|
||||
#
|
||||
# [INTENSITY <i>]
|
||||
# - default i = 1
|
||||
# - sets the intensity level for the test, test is only run if ${EMBREE_TESTING_INTENSITY} GREATER_EQUAL i
|
||||
# - could be done with an *.embree_options file, but this is more flexible, e.g. you can easier share reference images without specifying an absolute path
|
||||
# - DOES NOT overrite EMBREE_TESTING_INTENSITY, if specified in *.embree_options
|
||||
#
|
||||
# [CONDITION_FILE <file>]
|
||||
# - file containing additional conditions
|
||||
# - conditions are specified linewise in form of: EMBREE_OPTION op VALUE, where EMBREE_OPTION is a cmake variable used during embree configuration and op is one of ==, !=, <, <=, >, >=
|
||||
# - if this argument is not specified, looks for
|
||||
# 1. <inputfile>.embree_options, or
|
||||
# 2. <testname>.embree_options, if no <inputfile> was given
|
||||
#
|
||||
# [CONDITION <conds>]
|
||||
# - cmake list of additional conditions, specified the same way as in an embree_options file
|
||||
#
|
||||
# [ARGS <args>]
|
||||
# - additional arguments for the test command
|
||||
#
|
||||
# [GEN_REFERENCE]
|
||||
# - writes the reference to the expected location
|
||||
# - could also be done with the ARGS parameter, but this way we don't have to deal with paths
|
||||
#
|
||||
# EXAMPLES
|
||||
#
|
||||
# all optional arguments default,
|
||||
# - looks for points.ecs.embree_options to filter out test by configured options, if not found no restrictions
|
||||
# - runs for EMBREE_TESTING_INTENSITY >= 1
|
||||
# - reference will be expected in the same folder as points.ecs with name points.ecs.embree_viewer.exr
|
||||
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs") # 1)
|
||||
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "${PROJECT_SOURCE_DIR}/models/xxx/points.ecs") # 2) same as 1) but with absolute path to ecs
|
||||
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "points.ecs") # 3) same as 1) but looks for points.ecs in the ${CMAKE_CURRENT_SOURCE_DIR} i.e. <embree_root>/tutorials/viewer/points.ecs
|
||||
|
||||
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" ARGS --coherent INTENSITY 2) # 4) same as 1) but runs only at EMBREE_TESTING_INTENSITY >= 2
|
||||
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" REFERENCE_SUFFIX "_quads" ARGS
|
||||
# --coherent
|
||||
# --convert-triangles-to-quads INTENSITY 2) # 5) same as 4) but expects reference name points.ecr.embree_viewer_quads.ecs
|
||||
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" REFERENCE "special.exr" ARGS
|
||||
# --coherent
|
||||
# --convert-triangles-to-quads INTENSITY 2) # 5) same as 4) but expects reference <embree-root>/tutorials/viewer/special.exr
|
||||
## 1) - 5) all share the same base input arguments defined in points.ecs as well as the points.ecs.embree_options
|
||||
|
||||
#ADD_EMBREE_TEST_ECS(point_geometry embree_point_geometry) # 6) no ecs file, uses point_geometry.embree_options if exists, expects reference ${CMAKE_CURRENT_SOURCE_DIR}/point_geometry.exr
|
||||
#ADD_EMBREE_TEST_ECS(verify verify NO_REFERENCE) # 7) no ecs file, uses verify.embree_options if exists, no reference
|
||||
#ADD_EMBREE_TEST_ECS(verify_memcheck verify NO_REFERENCE CONDITIONS "EMBREE_TESTING_MEMCHECK == ON") # 8) same as 7) but with extra condition
|
||||
|
||||
FUNCTION (ADD_EMBREE_TEST_ECS testname executable)
|
||||
if (EMBREE_TESTING_FILTER_TESTNAMES)
|
||||
list(FIND EMBREE_TESTING_FILTER_TESTNAMES "${testname}" i)
|
||||
if (${i} EQUAL -1)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
SET(nargs ${ARGN})
|
||||
|
||||
# disable everything
|
||||
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
|
||||
SET(${testnamedef} "0" CACHE INTERNAL "")
|
||||
SET(testnamedef EMBREE_TEST_${testname}_ispc_DEFINED)
|
||||
SET(${testnamedef} "0" CACHE INTERNAL "")
|
||||
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
|
||||
SET(${testnamedef} "0" CACHE INTERNAL "")
|
||||
|
||||
# parsing input file
|
||||
# ECS mode -> single parameter with filename after ECS keyword
|
||||
list(FIND nargs "ECS" i)
|
||||
if (NOT(i EQUAL -1))
|
||||
SET(inputtype "-c")
|
||||
MATH(EXPR i "${i}+1")
|
||||
list(GET nargs ${i} out)
|
||||
EMBREE_FIND_TEST_FILE("${out}" inputfile "test file")
|
||||
endif()
|
||||
# XML mode -> single parameter with filename after XML keyword
|
||||
list(FIND nargs "XML" i)
|
||||
if (NOT(i EQUAL -1))
|
||||
SET(inputtype "-i")
|
||||
MATH(EXPR i "${i}+1")
|
||||
list(GET nargs ${i} out)
|
||||
EMBREE_FIND_TEST_FILE("${out}" inputfile "test file")
|
||||
endif()
|
||||
# no filetype keyword -> look for <testname>.ecs/xml
|
||||
# does not need to be specified
|
||||
if (NOT inputtype)
|
||||
EMBREE_FIND_TEST_FILE("${testname}.ecs" inputfile "")
|
||||
if(inputfile)
|
||||
SET(inputtype "-c")
|
||||
endif()
|
||||
EMBREE_FIND_TEST_FILE("${testname}.ecs" inputfile "")
|
||||
if(inputfile)
|
||||
SET(inputtype "-i")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# parsing refernce image
|
||||
# no reference image mode -> no additional parameter to parse
|
||||
list(FIND nargs "NO_REFERENCE" i)
|
||||
if (NOT(i EQUAL -1))
|
||||
SET(no_reference ON)
|
||||
endif()
|
||||
# reference suffix mode -> singe parameter with suffix to default reference file name
|
||||
list(FIND nargs "REFERENCE_SUFFIX" i)
|
||||
if (NOT(i EQUAL -1))
|
||||
MATH(EXPR i "${i}+1")
|
||||
list(GET nargs ${i} out)
|
||||
EMBREE_FIND_TEST_FILE("${inputfile}.${executable}${out}.exr" referencefile "reference image")
|
||||
endif()
|
||||
# reference mode -> singe parameter with absolute path to reference image
|
||||
list(FIND nargs "REFERENCE" i)
|
||||
if (NOT(i EQUAL -1))
|
||||
MATH(EXPR i "${i}+1")
|
||||
list(GET nargs ${i} out)
|
||||
EMBREE_FIND_TEST_FILE("${out}" referencefile "reference image")
|
||||
endif()
|
||||
# no reference keyword -> look for <testname>.exr and <inputfile>.<executable>.exr respectively
|
||||
if ((NOT no_reference) AND (NOT referencefile))
|
||||
if (NOT inputfile)
|
||||
EMBREE_FIND_TEST_FILE("${testname}.exr" referencefile "reference image")
|
||||
else()
|
||||
EMBREE_FIND_TEST_FILE("${inputfile}.${executable}.exr" referencefile "reference image")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# parsing intensity
|
||||
# single integer parameter
|
||||
SET(intensity 1)
|
||||
list(FIND nargs "INTENSITY" i)
|
||||
if (NOT(i EQUAL -1))
|
||||
MATH(EXPR i "${i}+1")
|
||||
list(GET nargs ${i} intensity)
|
||||
endif()
|
||||
|
||||
# parsing condition
|
||||
SET(conditions "")
|
||||
SET(conditionsfile)
|
||||
list(FIND nargs "CONDITION_FILE" i)
|
||||
# condition file -> single parameter to absolute path of conditions file
|
||||
if (NOT(i EQUAL -1))
|
||||
list(GET nargs ${i} conditionsfile)
|
||||
EMBREE_FIND_TEST_FILE("${conditionsfile}" conditionsfile "")
|
||||
# no <inputfile> specified -> look for <testname>.embree_options
|
||||
elseif (NOT inputtype)
|
||||
EMBREE_FIND_TEST_FILE("${testname}.embree_options" conditionsfile "")
|
||||
# <inputfile> specified -> look for <inputfile>.embree_options
|
||||
else()
|
||||
EMBREE_FIND_TEST_FILE("${inputfile}.embree_options" conditionsfile "")
|
||||
endif()
|
||||
if (conditionsfile)
|
||||
file(READ "${conditionsfile}" lines)
|
||||
string(REGEX REPLACE "\n" ";" conditions "${lines}")
|
||||
endif()
|
||||
|
||||
# parsing additional conditions
|
||||
EMBREE_ADD_TEST_PARSE_SUBLIST("${nargs}" "CONDITION" extra_conditions)
|
||||
list(APPEND conditions ${extra_conditions})
|
||||
|
||||
# parsing extra args
|
||||
EMBREE_ADD_TEST_PARSE_SUBLIST("${nargs}" "ARGS" extraargs)
|
||||
|
||||
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "MEMCHECK" memcheck)
|
||||
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_CPP" no_cpp)
|
||||
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_ISPC" no_ispc)
|
||||
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_SYCL" no_sycl)
|
||||
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_POSTFIX" no_postfix)
|
||||
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "GEN_REFERENCE" gen_reference)
|
||||
|
||||
# add the test, if the conditions are met
|
||||
SET(matchconditions ON)
|
||||
if (conditions)
|
||||
EMBREE_TESTING_CHECK_OPTIONS_LIST(out "${conditions}")
|
||||
if (out EQUAL 0)
|
||||
SET(matchconditions OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# LESS_EQUAL not supported on all CI runners
|
||||
if (matchconditions AND ((intensity LESS EMBREE_TESTING_INTENSITY) OR (intensity EQUAL EMBREE_TESTING_INTENSITY)))
|
||||
SET(args "")
|
||||
if (inputfile)
|
||||
list(APPEND args "${inputtype} ${inputfile}")
|
||||
endif()
|
||||
if (NOT no_reference)
|
||||
list(APPEND args "--compare ${referencefile}")
|
||||
endif()
|
||||
if (gen_reference)
|
||||
list(APPEND args "-o ${referencefile}")
|
||||
endif()
|
||||
foreach(a ${extraargs})
|
||||
list(APPEND args "${a}")
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
if (memcheck)
|
||||
list(PREPEND args "${MY_PROJECT_BINARY_DIR}/${executable}")
|
||||
list(PREPEND args "${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
|
||||
if (no_postfix)
|
||||
ADD_EMBREE_GENERIC_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
|
||||
else()
|
||||
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
|
||||
if (NOT(no_cpp))
|
||||
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
|
||||
endif()
|
||||
if (NOT(no_ispc))
|
||||
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
|
||||
endif()
|
||||
endif()
|
||||
if (NOT(no_sycl))
|
||||
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if (no_postfix)
|
||||
ADD_EMBREE_GENERIC_TEST(${testname} ${executable} ${args})
|
||||
else()
|
||||
if (NOT(no_cpp))
|
||||
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${executable} ${args})
|
||||
endif()
|
||||
if (NOT(no_ispc))
|
||||
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${executable} ${args})
|
||||
endif()
|
||||
if (NOT(no_sycl))
|
||||
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${executable} ${args})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
if (EMBREE_TESTING_INSTALL_TESTS)
|
||||
if (inputfile)
|
||||
get_filename_component(inputpath ${inputfile} DIRECTORY)
|
||||
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" inputpath "${inputpath}")
|
||||
INSTALL(FILES "${inputfile}"
|
||||
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${inputpath}"
|
||||
COMPONENT testing)
|
||||
endif()
|
||||
|
||||
if (conditionsfile)
|
||||
get_filename_component(conditionspath ${conditionsfile} DIRECTORY)
|
||||
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" conditionspath "${conditionspath}")
|
||||
INSTALL(FILES "${conditionsfile}"
|
||||
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${conditionspath}"
|
||||
COMPONENT testing)
|
||||
endif()
|
||||
|
||||
if (referencefile)
|
||||
get_filename_component(referencepath ${referencefile} DIRECTORY)
|
||||
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" referencepath "${referencepath}")
|
||||
INSTALL(FILES "${referencefile}"
|
||||
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${referencepath}"
|
||||
COMPONENT testing)
|
||||
endif()
|
||||
|
||||
SET(testcall "ADD_EMBREE_TEST_ECS(${testname} ${executable}")
|
||||
if (inputfile)
|
||||
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" inputfile "${inputfile}")
|
||||
if (inputtype STREQUAL "-c")
|
||||
SET(testcall "${testcall} \n ECS ${inputfile}")
|
||||
elseif (inputtype STREQUAL "-i")
|
||||
SET(testcall "${testcall} \n XML ${inputfile}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (no_reference)
|
||||
SET(testcall "${testcall} \n NO_REFERENCE")
|
||||
else()
|
||||
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" referencefile "${referencefile}")
|
||||
SET(testcall "${testcall} \n REFERENCE ${referencefile}")
|
||||
endif()
|
||||
|
||||
SET(testcall "${testcall} \n INTENSITY ${intensity}")
|
||||
if (${memcheck})
|
||||
SET(testcall "${testcall} \n MEMCHECK")
|
||||
endif()
|
||||
if (${no_cpp})
|
||||
SET(testcall "${testcall} \n NO_CPP")
|
||||
endif()
|
||||
if (${no_ispc})
|
||||
SET(testcall "${testcall} \n NO_ISPC")
|
||||
endif()
|
||||
if (${no_sycl})
|
||||
SET(testcall "${testcall} \n NO_SYCL")
|
||||
endif()
|
||||
if (${no_postfix})
|
||||
SET(testcall "${testcall} \n NO_POSTFIX")
|
||||
endif()
|
||||
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" conditionsfile "${conditionsfile}")
|
||||
SET(testcall "${testcall} \n CONDITION_FILE ${conditionsfile}")
|
||||
SET(testcall "${testcall} \n CONDITION ")
|
||||
foreach(c ${conditions})
|
||||
SET(testcall "${testcall} \"${c}\"")
|
||||
endforeach()
|
||||
SET(testcall "${testcall} \n ARGS ")
|
||||
foreach(a ${extraargs})
|
||||
SET(testcall "${testcall} ${a}")
|
||||
endforeach()
|
||||
|
||||
SET(testcall "${testcall})\n\n")
|
||||
file(APPEND "${EMBREE_INSTALL_CTESTTESTFILE}" "${testcall}")
|
||||
endif()
|
||||
ENDFUNCTION()
|
||||
|
||||
else()
|
||||
FUNCTION(ADD_EMBREE_TEST_ECS testname executable)
|
||||
ENDFUNCTION()
|
||||
FUNCTION(ADD_EMBREE_GENERIC_TEST testname executable)
|
||||
ENDFUNCTION()
|
||||
FUNCTION(ADD_EMBREE_GENERIC_CPP_TEST testname executable)
|
||||
ENDFUNCTION()
|
||||
FUNCTION(ADD_EMBREE_GENERIC_SYCL_TEST testname executable)
|
||||
ENDFUNCTION()
|
||||
FUNCTION(ADD_EMBREE_GENERIC_ISPC_TEST testname executable)
|
||||
ENDFUNCTION()
|
||||
FUNCTION(SET_EMBREE_TEST_PROPERTIES testname)
|
||||
ENDFUNCTION()
|
||||
endif()
|
||||
+25
-12
@@ -5,21 +5,34 @@
|
||||
# if ADDITIONAL_LIBRARIES is set these will be included during linking
|
||||
|
||||
MACRO (ADD_TUTORIAL TUTORIAL_NAME)
|
||||
ADD_EXECUTABLE(${TUTORIAL_NAME} ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME} embree image tutorial noise ${ADDITIONAL_LIBRARIES})
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME} APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
INSTALL(TARGETS ${TUTORIAL_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
|
||||
SIGN_TARGET(${TUTORIAL_NAME})
|
||||
ADD_EXECUTABLE(embree_${TUTORIAL_NAME} ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(embree_${TUTORIAL_NAME} embree image tutorial noise ${ADDITIONAL_LIBRARIES})
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME} APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
INSTALL(TARGETS embree_${TUTORIAL_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
|
||||
SIGN_TARGET(embree_${TUTORIAL_NAME})
|
||||
ENDMACRO ()
|
||||
|
||||
MACRO (ADD_TUTORIAL_SYCL TUTORIAL_NAME)
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
ADD_EXECUTABLE(embree_${TUTORIAL_NAME}_sycl ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(embree_${TUTORIAL_NAME}_sycl embree image tutorial_sycl noise ${ADDITIONAL_LIBRARIES})
|
||||
TARGET_COMPILE_DEFINITIONS(embree_${TUTORIAL_NAME}_sycl PUBLIC EMBREE_SYCL_TUTORIAL)
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_sycl PROPERTY FOLDER tutorials/sycl)
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_sycl APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST} ${CMAKE_CXX_FLAGS_SYCL}")
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_sycl APPEND PROPERTY LINK_FLAGS "${CMAKE_LINK_FLAGS_SYCL}")
|
||||
INSTALL(TARGETS embree_${TUTORIAL_NAME}_sycl DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
|
||||
SIGN_TARGET(embree_${TUTORIAL_NAME}_sycl)
|
||||
ENDIF()
|
||||
ENDMACRO ()
|
||||
|
||||
MACRO (ADD_TUTORIAL_ISPC TUTORIAL_NAME)
|
||||
IF (EMBREE_ISPC_SUPPORT)
|
||||
ADD_EMBREE_ISPC_EXECUTABLE(${TUTORIAL_NAME}_ispc ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME}_ispc embree image tutorial_ispc noise noise_ispc)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
INSTALL(TARGETS ${TUTORIAL_NAME}_ispc DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
|
||||
SIGN_TARGET(${TUTORIAL_NAME}_ispc)
|
||||
ADD_EMBREE_ISPC_EXECUTABLE(embree_${TUTORIAL_NAME}_ispc ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(embree_${TUTORIAL_NAME}_ispc embree image tutorial_ispc noise noise_ispc)
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
|
||||
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_ispc APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
INSTALL(TARGETS embree_${TUTORIAL_NAME}_ispc DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
|
||||
SIGN_TARGET(embree_${TUTORIAL_NAME}_ispc)
|
||||
ENDIF()
|
||||
ENDMACRO ()
|
||||
|
||||
+10
-10
@@ -6,7 +6,7 @@
|
||||
#include "../sys/platform.h"
|
||||
#include "../sys/ref.h"
|
||||
#include "../sys/filename.h"
|
||||
#include "../sys/string.h"
|
||||
#include "../sys/estring.h"
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -122,17 +122,16 @@ namespace embree
|
||||
class FileStream : public Stream<int>
|
||||
{
|
||||
public:
|
||||
|
||||
FileStream (FILE* file, const std::string& name = "file")
|
||||
: file(file), lineNumber(1), colNumber(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(name))) {}
|
||||
|
||||
FileStream (const FileName& fileName)
|
||||
: lineNumber(1), colNumber(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(fileName.str())))
|
||||
{
|
||||
file = fopen(fileName.c_str(),"r");
|
||||
if (file == nullptr) THROW_RUNTIME_ERROR("cannot open file " + fileName.str());
|
||||
if (ifs) ifs.close();
|
||||
ifs.open(fileName.str());
|
||||
if (!ifs.is_open()) THROW_RUNTIME_ERROR("cannot open file " + fileName.str());
|
||||
}
|
||||
~FileStream() {
|
||||
if (ifs) ifs.close();
|
||||
}
|
||||
~FileStream() { if (file) fclose(file); }
|
||||
|
||||
public:
|
||||
ParseLocation location() {
|
||||
@@ -140,14 +139,15 @@ namespace embree
|
||||
}
|
||||
|
||||
int next() {
|
||||
int c = fgetc(file);
|
||||
int c = ifs.get();
|
||||
if (c == '\n') { lineNumber++; colNumber = 0; } else if (c != '\r') colNumber++;
|
||||
charNumber++;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
FILE* file;
|
||||
std::ifstream ifs;
|
||||
ssize_t lineNumber; /// the line number the token is from
|
||||
ssize_t colNumber; /// the character number in the current line
|
||||
ssize_t charNumber; /// the character in the file
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "tokenstream.h"
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace embree
|
||||
if (D) *D = sqrtf(D_x);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
__forceinline void AffineSpace3fa_store_unaligned(const AffineSpace3fa &source, AffineSpace3fa* ptr)
|
||||
{
|
||||
Vec3fa::storeu(&ptr->l.vx, source.l.vx);
|
||||
|
||||
@@ -56,6 +56,11 @@ namespace embree
|
||||
return BBox(min(a.lower, b.lower), max(a.upper, b.upper));
|
||||
}
|
||||
|
||||
/*! intersects two boxes */
|
||||
__forceinline static const BBox intersect (const BBox& a, const BBox& b) {
|
||||
return BBox(max(a.lower, b.lower), min(a.upper, b.upper));
|
||||
}
|
||||
|
||||
/*! enlarge box by some scaling factor */
|
||||
__forceinline BBox enlarge_by(const float a) const {
|
||||
return BBox(lower - T(a)*abs(lower), upper + T(a)*abs(upper));
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "color_sycl.h"
|
||||
#else
|
||||
|
||||
#include "constants.h"
|
||||
#include "col3.h"
|
||||
#include "col4.h"
|
||||
@@ -64,6 +68,10 @@ namespace embree
|
||||
d.b = (unsigned char)(s[2]);
|
||||
d.a = (unsigned char)(s[3]);
|
||||
}
|
||||
__forceinline void set(float &f) const
|
||||
{
|
||||
f = 0.2126f*r+0.7125f*g+0.0722f*b; // sRGB luminance.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
@@ -256,3 +264,5 @@ namespace embree
|
||||
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "constants.h"
|
||||
#include "col3.h"
|
||||
#include "col4.h"
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE RGBA Color Class
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Color4
|
||||
{
|
||||
struct { float r,g,b,a; };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Construction
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Color4 () {}
|
||||
//__forceinline Color4 ( const __m128 a ) : m128(a) {}
|
||||
|
||||
__forceinline explicit Color4 (const float v) : r(v), g(v), b(v), a(v) {}
|
||||
__forceinline Color4 (const float r, const float g, const float b, const float a) : r(r), g(g), b(b), a(a) {}
|
||||
|
||||
__forceinline explicit Color4 ( const Col3uc& other ) : r(other.r/255.0f), g(other.g/255.0f), b(other.b/255.0f), a(1.0f) {}
|
||||
__forceinline explicit Color4 ( const Col3f& other ) : r(other.r), g(other.g), b(other.b), a(1.0f) {}
|
||||
__forceinline explicit Color4 ( const Col4uc& other ) : r(other.r/255.0f), g(other.g/255.0f), b(other.b/255.0f), a(other.a/255.0f) {}
|
||||
__forceinline explicit Color4 ( const Col4f& other ) : r(other.r), g(other.g), b(other.b), a(other.a) {}
|
||||
|
||||
//__forceinline Color4 ( const Color4& other ) : m128(other.m128) {}
|
||||
//__forceinline Color4& operator=( const Color4& other ) { m128 = other.m128; return *this; }
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Set
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline void set(Col3f& d) const { d.r = r; d.g = g; d.b = b; }
|
||||
__forceinline void set(Col4f& d) const { d.r = r; d.g = g; d.b = b; d.a = a; }
|
||||
|
||||
__forceinline void set(Col3uc& d) const
|
||||
{
|
||||
d.r = (unsigned char)(clamp(r)*255.0f);
|
||||
d.g = (unsigned char)(clamp(g)*255.0f);
|
||||
d.b = (unsigned char)(clamp(b)*255.0f);
|
||||
}
|
||||
|
||||
__forceinline void set(Col4uc& d) const
|
||||
{
|
||||
d.r = (unsigned char)(clamp(r)*255.0f);
|
||||
d.g = (unsigned char)(clamp(g)*255.0f);
|
||||
d.b = (unsigned char)(clamp(b)*255.0f);
|
||||
d.a = (unsigned char)(clamp(a)*255.0f);
|
||||
}
|
||||
__forceinline void set(float &f) const
|
||||
{
|
||||
f = 0.2126f*r+0.7125f*g+0.0722f*b; // sRGB luminance.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Color4( ZeroTy ) : r(0.0f), g(0.0f), b(0.0f), a(0.0f) {}
|
||||
__forceinline Color4( OneTy ) : r(1.0f), g(1.0f), b(1.0f), a(1.0f) {}
|
||||
//__forceinline Color4( PosInfTy ) : m128(_mm_set1_ps(pos_inf)) {}
|
||||
//__forceinline Color4( NegInfTy ) : m128(_mm_set1_ps(neg_inf)) {}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE RGB Color Class
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Color
|
||||
{
|
||||
struct { float r,g,b; };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Construction
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Color () {}
|
||||
//__forceinline Color ( const __m128 a ) : m128(a) {}
|
||||
|
||||
__forceinline explicit Color (const float v) : r(v), g(v), b(v) {}
|
||||
__forceinline Color (const float r, const float g, const float b) : r(r), g(g), b(b) {}
|
||||
|
||||
//__forceinline Color ( const Color& other ) : m128(other.m128) {}
|
||||
//__forceinline Color& operator=( const Color& other ) { m128 = other.m128; return *this; }
|
||||
|
||||
//__forceinline Color ( const Color4& other ) : m128(other.m128) {}
|
||||
//__forceinline Color& operator=( const Color4& other ) { m128 = other.m128; return *this; }
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Set
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline void set(Col3f& d) const { d.r = r; d.g = g; d.b = b; }
|
||||
__forceinline void set(Col4f& d) const { d.r = r; d.g = g; d.b = b; d.a = 1.0f; }
|
||||
|
||||
#if 0
|
||||
__forceinline void set(Col3uc& d) const
|
||||
{
|
||||
vfloat4 s = clamp(vfloat4(m128))*255.0f;
|
||||
d.r = (unsigned char)(s[0]);
|
||||
d.g = (unsigned char)(s[1]);
|
||||
d.b = (unsigned char)(s[2]);
|
||||
}
|
||||
__forceinline void set(Col4uc& d) const
|
||||
{
|
||||
vfloat4 s = clamp(vfloat4(m128))*255.0f;
|
||||
d.r = (unsigned char)(s[0]);
|
||||
d.g = (unsigned char)(s[1]);
|
||||
d.b = (unsigned char)(s[2]);
|
||||
d.a = 255;
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Color( ZeroTy ) : r(0.0f), g(0.0f), b(0.0f) {}
|
||||
__forceinline Color( OneTy ) : r(1.0f), g(1.0f), b(1.0f) {}
|
||||
//__forceinline Color( PosInfTy ) : m128(_mm_set1_ps(pos_inf)) {}
|
||||
//__forceinline Color( NegInfTy ) : m128(_mm_set1_ps(neg_inf)) {}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const Color operator +( const Color& a ) { return a; }
|
||||
__forceinline const Color operator -( const Color& a ) { return Color(-a.r, -a.g, -a.b); }
|
||||
__forceinline const Color abs ( const Color& a ) { return Color(abs(a.r), abs(a.g), abs(a.b)); }
|
||||
__forceinline const Color rcp ( const Color& a ) { return Color(1.0f/a.r, 1.0f/a.g, 1.0f/a.b); }
|
||||
__forceinline const Color rsqrt( const Color& a ) { return Color(1.0f/sqrt(a.r), 1.0f/sqrt(a.g), 1.0f/sqrt(a.b)); }
|
||||
__forceinline const Color sqrt ( const Color& a ) { return Color(sqrt(a.r), sqrt(a.g), sqrt(a.b)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const Color operator +( const Color& a, const Color& b ) { return Color(a.r+b.r, a.g+b.g, a.b+b.b); }
|
||||
__forceinline const Color operator -( const Color& a, const Color& b ) { return Color(a.r-b.r, a.g-b.g, a.b-b.b); }
|
||||
__forceinline const Color operator *( const Color& a, const Color& b ) { return Color(a.r*b.r, a.g*b.g, a.b*b.b); }
|
||||
__forceinline const Color operator *( const Color& a, const float b ) { return a * Color(b); }
|
||||
__forceinline const Color operator *( const float a, const Color& b ) { return Color(a) * b; }
|
||||
__forceinline const Color operator /( const Color& a, const Color& b ) { return a * rcp(b); }
|
||||
__forceinline const Color operator /( const Color& a, const float b ) { return a * rcp(b); }
|
||||
|
||||
__forceinline const Color min( const Color& a, const Color& b ) { return Color(min(a.r,b.r), min(a.g,b.g), min(a.b,b.b)); }
|
||||
__forceinline const Color max( const Color& a, const Color& b ) { return Color(max(a.r,b.r), max(a.g,b.g), max(a.b,b.b)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const Color operator+=(Color& a, const Color& b) { return a = a + b; }
|
||||
__forceinline const Color operator-=(Color& a, const Color& b) { return a = a - b; }
|
||||
__forceinline const Color operator*=(Color& a, const Color& b) { return a = a * b; }
|
||||
__forceinline const Color operator/=(Color& a, const Color& b) { return a = a / b; }
|
||||
__forceinline const Color operator*=(Color& a, const float b ) { return a = a * b; }
|
||||
__forceinline const Color operator/=(Color& a, const float b ) { return a = a / b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float reduce_add(const Color& v) { return v.r+v.g+v.b; }
|
||||
__forceinline float reduce_mul(const Color& v) { return v.r*v.g*v.b; }
|
||||
__forceinline float reduce_min(const Color& v) { return min(v.r,v.g,v.b); }
|
||||
__forceinline float reduce_max(const Color& v) { return max(v.r,v.g,v.b); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Color& a, const Color& b ) { return a.r == b.r && a.g == b.g && a.b == b.b; }
|
||||
__forceinline bool operator !=( const Color& a, const Color& b ) { return a.r != b.r || a.g != b.g || a.b != b.b; }
|
||||
__forceinline bool operator < ( const Color& a, const Color& b ) {
|
||||
if (a.r != b.r) return a.r < b.r;
|
||||
if (a.g != b.g) return a.g < b.g;
|
||||
if (a.b != b.b) return a.b < b.b;
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const Color select( bool s, const Color& t, const Color& f ) {
|
||||
return s ? t : f;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Special Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*! computes luminance of a color */
|
||||
__forceinline float luminance (const Color& a) { return madd(0.212671f,a.r,madd(0.715160f,a.g,0.072169f*a.b)); }
|
||||
|
||||
/*! output operator */
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Color& a) {
|
||||
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,10 @@
|
||||
#include "constants.h"
|
||||
#include <cmath>
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "math_sycl.h"
|
||||
#else
|
||||
|
||||
#if defined(__ARM_NEON)
|
||||
#include "../simd/arm/emulation.h"
|
||||
#else
|
||||
@@ -44,6 +48,9 @@ namespace embree
|
||||
__forceinline int toInt (const float& a) { return int(a); }
|
||||
__forceinline float toFloat(const int& a) { return float(a); }
|
||||
|
||||
__forceinline int asInt (const float& a) { return *((int*)&a); }
|
||||
__forceinline float asFloat(const int& a) { return *((float*)&a); }
|
||||
|
||||
#if defined(__WIN32__)
|
||||
__forceinline bool finite ( const float x ) { return _finite(x) != 0; }
|
||||
#endif
|
||||
@@ -351,7 +358,11 @@ __forceinline float nmsub ( const float a, const float b, const float c) { retur
|
||||
__forceinline int select(bool s, int t, int f) { return s ? t : f; }
|
||||
__forceinline float select(bool s, float t, float f) { return s ? t : f; }
|
||||
|
||||
__forceinline bool all(bool s) { return s; }
|
||||
__forceinline bool none(bool s) { return !s; }
|
||||
__forceinline bool all (bool s) { return s; }
|
||||
__forceinline bool any (bool s) { return s; }
|
||||
|
||||
__forceinline unsigned movemask (bool s) { return (unsigned)s; }
|
||||
|
||||
__forceinline float lerp(const float v0, const float v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
@@ -453,3 +464,5 @@ __forceinline float nmsub ( const float a, const float b, const float c) { retur
|
||||
return x | (y << 1) | (z << 2);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -179,6 +179,48 @@ namespace embree
|
||||
bounds1 = b1;
|
||||
}
|
||||
|
||||
/*! calculates the linear bounds for target_time_range of primitive with it's time_range_in and bounds */
|
||||
__forceinline LBBox(const BBox1f& time_range_in, const LBBox<T> lbounds, const BBox1f& target_time_range)
|
||||
{
|
||||
const BBox3f bounds0 = lbounds.bounds0;
|
||||
const BBox3f bounds1 = lbounds.bounds1;
|
||||
|
||||
/* normalize global target_time_range to local time_range_in */
|
||||
const BBox1f time_range((target_time_range.lower-time_range_in.lower)/time_range_in.size(),
|
||||
(target_time_range.upper-time_range_in.lower)/time_range_in.size());
|
||||
|
||||
const BBox1f clipped_time_range(max(0.0f,time_range.lower), min(1.0f,time_range.upper));
|
||||
|
||||
/* compute bounds at begin and end of clipped time range */
|
||||
BBox<T> b0 = lerp(bounds0,bounds1,clipped_time_range.lower);
|
||||
BBox<T> b1 = lerp(bounds0,bounds1,clipped_time_range.upper);
|
||||
|
||||
/* make sure that b0 is properly bounded at time_range_in.lower */
|
||||
{
|
||||
const BBox<T> bt = lerp(b0, b1, (0.0f - time_range.lower) / time_range.size());
|
||||
const T dlower = min(bounds0.lower-bt.lower, T(zero));
|
||||
const T dupper = max(bounds0.upper-bt.upper, T(zero));
|
||||
b0.lower += dlower; b1.lower += dlower;
|
||||
b0.upper += dupper; b1.upper += dupper;
|
||||
}
|
||||
|
||||
/* make sure that b1 is properly bounded at time_range_in.upper */
|
||||
{
|
||||
const BBox<T> bt = lerp(b0, b1, (1.0f - time_range.lower) / time_range.size());
|
||||
const T dlower = min(bounds1.lower-bt.lower, T(zero));
|
||||
const T dupper = max(bounds1.upper-bt.upper, T(zero));
|
||||
b0.lower += dlower; b1.lower += dlower;
|
||||
b0.upper += dupper; b1.upper += dupper;
|
||||
}
|
||||
|
||||
this->bounds0 = b0;
|
||||
this->bounds1 = b1;
|
||||
}
|
||||
|
||||
/*! calculates the linear bounds for target_time_range of primitive with it's time_range_in and bounds */
|
||||
__forceinline LBBox(const BBox1f& time_range_in, const BBox<T>& bounds0, const BBox<T>& bounds1, const BBox1f& target_time_range)
|
||||
: LBBox(time_range_in,LBBox(bounds0,bounds1),target_time_range) {}
|
||||
|
||||
public:
|
||||
|
||||
__forceinline bool empty() const {
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace embree
|
||||
|
||||
/*! default matrix constructor */
|
||||
__forceinline LinearSpace2 ( ) {}
|
||||
|
||||
__forceinline LinearSpace2 ( const LinearSpace2& other ) { vx = other.vx; vy = other.vy; }
|
||||
__forceinline LinearSpace2& operator=( const LinearSpace2& other ) { vx = other.vx; vy = other.vy; return *this; }
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace embree
|
||||
|
||||
/*! default matrix constructor */
|
||||
__forceinline LinearSpace3 ( ) {}
|
||||
|
||||
__forceinline LinearSpace3 ( const LinearSpace3& other ) { vx = other.vx; vy = other.vy; vz = other.vz; }
|
||||
__forceinline LinearSpace3& operator=( const LinearSpace3& other ) { vx = other.vx; vy = other.vy; vz = other.vz; return *this; }
|
||||
|
||||
@@ -90,17 +91,20 @@ namespace embree
|
||||
Vector vx,vy,vz;
|
||||
};
|
||||
|
||||
#if !defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
/*! compute transposed matrix */
|
||||
template<> __forceinline const LinearSpace3<Vec3fa> LinearSpace3<Vec3fa>::transposed() const {
|
||||
vfloat4 rx,ry,rz; transpose((vfloat4&)vx,(vfloat4&)vy,(vfloat4&)vz,vfloat4(zero),rx,ry,rz);
|
||||
return LinearSpace3<Vec3fa>(Vec3fa(rx),Vec3fa(ry),Vec3fa(rz));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
__forceinline const LinearSpace3<T> transposed(const LinearSpace3<T>& xfm) {
|
||||
return xfm.transposed();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/platform.h"
|
||||
#include "../sys/intrinsics.h"
|
||||
#include "constants.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace embree
|
||||
{
|
||||
__forceinline bool isvalid ( const float& v ) {
|
||||
return (v > -FLT_LARGE) & (v < +FLT_LARGE);
|
||||
}
|
||||
|
||||
__forceinline int cast_f2i(float f) {
|
||||
return __builtin_bit_cast(int,f);
|
||||
}
|
||||
|
||||
__forceinline float cast_i2f(int i) {
|
||||
return __builtin_bit_cast(float,i);
|
||||
}
|
||||
|
||||
__forceinline int toInt (const float& a) { return int(a); }
|
||||
__forceinline float toFloat(const int& a) { return float(a); }
|
||||
|
||||
__forceinline float asFloat(const int a) { return __builtin_bit_cast(float,a); }
|
||||
__forceinline int asInt (const float a) { return __builtin_bit_cast(int,a); }
|
||||
|
||||
//__forceinline bool finite ( const float x ) { return _finite(x) != 0; }
|
||||
__forceinline float sign ( const float x ) { return x<0?-1.0f:1.0f; }
|
||||
__forceinline float sqr ( const float x ) { return x*x; }
|
||||
|
||||
__forceinline float rcp ( const float x ) {
|
||||
return sycl::native::recip(x);
|
||||
}
|
||||
|
||||
__forceinline float signmsk(const float a) { return asFloat(asInt(a) & 0x80000000); }
|
||||
//__forceinline float signmsk ( const float x ) {
|
||||
// return _mm_cvtss_f32(_mm_and_ps(_mm_set_ss(x),_mm_castsi128_ps(_mm_set1_epi32(0x80000000))));
|
||||
//}
|
||||
//__forceinline float xorf( const float x, const float y ) {
|
||||
// return _mm_cvtss_f32(_mm_xor_ps(_mm_set_ss(x),_mm_set_ss(y)));
|
||||
//}
|
||||
//__forceinline float andf( const float x, const unsigned y ) {
|
||||
// return _mm_cvtss_f32(_mm_and_ps(_mm_set_ss(x),_mm_castsi128_ps(_mm_set1_epi32(y))));
|
||||
//}
|
||||
|
||||
__forceinline float rsqrt( const float x ) {
|
||||
return sycl::rsqrt(x);
|
||||
}
|
||||
|
||||
//__forceinline float nextafter(float x, float y) { if ((x<y) == (x>0)) return x*(1.1f+float(ulp)); else return x*(0.9f-float(ulp)); }
|
||||
//__forceinline double nextafter(double x, double y) { return _nextafter(x, y); }
|
||||
//__forceinline int roundf(float f) { return (int)(f + 0.5f); }
|
||||
|
||||
__forceinline float abs ( const float x ) { return sycl::fabs(x); }
|
||||
__forceinline float acos ( const float x ) { return sycl::acos(x); }
|
||||
__forceinline float asin ( const float x ) { return sycl::asin(x); }
|
||||
__forceinline float atan ( const float x ) { return sycl::atan(x); }
|
||||
__forceinline float atan2( const float y, const float x ) { return sycl::atan2(y, x); }
|
||||
__forceinline float cos ( const float x ) { return sycl::cos(x); }
|
||||
__forceinline float cosh ( const float x ) { return sycl::cosh(x); }
|
||||
__forceinline float exp ( const float x ) { return sycl::exp(x); }
|
||||
__forceinline float fmod ( const float x, const float y ) { return sycl::fmod(x, y); }
|
||||
__forceinline float log ( const float x ) { return sycl::log(x); }
|
||||
__forceinline float log10( const float x ) { return sycl::log10(x); }
|
||||
__forceinline float pow ( const float x, const float y ) { return sycl::pow(x, y); }
|
||||
__forceinline float sin ( const float x ) { return sycl::sin(x); }
|
||||
__forceinline float sinh ( const float x ) { return sycl::sinh(x); }
|
||||
__forceinline float sqrt ( const float x ) { return sycl::sqrt(x); }
|
||||
__forceinline float tan ( const float x ) { return sycl::tan(x); }
|
||||
__forceinline float tanh ( const float x ) { return sycl::tanh(x); }
|
||||
__forceinline float floor( const float x ) { return sycl::floor(x); }
|
||||
__forceinline float ceil ( const float x ) { return sycl::ceil(x); }
|
||||
__forceinline float frac ( const float x ) { return x-floor(x); }
|
||||
|
||||
//__forceinline double abs ( const double x ) { return ::fabs(x); }
|
||||
//__forceinline double sign ( const double x ) { return x<0?-1.0:1.0; }
|
||||
//__forceinline double acos ( const double x ) { return ::acos (x); }
|
||||
//__forceinline double asin ( const double x ) { return ::asin (x); }
|
||||
//__forceinline double atan ( const double x ) { return ::atan (x); }
|
||||
//__forceinline double atan2( const double y, const double x ) { return ::atan2(y, x); }
|
||||
//__forceinline double cos ( const double x ) { return ::cos (x); }
|
||||
//__forceinline double cosh ( const double x ) { return ::cosh (x); }
|
||||
//__forceinline double exp ( const double x ) { return ::exp (x); }
|
||||
//__forceinline double fmod ( const double x, const double y ) { return ::fmod (x, y); }
|
||||
//__forceinline double log ( const double x ) { return ::log (x); }
|
||||
//__forceinline double log10( const double x ) { return ::log10(x); }
|
||||
//__forceinline double pow ( const double x, const double y ) { return ::pow (x, y); }
|
||||
//__forceinline double rcp ( const double x ) { return 1.0/x; }
|
||||
//__forceinline double rsqrt( const double x ) { return 1.0/::sqrt(x); }
|
||||
//__forceinline double sin ( const double x ) { return ::sin (x); }
|
||||
//__forceinline double sinh ( const double x ) { return ::sinh (x); }
|
||||
//__forceinline double sqr ( const double x ) { return x*x; }
|
||||
//__forceinline double sqrt ( const double x ) { return ::sqrt (x); }
|
||||
//__forceinline double tan ( const double x ) { return ::tan (x); }
|
||||
//__forceinline double tanh ( const double x ) { return ::tanh (x); }
|
||||
//__forceinline double floor( const double x ) { return ::floor (x); }
|
||||
//__forceinline double ceil ( const double x ) { return ::ceil (x); }
|
||||
|
||||
/*
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline float mini(float a, float b) {
|
||||
const __m128i ai = _mm_castps_si128(_mm_set_ss(a));
|
||||
const __m128i bi = _mm_castps_si128(_mm_set_ss(b));
|
||||
const __m128i ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_cvtss_f32(_mm_castsi128_ps(ci));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline float maxi(float a, float b) {
|
||||
const __m128i ai = _mm_castps_si128(_mm_set_ss(a));
|
||||
const __m128i bi = _mm_castps_si128(_mm_set_ss(b));
|
||||
const __m128i ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_cvtss_f32(_mm_castsi128_ps(ci));
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
__forceinline T twice(const T& a) { return a+a; }
|
||||
|
||||
__forceinline int min(int a, int b) { return sycl::min(a,b); }
|
||||
__forceinline unsigned min(unsigned a, unsigned b) { return sycl::min(a,b); }
|
||||
__forceinline int64_t min(int64_t a, int64_t b) { return sycl::min(a,b); }
|
||||
__forceinline float min(float a, float b) { return sycl::fmin(a,b); }
|
||||
__forceinline double min(double a, double b) { return sycl::fmin(a,b); }
|
||||
#if defined(__X86_64__)
|
||||
__forceinline size_t min(size_t a, size_t b) { return sycl::min(a,b); }
|
||||
#endif
|
||||
|
||||
template<typename T> __forceinline T min(const T& a, const T& b, const T& c) { return min(min(a,b),c); }
|
||||
template<typename T> __forceinline T min(const T& a, const T& b, const T& c, const T& d) { return min(min(a,b),min(c,d)); }
|
||||
template<typename T> __forceinline T min(const T& a, const T& b, const T& c, const T& d, const T& e) { return min(min(min(a,b),min(c,d)),e); }
|
||||
|
||||
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c) { return mini(mini(a,b),c); }
|
||||
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d) { return mini(mini(a,b),mini(c,d)); }
|
||||
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d, const T& e) { return mini(mini(mini(a,b),mini(c,d)),e); }
|
||||
|
||||
__forceinline int max(int a, int b) { return sycl::max(a,b); }
|
||||
__forceinline unsigned max(unsigned a, unsigned b) { return sycl::max(a,b); }
|
||||
__forceinline int64_t max(int64_t a, int64_t b) { return sycl::max(a,b); }
|
||||
__forceinline float max(float a, float b) { return sycl::fmax(a,b); }
|
||||
__forceinline double max(double a, double b) { return sycl::fmax(a,b); }
|
||||
#if defined(__X86_64__)
|
||||
__forceinline size_t max(size_t a, size_t b) { return sycl::max(a,b); }
|
||||
#endif
|
||||
|
||||
template<typename T> __forceinline T max(const T& a, const T& b, const T& c) { return max(max(a,b),c); }
|
||||
template<typename T> __forceinline T max(const T& a, const T& b, const T& c, const T& d) { return max(max(a,b),max(c,d)); }
|
||||
template<typename T> __forceinline T max(const T& a, const T& b, const T& c, const T& d, const T& e) { return max(max(max(a,b),max(c,d)),e); }
|
||||
|
||||
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c) { return maxi(maxi(a,b),c); }
|
||||
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c, const T& d) { return maxi(maxi(a,b),maxi(c,d)); }
|
||||
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c, const T& d, const T& e) { return maxi(maxi(maxi(a,b),maxi(c,d)),e); }
|
||||
|
||||
template<typename T> __forceinline T clamp(const T& x, const T& lower = T(zero), const T& upper = T(one)) { return max(min(x,upper),lower); }
|
||||
template<typename T> __forceinline T clampz(const T& x, const T& upper) { return max(T(zero), min(x,upper)); }
|
||||
|
||||
template<typename T> __forceinline T deg2rad ( const T& x ) { return x * T(1.74532925199432957692e-2f); }
|
||||
template<typename T> __forceinline T rad2deg ( const T& x ) { return x * T(5.72957795130823208768e1f); }
|
||||
template<typename T> __forceinline T sin2cos ( const T& x ) { return sqrt(max(T(zero),T(one)-x*x)); }
|
||||
template<typename T> __forceinline T cos2sin ( const T& x ) { return sin2cos(x); }
|
||||
|
||||
__forceinline float madd ( const float a, const float b, const float c) { return +sycl::fma(+a,b,+c); }
|
||||
__forceinline float msub ( const float a, const float b, const float c) { return +sycl::fma(+a,b,-c); }
|
||||
__forceinline float nmadd ( const float a, const float b, const float c) { return +sycl::fma(-a,b,+c); }
|
||||
__forceinline float nmsub ( const float a, const float b, const float c) { return -sycl::fma(+a,b,+c); }
|
||||
|
||||
/*! random functions */
|
||||
/*
|
||||
template<typename T> T random() { return T(0); }
|
||||
template<> __forceinline int random() { return int(rand()); }
|
||||
template<> __forceinline uint32_t random() { return uint32_t(rand()) ^ (uint32_t(rand()) << 16); }
|
||||
template<> __forceinline float random() { return rand()/float(RAND_MAX); }
|
||||
template<> __forceinline double random() { return rand()/double(RAND_MAX); }
|
||||
*/
|
||||
|
||||
/*! selects */
|
||||
__forceinline bool select(bool s, bool t , bool f) { return s ? t : f; }
|
||||
__forceinline int select(bool s, int t, int f) { return s ? t : f; }
|
||||
__forceinline float select(bool s, float t, float f) { return s ? t : f; }
|
||||
|
||||
__forceinline bool none(bool s) { return !s; }
|
||||
__forceinline bool all (bool s) { return s; }
|
||||
__forceinline bool any (bool s) { return s; }
|
||||
|
||||
__forceinline unsigned movemask (bool s) { return (unsigned)s; }
|
||||
|
||||
__forceinline float lerp(const float v0, const float v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
__forceinline T lerp2(const float x0, const float x1, const float x2, const float x3, const T& u, const T& v) {
|
||||
return madd((1.0f-u),madd((1.0f-v),T(x0),v*T(x2)),u*madd((1.0f-v),T(x1),v*T(x3)));
|
||||
}
|
||||
|
||||
/*! exchange */
|
||||
template<typename T> __forceinline void xchg ( T& a, T& b ) { const T tmp = a; a = b; b = tmp; }
|
||||
|
||||
/* load/store */
|
||||
template<typename Ty> struct mem;
|
||||
|
||||
template<> struct mem<float> {
|
||||
static __forceinline float load (bool mask, const void* ptr) { return mask ? *(float*)ptr : 0.0f; }
|
||||
static __forceinline float loadu(bool mask, const void* ptr) { return mask ? *(float*)ptr : 0.0f; }
|
||||
|
||||
static __forceinline void store (bool mask, void* ptr, const float v) { if (mask) *(float*)ptr = v; }
|
||||
static __forceinline void storeu(bool mask, void* ptr, const float v) { if (mask) *(float*)ptr = v; }
|
||||
};
|
||||
|
||||
/*! bit reverse operation */
|
||||
template<class T>
|
||||
__forceinline T bitReverse(const T& vin)
|
||||
{
|
||||
T v = vin;
|
||||
v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1);
|
||||
v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2);
|
||||
v = ((v >> 4) & 0x0F0F0F0F) | ((v & 0x0F0F0F0F) << 4);
|
||||
v = ((v >> 8) & 0x00FF00FF) | ((v & 0x00FF00FF) << 8);
|
||||
v = ( v >> 16 ) | ( v << 16);
|
||||
return v;
|
||||
}
|
||||
|
||||
/*! bit interleave operation */
|
||||
template<class T>
|
||||
__forceinline T bitInterleave(const T& xin, const T& yin, const T& zin)
|
||||
{
|
||||
T x = xin, y = yin, z = zin;
|
||||
x = (x | (x << 16)) & 0x030000FF;
|
||||
x = (x | (x << 8)) & 0x0300F00F;
|
||||
x = (x | (x << 4)) & 0x030C30C3;
|
||||
x = (x | (x << 2)) & 0x09249249;
|
||||
|
||||
y = (y | (y << 16)) & 0x030000FF;
|
||||
y = (y | (y << 8)) & 0x0300F00F;
|
||||
y = (y | (y << 4)) & 0x030C30C3;
|
||||
y = (y | (y << 2)) & 0x09249249;
|
||||
|
||||
z = (z | (z << 16)) & 0x030000FF;
|
||||
z = (z | (z << 8)) & 0x0300F00F;
|
||||
z = (z | (z << 4)) & 0x030C30C3;
|
||||
z = (z | (z << 2)) & 0x09249249;
|
||||
|
||||
return x | (y << 1) | (z << 2);
|
||||
}
|
||||
|
||||
/*! bit interleave operation for 64bit data types*/
|
||||
template<class T>
|
||||
__forceinline T bitInterleave64(const T& xin, const T& yin, const T& zin){
|
||||
T x = xin & 0x1fffff;
|
||||
T y = yin & 0x1fffff;
|
||||
T z = zin & 0x1fffff;
|
||||
|
||||
x = (x | x << 32) & 0x1f00000000ffff;
|
||||
x = (x | x << 16) & 0x1f0000ff0000ff;
|
||||
x = (x | x << 8) & 0x100f00f00f00f00f;
|
||||
x = (x | x << 4) & 0x10c30c30c30c30c3;
|
||||
x = (x | x << 2) & 0x1249249249249249;
|
||||
|
||||
y = (y | y << 32) & 0x1f00000000ffff;
|
||||
y = (y | y << 16) & 0x1f0000ff0000ff;
|
||||
y = (y | y << 8) & 0x100f00f00f00f00f;
|
||||
y = (y | y << 4) & 0x10c30c30c30c30c3;
|
||||
y = (y | y << 2) & 0x1249249249249249;
|
||||
|
||||
z = (z | z << 32) & 0x1f00000000ffff;
|
||||
z = (z | z << 16) & 0x1f0000ff0000ff;
|
||||
z = (z | z << 8) & 0x100f00f00f00f00f;
|
||||
z = (z | z << 4) & 0x10c30c30c30c30c3;
|
||||
z = (z | z << 2) & 0x1249249249249249;
|
||||
|
||||
return x | (y << 1) | (z << 2);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../sys/platform.h"
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
+3
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace embree
|
||||
__forceinline Vec2( const T& x, const T& y ) : x(x), y(y) {}
|
||||
|
||||
__forceinline Vec2( const Vec2& other ) { x = other.x; y = other.y; }
|
||||
__forceinline Vec2( const Vec2fa& other );
|
||||
Vec2( const Vec2fa& other );
|
||||
|
||||
template<typename T1> __forceinline Vec2( const Vec2<T1>& a ) : x(T(a.x)), y(T(a.y)) {}
|
||||
template<typename T1> __forceinline Vec2& operator =( const Vec2<T1>& other ) { x = other.x; y = other.y; return *this; }
|
||||
@@ -232,4 +232,5 @@ namespace embree
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec2<vfloat16>::Vec2(const Vec2fa& a) : x(a.x), y(a.y) {}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "vec2fa_sycl.h"
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -316,3 +321,5 @@ namespace embree
|
||||
|
||||
typedef Vec2fa Vec2fa_t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,270 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "emath.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
struct Vec3fa;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec2fa Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec2fa
|
||||
{
|
||||
//ALIGNED_STRUCT_(16);
|
||||
|
||||
typedef float Scalar;
|
||||
enum { N = 2 };
|
||||
struct { float x,y; };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa( ) {}
|
||||
//__forceinline Vec2fa( const __m128 a ) : m128(a) {}
|
||||
explicit Vec2fa(const Vec3fa& a);
|
||||
|
||||
__forceinline explicit Vec2fa( const vfloat<4>& a ) {
|
||||
x = a[0];
|
||||
y = a[1];
|
||||
}
|
||||
|
||||
__forceinline Vec2fa ( const Vec2<float>& other ) { x = other.x; y = other.y; }
|
||||
__forceinline Vec2fa& operator =( const Vec2<float>& other ) { x = other.x; y = other.y; return *this; }
|
||||
|
||||
__forceinline Vec2fa ( const Vec2fa& other ) { x = other.x; y = other.y; }
|
||||
__forceinline Vec2fa& operator =( const Vec2fa& other ) { x = other.x; y = other.y; return *this; }
|
||||
|
||||
__forceinline explicit Vec2fa( const float a ) : x(a), y(a) {}
|
||||
__forceinline Vec2fa( const float x, const float y) : x(x), y(y) {}
|
||||
|
||||
//__forceinline explicit Vec2fa( const __m128i a ) : m128(_mm_cvtepi32_ps(a)) {}
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Loads and Stores
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static __forceinline Vec2fa load( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec2fa(ptr[0],ptr[1]);
|
||||
}
|
||||
|
||||
static __forceinline Vec2fa loadu( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec2fa(ptr[0],ptr[1]);
|
||||
}
|
||||
|
||||
static __forceinline void storeu ( void* a, const Vec2fa& v ) {
|
||||
float* ptr = (float*)a;
|
||||
ptr[0] = v.x; ptr[1] = v.y;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa( ZeroTy ) : x(0.0f), y(0.0f) {}
|
||||
__forceinline Vec2fa( OneTy ) : x(1.0f), y(1.0f) {}
|
||||
__forceinline Vec2fa( PosInfTy ) : x(+INFINITY), y(+INFINITY) {}
|
||||
__forceinline Vec2fa( NegInfTy ) : x(-INFINITY), y(-INFINITY) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//__forceinline const float& operator []( const size_t index ) const { assert(index < 2); return (&x)[index]; }
|
||||
//__forceinline float& operator []( const size_t index ) { assert(index < 2); return (&x)[index]; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa operator +( const Vec2fa& a ) { return a; }
|
||||
__forceinline Vec2fa operator -( const Vec2fa& a ) { return Vec2fa(-a.x,-a.y); }
|
||||
__forceinline Vec2fa abs ( const Vec2fa& a ) { return Vec2fa(sycl::fabs(a.x),sycl::fabs(a.y)); }
|
||||
__forceinline Vec2fa sign ( const Vec2fa& a ) { return Vec2fa(sycl::sign(a.x),sycl::sign(a.y)); }
|
||||
|
||||
//__forceinline Vec2fa rcp ( const Vec2fa& a ) { return Vec2fa(sycl::native::recip(a.x),sycl::native::recip(a.y)); }
|
||||
__forceinline Vec2fa rcp ( const Vec2fa& a ) { return Vec2fa(sycl::native::recip(a.x),sycl::native::recip(a.y)); }
|
||||
__forceinline Vec2fa sqrt ( const Vec2fa& a ) { return Vec2fa(sycl::sqrt(a.x),sycl::sqrt(a.y)); }
|
||||
__forceinline Vec2fa sqr ( const Vec2fa& a ) { return Vec2fa(a.x*a.x,a.y*a.y); }
|
||||
|
||||
__forceinline Vec2fa rsqrt( const Vec2fa& a ) { return Vec2fa(sycl::rsqrt(a.x),sycl::rsqrt(a.y)); }
|
||||
|
||||
__forceinline Vec2fa zero_fix(const Vec2fa& a) {
|
||||
const float x = sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
|
||||
const float y = sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
|
||||
return Vec2fa(x,y);
|
||||
}
|
||||
__forceinline Vec2fa rcp_safe(const Vec2fa& a) {
|
||||
return rcp(zero_fix(a));
|
||||
}
|
||||
__forceinline Vec2fa log ( const Vec2fa& a ) {
|
||||
return Vec2fa(sycl::log(a.x),sycl::log(a.y));
|
||||
}
|
||||
|
||||
__forceinline Vec2fa exp ( const Vec2fa& a ) {
|
||||
return Vec2fa(sycl::exp(a.x),sycl::exp(a.y));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa operator +( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x+b.x, a.y+b.y); }
|
||||
__forceinline Vec2fa operator -( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x-b.x, a.y-b.y); }
|
||||
__forceinline Vec2fa operator *( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x*b.x, a.y*b.y); }
|
||||
__forceinline Vec2fa operator *( const Vec2fa& a, const float b ) { return a * Vec2fa(b); }
|
||||
__forceinline Vec2fa operator *( const float a, const Vec2fa& b ) { return Vec2fa(a) * b; }
|
||||
__forceinline Vec2fa operator /( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x/b.x, a.y/b.y); }
|
||||
__forceinline Vec2fa operator /( const Vec2fa& a, const float b ) { return Vec2fa(a.x/b, a.y/b); }
|
||||
__forceinline Vec2fa operator /( const float a, const Vec2fa& b ) { return Vec2fa(a/b.x, a/b.y); }
|
||||
|
||||
__forceinline Vec2fa min( const Vec2fa& a, const Vec2fa& b ) {
|
||||
return Vec2fa(sycl::fmin(a.x,b.x), sycl::fmin(a.y,b.y));
|
||||
}
|
||||
__forceinline Vec2fa max( const Vec2fa& a, const Vec2fa& b ) {
|
||||
return Vec2fa(sycl::fmax(a.x,b.x), sycl::fmax(a.y,b.y));
|
||||
}
|
||||
|
||||
/*
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec2fa mini(const Vec2fa& a, const Vec2fa& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec2fa maxi(const Vec2fa& a, const Vec2fa& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
__forceinline Vec2fa pow ( const Vec2fa& a, const float& b ) {
|
||||
return Vec2fa(powf(a.x,b),powf(a.y,b));
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Ternary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa madd ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y)); }
|
||||
__forceinline Vec2fa msub ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y)); }
|
||||
__forceinline Vec2fa nmadd ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y)); }
|
||||
__forceinline Vec2fa nmsub ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y)); }
|
||||
|
||||
__forceinline Vec2fa madd ( const float a, const Vec2fa& b, const Vec2fa& c) { return madd(Vec2fa(a),b,c); }
|
||||
__forceinline Vec2fa msub ( const float a, const Vec2fa& b, const Vec2fa& c) { return msub(Vec2fa(a),b,c); }
|
||||
__forceinline Vec2fa nmadd ( const float a, const Vec2fa& b, const Vec2fa& c) { return nmadd(Vec2fa(a),b,c); }
|
||||
__forceinline Vec2fa nmsub ( const float a, const Vec2fa& b, const Vec2fa& c) { return nmsub(Vec2fa(a),b,c); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa& operator +=( Vec2fa& a, const Vec2fa& b ) { return a = a + b; }
|
||||
__forceinline Vec2fa& operator -=( Vec2fa& a, const Vec2fa& b ) { return a = a - b; }
|
||||
__forceinline Vec2fa& operator *=( Vec2fa& a, const Vec2fa& b ) { return a = a * b; }
|
||||
__forceinline Vec2fa& operator *=( Vec2fa& a, const float b ) { return a = a * b; }
|
||||
__forceinline Vec2fa& operator /=( Vec2fa& a, const Vec2fa& b ) { return a = a / b; }
|
||||
__forceinline Vec2fa& operator /=( Vec2fa& a, const float b ) { return a = a / b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float reduce_add(const Vec2fa& v) { return v.x+v.y; }
|
||||
__forceinline float reduce_mul(const Vec2fa& v) { return v.x*v.y; }
|
||||
__forceinline float reduce_min(const Vec2fa& v) { return sycl::fmin(v.x,v.y); }
|
||||
__forceinline float reduce_max(const Vec2fa& v) { return sycl::fmax(v.x,v.y); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec2fa& a, const Vec2fa& b ) { return a.x == b.x && a.y == b.y; }
|
||||
__forceinline bool operator !=( const Vec2fa& a, const Vec2fa& b ) { return a.x != b.x || a.y != b.y; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float dot ( const Vec2fa& a, const Vec2fa& b ) {
|
||||
return reduce_add(a*b);
|
||||
}
|
||||
|
||||
__forceinline Vec2fa cross ( const Vec2fa& a ) {
|
||||
return Vec2fa(-a.y,a.x);
|
||||
}
|
||||
|
||||
__forceinline float sqr_length ( const Vec2fa& a ) { return dot(a,a); }
|
||||
__forceinline float rcp_length ( const Vec2fa& a ) { return rsqrt(dot(a,a)); }
|
||||
__forceinline float rcp_length2( const Vec2fa& a ) { return rcp(dot(a,a)); }
|
||||
__forceinline float length ( const Vec2fa& a ) { return sqrt(dot(a,a)); }
|
||||
__forceinline Vec2fa normalize( const Vec2fa& a ) { return a*rsqrt(dot(a,a)); }
|
||||
__forceinline float distance ( const Vec2fa& a, const Vec2fa& b ) { return length(a-b); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa select( bool s, const Vec2fa& t, const Vec2fa& f ) {
|
||||
return Vec2fa(s ? t.x : f.x, s ? t.y : f.y);
|
||||
}
|
||||
|
||||
__forceinline Vec2fa lerp(const Vec2fa& v0, const Vec2fa& v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
}
|
||||
|
||||
__forceinline int maxDim ( const Vec2fa& a )
|
||||
{
|
||||
const Vec2fa b = abs(a);
|
||||
if (b.x > b.y) return 0;
|
||||
else return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Rounding Functions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec2fa trunc( const Vec2fa& a ) { return Vec2fa(sycl::trunc(a.x),sycl::trunc(a.y)); }
|
||||
__forceinline Vec2fa floor( const Vec2fa& a ) { return Vec2fa(sycl::floor(a.x),sycl::floor(a.y)); }
|
||||
__forceinline Vec2fa ceil ( const Vec2fa& a ) { return Vec2fa(sycl::ceil (a.x),sycl::ceil (a.y)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline embree_ostream operator<<(embree_ostream cout, const Vec2fa& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ")";
|
||||
}
|
||||
|
||||
/*template<>
|
||||
__forceinline vfloat_impl<4>::vfloat_impl(const Vec2fa& a)
|
||||
{
|
||||
v = 0;
|
||||
const unsigned int lid = get_sub_group_local_id();
|
||||
if (lid == 0) v = a.x;
|
||||
if (lid == 1) v = a.y;
|
||||
}*/
|
||||
|
||||
typedef Vec2fa Vec2fa_t;
|
||||
}
|
||||
+22
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
@@ -286,6 +286,8 @@ namespace embree
|
||||
|
||||
template<> __forceinline Vec3<float>::Vec3(const Vec3fa& a) { x = a.x; y = a.y; z = a.z; }
|
||||
|
||||
#if !defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec3<vfloat4>::Vec3(const Vec3fa& a) {
|
||||
x = a.x; y = a.y; z = a.z;
|
||||
@@ -333,4 +335,23 @@ namespace embree
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec3<vfloat16>::Vec3(const Vec3fa& a) : x(a.x), y(a.y), z(a.z) {}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__SSE__)
|
||||
template<> __forceinline Vec3<vfloat4>::Vec3(const Vec3fa& a) {
|
||||
x = a.x; y = a.y; z = a.z;
|
||||
}
|
||||
#endif
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec3<vfloat8>::Vec3(const Vec3fa& a) {
|
||||
x = a.x; y = a.y; z = a.z;
|
||||
}
|
||||
#endif
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec3<vfloat16>::Vec3(const Vec3fa& a) {
|
||||
x = a.x; y = a.y; z = a.z;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "vec3ba_sycl.h"
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -118,3 +123,5 @@ namespace embree
|
||||
return cout << "(" << (a.x ? "1" : "0") << ", " << (a.y ? "1" : "0") << ", " << (a.z ? "1" : "0") << ")";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "emath.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3ba Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3ba
|
||||
{
|
||||
//ALIGNED_STRUCT_(16);
|
||||
|
||||
struct { bool x,y,z; };
|
||||
|
||||
typedef bool Scalar;
|
||||
enum { N = 3 };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba( ) {}
|
||||
//__forceinline Vec3ba( const __m128 input ) : m128(input) {}
|
||||
|
||||
__forceinline Vec3ba( const Vec3ba& other ) : x(other.x), y(other.y), z(other.z) {}
|
||||
__forceinline Vec3ba& operator =(const Vec3ba& other) { x = other.x; y = other.y; z = other.z; return *this; }
|
||||
|
||||
__forceinline explicit Vec3ba( bool a ) : x(a), y(a), z(a) {}
|
||||
__forceinline Vec3ba( bool a, bool b, bool c) : x(a), y(b), z(c) {}
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba( FalseTy ) : x(false), y(false), z(false) {}
|
||||
__forceinline Vec3ba( TrueTy ) : x(true), y(true), z(true) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//__forceinline const int& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
//__forceinline int& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba operator !( const Vec3ba& a ) { return Vec3ba(!a.x,!a.y,!a.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba operator &( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x & b.x, a.y & b.y, a.z & b.z); }
|
||||
__forceinline Vec3ba operator |( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x | b.x, a.y | b.y, a.z | b.z); }
|
||||
__forceinline Vec3ba operator ^( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba& operator &=( Vec3ba& a, const Vec3ba& b ) { return a = a & b; }
|
||||
__forceinline Vec3ba& operator |=( Vec3ba& a, const Vec3ba& b ) { return a = a | b; }
|
||||
__forceinline Vec3ba& operator ^=( Vec3ba& a, const Vec3ba& b ) { return a = a ^ b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators + Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3ba& a, const Vec3ba& b ) {
|
||||
return a.x == b.x && a.y == b.y && a.z == b.z;
|
||||
}
|
||||
__forceinline bool operator !=( const Vec3ba& a, const Vec3ba& b ) {
|
||||
return a.x != b.x || a.y != b.y || a.z != b.z;
|
||||
}
|
||||
/*
|
||||
__forceinline bool operator < ( const Vec3ba& a, const Vec3ba& b ) {
|
||||
if (a.x != b.x) return a.x < b.x;
|
||||
if (a.y != b.y) return a.y < b.y;
|
||||
if (a.z != b.z) return a.z < b.z;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reduction Operations
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool reduce_and( const Vec3ba& a ) { return a.x & a.y & a.z; }
|
||||
__forceinline bool reduce_or ( const Vec3ba& a ) { return a.x | a.y | a.z; }
|
||||
|
||||
__forceinline bool all ( const Vec3ba& b ) { return reduce_and(b); }
|
||||
__forceinline bool any ( const Vec3ba& b ) { return reduce_or(b); }
|
||||
__forceinline bool none ( const Vec3ba& b ) { return !reduce_or(b); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline embree_ostream operator<<(embree_ostream cout, const Vec3ba& a) {
|
||||
return cout;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "vec3fa_sycl.h"
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -441,7 +446,6 @@ namespace embree
|
||||
//__forceinline Vec3fx& operator =( const Vec3<float>& other ) { m128 = _mm_set_ps(0, other.z, other.y, other.x); return *this; }
|
||||
|
||||
__forceinline Vec3fx ( const Vec3fx& other ) { m128 = other.m128; }
|
||||
|
||||
__forceinline Vec3fx& operator =( const Vec3fx& other ) { m128 = other.m128; return *this; }
|
||||
|
||||
__forceinline explicit Vec3fx( const float a ) : m128(_mm_set1_ps(a)) {}
|
||||
@@ -783,3 +787,5 @@ namespace embree
|
||||
|
||||
typedef Vec3fx Vec3ff;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,617 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "emath.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3fa Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3fa
|
||||
{
|
||||
//ALIGNED_STRUCT_(16);
|
||||
|
||||
typedef float Scalar;
|
||||
enum { N = 3 };
|
||||
struct { float x,y,z, do_not_use; };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa( ) {}
|
||||
//__forceinline Vec3fa( const __m128 a ) : m128(a) {}
|
||||
//__forceinline explicit Vec3fa(const vfloat4& a) : x(a[0]), y(a[1]), z(a[2]) {}
|
||||
|
||||
__forceinline Vec3fa ( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; }
|
||||
//__forceinline Vec3fa& operator =( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; return *this; }
|
||||
|
||||
__forceinline Vec3fa ( const Vec3fa& other ) { x = other.x; y = other.y; z = other.z; }
|
||||
__forceinline Vec3fa& operator =( const Vec3fa& other ) { x = other.x; y = other.y; z = other.z; return *this; }
|
||||
|
||||
__forceinline explicit Vec3fa( const float a ) : x(a), y(a), z(a) {}
|
||||
__forceinline Vec3fa( const float x, const float y, const float z) : x(x), y(y), z(z) {}
|
||||
|
||||
__forceinline explicit Vec3fa( const Vec3ia& a ) : x((float)a.x), y((float)a.y), z((float)a.z) {}
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
__forceinline operator vfloat4() const { return vfloat4(x,y,z,0.0f); } // FIXME: we should not need this!!
|
||||
|
||||
//friend __forceinline Vec3fa copy_a( const Vec3fa& a, const Vec3fa& b ) { Vec3fa c = a; c.a = b.a; return c; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Loads and Stores
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static __forceinline Vec3fa load( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec3fa(ptr[0],ptr[1],ptr[2]);
|
||||
}
|
||||
|
||||
static __forceinline Vec3fa loadu( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec3fa(ptr[0],ptr[1],ptr[2]);
|
||||
}
|
||||
|
||||
static __forceinline void storeu ( void* a, const Vec3fa& v ) {
|
||||
float* ptr = (float*)a;
|
||||
ptr[0] = v.x; ptr[1] = v.y; ptr[2] = v.z;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa( ZeroTy ) : x(0.0f), y(0.0f), z(0.0f) {}
|
||||
__forceinline Vec3fa( OneTy ) : x(1.0f), y(1.0f), z(1.0f) {}
|
||||
__forceinline Vec3fa( PosInfTy ) : x(+INFINITY), y(+INFINITY), z(+INFINITY) {}
|
||||
__forceinline Vec3fa( NegInfTy ) : x(-INFINITY), y(-INFINITY), z(-INFINITY) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const float& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
__forceinline float& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa operator +( const Vec3fa& a ) { return a; }
|
||||
__forceinline Vec3fa operator -( const Vec3fa& a ) { return Vec3fa(-a.x,-a.y,-a.z); }
|
||||
__forceinline Vec3fa abs ( const Vec3fa& a ) { return Vec3fa(sycl::fabs(a.x),sycl::fabs(a.y),sycl::fabs(a.z)); }
|
||||
__forceinline Vec3fa sign ( const Vec3fa& a ) { return Vec3fa(sycl::sign(a.x),sycl::sign(a.y),sycl::sign(a.z)); }
|
||||
|
||||
//__forceinline Vec3fa rcp ( const Vec3fa& a ) { return Vec3fa(sycl::recip(a.x),sycl::recip(a.y),sycl::recip(a.z)); }
|
||||
__forceinline Vec3fa rcp ( const Vec3fa& a ) { return Vec3fa(sycl::native::recip(a.x),sycl::native::recip(a.y),sycl::native::recip(a.z)); }
|
||||
__forceinline Vec3fa sqrt ( const Vec3fa& a ) { return Vec3fa(sycl::sqrt(a.x),sycl::sqrt(a.y),sycl::sqrt(a.z)); }
|
||||
__forceinline Vec3fa sqr ( const Vec3fa& a ) { return Vec3fa(a.x*a.x,a.y*a.y,a.z*a.z); }
|
||||
|
||||
__forceinline Vec3fa rsqrt( const Vec3fa& a ) { return Vec3fa(sycl::rsqrt(a.x),sycl::rsqrt(a.y),sycl::rsqrt(a.z)); }
|
||||
|
||||
__forceinline Vec3fa zero_fix(const Vec3fa& a) {
|
||||
const float x = sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
|
||||
const float y = sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
|
||||
const float z = sycl::fabs(a.z) < min_rcp_input ? min_rcp_input : a.z;
|
||||
return Vec3fa(x,y,z);
|
||||
}
|
||||
__forceinline Vec3fa rcp_safe(const Vec3fa& a) {
|
||||
return rcp(zero_fix(a));
|
||||
}
|
||||
__forceinline Vec3fa log ( const Vec3fa& a ) {
|
||||
return Vec3fa(sycl::log(a.x),sycl::log(a.y),sycl::log(a.z));
|
||||
}
|
||||
|
||||
__forceinline Vec3fa exp ( const Vec3fa& a ) {
|
||||
return Vec3fa(sycl::exp(a.x),sycl::exp(a.y),sycl::exp(a.z));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa operator +( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x+b.x, a.y+b.y, a.z+b.z); }
|
||||
__forceinline Vec3fa operator -( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x-b.x, a.y-b.y, a.z-b.z); }
|
||||
__forceinline Vec3fa operator *( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x*b.x, a.y*b.y, a.z*b.z); }
|
||||
__forceinline Vec3fa operator *( const Vec3fa& a, const float b ) { return a * Vec3fa(b); }
|
||||
__forceinline Vec3fa operator *( const float a, const Vec3fa& b ) { return Vec3fa(a) * b; }
|
||||
__forceinline Vec3fa operator /( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x/b.x, a.y/b.y, a.z/b.z); }
|
||||
__forceinline Vec3fa operator /( const Vec3fa& a, const float b ) { return Vec3fa(a.x/b, a.y/b, a.z/b); }
|
||||
__forceinline Vec3fa operator /( const float a, const Vec3fa& b ) { return Vec3fa(a/b.x, a/b.y, a/b.z); }
|
||||
|
||||
__forceinline Vec3fa min( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return Vec3fa(sycl::fmin(a.x,b.x), sycl::fmin(a.y,b.y), sycl::fmin(a.z,b.z));
|
||||
}
|
||||
__forceinline Vec3fa max( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return Vec3fa(sycl::fmax(a.x,b.x), sycl::fmax(a.y,b.y), sycl::fmax(a.z,b.z));
|
||||
}
|
||||
|
||||
/*
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fa mini(const Vec3fa& a, const Vec3fa& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fa maxi(const Vec3fa& a, const Vec3fa& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
__forceinline Vec3fa pow ( const Vec3fa& a, const float& b ) {
|
||||
return Vec3fa(powf(a.x,b),powf(a.y,b),powf(a.z,b));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Ternary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa madd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y), madd(a.z,b.z,c.z)); }
|
||||
__forceinline Vec3fa msub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y), msub(a.z,b.z,c.z)); }
|
||||
__forceinline Vec3fa nmadd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y), nmadd(a.z,b.z,c.z)); }
|
||||
__forceinline Vec3fa nmsub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y), nmsub(a.z,b.z,c.z)); }
|
||||
|
||||
__forceinline Vec3fa madd ( const float a, const Vec3fa& b, const Vec3fa& c) { return madd(Vec3fa(a),b,c); }
|
||||
__forceinline Vec3fa msub ( const float a, const Vec3fa& b, const Vec3fa& c) { return msub(Vec3fa(a),b,c); }
|
||||
__forceinline Vec3fa nmadd ( const float a, const Vec3fa& b, const Vec3fa& c) { return nmadd(Vec3fa(a),b,c); }
|
||||
__forceinline Vec3fa nmsub ( const float a, const Vec3fa& b, const Vec3fa& c) { return nmsub(Vec3fa(a),b,c); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa& operator +=( Vec3fa& a, const Vec3fa& b ) { return a = a + b; }
|
||||
__forceinline Vec3fa& operator -=( Vec3fa& a, const Vec3fa& b ) { return a = a - b; }
|
||||
__forceinline Vec3fa& operator *=( Vec3fa& a, const Vec3fa& b ) { return a = a * b; }
|
||||
__forceinline Vec3fa& operator *=( Vec3fa& a, const float b ) { return a = a * b; }
|
||||
__forceinline Vec3fa& operator /=( Vec3fa& a, const Vec3fa& b ) { return a = a / b; }
|
||||
__forceinline Vec3fa& operator /=( Vec3fa& a, const float b ) { return a = a / b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float reduce_add(const Vec3fa& v) { return v.x+v.y+v.z; }
|
||||
__forceinline float reduce_mul(const Vec3fa& v) { return v.x*v.y*v.z; }
|
||||
__forceinline float reduce_min(const Vec3fa& v) { return sycl::fmin(sycl::fmin(v.x,v.y),v.z); }
|
||||
__forceinline float reduce_max(const Vec3fa& v) { return sycl::fmax(sycl::fmax(v.x,v.y),v.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3fa& a, const Vec3fa& b ) { return a.x == b.x && a.y == b.y && a.z == b.z; }
|
||||
__forceinline bool operator !=( const Vec3fa& a, const Vec3fa& b ) { return a.x != b.x || a.y != b.y || a.z != b.z; }
|
||||
|
||||
__forceinline Vec3ba eq_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
|
||||
__forceinline Vec3ba neq_mask(const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
|
||||
__forceinline Vec3ba lt_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
|
||||
__forceinline Vec3ba le_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x <= b.x, a.y <= b.y, a.z <= b.z); }
|
||||
__forceinline Vec3ba gt_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
|
||||
__forceinline Vec3ba ge_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x >= b.x, a.y >= b.y, a.z >= b.z); }
|
||||
|
||||
__forceinline bool isvalid ( const Vec3fa& v ) {
|
||||
return all(gt_mask(v,Vec3fa(-FLT_LARGE)) & lt_mask(v,Vec3fa(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
__forceinline bool is_finite ( const Vec3fa& a ) {
|
||||
return all(ge_mask(a,Vec3fa(-FLT_MAX)) & le_mask(a,Vec3fa(+FLT_MAX)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float dot ( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return reduce_add(a*b);
|
||||
}
|
||||
|
||||
__forceinline Vec3fa cross ( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return Vec3fa(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x));
|
||||
}
|
||||
|
||||
__forceinline float sqr_length ( const Vec3fa& a ) { return dot(a,a); }
|
||||
__forceinline float rcp_length ( const Vec3fa& a ) { return rsqrt(dot(a,a)); }
|
||||
__forceinline float rcp_length2( const Vec3fa& a ) { return rcp(dot(a,a)); }
|
||||
__forceinline float length ( const Vec3fa& a ) { return sqrt(dot(a,a)); }
|
||||
__forceinline Vec3fa normalize( const Vec3fa& a ) { return a*rsqrt(dot(a,a)); }
|
||||
__forceinline float distance ( const Vec3fa& a, const Vec3fa& b ) { return length(a-b); }
|
||||
__forceinline float halfArea ( const Vec3fa& d ) { return madd(d.x,(d.y+d.z),d.y*d.z); }
|
||||
__forceinline float area ( const Vec3fa& d ) { return 2.0f*halfArea(d); }
|
||||
|
||||
__forceinline Vec3fa normalize_safe( const Vec3fa& a ) {
|
||||
const float d = dot(a,a); if (unlikely(d == 0.0f)) return a; else return a*rsqrt(d);
|
||||
}
|
||||
|
||||
/*! differentiated normalization */
|
||||
__forceinline Vec3fa dnormalize(const Vec3fa& p, const Vec3fa& dp)
|
||||
{
|
||||
const float pp = dot(p,p);
|
||||
const float pdp = dot(p,dp);
|
||||
return (pp*dp-pdp*p)*rcp(pp)*rsqrt(pp);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa select( bool s, const Vec3fa& t, const Vec3fa& f ) {
|
||||
return Vec3fa(s ? t.x : f.x, s ? t.y : f.y, s ? t.z : f.z);
|
||||
}
|
||||
|
||||
__forceinline Vec3fa select( const Vec3ba& s, const Vec3fa& t, const Vec3fa& f ) {
|
||||
return Vec3fa(s.x ? t.x : f.x, s.y ? t.y : f.y, s.z ? t.z : f.z);
|
||||
}
|
||||
|
||||
__forceinline Vec3fa lerp(const Vec3fa& v0, const Vec3fa& v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
}
|
||||
|
||||
__forceinline int maxDim ( const Vec3fa& a )
|
||||
{
|
||||
const Vec3fa b = abs(a);
|
||||
if (b.x > b.y) {
|
||||
if (b.x > b.z) return 0; else return 2;
|
||||
} else {
|
||||
if (b.y > b.z) return 1; else return 2;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Rounding Functions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa trunc( const Vec3fa& a ) { return Vec3fa(sycl::trunc(a.x),sycl::trunc(a.y),sycl::trunc(a.z)); }
|
||||
__forceinline Vec3fa floor( const Vec3fa& a ) { return Vec3fa(sycl::floor(a.x),sycl::floor(a.y),sycl::floor(a.z)); }
|
||||
__forceinline Vec3fa ceil ( const Vec3fa& a ) { return Vec3fa(sycl::ceil (a.x),sycl::ceil (a.y),sycl::ceil (a.z)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline embree_ostream operator<<(embree_ostream cout, const Vec3fa& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
|
||||
}
|
||||
|
||||
__forceinline Vec2fa::Vec2fa(const Vec3fa& a)
|
||||
: x(a.x), y(a.y) {}
|
||||
|
||||
__forceinline Vec3ia::Vec3ia( const Vec3fa& a )
|
||||
: x((int)a.x), y((int)a.y), z((int)a.z) {}
|
||||
|
||||
typedef Vec3fa Vec3fa_t;
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3fx Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3fx
|
||||
{
|
||||
//ALIGNED_STRUCT_(16);
|
||||
|
||||
typedef float Scalar;
|
||||
enum { N = 3 };
|
||||
struct { float x,y,z; union { int a; unsigned u; float w; }; };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx( ) {}
|
||||
//__forceinline Vec3fx( const __m128 a ) : m128(a) {}
|
||||
__forceinline explicit Vec3fx(const vfloat4& a) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) {}
|
||||
|
||||
__forceinline explicit Vec3fx(const Vec3fa& v) : x(v.x), y(v.y), z(v.z), w(0.0f) {}
|
||||
__forceinline operator Vec3fa() const { return Vec3fa(x,y,z); }
|
||||
|
||||
__forceinline explicit Vec3fx ( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; }
|
||||
//__forceinline Vec3fx& operator =( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; return *this; }
|
||||
|
||||
//__forceinline Vec3fx ( const Vec3fx& other ) { *(sycl::float4*)this = *(const sycl::float4*)&other; }
|
||||
//__forceinline Vec3fx& operator =( const Vec3fx& other ) { *(sycl::float4*)this = *(const sycl::float4*)&other; return *this; }
|
||||
|
||||
__forceinline explicit Vec3fx( const float a ) : x(a), y(a), z(a), w(a) {}
|
||||
__forceinline Vec3fx( const float x, const float y, const float z) : x(x), y(y), z(z), w(z) {}
|
||||
|
||||
__forceinline Vec3fx( const Vec3fa& other, const int a1) : x(other.x), y(other.y), z(other.z), a(a1) {}
|
||||
__forceinline Vec3fx( const Vec3fa& other, const unsigned a1) : x(other.x), y(other.y), z(other.z), u(a1) {}
|
||||
__forceinline Vec3fx( const Vec3fa& other, const float w1) : x(other.x), y(other.y), z(other.z), w(w1) {}
|
||||
|
||||
//__forceinline Vec3fx( const float x, const float y, const float z, const int a) : x(x), y(y), z(z), a(a) {} // not working properly!
|
||||
//__forceinline Vec3fx( const float x, const float y, const float z, const unsigned a) : x(x), y(y), z(z), u(a) {} // not working properly!
|
||||
__forceinline Vec3fx( const float x, const float y, const float z, const float w) : x(x), y(y), z(z), w(w) {}
|
||||
|
||||
__forceinline explicit Vec3fx( const Vec3ia& a ) : x((float)a.x), y((float)a.y), z((float)a.z), w(0.0f) {}
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
__forceinline operator vfloat4() const { return vfloat4(x,y,z,w); }
|
||||
|
||||
//friend __forceinline Vec3fx copy_a( const Vec3fx& a, const Vec3fx& b ) { Vec3fx c = a; c.a = b.a; return c; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Loads and Stores
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static __forceinline Vec3fx load( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec3fx(ptr[0],ptr[1],ptr[2],ptr[3]);
|
||||
}
|
||||
|
||||
static __forceinline Vec3fx loadu( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec3fx(ptr[0],ptr[1],ptr[2],ptr[3]);
|
||||
}
|
||||
|
||||
static __forceinline void storeu ( void* a, const Vec3fx& v ) {
|
||||
float* ptr = (float*)a;
|
||||
ptr[0] = v.x; ptr[1] = v.y; ptr[2] = v.z; ptr[3] = v.w;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx( ZeroTy ) : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
|
||||
__forceinline Vec3fx( OneTy ) : x(1.0f), y(1.0f), z(1.0f), w(1.0f) {}
|
||||
__forceinline Vec3fx( PosInfTy ) : x(+INFINITY), y(+INFINITY), z(+INFINITY), w(+INFINITY) {}
|
||||
__forceinline Vec3fx( NegInfTy ) : x(-INFINITY), y(-INFINITY), z(-INFINITY), w(-INFINITY) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const float& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
__forceinline float& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx operator +( const Vec3fx& a ) { return a; }
|
||||
__forceinline Vec3fx operator -( const Vec3fx& a ) { return Vec3fx(-a.x,-a.y,-a.z,-a.w); }
|
||||
__forceinline Vec3fx abs ( const Vec3fx& a ) { return Vec3fx(sycl::fabs(a.x),sycl::fabs(a.y),sycl::fabs(a.z),sycl::fabs(a.w)); }
|
||||
__forceinline Vec3fx sign ( const Vec3fx& a ) { return Vec3fx(sycl::sign(a.x),sycl::sign(a.y),sycl::sign(a.z),sycl::sign(a.z)); }
|
||||
|
||||
//__forceinline Vec3fx rcp ( const Vec3fx& a ) { return Vec3fx(sycl::recip(a.x),sycl::recip(a.y),sycl::recip(a.z)); }
|
||||
__forceinline Vec3fx rcp ( const Vec3fx& a ) { return Vec3fx(sycl::native::recip(a.x),sycl::native::recip(a.y),sycl::native::recip(a.z),sycl::native::recip(a.w)); }
|
||||
__forceinline Vec3fx sqrt ( const Vec3fx& a ) { return Vec3fx(sycl::sqrt(a.x),sycl::sqrt(a.y),sycl::sqrt(a.z),sycl::sqrt(a.w)); }
|
||||
__forceinline Vec3fx sqr ( const Vec3fx& a ) { return Vec3fx(a.x*a.x,a.y*a.y,a.z*a.z,a.w*a.w); }
|
||||
|
||||
__forceinline Vec3fx rsqrt( const Vec3fx& a ) { return Vec3fx(sycl::rsqrt(a.x),sycl::rsqrt(a.y),sycl::rsqrt(a.z),sycl::rsqrt(a.w)); }
|
||||
|
||||
__forceinline Vec3fx zero_fix(const Vec3fx& a) {
|
||||
const float x = sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
|
||||
const float y = sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
|
||||
const float z = sycl::fabs(a.z) < min_rcp_input ? min_rcp_input : a.z;
|
||||
return Vec3fx(x,y,z);
|
||||
}
|
||||
__forceinline Vec3fx rcp_safe(const Vec3fx& a) {
|
||||
return rcp(zero_fix(a));
|
||||
}
|
||||
__forceinline Vec3fx log ( const Vec3fx& a ) {
|
||||
return Vec3fx(sycl::log(a.x),sycl::log(a.y),sycl::log(a.z));
|
||||
}
|
||||
|
||||
__forceinline Vec3fx exp ( const Vec3fx& a ) {
|
||||
return Vec3fx(sycl::exp(a.x),sycl::exp(a.y),sycl::exp(a.z));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx operator +( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w); }
|
||||
__forceinline Vec3fx operator -( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x-b.x, a.y-b.y, a.z-b.z, a.w-b.w); }
|
||||
__forceinline Vec3fx operator *( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w); }
|
||||
__forceinline Vec3fx operator *( const Vec3fx& a, const float b ) { return a * Vec3fx(b); }
|
||||
__forceinline Vec3fx operator *( const float a, const Vec3fx& b ) { return Vec3fx(a) * b; }
|
||||
__forceinline Vec3fx operator /( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x/b.x, a.y/b.y, a.z/b.z, a.w/b.w); }
|
||||
__forceinline Vec3fx operator /( const Vec3fx& a, const float b ) { return Vec3fx(a.x/b, a.y/b, a.z/b, a.w/b); }
|
||||
__forceinline Vec3fx operator /( const float a, const Vec3fx& b ) { return Vec3fx(a/b.x, a/b.y, a/b.z, a/b.w); }
|
||||
|
||||
__forceinline Vec3fx min( const Vec3fx& a, const Vec3fx& b ) {
|
||||
return Vec3fx(sycl::fmin(a.x,b.x), sycl::fmin(a.y,b.y), sycl::fmin(a.z,b.z), sycl::fmin(a.w,b.w));
|
||||
}
|
||||
__forceinline Vec3fx max( const Vec3fx& a, const Vec3fx& b ) {
|
||||
return Vec3fx(sycl::fmax(a.x,b.x), sycl::fmax(a.y,b.y), sycl::fmax(a.z,b.z), sycl::fmax(a.w,b.w));
|
||||
}
|
||||
|
||||
/*
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fx mini(const Vec3fx& a, const Vec3fx& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fx maxi(const Vec3fx& a, const Vec3fx& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
__forceinline Vec3fx pow ( const Vec3fx& a, const float& b ) {
|
||||
return Vec3fx(powf(a.x,b),powf(a.y,b),powf(a.z,b));
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Ternary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx madd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y), madd(a.z,b.z,c.z), madd(a.w,b.w,c.w)); }
|
||||
__forceinline Vec3fx msub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y), msub(a.z,b.z,c.z), msub(a.w,b.w,c.w)); }
|
||||
__forceinline Vec3fx nmadd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y), nmadd(a.z,b.z,c.z), nmadd(a.w,b.w,c.w)); }
|
||||
__forceinline Vec3fx nmsub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y), nmsub(a.z,b.z,c.z), nmsub(a.w,b.w,c.w)); }
|
||||
|
||||
__forceinline Vec3fx madd ( const float a, const Vec3fx& b, const Vec3fx& c) { return madd(Vec3fx(a),b,c); }
|
||||
__forceinline Vec3fx msub ( const float a, const Vec3fx& b, const Vec3fx& c) { return msub(Vec3fx(a),b,c); }
|
||||
__forceinline Vec3fx nmadd ( const float a, const Vec3fx& b, const Vec3fx& c) { return nmadd(Vec3fx(a),b,c); }
|
||||
__forceinline Vec3fx nmsub ( const float a, const Vec3fx& b, const Vec3fx& c) { return nmsub(Vec3fx(a),b,c); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx& operator +=( Vec3fx& a, const Vec3fx& b ) { return a = a + b; }
|
||||
__forceinline Vec3fx& operator -=( Vec3fx& a, const Vec3fx& b ) { return a = a - b; }
|
||||
__forceinline Vec3fx& operator *=( Vec3fx& a, const Vec3fx& b ) { return a = a * b; }
|
||||
__forceinline Vec3fx& operator *=( Vec3fx& a, const float b ) { return a = a * b; }
|
||||
__forceinline Vec3fx& operator /=( Vec3fx& a, const Vec3fx& b ) { return a = a / b; }
|
||||
__forceinline Vec3fx& operator /=( Vec3fx& a, const float b ) { return a = a / b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float reduce_add(const Vec3fx& v) { return v.x+v.y+v.z; }
|
||||
__forceinline float reduce_mul(const Vec3fx& v) { return v.x*v.y*v.z; }
|
||||
__forceinline float reduce_min(const Vec3fx& v) { return sycl::fmin(sycl::fmin(v.x,v.y),v.z); }
|
||||
__forceinline float reduce_max(const Vec3fx& v) { return sycl::fmax(sycl::fmax(v.x,v.y),v.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3fx& a, const Vec3fx& b ) { return a.x == b.x && a.y == b.y && a.z == b.z; }
|
||||
__forceinline bool operator !=( const Vec3fx& a, const Vec3fx& b ) { return a.x != b.x || a.y != b.y || a.z != b.z; }
|
||||
|
||||
__forceinline Vec3ba eq_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
|
||||
__forceinline Vec3ba neq_mask(const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
|
||||
__forceinline Vec3ba lt_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
|
||||
__forceinline Vec3ba le_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x <= b.x, a.y <= b.y, a.z <= b.z); }
|
||||
__forceinline Vec3ba gt_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
|
||||
__forceinline Vec3ba ge_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x >= b.x, a.y >= b.y, a.z >= b.z); }
|
||||
|
||||
__forceinline bool isvalid ( const Vec3fx& v ) {
|
||||
return all(gt_mask(v,Vec3fx(-FLT_LARGE)) & lt_mask(v,Vec3fx(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
__forceinline bool is_finite ( const Vec3fx& a ) {
|
||||
return all(ge_mask(a,Vec3fx(-FLT_MAX)) & le_mask(a,Vec3fx(+FLT_MAX)));
|
||||
}
|
||||
|
||||
__forceinline bool isvalid4 ( const Vec3fx& v ) {
|
||||
const bool valid_x = v.x >= -FLT_LARGE & v.x <= +FLT_LARGE;
|
||||
const bool valid_y = v.y >= -FLT_LARGE & v.y <= +FLT_LARGE;
|
||||
const bool valid_z = v.z >= -FLT_LARGE & v.z <= +FLT_LARGE;
|
||||
const bool valid_w = v.w >= -FLT_LARGE & v.w <= +FLT_LARGE;
|
||||
return valid_x & valid_y & valid_z & valid_w;
|
||||
}
|
||||
|
||||
__forceinline bool is_finite4 ( const Vec3fx& v ) {
|
||||
const bool finite_x = v.x >= -FLT_MAX & v.x <= +FLT_MAX;
|
||||
const bool finite_y = v.y >= -FLT_MAX & v.y <= +FLT_MAX;
|
||||
const bool finite_z = v.z >= -FLT_MAX & v.z <= +FLT_MAX;
|
||||
const bool finite_w = v.w >= -FLT_MAX & v.w <= +FLT_MAX;
|
||||
return finite_x & finite_y & finite_z & finite_w;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float dot ( const Vec3fx& a, const Vec3fx& b ) {
|
||||
return reduce_add(a*b);
|
||||
}
|
||||
|
||||
__forceinline Vec3fx cross ( const Vec3fx& a, const Vec3fx& b ) {
|
||||
return Vec3fx(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x));
|
||||
}
|
||||
|
||||
__forceinline float sqr_length ( const Vec3fx& a ) { return dot(a,a); }
|
||||
__forceinline float rcp_length ( const Vec3fx& a ) { return rsqrt(dot(a,a)); }
|
||||
__forceinline float rcp_length2( const Vec3fx& a ) { return rcp(dot(a,a)); }
|
||||
__forceinline float length ( const Vec3fx& a ) { return sqrt(dot(a,a)); }
|
||||
__forceinline Vec3fx normalize( const Vec3fx& a ) { return a*rsqrt(dot(a,a)); }
|
||||
__forceinline float distance ( const Vec3fx& a, const Vec3fx& b ) { return length(a-b); }
|
||||
__forceinline float halfArea ( const Vec3fx& d ) { return madd(d.x,(d.y+d.z),d.y*d.z); }
|
||||
__forceinline float area ( const Vec3fx& d ) { return 2.0f*halfArea(d); }
|
||||
|
||||
__forceinline Vec3fx normalize_safe( const Vec3fx& a ) {
|
||||
const float d = dot(a,a); if (unlikely(d == 0.0f)) return a; else return a*rsqrt(d);
|
||||
}
|
||||
|
||||
/*! differentiated normalization */
|
||||
__forceinline Vec3fx dnormalize(const Vec3fx& p, const Vec3fx& dp)
|
||||
{
|
||||
const float pp = dot(p,p);
|
||||
const float pdp = dot(p,dp);
|
||||
return (pp*dp-pdp*p)*rcp(pp)*rsqrt(pp);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx select( bool s, const Vec3fx& t, const Vec3fx& f ) {
|
||||
return Vec3fx(s ? t.x : f.x, s ? t.y : f.y, s ? t.z : f.z, s ? t.w : f.w);
|
||||
}
|
||||
|
||||
__forceinline Vec3fx select( const Vec3ba& s, const Vec3fx& t, const Vec3fx& f ) {
|
||||
return Vec3fx(s.x ? t.x : f.x, s.y ? t.y : f.y, s.z ? t.z : f.z);
|
||||
}
|
||||
|
||||
__forceinline Vec3fx lerp(const Vec3fx& v0, const Vec3fx& v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
}
|
||||
|
||||
__forceinline int maxDim ( const Vec3fx& a )
|
||||
{
|
||||
const Vec3fx b = abs(a);
|
||||
if (b.x > b.y) {
|
||||
if (b.x > b.z) return 0; else return 2;
|
||||
} else {
|
||||
if (b.y > b.z) return 1; else return 2;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Rounding Functions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx trunc( const Vec3fx& a ) { return Vec3fx(sycl::trunc(a.x),sycl::trunc(a.y),sycl::trunc(a.z),sycl::trunc(a.w)); }
|
||||
__forceinline Vec3fx floor( const Vec3fx& a ) { return Vec3fx(sycl::floor(a.x),sycl::floor(a.y),sycl::floor(a.z),sycl::floor(a.w)); }
|
||||
__forceinline Vec3fx ceil ( const Vec3fx& a ) { return Vec3fx(sycl::ceil (a.x),sycl::ceil (a.y),sycl::ceil (a.z),sycl::ceil (a.w)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline embree_ostream operator<<(embree_ostream cout, const Vec3fx& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << "," << a.w << ")";
|
||||
}
|
||||
|
||||
typedef Vec3fx Vec3ff;
|
||||
|
||||
//__forceinline Vec2fa::Vec2fa(const Vec3fx& a)
|
||||
// : x(a.x), y(a.y) {}
|
||||
|
||||
//__forceinline Vec3ia::Vec3ia( const Vec3fx& a )
|
||||
// : x((int)a.x), y((int)a.y), z((int)a.z) {}
|
||||
}
|
||||
@@ -4,7 +4,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "vec3ia_sycl.h"
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -194,3 +199,5 @@ namespace embree
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "emath.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3ia Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3ia
|
||||
{
|
||||
ALIGNED_STRUCT_(16);
|
||||
|
||||
struct { int x,y,z; };
|
||||
|
||||
typedef int Scalar;
|
||||
enum { N = 3 };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia( ) {}
|
||||
//__forceinline Vec3ia( const __m128i a ) : m128(a) {}
|
||||
|
||||
__forceinline Vec3ia( const Vec3ia& other ) : x(other.x), y(other.y), z(other.z) {}
|
||||
__forceinline Vec3ia& operator =(const Vec3ia& other) { x = other.x; y = other.y; z = other.z; return *this; }
|
||||
|
||||
__forceinline explicit Vec3ia( const int a ) : x(a), y(a), z(a) {}
|
||||
__forceinline Vec3ia( const int x, const int y, const int z) : x(x), y(y), z(z) {}
|
||||
//__forceinline explicit Vec3ia( const __m128 a ) : m128(_mm_cvtps_epi32(a)) {}
|
||||
__forceinline explicit Vec3ia(const vint4& a) : x(a[0]), y(a[1]), z(a[2]) {}
|
||||
|
||||
__forceinline explicit Vec3ia( const Vec3fa& a );
|
||||
|
||||
//__forceinline operator const __m128i&() const { return m128; }
|
||||
//__forceinline operator __m128i&() { return m128; }
|
||||
__forceinline operator vint4() const { return vint4(x,y,z,z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia( ZeroTy ) : x(0), y(0), z(0) {}
|
||||
__forceinline Vec3ia( OneTy ) : x(1), y(1), z(1) {}
|
||||
__forceinline Vec3ia( PosInfTy ) : x(0x7FFFFFFF), y(0x7FFFFFFF), z(0x7FFFFFFF) {}
|
||||
__forceinline Vec3ia( NegInfTy ) : x(0x80000000), y(0x80000000), z(0x80000000) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline const int& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
__forceinline int& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia operator +( const Vec3ia& a ) { return Vec3ia(+a.x,+a.y,+a.z); }
|
||||
__forceinline Vec3ia operator -( const Vec3ia& a ) { return Vec3ia(-a.x,-a.y,-a.z); }
|
||||
__forceinline Vec3ia abs ( const Vec3ia& a ) { return Vec3ia(sycl::abs(a.x),sycl::abs(a.y),sycl::abs(a.z)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia operator +( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x+b.x, a.y+b.y, a.z+b.z); }
|
||||
__forceinline Vec3ia operator +( const Vec3ia& a, const int b ) { return a+Vec3ia(b); }
|
||||
__forceinline Vec3ia operator +( const int a, const Vec3ia& b ) { return Vec3ia(a)+b; }
|
||||
|
||||
__forceinline Vec3ia operator -( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x-b.x, a.y-b.y, a.z-b.z); }
|
||||
__forceinline Vec3ia operator -( const Vec3ia& a, const int b ) { return a-Vec3ia(b); }
|
||||
__forceinline Vec3ia operator -( const int a, const Vec3ia& b ) { return Vec3ia(a)-b; }
|
||||
|
||||
__forceinline Vec3ia operator *( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x*b.x, a.y*b.y, a.z*b.z); }
|
||||
__forceinline Vec3ia operator *( const Vec3ia& a, const int b ) { return a * Vec3ia(b); }
|
||||
__forceinline Vec3ia operator *( const int a, const Vec3ia& b ) { return Vec3ia(a) * b; }
|
||||
|
||||
__forceinline Vec3ia operator &( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x&b.x, a.y&b.y, a.z&b.z); }
|
||||
__forceinline Vec3ia operator &( const Vec3ia& a, const int b ) { return a & Vec3ia(b); }
|
||||
__forceinline Vec3ia operator &( const int a, const Vec3ia& b ) { return Vec3ia(a) & b; }
|
||||
|
||||
__forceinline Vec3ia operator |( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x|b.x, a.y|b.y, a.z|b.z); }
|
||||
__forceinline Vec3ia operator |( const Vec3ia& a, const int b ) { return a | Vec3ia(b); }
|
||||
__forceinline Vec3ia operator |( const int a, const Vec3ia& b ) { return Vec3ia(a) | b; }
|
||||
|
||||
__forceinline Vec3ia operator ^( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x^b.x, a.y^b.y, a.z^b.z); }
|
||||
__forceinline Vec3ia operator ^( const Vec3ia& a, const int b ) { return a ^ Vec3ia(b); }
|
||||
__forceinline Vec3ia operator ^( const int a, const Vec3ia& b ) { return Vec3ia(a) ^ b; }
|
||||
|
||||
__forceinline Vec3ia operator <<( const Vec3ia& a, const int n ) { return Vec3ia(a.x<<n, a.y<<n, a.z<<n); }
|
||||
__forceinline Vec3ia operator >>( const Vec3ia& a, const int n ) { return Vec3ia(a.x>>n, a.y>>n, a.z>>n); }
|
||||
|
||||
__forceinline Vec3ia sll ( const Vec3ia& a, const int b ) { return Vec3ia(a.x<<b, a.y<<b, a.z<<b); }
|
||||
__forceinline Vec3ia sra ( const Vec3ia& a, const int b ) { return Vec3ia(a.x>>b, a.y>>b, a.z>>b); }
|
||||
__forceinline Vec3ia srl ( const Vec3ia& a, const int b ) { return Vec3ia(unsigned(a.x)>>b, unsigned(a.y)>>b, unsigned(a.z)>>b); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia& operator +=( Vec3ia& a, const Vec3ia& b ) { return a = a + b; }
|
||||
__forceinline Vec3ia& operator +=( Vec3ia& a, const int& b ) { return a = a + b; }
|
||||
|
||||
__forceinline Vec3ia& operator -=( Vec3ia& a, const Vec3ia& b ) { return a = a - b; }
|
||||
__forceinline Vec3ia& operator -=( Vec3ia& a, const int& b ) { return a = a - b; }
|
||||
|
||||
__forceinline Vec3ia& operator *=( Vec3ia& a, const Vec3ia& b ) { return a = a * b; }
|
||||
__forceinline Vec3ia& operator *=( Vec3ia& a, const int& b ) { return a = a * b; }
|
||||
|
||||
__forceinline Vec3ia& operator &=( Vec3ia& a, const Vec3ia& b ) { return a = a & b; }
|
||||
__forceinline Vec3ia& operator &=( Vec3ia& a, const int& b ) { return a = a & b; }
|
||||
|
||||
__forceinline Vec3ia& operator |=( Vec3ia& a, const Vec3ia& b ) { return a = a | b; }
|
||||
__forceinline Vec3ia& operator |=( Vec3ia& a, const int& b ) { return a = a | b; }
|
||||
|
||||
__forceinline Vec3ia& operator <<=( Vec3ia& a, const int& b ) { return a = a << b; }
|
||||
__forceinline Vec3ia& operator >>=( Vec3ia& a, const int& b ) { return a = a >> b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline int reduce_add(const Vec3ia& v) { return v.x+v.y+v.z; }
|
||||
__forceinline int reduce_mul(const Vec3ia& v) { return v.x*v.y*v.z; }
|
||||
__forceinline int reduce_min(const Vec3ia& v) { return sycl::min(sycl::min(v.x,v.y),v.z); }
|
||||
__forceinline int reduce_max(const Vec3ia& v) { return sycl::max(sycl::max(v.x,v.y),v.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3ia& a, const Vec3ia& b ) { return a.x == b.x & a.y == b.y & a.z == b.z; }
|
||||
__forceinline bool operator !=( const Vec3ia& a, const Vec3ia& b ) { return a.x != b.x & a.y != b.y & a.z != b.z; }
|
||||
|
||||
/*
|
||||
__forceinline bool operator < ( const Vec3ia& a, const Vec3ia& b ) {
|
||||
if (a.x != b.x) return a.x < b.x;
|
||||
if (a.y != b.y) return a.y < b.y;
|
||||
if (a.z != b.z) return a.z < b.z;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
__forceinline Vec3ba eq_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
|
||||
__forceinline Vec3ba lt_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
|
||||
__forceinline Vec3ba gt_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia select( const Vec3ba& m, const Vec3ia& t, const Vec3ia& f ) {
|
||||
const int x = m.x ? t.x : f.x;
|
||||
const int y = m.y ? t.y : f.y;
|
||||
const int z = m.z ? t.z : f.z;
|
||||
return Vec3ia(x,y,z);
|
||||
}
|
||||
|
||||
__forceinline Vec3ia min( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(sycl::min(a.x,b.x), sycl::min(a.y,b.y), sycl::min(a.z,b.z)); }
|
||||
__forceinline Vec3ia max( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(sycl::max(a.x,b.x), sycl::max(a.y,b.y), sycl::max(a.z,b.z)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline embree_ostream operator<<(embree_ostream cout, const Vec3ia& a) {
|
||||
return cout;
|
||||
}
|
||||
}
|
||||
+24
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "math.h"
|
||||
#include "emath.h"
|
||||
#include "vec3.h"
|
||||
|
||||
namespace embree
|
||||
@@ -221,6 +221,8 @@ namespace embree
|
||||
{
|
||||
template<> __forceinline Vec4<float>::Vec4( const Vec3fx& a ) { x = a.x; y = a.y; z = a.z; w = a.w; }
|
||||
|
||||
#if !defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fx& a ) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
@@ -240,4 +242,25 @@ namespace embree
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec4<vfloat16>::Vec4( const Vec3fx& a ) : x(a.x), y(a.y), z(a.z), w(a.w) {}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__SSE__)
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4(const Vec3fx& a) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
}
|
||||
#endif
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec4<vfloat8>::Vec4(const Vec3fx& a) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
}
|
||||
#endif
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec4<vfloat16>::Vec4(const Vec3fx& a) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ __forceinline __m128 _mm_broadcast_ss (float const * mem_addr)
|
||||
#define _MM_SET_EXCEPTION_MASK(x)
|
||||
// #define _MM_SET_FLUSH_ZERO_MODE(x)
|
||||
|
||||
/*
|
||||
__forceinline int _mm_getcsr()
|
||||
{
|
||||
return 0;
|
||||
@@ -43,6 +44,7 @@ __forceinline void _mm_mfence()
|
||||
{
|
||||
__sync_synchronize();
|
||||
}
|
||||
*/
|
||||
|
||||
__forceinline __m128i _mm_load4epu8_epi32(__m128i *ptr)
|
||||
{
|
||||
|
||||
+2053
-685
File diff suppressed because it is too large
Load Diff
@@ -31,4 +31,3 @@
|
||||
#if defined(__AVX512F__)
|
||||
#include "avx512.h"
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
|
||||
/* include SSE wrapper classes */
|
||||
#if defined(__SSE__) || defined(__ARM_NEON)
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace embree
|
||||
__forceinline const float& operator [](size_t index) const { assert(index < N); return f[index]; }
|
||||
__forceinline float& operator [](size_t index) { assert(index < N); return f[index]; }
|
||||
};
|
||||
|
||||
|
||||
template<int N>
|
||||
struct vdouble_impl
|
||||
{
|
||||
@@ -31,7 +31,7 @@ namespace embree
|
||||
__forceinline const int& operator [](size_t index) const { assert(index < N); return i[index]; }
|
||||
__forceinline int& operator [](size_t index) { assert(index < N); return i[index]; }
|
||||
};
|
||||
|
||||
|
||||
template<int N>
|
||||
struct vuint_impl
|
||||
{
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace embree
|
||||
#if defined(__aarch64__)
|
||||
template<int i0, int i1, int i2, int i3>
|
||||
__forceinline vboolf4 shuffle(const vboolf4& v) {
|
||||
return vreinterpretq_f32_u8(vqtbl1q_u8( vreinterpretq_u8_s32(v), _MN_SHUFFLE(i0, i1, i2, i3)));
|
||||
return vreinterpretq_f32_u8(vqtbl1q_u8( vreinterpretq_u8_s32((int32x4_t)v.v), _MN_SHUFFLE(i0, i1, i2, i3)));
|
||||
}
|
||||
|
||||
template<int i0, int i1, int i2, int i3>
|
||||
|
||||
@@ -316,6 +316,17 @@ namespace embree
|
||||
return madd(t,b-a,a);
|
||||
}
|
||||
|
||||
__forceinline bool isvalid (const vfloat16& v) {
|
||||
return all((v > vfloat16(-FLT_LARGE)) & (v < vfloat16(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
__forceinline void xchg(vboolf16 m, vfloat16& a, vfloat16& b)
|
||||
{
|
||||
vfloat16 c = a;
|
||||
a = select(m,b,a);
|
||||
b = select(m,c,b);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Rounding Functions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace embree
|
||||
|
||||
__forceinline vfloat() {}
|
||||
__forceinline vfloat(const vfloat4& other) { v = other.v; }
|
||||
//__forceinline vfloat(const vfloat4& other) = default;
|
||||
|
||||
__forceinline vfloat4& operator =(const vfloat4& other) { v = other.v; return *this; }
|
||||
|
||||
__forceinline vfloat(__m128 a) : v(a) {}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
|
||||
@@ -10,7 +10,7 @@ ADD_LIBRARY(sys STATIC
|
||||
filename.cpp
|
||||
library.cpp
|
||||
thread.cpp
|
||||
string.cpp
|
||||
estring.cpp
|
||||
regression.cpp
|
||||
mutex.cpp
|
||||
condition.cpp
|
||||
@@ -21,6 +21,9 @@ SET_PROPERTY(TARGET sys PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET sys APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
TARGET_LINK_LIBRARIES(sys ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||
IF (EMBREE_SYCL_SUPPORT)
|
||||
TARGET_LINK_LIBRARIES(sys ${SYCL_LIB_NAME})
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INSTALL(TARGETS sys EXPORT sys-targets ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel)
|
||||
|
||||
+118
-6
@@ -12,30 +12,142 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
void* alignedMalloc(size_t size, size_t align)
|
||||
size_t total_allocations = 0;
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
__thread sycl::context* tls_context_tutorial = nullptr;
|
||||
__thread sycl::device* tls_device_tutorial = nullptr;
|
||||
|
||||
__thread sycl::context* tls_context_embree = nullptr;
|
||||
__thread sycl::device* tls_device_embree = nullptr;
|
||||
|
||||
void enableUSMAllocEmbree(sycl::context* context, sycl::device* device)
|
||||
{
|
||||
if (tls_context_embree != nullptr) throw std::runtime_error("USM allocation already enabled");
|
||||
if (tls_device_embree != nullptr) throw std::runtime_error("USM allocation already enabled");
|
||||
tls_context_embree = context;
|
||||
tls_device_embree = device;
|
||||
}
|
||||
|
||||
void disableUSMAllocEmbree()
|
||||
{
|
||||
if (tls_context_embree == nullptr) throw std::runtime_error("USM allocation not enabled");
|
||||
if (tls_device_embree == nullptr) throw std::runtime_error("USM allocation not enabled");
|
||||
tls_context_embree = nullptr;
|
||||
tls_device_embree = nullptr;
|
||||
}
|
||||
|
||||
void enableUSMAllocTutorial(sycl::context* context, sycl::device* device)
|
||||
{
|
||||
//if (tls_context_tutorial != nullptr) throw std::runtime_error("USM allocation already enabled");
|
||||
//if (tls_device_tutorial != nullptr) throw std::runtime_error("USM allocation already enabled");
|
||||
tls_context_tutorial = context;
|
||||
tls_device_tutorial = device;
|
||||
}
|
||||
|
||||
void disableUSMAllocTutorial()
|
||||
{
|
||||
//if (tls_context_tutorial == nullptr) throw std::runtime_error("USM allocation not enabled");
|
||||
//if (tls_device_tutorial == nullptr) throw std::runtime_error("USM allocation not enabled");
|
||||
tls_context_tutorial = nullptr;
|
||||
tls_device_tutorial = nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void* alignedMalloc(size_t size, size_t align)
|
||||
{
|
||||
if (size == 0)
|
||||
return nullptr;
|
||||
|
||||
|
||||
assert((align & (align-1)) == 0);
|
||||
void* ptr = _mm_malloc(size,align);
|
||||
|
||||
if (size != 0 && ptr == nullptr)
|
||||
throw std::bad_alloc();
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
void alignedFree(void* ptr)
|
||||
{
|
||||
if (ptr)
|
||||
_mm_free(ptr);
|
||||
}
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
void* alignedSYCLMalloc(sycl::context* context, sycl::device* device, size_t size, size_t align, EmbreeUSMMode mode)
|
||||
{
|
||||
assert(context);
|
||||
assert(device);
|
||||
|
||||
if (size == 0)
|
||||
return nullptr;
|
||||
|
||||
assert((align & (align-1)) == 0);
|
||||
total_allocations++;
|
||||
|
||||
void* ptr = nullptr;
|
||||
if (mode == EMBREE_USM_SHARED_DEVICE_READ_ONLY)
|
||||
ptr = sycl::aligned_alloc_shared(align,size,*device,*context,sycl::ext::oneapi::property::usm::device_read_only());
|
||||
else
|
||||
ptr = sycl::aligned_alloc_shared(align,size,*device,*context);
|
||||
|
||||
if (size != 0 && ptr == nullptr)
|
||||
throw std::bad_alloc();
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static MutexSys g_alloc_mutex;
|
||||
|
||||
void* alignedSYCLMalloc(size_t size, size_t align, EmbreeUSMMode mode)
|
||||
{
|
||||
if (tls_context_tutorial) return alignedSYCLMalloc(tls_context_tutorial, tls_device_tutorial, size, align, mode);
|
||||
if (tls_context_embree ) return alignedSYCLMalloc(tls_context_embree, tls_device_embree, size, align, mode);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void alignedSYCLFree(sycl::context* context, void* ptr)
|
||||
{
|
||||
assert(context);
|
||||
if (ptr) {
|
||||
sycl::free(ptr,*context);
|
||||
}
|
||||
}
|
||||
|
||||
void alignedSYCLFree(void* ptr)
|
||||
{
|
||||
if (tls_context_tutorial) return alignedSYCLFree(tls_context_tutorial, ptr);
|
||||
if (tls_context_embree ) return alignedSYCLFree(tls_context_embree, ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void* alignedUSMMalloc(size_t size, size_t align, EmbreeUSMMode mode)
|
||||
{
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
if (tls_context_embree || tls_context_tutorial)
|
||||
return alignedSYCLMalloc(size,align,mode);
|
||||
else
|
||||
#endif
|
||||
return alignedMalloc(size,align);
|
||||
}
|
||||
|
||||
void alignedUSMFree(void* ptr)
|
||||
{
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
if (tls_context_embree || tls_context_tutorial)
|
||||
return alignedSYCLFree(ptr);
|
||||
else
|
||||
#endif
|
||||
return alignedFree(ptr);
|
||||
}
|
||||
|
||||
static bool huge_pages_enabled = false;
|
||||
static MutexSys os_init_mutex;
|
||||
|
||||
__forceinline bool isHugePageCandidate(const size_t bytes)
|
||||
__forceinline bool isHugePageCandidate(const size_t bytes)
|
||||
{
|
||||
if (!huge_pages_enabled)
|
||||
return false;
|
||||
|
||||
+86
-6
@@ -9,20 +9,72 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
#define ALIGNED_STRUCT_(align) \
|
||||
void* operator new(size_t size) { return alignedMalloc(size,align); } \
|
||||
void operator delete(void* ptr) { alignedFree(ptr); } \
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
/* enables SYCL USM allocation */
|
||||
void enableUSMAllocEmbree(sycl::context* context, sycl::device* device);
|
||||
void enableUSMAllocTutorial(sycl::context* context, sycl::device* device);
|
||||
|
||||
/* disables SYCL USM allocation */
|
||||
void disableUSMAllocEmbree();
|
||||
void disableUSMAllocTutorial();
|
||||
|
||||
#endif
|
||||
|
||||
#define ALIGNED_STRUCT_(align) \
|
||||
void* operator new(size_t size) { return alignedMalloc(size,align); } \
|
||||
void operator delete(void* ptr) { alignedFree(ptr); } \
|
||||
void* operator new[](size_t size) { return alignedMalloc(size,align); } \
|
||||
void operator delete[](void* ptr) { alignedFree(ptr); }
|
||||
|
||||
#define ALIGNED_CLASS_(align) \
|
||||
|
||||
#define ALIGNED_STRUCT_USM_(align) \
|
||||
void* operator new(size_t size) { return alignedUSMMalloc(size,align); } \
|
||||
void operator delete(void* ptr) { alignedUSMFree(ptr); } \
|
||||
void* operator new[](size_t size) { return alignedUSMMalloc(size,align); } \
|
||||
void operator delete[](void* ptr) { alignedUSMFree(ptr); }
|
||||
|
||||
#define ALIGNED_CLASS_(align) \
|
||||
public: \
|
||||
ALIGNED_STRUCT_(align) \
|
||||
ALIGNED_STRUCT_(align) \
|
||||
private:
|
||||
|
||||
#define ALIGNED_CLASS_USM_(align) \
|
||||
public: \
|
||||
ALIGNED_STRUCT_USM_(align) \
|
||||
private:
|
||||
|
||||
enum EmbreeUSMMode {
|
||||
EMBREE_USM_SHARED = 0,
|
||||
EMBREE_USM_SHARED_DEVICE_READ_WRITE = 0,
|
||||
EMBREE_USM_SHARED_DEVICE_READ_ONLY = 1
|
||||
};
|
||||
|
||||
/*! aligned allocation */
|
||||
void* alignedMalloc(size_t size, size_t align);
|
||||
void alignedFree(void* ptr);
|
||||
|
||||
/*! aligned allocation using SYCL USM */
|
||||
void* alignedUSMMalloc(size_t size, size_t align = 16, EmbreeUSMMode mode = EMBREE_USM_SHARED_DEVICE_READ_ONLY);
|
||||
void alignedUSMFree(void* ptr);
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
/*! aligned allocation using SYCL USM */
|
||||
void* alignedSYCLMalloc(sycl::context* context, sycl::device* device, size_t size, size_t align, EmbreeUSMMode mode);
|
||||
void alignedSYCLFree(sycl::context* context, void* ptr);
|
||||
|
||||
// deleter functor to use as deleter in std unique or shared pointers that
|
||||
// capture raw pointers created by sycl::malloc and it's variants
|
||||
template<typename T>
|
||||
struct sycl_deleter
|
||||
{
|
||||
void operator()(T const* ptr)
|
||||
{
|
||||
alignedUSMFree((void*)ptr);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*! allocator that performs aligned allocations */
|
||||
template<typename T, size_t alignment>
|
||||
@@ -95,6 +147,34 @@ namespace embree
|
||||
bool hugepages;
|
||||
};
|
||||
|
||||
/*! allocator that newer performs allocations */
|
||||
template<typename T>
|
||||
struct no_allocator
|
||||
{
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
__forceinline pointer allocate( size_type n ) {
|
||||
throw std::runtime_error("no allocation supported");
|
||||
}
|
||||
|
||||
__forceinline void deallocate( pointer p, size_type n ) {
|
||||
}
|
||||
|
||||
__forceinline void construct( pointer p, const_reference val ) {
|
||||
new (p) T(val);
|
||||
}
|
||||
|
||||
__forceinline void destroy( pointer p ) {
|
||||
p->~T();
|
||||
}
|
||||
};
|
||||
|
||||
/*! allocator for IDs */
|
||||
template<typename T, size_t max_id>
|
||||
struct IDPool
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ namespace embree
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
__forceinline void atomic_min(std::atomic<T>& aref, const T& bref)
|
||||
__forceinline void _atomic_min(std::atomic<T>& aref, const T& bref)
|
||||
{
|
||||
const T b = bref.load();
|
||||
while (true) {
|
||||
@@ -47,7 +47,7 @@ namespace embree
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
__forceinline void atomic_max(std::atomic<T>& aref, const T& bref)
|
||||
__forceinline void _atomic_max(std::atomic<T>& aref, const T& bref)
|
||||
{
|
||||
const T b = bref.load();
|
||||
while (true) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "string.h"
|
||||
#include "estring.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <ctype.h>
|
||||
@@ -28,6 +28,42 @@ namespace embree
|
||||
std::streamsize precision;
|
||||
};
|
||||
|
||||
struct IndentOStream : public std::streambuf
|
||||
{
|
||||
explicit IndentOStream(std::ostream &ostream, int indent = 2)
|
||||
: streambuf(ostream.rdbuf())
|
||||
, start_of_line(true)
|
||||
, ident_str(indent, ' ')
|
||||
, stream(&ostream)
|
||||
{
|
||||
// set streambuf of ostream to this and save original streambuf
|
||||
stream->rdbuf(this);
|
||||
}
|
||||
|
||||
virtual ~IndentOStream()
|
||||
{
|
||||
if (stream != NULL) {
|
||||
// restore old streambuf
|
||||
stream->rdbuf(streambuf);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual int overflow(int ch) {
|
||||
if (start_of_line && ch != '\n') {
|
||||
streambuf->sputn(ident_str.data(), ident_str.size());
|
||||
}
|
||||
start_of_line = ch == '\n';
|
||||
return streambuf->sputc(ch);
|
||||
}
|
||||
|
||||
private:
|
||||
std::streambuf *streambuf;
|
||||
bool start_of_line;
|
||||
std::string ident_str;
|
||||
std::ostream *stream;
|
||||
};
|
||||
|
||||
std::string toLowerCase(const std::string& s);
|
||||
std::string toUpperCase(const std::string& s);
|
||||
|
||||
@@ -35,18 +35,6 @@ namespace embree
|
||||
filename.resize(filename.size()-1);
|
||||
}
|
||||
|
||||
/*! returns path to home folder */
|
||||
FileName FileName::homeFolder()
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
const char* home = getenv("UserProfile");
|
||||
#else
|
||||
const char* home = getenv("HOME");
|
||||
#endif
|
||||
if (home) return home;
|
||||
return "";
|
||||
}
|
||||
|
||||
/*! returns path to executable */
|
||||
FileName FileName::executableFolder() {
|
||||
return FileName(getExecutableFileName()).path();
|
||||
|
||||
@@ -20,9 +20,6 @@ namespace embree
|
||||
|
||||
/*! create a valid filename from a string */
|
||||
FileName (const std::string& filename);
|
||||
|
||||
/*! returns path to home folder */
|
||||
static FileName homeFolder();
|
||||
|
||||
/*! returns path to executable */
|
||||
static FileName executableFolder();
|
||||
|
||||
+65
-48
@@ -64,7 +64,7 @@ namespace embree
|
||||
/// Windows Platform
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__WIN32__) && !defined(__INTEL_LLVM_COMPILER)
|
||||
|
||||
__forceinline size_t read_tsc()
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace embree
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__X86_64__)
|
||||
#if defined(__X86_64__) || defined (__aarch64__)
|
||||
__forceinline size_t bsf(size_t v) {
|
||||
#if defined(__AVX2__)
|
||||
return _tzcnt_u64(v);
|
||||
@@ -113,7 +113,7 @@ namespace embree
|
||||
return i;
|
||||
}
|
||||
|
||||
#if defined(__X86_64__)
|
||||
#if defined(__X86_64__) || defined (__aarch64__)
|
||||
__forceinline size_t bscf(size_t& v)
|
||||
{
|
||||
size_t i = bsf(v);
|
||||
@@ -138,7 +138,7 @@ namespace embree
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__X86_64__)
|
||||
#if defined(__X86_64__) || defined (__aarch64__)
|
||||
__forceinline size_t bsr(size_t v) {
|
||||
#if defined(__AVX2__)
|
||||
return 63 -_lzcnt_u64(v);
|
||||
@@ -196,49 +196,6 @@ namespace embree
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__i386__) && defined(__PIC__)
|
||||
|
||||
__forceinline void __cpuid(int out[4], int op)
|
||||
{
|
||||
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
|
||||
"cpuid\n\t"
|
||||
"xchg{l}\t{%%}ebx, %1\n\t"
|
||||
: "=a"(out[0]), "=r"(out[1]), "=c"(out[2]), "=d"(out[3])
|
||||
: "0"(op));
|
||||
}
|
||||
|
||||
__forceinline void __cpuid_count(int out[4], int op1, int op2)
|
||||
{
|
||||
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
|
||||
"cpuid\n\t"
|
||||
"xchg{l}\t{%%}ebx, %1\n\t"
|
||||
: "=a" (out[0]), "=r" (out[1]), "=c" (out[2]), "=d" (out[3])
|
||||
: "0" (op1), "2" (op2));
|
||||
}
|
||||
|
||||
#elif defined(__X86_ASM__)
|
||||
|
||||
__forceinline void __cpuid(int out[4], int op) {
|
||||
#if defined(__ARM_NEON)
|
||||
if (op == 0) { // Get CPU name
|
||||
out[0] = 0x41524d20;
|
||||
out[1] = 0x41524d20;
|
||||
out[2] = 0x41524d20;
|
||||
out[3] = 0x41524d20;
|
||||
}
|
||||
#else
|
||||
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(__ARM_NEON)
|
||||
__forceinline void __cpuid_count(int out[4], int op1, int op2) {
|
||||
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op1), "c"(op2));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
__forceinline uint64_t read_tsc() {
|
||||
#if defined(__X86_ASM__)
|
||||
uint32_t high,low;
|
||||
@@ -263,6 +220,13 @@ namespace embree
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
__forceinline unsigned int bsf(unsigned v) {
|
||||
return sycl::ctz(v);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__64BIT__)
|
||||
__forceinline unsigned bsf(unsigned v)
|
||||
@@ -280,6 +244,13 @@ namespace embree
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
__forceinline size_t bsf(size_t v) {
|
||||
return sycl::ctz(v);
|
||||
}
|
||||
#else
|
||||
|
||||
__forceinline size_t bsf(size_t v) {
|
||||
#if defined(__AVX2__) && !defined(__aarch64__)
|
||||
@@ -294,6 +265,7 @@ namespace embree
|
||||
return __builtin_ctzl(v);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
__forceinline int bscf(int& v)
|
||||
{
|
||||
@@ -434,6 +406,41 @@ namespace embree
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN32__)
|
||||
|
||||
#if defined(__i386__) && defined(__PIC__)
|
||||
|
||||
__forceinline void __cpuid(int out[4], int op)
|
||||
{
|
||||
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
|
||||
"cpuid\n\t"
|
||||
"xchg{l}\t{%%}ebx, %1\n\t"
|
||||
: "=a"(out[0]), "=r"(out[1]), "=c"(out[2]), "=d"(out[3])
|
||||
: "0"(op));
|
||||
}
|
||||
|
||||
__forceinline void __cpuid_count(int out[4], int op1, int op2)
|
||||
{
|
||||
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
|
||||
"cpuid\n\t"
|
||||
"xchg{l}\t{%%}ebx, %1\n\t"
|
||||
: "=a" (out[0]), "=r" (out[1]), "=c" (out[2]), "=d" (out[3])
|
||||
: "0" (op1), "2" (op2));
|
||||
}
|
||||
|
||||
#elif defined(__X86_ASM__)
|
||||
|
||||
__forceinline void __cpuid(int out[4], int op) {
|
||||
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op));
|
||||
}
|
||||
|
||||
__forceinline void __cpuid_count(int out[4], int op1, int op2) {
|
||||
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op1), "c"(op2));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// All Platforms
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -459,8 +466,16 @@ namespace embree
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_2__) || defined(__ARM_NEON)
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
__forceinline unsigned int popcnt(unsigned int in) {
|
||||
return sycl::popcount(in);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#if defined(__SSE4_2__) || defined(__ARM_NEON)
|
||||
|
||||
__forceinline int popcnt(int in) {
|
||||
return _mm_popcnt_u32(in);
|
||||
}
|
||||
@@ -475,6 +490,8 @@ namespace embree
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__X86_ASM__)
|
||||
|
||||
+2
-2
@@ -86,8 +86,8 @@ namespace embree
|
||||
|
||||
class PaddedSpinLock : public SpinLock
|
||||
{
|
||||
private:
|
||||
char padding[CPU_CACHELINE_SIZE - sizeof(SpinLock)];
|
||||
private:
|
||||
MAYBE_UNUSED char padding[CPU_CACHELINE_SIZE - sizeof(SpinLock)];
|
||||
};
|
||||
/*! safe mutex lock and unlock helper */
|
||||
template<typename Mutex> class Lock {
|
||||
|
||||
+236
-5
@@ -3,7 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(_CRT_SECURE_NO_WARNINGS)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <cassert>
|
||||
@@ -18,6 +20,30 @@
|
||||
#include <cstring>
|
||||
#include <stdint.h>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
#define __SYCL_USE_NON_VARIADIC_SPIRV_OCL_PRINTF__
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#pragma clang diagnostic ignored "-W#pragma-messages"
|
||||
|
||||
#include <sycl/sycl.hpp>
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
#include "sycl.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
#define CONSTANT __attribute__((opencl_constant))
|
||||
#else
|
||||
#define CONSTANT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// detect platform
|
||||
@@ -115,7 +141,7 @@
|
||||
#else
|
||||
#define __restrict__ //__restrict // causes issues with MSVC
|
||||
#endif
|
||||
#if !defined(__thread)
|
||||
#if !defined(__thread) && !defined(__INTEL_LLVM_COMPILER)
|
||||
#define __thread __declspec(thread)
|
||||
#endif
|
||||
#if !defined(__aligned)
|
||||
@@ -148,6 +174,10 @@
|
||||
#define MAYBE_UNUSED
|
||||
#endif
|
||||
|
||||
#if !defined(_unused)
|
||||
#define _unused(x) ((void)(x))
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1900) // before VS2015 deleted functions are not supported properly
|
||||
#define DELETED
|
||||
#else
|
||||
@@ -155,7 +185,7 @@
|
||||
#endif
|
||||
|
||||
#if !defined(likely)
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) || defined(__SYCL_DEVICE_ONLY__)
|
||||
#define likely(expr) (expr)
|
||||
#define unlikely(expr) (expr)
|
||||
#else
|
||||
@@ -171,12 +201,17 @@
|
||||
/* debug printing macros */
|
||||
#define STRING(x) #x
|
||||
#define TOSTRING(x) STRING(x)
|
||||
#define PING embree_cout << __FILE__ << " (" << __LINE__ << "): " << __FUNCTION__ << embree_endl
|
||||
#define PING embree_cout_uniform << __FILE__ << " (" << __LINE__ << "): " << __FUNCTION__ << embree_endl
|
||||
#define PRINT(x) embree_cout << STRING(x) << " = " << (x) << embree_endl
|
||||
#define PRINT2(x,y) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << embree_endl
|
||||
#define PRINT3(x,y,z) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << embree_endl
|
||||
#define PRINT4(x,y,z,w) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << embree_endl
|
||||
|
||||
#define UPRINT(x) embree_cout_uniform << STRING(x) << " = " << (x) << embree_endl
|
||||
#define UPRINT2(x,y) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << embree_endl
|
||||
#define UPRINT3(x,y,z) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << embree_endl
|
||||
#define UPRINT4(x,y,z,w) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << embree_endl
|
||||
|
||||
#if defined(DEBUG) // only report file and line in debug mode
|
||||
#define THROW_RUNTIME_ERROR(str) \
|
||||
throw std::runtime_error(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
@@ -315,13 +350,209 @@ __forceinline std::string toString(long long value) {
|
||||
#define DISABLE_DEPRECATED_WARNING __pragma(warning (disable: 4996)) // warning: function was declared deprecated
|
||||
#define ENABLE_DEPRECATED_WARNING __pragma(warning (enable : 4996)) // warning: function was declared deprecated
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SYCL specific
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#define sycl_printf0(format, ...) { \
|
||||
static const CONSTANT char fmt[] = format; \
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true))) \
|
||||
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
|
||||
}
|
||||
|
||||
#define sycl_printf0_(format) { \
|
||||
static const CONSTANT char fmt[] = format; \
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true))) \
|
||||
sycl::ext::oneapi::experimental::printf(fmt); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define sycl_printf0(format, ...) { \
|
||||
static const CONSTANT char fmt[] = format; \
|
||||
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
|
||||
}
|
||||
|
||||
#define sycl_printf0_(format) { \
|
||||
static const CONSTANT char fmt[] = format; \
|
||||
sycl::ext::oneapi::experimental::printf(fmt); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define sycl_printf(format, ...) { \
|
||||
static const CONSTANT char fmt[] = format; \
|
||||
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
|
||||
}
|
||||
|
||||
#define sycl_printf_(format) { \
|
||||
static const CONSTANT char fmt[] = format; \
|
||||
sycl::ext::oneapi::experimental::printf(fmt); \
|
||||
}
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
namespace embree
|
||||
{
|
||||
struct sycl_ostream_ {
|
||||
sycl_ostream_ (bool uniform) : uniform(uniform) {}
|
||||
bool uniform = false;
|
||||
};
|
||||
struct sycl_endl_ {};
|
||||
|
||||
#define embree_ostream embree::sycl_ostream_
|
||||
#define embree_cout embree::sycl_ostream_(false)
|
||||
#define embree_cout_uniform embree::sycl_ostream_(true)
|
||||
#define embree_endl embree::sycl_endl_()
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, int i)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%i",i);
|
||||
}
|
||||
else
|
||||
sycl_printf("%i ",i);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, unsigned int i)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%u",i);
|
||||
} else
|
||||
sycl_printf("%u ",i);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, float f)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%f",f);
|
||||
} else
|
||||
sycl_printf("%f ",f);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, double d)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%f",d);
|
||||
} else
|
||||
sycl_printf("%f ",d);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, uint64_t l)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%lu",l);
|
||||
} else
|
||||
sycl_printf("%lu ",l);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, long l)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%l",l);
|
||||
} else
|
||||
sycl_printf("%l ",l);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, void* p)
|
||||
{
|
||||
if (cout.uniform) {
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%p",p);
|
||||
} else
|
||||
sycl_printf("%p ",p);
|
||||
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, const char* c)
|
||||
{
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf("%s",c);
|
||||
return cout;
|
||||
}
|
||||
|
||||
inline sycl_ostream_ operator <<(sycl_ostream_ cout, sycl_endl_)
|
||||
{
|
||||
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
|
||||
sycl_printf_("\n");
|
||||
return cout;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* embree output stream */
|
||||
#define embree_ostream std::ostream&
|
||||
#define embree_cout std::cout
|
||||
#define embree_cout_uniform std::cout
|
||||
#define embree_endl std::endl
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(EMBREE_SYCL_SUPPORT)
|
||||
|
||||
/* printing out sycle vector types */
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::float4& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << "," << v.z() << "," << v.w() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::float3& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::float2& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::int4& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << "," << v.z() << "," << v.w() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::int3& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::int2& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::uint4& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << "," << v.z() << "," << v.w() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::uint3& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
|
||||
}
|
||||
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::uint2& v) {
|
||||
return out << "(" << v.x() << "," << v.y() << ")";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
inline void tab(std::ostream& cout, int n) {
|
||||
for (int i=0; i<n; i++) cout << " ";
|
||||
}
|
||||
|
||||
inline std::string tab(int depth) {
|
||||
return std::string(2*depth,' ');
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Some macros for static profiling
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
using sycl::float16;
|
||||
using sycl::float8;
|
||||
using sycl::float4;
|
||||
using sycl::float3;
|
||||
using sycl::float2;
|
||||
using sycl::int16;
|
||||
using sycl::int8;
|
||||
using sycl::int4;
|
||||
using sycl::int3;
|
||||
using sycl::int2;
|
||||
using sycl::uint16;
|
||||
using sycl::uint8;
|
||||
using sycl::uint4;
|
||||
using sycl::uint3;
|
||||
using sycl::uint2;
|
||||
using sycl::uchar16;
|
||||
using sycl::uchar8;
|
||||
using sycl::uchar4;
|
||||
using sycl::uchar3;
|
||||
using sycl::uchar2;
|
||||
using sycl::ushort16;
|
||||
using sycl::ushort8;
|
||||
using sycl::ushort4;
|
||||
using sycl::ushort3;
|
||||
using sycl::ushort2;
|
||||
|
||||
#ifdef __SYCL_DEVICE_ONLY__
|
||||
#define GLOBAL __attribute__((opencl_global))
|
||||
#define LOCAL __attribute__((opencl_local))
|
||||
|
||||
SYCL_EXTERNAL extern int work_group_reduce_add(int x);
|
||||
SYCL_EXTERNAL extern float work_group_reduce_min(float x);
|
||||
SYCL_EXTERNAL extern float work_group_reduce_max(float x);
|
||||
|
||||
SYCL_EXTERNAL extern float atomic_min(volatile GLOBAL float *p, float val);
|
||||
SYCL_EXTERNAL extern float atomic_min(volatile LOCAL float *p, float val);
|
||||
SYCL_EXTERNAL extern float atomic_max(volatile GLOBAL float *p, float val);
|
||||
SYCL_EXTERNAL extern float atomic_max(volatile LOCAL float *p, float val);
|
||||
|
||||
SYCL_EXTERNAL extern "C" unsigned int intel_sub_group_ballot(bool valid);
|
||||
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_assume_uniform(void *p);
|
||||
|
||||
// Load message caching control
|
||||
|
||||
enum LSC_LDCC {
|
||||
LSC_LDCC_DEFAULT,
|
||||
LSC_LDCC_L1UC_L3UC, // Override to L1 uncached and L3 uncached
|
||||
LSC_LDCC_L1UC_L3C, // Override to L1 uncached and L3 cached
|
||||
LSC_LDCC_L1C_L3UC, // Override to L1 cached and L3 uncached
|
||||
LSC_LDCC_L1C_L3C, // Override to L1 cached and L3 cached
|
||||
LSC_LDCC_L1S_L3UC, // Override to L1 streaming load and L3 uncached
|
||||
LSC_LDCC_L1S_L3C, // Override to L1 streaming load and L3 cached
|
||||
LSC_LDCC_L1IAR_L3C, // Override to L1 invalidate-after-read, and L3 cached
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Store message caching control (also used for atomics)
|
||||
|
||||
enum LSC_STCC {
|
||||
LSC_STCC_DEFAULT,
|
||||
LSC_STCC_L1UC_L3UC, // Override to L1 uncached and L3 uncached
|
||||
LSC_STCC_L1UC_L3WB, // Override to L1 uncached and L3 written back
|
||||
LSC_STCC_L1WT_L3UC, // Override to L1 written through and L3 uncached
|
||||
LSC_STCC_L1WT_L3WB, // Override to L1 written through and L3 written back
|
||||
LSC_STCC_L1S_L3UC, // Override to L1 streaming and L3 uncached
|
||||
LSC_STCC_L1S_L3WB, // Override to L1 streaming and L3 written back
|
||||
LSC_STCC_L1WB_L3WB, // Override to L1 written through and L3 written back
|
||||
};
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
// LSC Loads
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_uchar_to_uint (const GLOBAL uint8_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D8U32
|
||||
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_ushort_to_uint(const GLOBAL uint16_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D16U32
|
||||
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_uint (const GLOBAL uint32_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V1
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::uint2 __builtin_IB_lsc_load_global_uint2 (const GLOBAL sycl::uint2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V2
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::uint3 __builtin_IB_lsc_load_global_uint3 (const GLOBAL sycl::uint3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V3
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::uint4 __builtin_IB_lsc_load_global_uint4 (const GLOBAL sycl::uint4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V4
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::uint8 __builtin_IB_lsc_load_global_uint8 (const GLOBAL sycl::uint8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V8
|
||||
SYCL_EXTERNAL /* extern "C" */ uint64_t __builtin_IB_lsc_load_global_ulong (const GLOBAL uint64_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V1
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::ulong2 __builtin_IB_lsc_load_global_ulong2 (const GLOBAL sycl::ulong2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V2
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::ulong3 __builtin_IB_lsc_load_global_ulong3 (const GLOBAL sycl::ulong3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V3
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::ulong4 __builtin_IB_lsc_load_global_ulong4 (const GLOBAL sycl::ulong4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V4
|
||||
SYCL_EXTERNAL /* extern "C" */ sycl::ulong8 __builtin_IB_lsc_load_global_ulong8 (const GLOBAL sycl::ulong8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V8
|
||||
|
||||
// global address space
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uchar_from_uint (GLOBAL uint8_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D8U32
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ushort_from_uint(GLOBAL uint16_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D16U32
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint (GLOBAL uint32_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D32V1
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint2 (GLOBAL sycl::uint2 *base, int immElemOff, sycl::uint2 val, enum LSC_STCC cacheOpt); //D32V2
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint3 (GLOBAL sycl::uint3 *base, int immElemOff, sycl::uint3 val, enum LSC_STCC cacheOpt); //D32V3
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint4 (GLOBAL sycl::uint4 *base, int immElemOff, sycl::uint4 val, enum LSC_STCC cacheOpt); //D32V4
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint8 (GLOBAL sycl::uint8 *base, int immElemOff, sycl::uint8 val, enum LSC_STCC cacheOpt); //D32V8
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong (GLOBAL uint64_t *base, int immElemOff, uint64_t val, enum LSC_STCC cacheOpt); //D64V1
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong2 (GLOBAL sycl::ulong2 *base, int immElemOff, sycl::ulong2 val, enum LSC_STCC cacheOpt); //D64V2
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong3 (GLOBAL sycl::ulong3 *base, int immElemOff, sycl::ulong3 val, enum LSC_STCC cacheOpt); //D64V3
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong4 (GLOBAL sycl::ulong4 *base, int immElemOff, sycl::ulong4 val, enum LSC_STCC cacheOpt); //D64V4
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong8 (GLOBAL sycl::ulong8 *base, int immElemOff, sycl::ulong8 val, enum LSC_STCC cacheOpt); //D64V8
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// prefetching
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LSC Pre-Fetch Load functions with CacheControls
|
||||
// global address space
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uchar (const GLOBAL uint8_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D8U32
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ushort(const GLOBAL uint16_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D16U32
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint (const GLOBAL uint32_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V1
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint2 (const GLOBAL sycl::uint2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V2
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint3 (const GLOBAL sycl::uint3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V3
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint4 (const GLOBAL sycl::uint4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V4
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint8 (const GLOBAL sycl::uint8 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V8
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong (const GLOBAL uint64_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V1
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong2(const GLOBAL sycl::ulong2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V2
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong3(const GLOBAL sycl::ulong3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V3
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong4(const GLOBAL sycl::ulong4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V4
|
||||
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong8(const GLOBAL sycl::ulong8 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V8
|
||||
|
||||
#else
|
||||
|
||||
#define GLOBAL
|
||||
#define LOCAL
|
||||
|
||||
/* dummy functions for host */
|
||||
inline int work_group_reduce_add(int x) { return x; }
|
||||
inline float work_group_reduce_min(float x) { return x; }
|
||||
inline float work_group_reduce_max(float x) { return x; }
|
||||
|
||||
inline float atomic_min(volatile float *p, float val) { return val; };
|
||||
inline float atomic_max(volatile float *p, float val) { return val; };
|
||||
|
||||
inline uint32_t intel_sub_group_ballot(bool valid) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
/* creates a temporary that is enforced to be uniform */
|
||||
#define SYCL_UNIFORM_VAR(Ty,tmp,k) \
|
||||
Ty tmp##_data; \
|
||||
Ty* p##tmp##_data = (Ty*) sub_group_broadcast((uint64_t)&tmp##_data,k); \
|
||||
Ty& tmp = *p##tmp##_data;
|
||||
|
||||
#if !defined(__forceinline)
|
||||
#define __forceinline inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
#if __SYCL_COMPILER_VERSION < 20210801
|
||||
#define all_of_group all_of
|
||||
#define any_of_group any_of
|
||||
#define none_of_group none_of
|
||||
#define group_broadcast broadcast
|
||||
#define reduce_over_group reduce
|
||||
#define exclusive_scan_over_group exclusive_scan
|
||||
#define inclusive_scan_over_group inclusive_scan
|
||||
#endif
|
||||
|
||||
namespace embree
|
||||
{
|
||||
template<typename T>
|
||||
__forceinline T cselect(const bool mask, const T &a, const T &b)
|
||||
{
|
||||
return sycl::select(b,a,(int)mask);
|
||||
}
|
||||
|
||||
template<typename T, typename M>
|
||||
__forceinline T cselect(const M &mask, const T &a, const T &b)
|
||||
{
|
||||
return sycl::select(b,a,mask);
|
||||
}
|
||||
|
||||
#define XSTR(x) STR(x)
|
||||
#define STR(x) #x
|
||||
|
||||
__forceinline const sycl::sub_group this_sub_group() {
|
||||
#if __LIBSYCL_MAJOR_VERSION >= 8
|
||||
return sycl::ext::oneapi::this_work_item::get_sub_group();
|
||||
#else
|
||||
return sycl::ext::oneapi::experimental::this_sub_group();
|
||||
#endif
|
||||
}
|
||||
|
||||
__forceinline const uint32_t get_sub_group_local_id() {
|
||||
return this_sub_group().get_local_id()[0];
|
||||
}
|
||||
|
||||
__forceinline const uint32_t get_sub_group_size() {
|
||||
return this_sub_group().get_max_local_range().size();
|
||||
}
|
||||
|
||||
__forceinline const uint32_t get_sub_group_id() {
|
||||
return this_sub_group().get_group_id()[0];
|
||||
}
|
||||
|
||||
__forceinline const uint32_t get_num_sub_groups() {
|
||||
return this_sub_group().get_group_range().size();
|
||||
}
|
||||
|
||||
__forceinline uint32_t sub_group_ballot(bool pred) {
|
||||
return intel_sub_group_ballot(pred);
|
||||
}
|
||||
|
||||
__forceinline bool sub_group_all_of(bool pred) {
|
||||
return sycl::all_of_group(this_sub_group(),pred);
|
||||
}
|
||||
|
||||
__forceinline bool sub_group_any_of(bool pred) {
|
||||
return sycl::any_of_group(this_sub_group(),pred);
|
||||
}
|
||||
|
||||
__forceinline bool sub_group_none_of(bool pred) {
|
||||
return sycl::none_of_group(this_sub_group(),pred);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_broadcast(T x, sycl::id<1> local_id) {
|
||||
return sycl::group_broadcast<sycl::sub_group>(this_sub_group(),x,local_id);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_make_uniform(T x) {
|
||||
return sub_group_broadcast(x,sycl::ctz(intel_sub_group_ballot(true)));
|
||||
}
|
||||
|
||||
__forceinline void assume_uniform_array(void* ptr) {
|
||||
#ifdef __SYCL_DEVICE_ONLY__
|
||||
__builtin_IB_assume_uniform(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, BinaryOperation binary_op) {
|
||||
return sycl::reduce_over_group<sycl::sub_group>(this_sub_group(),x,binary_op);
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, T init, BinaryOperation binary_op) {
|
||||
return sycl::reduce_over_group<sycl::sub_group>(this_sub_group(),x,init,binary_op);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_reduce_min(T x, T init) {
|
||||
return sub_group_reduce(x, init, sycl::ext::oneapi::minimum<T>());
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_reduce_min(T x) {
|
||||
return sub_group_reduce(x, sycl::ext::oneapi::minimum<T>());
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_reduce_max(T x) {
|
||||
return sub_group_reduce(x, sycl::ext::oneapi::maximum<T>());
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_reduce_add(T x) {
|
||||
return sub_group_reduce(x, sycl::ext::oneapi::plus<T>());
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_exclusive_scan(T x, BinaryOperation binary_op) {
|
||||
return sycl::exclusive_scan_over_group(this_sub_group(),x,binary_op);
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_exclusive_scan_min(T x) {
|
||||
return sub_group_exclusive_scan(x,sycl::ext::oneapi::minimum<T>());
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_exclusive_scan(T x, T init, BinaryOperation binary_op) {
|
||||
return sycl::exclusive_scan_over_group(this_sub_group(),x,init,binary_op);
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_inclusive_scan(T x, BinaryOperation binary_op) {
|
||||
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op);
|
||||
}
|
||||
|
||||
template <typename T, class BinaryOperation> __forceinline T sub_group_inclusive_scan(T x, BinaryOperation binary_op, T init) {
|
||||
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op,init);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_shuffle(T x, sycl::id<1> local_id) {
|
||||
return this_sub_group().shuffle(x, local_id);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_shuffle_down(T x, uint32_t delta) {
|
||||
return this_sub_group().shuffle_down(x, delta);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_shuffle_up(T x, uint32_t delta) {
|
||||
return this_sub_group().shuffle_up(x, delta);
|
||||
}
|
||||
|
||||
template <typename T> __forceinline T sub_group_load(const void* src) {
|
||||
return this_sub_group().load(sycl::multi_ptr<T,sycl::access::address_space::global_space>((T*)src));
|
||||
}
|
||||
|
||||
template <typename T> __forceinline void sub_group_store(void* dst, const T& x) {
|
||||
this_sub_group().store(sycl::multi_ptr<T,sycl::access::address_space::global_space>((T*)dst),x);
|
||||
}
|
||||
}
|
||||
|
||||
#if __SYCL_COMPILER_VERSION < 20210801
|
||||
#undef all_of_group
|
||||
#undef any_of_group
|
||||
#undef none_of_group
|
||||
#undef group_broadcast
|
||||
#undef reduce_over_group
|
||||
#undef exclusive_scan_over_group
|
||||
#undef inclusive_scan_over_group
|
||||
#endif
|
||||
+23
-1
@@ -1,9 +1,15 @@
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#if defined(__INTEL_LLVM_COMPILER)
|
||||
// prevents "'__thiscall' calling convention is not supported for this target" warning from TBB
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wignored-attributes"
|
||||
#endif
|
||||
|
||||
#include "sysinfo.h"
|
||||
#include "intrinsics.h"
|
||||
#include "string.h"
|
||||
#include "estring.h"
|
||||
#include "ref.h"
|
||||
#if defined(__FREEBSD__)
|
||||
#include <sys/cpuset.h>
|
||||
@@ -338,6 +344,19 @@ namespace embree
|
||||
if (cpuid_leaf_7[EBX] & CPU_FEATURE_BIT_AVX512VL ) cpu_features |= CPU_FEATURE_AVX512VL;
|
||||
if (cpuid_leaf_7[ECX] & CPU_FEATURE_BIT_AVX512VBMI) cpu_features |= CPU_FEATURE_AVX512VBMI;
|
||||
|
||||
#if defined(__MACOSX__)
|
||||
if ( (cpu_features & CPU_FEATURE_AVX512F)
|
||||
|| (cpu_features & CPU_FEATURE_AVX512DQ)
|
||||
|| (cpu_features & CPU_FEATURE_AVX512CD)
|
||||
|| (cpu_features & CPU_FEATURE_AVX512BW)
|
||||
|| (cpu_features & CPU_FEATURE_AVX512VL) )
|
||||
{
|
||||
// on macOS AVX512 will be enabled automatically by the kernel when the first AVX512 instruction is called
|
||||
// see https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L176
|
||||
// therefore we ignore the state of XCR0
|
||||
cpu_features |= CPU_FEATURE_ZMM_ENABLED;
|
||||
}
|
||||
#endif
|
||||
return cpu_features;
|
||||
|
||||
#elif defined(__ARM_NEON) || defined(__EMSCRIPTEN__)
|
||||
@@ -696,3 +715,6 @@ namespace embree
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__INTEL_LLVM_COMPILER)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "thread.h"
|
||||
#include "sysinfo.h"
|
||||
#include "string.h"
|
||||
#include "estring.h"
|
||||
|
||||
#include <iostream>
|
||||
#if defined(__ARM_NEON)
|
||||
|
||||
+21
-1
@@ -8,6 +8,8 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
class Device;
|
||||
|
||||
template<typename T, typename allocator>
|
||||
class vector_t
|
||||
{
|
||||
@@ -25,6 +27,12 @@ namespace embree
|
||||
template<typename M>
|
||||
__forceinline explicit vector_t (M alloc, size_t sz)
|
||||
: alloc(alloc), size_active(0), size_alloced(0), items(nullptr) { internal_resize_init(sz); }
|
||||
|
||||
__forceinline vector_t (Device* alloc)
|
||||
: vector_t(alloc,0) {}
|
||||
|
||||
__forceinline vector_t(void* data, size_t bytes)
|
||||
: size_active(0), size_alloced(bytes/sizeof(T)), items((T*)data) {}
|
||||
|
||||
__forceinline ~vector_t() {
|
||||
clear();
|
||||
@@ -65,6 +73,10 @@ namespace embree
|
||||
return *this;
|
||||
}
|
||||
|
||||
__forceinline allocator& getAlloc() {
|
||||
return alloc;
|
||||
}
|
||||
|
||||
/********************** Iterators ****************************/
|
||||
|
||||
__forceinline iterator begin() { return items; };
|
||||
@@ -215,6 +227,10 @@ namespace embree
|
||||
if (new_alloced <= size_alloced)
|
||||
return size_alloced;
|
||||
|
||||
/* if current size is 0 allocate exact requested size */
|
||||
if (size_alloced == 0)
|
||||
return new_alloced;
|
||||
|
||||
/* resize to next power of 2 otherwise */
|
||||
size_t new_size_alloced = size_alloced;
|
||||
while (new_size_alloced < new_alloced) {
|
||||
@@ -237,8 +253,12 @@ namespace embree
|
||||
/*! vector class that performs aligned allocations */
|
||||
template<typename T>
|
||||
using avector = vector_t<T,aligned_allocator<T,std::alignment_of<T>::value> >;
|
||||
|
||||
|
||||
/*! vector class that performs OS allocations */
|
||||
template<typename T>
|
||||
using ovector = vector_t<T,os_allocator<T> >;
|
||||
|
||||
/*! vector class with externally managed data buffer */
|
||||
template<typename T>
|
||||
using evector = vector_t<T,no_allocator<T>>;
|
||||
}
|
||||
|
||||
@@ -20,18 +20,27 @@ ELSEIF (TASKING_TBB)
|
||||
TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::${EMBREE_TBB_COMPONENT})
|
||||
else()
|
||||
# Try getting TBB via config first
|
||||
find_package(TBB 2021 COMPONENTS ${EMBREE_TBB_COMPONENT} CONFIG ${TBB_FIND_PACKAGE_OPTION})
|
||||
find_package(TBB 2020 COMPONENTS ${EMBREE_TBB_COMPONENT} CONFIG ${TBB_FIND_PACKAGE_OPTION})
|
||||
if (TBB_FOUND)
|
||||
TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::${EMBREE_TBB_COMPONENT})
|
||||
message("-- Found TBB: ${TBB_VERSION} at ${TBB_DIR} via TBBConfig.cmake")
|
||||
else()
|
||||
|
||||
# If not found try getting older TBB via module (FindTBB.cmake)
|
||||
message("-- Using FindTBB.cmake ")
|
||||
|
||||
unset(TBB_DIR CACHE)
|
||||
find_package(TBB 4.1 REQUIRED ${EMBREE_TBB_COMPONENT})
|
||||
if (TBB_FOUND)
|
||||
TARGET_LINK_LIBRARIES(tasking PUBLIC TBB)
|
||||
TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC "${TBB_INCLUDE_DIRS}")
|
||||
endif()
|
||||
TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC $<BUILD_INTERFACE:${TBB_INCLUDE_DIRS}>)
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INSTALL(TARGETS TBB EXPORT TBB-targets)
|
||||
INSTALL(EXPORT TBB-targets DESTINATION ${EMBREE_CMAKEEXPORT_DIR} COMPONENT devel)
|
||||
ENDIF()
|
||||
|
||||
endif()
|
||||
if (NOT TBB_FOUND)
|
||||
message("-- Not found TBB")
|
||||
endif()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(TASKING_INTERNAL)
|
||||
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
|
||||
# include "taskschedulerinternal.h"
|
||||
#elif defined(TASKING_TBB)
|
||||
# include "taskschedulertbb.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "taskschedulerinternal.h"
|
||||
#include "../math/math.h"
|
||||
#include "../math/emath.h"
|
||||
#include "../sys/sysinfo.h"
|
||||
#include <algorithm>
|
||||
|
||||
@@ -49,11 +49,11 @@ namespace embree
|
||||
Task* prevTask = thread.task;
|
||||
thread.task = this;
|
||||
try {
|
||||
if (thread.scheduler->cancellingException == nullptr)
|
||||
if (context->cancellingException == nullptr)
|
||||
closure->execute();
|
||||
} catch (...) {
|
||||
if (thread.scheduler->cancellingException == nullptr)
|
||||
thread.scheduler->cancellingException = std::current_exception();
|
||||
if (context->cancellingException == nullptr)
|
||||
context->cancellingException = std::current_exception();
|
||||
}
|
||||
thread.task = prevTask;
|
||||
add_dependencies(-1);
|
||||
@@ -150,7 +150,8 @@ namespace embree
|
||||
{
|
||||
Lock<MutexSys> lock(g_mutex);
|
||||
assert(newNumThreads);
|
||||
newNumThreads = min(newNumThreads, (size_t) getNumberOfLogicalThreads());
|
||||
if (newNumThreads == std::numeric_limits<size_t>::max())
|
||||
newNumThreads = (size_t) getNumberOfLogicalThreads();
|
||||
|
||||
numThreads = newNumThreads;
|
||||
if (!startThreads && !running) return;
|
||||
@@ -230,7 +231,8 @@ namespace embree
|
||||
TaskScheduler::TaskScheduler()
|
||||
: threadCounter(0), anyTasksRunning(0), hasRootTask(false)
|
||||
{
|
||||
threadLocal.resize(2*getNumberOfLogicalThreads()); // FIXME: this has to be 2x as in the compatibility join mode with rtcCommitScene the worker threads also join. When disallowing rtcCommitScene to join a build we can remove the 2x.
|
||||
assert(threadPool);
|
||||
threadLocal.resize(2 * TaskScheduler::threadCount()); // FIXME: this has to be 2x as in the compatibility join mode with rtcCommitScene the worker threads also join. When disallowing rtcCommitScene to join a build we can remove the 2x.
|
||||
for (size_t i=0; i<threadLocal.size(); i++)
|
||||
threadLocal[i].store(nullptr);
|
||||
}
|
||||
@@ -291,8 +293,7 @@ namespace embree
|
||||
size_t threadIndex = allocThreadIndex();
|
||||
condition.wait(mutex, [&] () { return hasRootTask.load(); });
|
||||
mutex.unlock();
|
||||
std::exception_ptr except = thread_loop(threadIndex);
|
||||
if (except != nullptr) std::rethrow_exception(except);
|
||||
thread_loop(threadIndex);
|
||||
}
|
||||
|
||||
void TaskScheduler::reset() {
|
||||
@@ -316,15 +317,15 @@ namespace embree
|
||||
return old;
|
||||
}
|
||||
|
||||
dll_export bool TaskScheduler::wait()
|
||||
dll_export void TaskScheduler::wait()
|
||||
{
|
||||
Thread* thread = TaskScheduler::thread();
|
||||
if (thread == nullptr) return true;
|
||||
if (thread == nullptr)
|
||||
return;
|
||||
while (thread->tasks.execute_local_internal(*thread,thread->task)) {};
|
||||
return thread->scheduler->cancellingException == nullptr;
|
||||
}
|
||||
|
||||
std::exception_ptr TaskScheduler::thread_loop(size_t threadIndex)
|
||||
void TaskScheduler::thread_loop(size_t threadIndex)
|
||||
{
|
||||
/* allocate thread structure */
|
||||
std::unique_ptr<Thread> mthread(new Thread(threadIndex,this)); // too large for stack allocation
|
||||
@@ -346,10 +347,6 @@ namespace embree
|
||||
threadLocal[threadIndex].store(nullptr);
|
||||
swapThread(oldThread);
|
||||
|
||||
/* remember exception to throw */
|
||||
std::exception_ptr except = nullptr;
|
||||
if (cancellingException != nullptr) except = cancellingException;
|
||||
|
||||
/* wait for all threads to terminate */
|
||||
threadCounter--;
|
||||
#if defined(__WIN32__)
|
||||
@@ -367,7 +364,6 @@ namespace embree
|
||||
yield();
|
||||
#endif
|
||||
}
|
||||
return except;
|
||||
}
|
||||
|
||||
bool TaskScheduler::steal_from_other_threads(Thread& thread)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "../sys/ref.h"
|
||||
#include "../sys/atomic.h"
|
||||
#include "../math/range.h"
|
||||
#include "../../include/embree3/rtcore.h"
|
||||
#include "../../include/embree4/rtcore.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
@@ -38,6 +38,13 @@ namespace embree
|
||||
virtual void execute() = 0;
|
||||
};
|
||||
|
||||
|
||||
struct TaskGroupContext {
|
||||
TaskGroupContext() : cancellingException(nullptr) {}
|
||||
|
||||
std::exception_ptr cancellingException;
|
||||
};
|
||||
|
||||
/*! builds a task interface from a closure */
|
||||
template<typename Closure>
|
||||
struct ClosureTaskFunction : public TaskFunction
|
||||
@@ -76,16 +83,16 @@ namespace embree
|
||||
: state(DONE) {}
|
||||
|
||||
/*! construction of new task */
|
||||
__forceinline Task (TaskFunction* closure, Task* parent, size_t stackPtr, size_t N)
|
||||
: dependencies(1), stealable(true), closure(closure), parent(parent), stackPtr(stackPtr), N(N)
|
||||
__forceinline Task (TaskFunction* closure, Task* parent, TaskGroupContext* context, size_t stackPtr, size_t N)
|
||||
: dependencies(1), stealable(true), closure(closure), parent(parent), context(context), stackPtr(stackPtr), N(N)
|
||||
{
|
||||
if (parent) parent->add_dependencies(+1);
|
||||
switch_state(DONE,INITIALIZED);
|
||||
}
|
||||
|
||||
/*! construction of stolen task, stealing thread will decrement initial dependency */
|
||||
__forceinline Task (TaskFunction* closure, Task* parent)
|
||||
: dependencies(1), stealable(false), closure(closure), parent(parent), stackPtr(-1), N(1)
|
||||
__forceinline Task (TaskFunction* closure, Task* parent, TaskGroupContext* context)
|
||||
: dependencies(1), stealable(false), closure(closure), parent(parent), context(context), stackPtr(-1), N(1)
|
||||
{
|
||||
switch_state(DONE,INITIALIZED);
|
||||
}
|
||||
@@ -95,7 +102,7 @@ namespace embree
|
||||
{
|
||||
if (!stealable) return false;
|
||||
if (!try_switch_state(INITIALIZED,DONE)) return false;
|
||||
new (&child) Task(closure, this);
|
||||
new (&child) Task(closure, this, context);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -110,6 +117,7 @@ namespace embree
|
||||
std::atomic<bool> stealable; //!< true if task can be stolen
|
||||
TaskFunction* closure; //!< the closure to execute
|
||||
Task* parent; //!< parent task to signal when we are finished
|
||||
TaskGroupContext* context;
|
||||
size_t stackPtr; //!< stack location where closure is stored
|
||||
size_t N; //!< approximative size of task
|
||||
};
|
||||
@@ -129,7 +137,7 @@ namespace embree
|
||||
}
|
||||
|
||||
template<typename Closure>
|
||||
__forceinline void push_right(Thread& thread, const size_t size, const Closure& closure)
|
||||
__forceinline void push_right(Thread& thread, const size_t size, const Closure& closure, TaskGroupContext* context)
|
||||
{
|
||||
if (right >= TASK_STACK_SIZE)
|
||||
throw std::runtime_error("task stack overflow");
|
||||
@@ -137,7 +145,7 @@ namespace embree
|
||||
/* allocate new task on right side of stack */
|
||||
size_t oldStackPtr = stackPtr;
|
||||
TaskFunction* func = new (alloc(sizeof(ClosureTaskFunction<Closure>))) ClosureTaskFunction<Closure>(closure);
|
||||
new (&(tasks[right.load()])) Task(func,thread.task,oldStackPtr,size);
|
||||
new (&tasks[right.load()]) Task(func,thread.task,context,oldStackPtr,size);
|
||||
right++;
|
||||
|
||||
/* also move left pointer */
|
||||
@@ -172,7 +180,7 @@ namespace embree
|
||||
: threadIndex(threadIndex), task(nullptr), scheduler(scheduler) {}
|
||||
|
||||
__forceinline size_t threadCount() {
|
||||
return scheduler->threadCounter;
|
||||
return scheduler->threadCounter;
|
||||
}
|
||||
|
||||
size_t threadIndex; //!< ID of this thread
|
||||
@@ -238,7 +246,7 @@ namespace embree
|
||||
void wait_for_threads(size_t threadCount);
|
||||
|
||||
/*! thread loop for all worker threads */
|
||||
std::exception_ptr thread_loop(size_t threadIndex);
|
||||
void thread_loop(size_t threadIndex);
|
||||
|
||||
/*! steals a task from a different thread */
|
||||
bool steal_from_other_threads(Thread& thread);
|
||||
@@ -248,7 +256,7 @@ namespace embree
|
||||
|
||||
/* spawn a new task at the top of the threads task stack */
|
||||
template<typename Closure>
|
||||
void spawn_root(const Closure& closure, size_t size = 1, bool useThreadPool = true)
|
||||
void spawn_root(const Closure& closure, TaskGroupContext* context, size_t size = 1, bool useThreadPool = true)
|
||||
{
|
||||
if (useThreadPool) startThreads();
|
||||
|
||||
@@ -258,7 +266,7 @@ namespace embree
|
||||
assert(threadLocal[threadIndex].load() == nullptr);
|
||||
threadLocal[threadIndex] = &thread;
|
||||
Thread* oldThread = swapThread(&thread);
|
||||
thread.tasks.push_right(thread,size,closure);
|
||||
thread.tasks.push_right(thread,size,closure,context);
|
||||
{
|
||||
Lock<MutexSys> lock(mutex);
|
||||
anyTasksRunning++;
|
||||
@@ -277,51 +285,52 @@ namespace embree
|
||||
|
||||
/* remember exception to throw */
|
||||
std::exception_ptr except = nullptr;
|
||||
if (cancellingException != nullptr) except = cancellingException;
|
||||
if (context->cancellingException != nullptr) except = context->cancellingException;
|
||||
|
||||
/* wait for all threads to terminate */
|
||||
threadCounter--;
|
||||
while (threadCounter > 0) yield();
|
||||
cancellingException = nullptr;
|
||||
context->cancellingException = nullptr;
|
||||
|
||||
/* re-throw proper exception */
|
||||
if (except != nullptr)
|
||||
if (except != nullptr) {
|
||||
std::rethrow_exception(except);
|
||||
}
|
||||
}
|
||||
|
||||
/* spawn a new task at the top of the threads task stack */
|
||||
template<typename Closure>
|
||||
static __forceinline void spawn(size_t size, const Closure& closure)
|
||||
static __forceinline void spawn(size_t size, const Closure& closure, TaskGroupContext* context)
|
||||
{
|
||||
Thread* thread = TaskScheduler::thread();
|
||||
if (likely(thread != nullptr)) thread->tasks.push_right(*thread,size,closure);
|
||||
else instance()->spawn_root(closure,size);
|
||||
if (likely(thread != nullptr)) thread->tasks.push_right(*thread,size,closure,context);
|
||||
else instance()->spawn_root(closure,context,size);
|
||||
}
|
||||
|
||||
/* spawn a new task at the top of the threads task stack */
|
||||
template<typename Closure>
|
||||
static __forceinline void spawn(const Closure& closure) {
|
||||
spawn(1,closure);
|
||||
static __forceinline void spawn(const Closure& closure, TaskGroupContext* taskGroupContext) {
|
||||
spawn(1,closure,taskGroupContext);
|
||||
}
|
||||
|
||||
/* spawn a new task set */
|
||||
template<typename Index, typename Closure>
|
||||
static void spawn(const Index begin, const Index end, const Index blockSize, const Closure& closure)
|
||||
static void spawn(const Index begin, const Index end, const Index blockSize, const Closure& closure, TaskGroupContext* context)
|
||||
{
|
||||
spawn(end-begin, [=]()
|
||||
{
|
||||
if (end-begin <= blockSize) {
|
||||
return closure(range<Index>(begin,end));
|
||||
}
|
||||
const Index center = (begin+end)/2;
|
||||
spawn(begin,center,blockSize,closure);
|
||||
spawn(center,end ,blockSize,closure);
|
||||
wait();
|
||||
});
|
||||
{
|
||||
if (end-begin <= blockSize) {
|
||||
return closure(range<Index>(begin,end));
|
||||
}
|
||||
const Index center = (begin+end)/2;
|
||||
spawn(begin,center,blockSize,closure,context);
|
||||
spawn(center,end ,blockSize,closure,context);
|
||||
wait();
|
||||
},context);
|
||||
}
|
||||
|
||||
/* work on spawned subtasks and wait until all have finished */
|
||||
dll_export static bool wait();
|
||||
dll_export static void wait();
|
||||
|
||||
/* returns the ID of the current thread */
|
||||
dll_export static size_t threadID();
|
||||
@@ -357,7 +366,6 @@ namespace embree
|
||||
std::atomic<size_t> threadCounter;
|
||||
std::atomic<size_t> anyTasksRunning;
|
||||
std::atomic<bool> hasRootTask;
|
||||
std::exception_ptr cancellingException;
|
||||
MutexSys mutex;
|
||||
ConditionSys condition;
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
# define NOMINMAX
|
||||
#endif
|
||||
|
||||
#if defined(__INTEL_LLVM_COMPILER)
|
||||
// prevents "'__thiscall' calling convention is not supported for this target" warning from TBB
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wignored-attributes"
|
||||
#endif
|
||||
|
||||
// We need to define these to avoid implicit linkage against
|
||||
// tbb_debug.lib under Windows. When removing these lines debug build
|
||||
// under Windows fails.
|
||||
@@ -25,6 +31,18 @@
|
||||
#include "tbb/tbb.h"
|
||||
#include "tbb/parallel_sort.h"
|
||||
|
||||
#if defined(TASKING_TBB) && (TBB_INTERFACE_VERSION_MAJOR >= 8)
|
||||
# define USE_TASK_ARENA 1
|
||||
#else
|
||||
# define USE_TASK_ARENA 0
|
||||
#endif
|
||||
|
||||
#if defined(TASKING_TBB) && (TBB_INTERFACE_VERSION >= 11009) // TBB 2019 Update 9
|
||||
# define TASKING_TBB_USE_TASK_ISOLATION 1
|
||||
#else
|
||||
# define TASKING_TBB_USE_TASK_ISOLATION 0
|
||||
#endif
|
||||
|
||||
namespace embree
|
||||
{
|
||||
struct TaskScheduler
|
||||
@@ -65,3 +83,7 @@ namespace embree
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#if defined(__INTEL_LLVM_COMPILER)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
@@ -12,6 +12,7 @@ endif()
|
||||
|
||||
string(REGEX REPLACE "\n$" "" intelstyle_url "${intelstyle_url}")
|
||||
string(REPLACE "embree" "intelstyle" intelstyle_url "${intelstyle_url}")
|
||||
string(REPLACE "libraries" "documentation" intelstyle_url "${intelstyle_url}")
|
||||
|
||||
message(STATUS "Fetch intelstyle repository ${intelstyle_url}")
|
||||
include(FetchContent)
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
images_jpg := $(addprefix images/, $(addsuffix .jpg, displacement_geometry instanced_geometry pathtracer dynamic_scene subdivision_geometry user_geometry hair_geometry intersection_filter triangle_geometry viewer viewer_stream interpolation motion_blur_geometry curve_geometry voronoi closest_point multi_level_instancing point_geometry grid_geometry quaternion_motion_blur collide))
|
||||
images_jpg := $(addprefix images/, $(addsuffix .jpg, displacement_geometry instanced_geometry pathtracer dynamic_scene subdivision_geometry user_geometry hair_geometry intersection_filter triangle_geometry viewer interpolation motion_blur_geometry curve_geometry voronoi closest_point multi_level_instancing point_geometry grid_geometry quaternion_motion_blur collide))
|
||||
images_png := $(addprefix images/, $(addsuffix .png, quad_uv triangle_uv half_edges))
|
||||
images_pdf := $(addprefix images/, $(addsuffix .pdf, quad_uv triangle_uv half_edges))
|
||||
|
||||
@@ -10,7 +10,7 @@ webimages := $(addprefix www/, $(images_jpg))
|
||||
docfiles := $(addprefix doc/, README.md CHANGELOG.md readme.pdf)
|
||||
spec := embree-spec.rst
|
||||
man_src := $(wildcard src/api/*.md)
|
||||
manfiles := $(patsubst src/api/%.md,man/man3/%.3embree3,$(man_src))
|
||||
manfiles := $(patsubst src/api/%.md,man/man3/%.4embree4,$(man_src))
|
||||
|
||||
all: www images man doc spec
|
||||
www: $(webpages) $(webimages)
|
||||
@@ -27,9 +27,9 @@ PANDOC := pandoc
|
||||
### add version
|
||||
########################################################################
|
||||
|
||||
tmp/version: ../include/embree3/rtcore_config.h
|
||||
tmp/version: ../include/embree4/rtcore_config.h
|
||||
sed -n 's/#define RTC_VERSION_STRING \"\(.*\)\".*/\1/p' $< > $@
|
||||
tmp/version_major: ../include/embree3/rtcore_config.h
|
||||
tmp/version_major: ../include/embree4/rtcore_config.h
|
||||
sed -n 's/#define RTC_VERSION_MAJOR \([0-9]\)/\1/p' $< > $@
|
||||
|
||||
replace_version = sed -e "s/<EMBREE_VERSION>/`cat tmp/version`/g" $< | sed -e "s/<EMBREE_VERSION_MAJOR>/`cat tmp/version_major`/g" > $@
|
||||
@@ -175,7 +175,7 @@ doc/readme.pdf: tmp/readme.tex tmp/readme_all.tex $(images_jpg) $(images_pdf)
|
||||
### manpages
|
||||
########################################################################
|
||||
|
||||
man/man3/%.3embree3: src/api/%.md
|
||||
man/man3/%.4embree4: src/api/%.md
|
||||
$(PANDOC) -s -t man $< -o $@
|
||||
|
||||
########################################################################
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 39 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 94 KiB |
+88
-34
@@ -3,6 +3,26 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcNewSYCLDevice
|
||||
``` {include=src/api/rtcNewSYCLDevice.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcIsSYCLDeviceSupported
|
||||
``` {include=src/api/rtcIsSYCLDeviceSupported.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSYCLDeviceSelector
|
||||
``` {include=src/api/rtcSYCLDeviceSelector.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetDeviceSYCLDevice
|
||||
``` {include=src/api/rtcSetDeviceSYCLDevice.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcRetainDevice
|
||||
``` {include=src/api/rtcRetainDevice.md}
|
||||
```
|
||||
@@ -164,6 +184,11 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## RTC_GEOMETRY_TYPE_INSTANCE_ARRAY
|
||||
``` {include=src/api/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## RTCCurveFlags
|
||||
``` {include=src/api/RTCCurveFlags.md}
|
||||
```
|
||||
@@ -219,6 +244,11 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetGeometryMaxRadiusScale
|
||||
``` {include=src/api/rtcSetGeometryMaxRadiusScale.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetGeometryBuffer
|
||||
``` {include=src/api/rtcSetGeometryBuffer.md}
|
||||
```
|
||||
@@ -264,13 +294,18 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcFilterIntersection
|
||||
``` {include=src/api/rtcFilterIntersection.md}
|
||||
## rtcSetGeometryEnableFilterFunctionFromArguments
|
||||
``` {include=src/api/rtcSetGeometryEnableFilterFunctionFromArguments.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcFilterOcclusion
|
||||
``` {include=src/api/rtcFilterOcclusion.md}
|
||||
## rtcInvokeIntersectFilterFromGeometry
|
||||
``` {include=src/api/rtcInvokeIntersectFilterFromGeometry.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcInvokeOccludedFilterFromGeometry
|
||||
``` {include=src/api/rtcInvokeOccludedFilterFromGeometry.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
@@ -284,6 +319,10 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcGetGeometryUserDataFromScene
|
||||
``` {include=src/api/rtcGetGeometryUserDataFromScene.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetGeometryUserPrimitiveCount
|
||||
``` {include=src/api/rtcSetGeometryUserPrimitiveCount.md}
|
||||
@@ -310,11 +349,22 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcGetSYCLDeviceFunctionPointer
|
||||
``` {include=src/api/rtcGetSYCLDeviceFunctionPointer.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
|
||||
## rtcSetGeometryInstancedScene
|
||||
``` {include=src/api/rtcSetGeometryInstancedScene.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetGeometryInstancedScenes
|
||||
``` {include=src/api/rtcSetGeometryInstancedScenes.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetGeometryTransform
|
||||
``` {include=src/api/rtcSetGeometryTransform.md}
|
||||
```
|
||||
@@ -330,6 +380,15 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcGetGeometryTransformEx
|
||||
``` {include=src/api/rtcGetGeometryTransformEx.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcGetGeometryTransformFromScene
|
||||
``` {include=src/api/rtcGetGeometryTransformFromScene.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcSetGeometryTessellationRate
|
||||
``` {include=src/api/rtcSetGeometryTessellationRate.md}
|
||||
@@ -447,8 +506,23 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcInitIntersectContext
|
||||
``` {include=src/api/rtcInitIntersectContext.md}
|
||||
## RTCFeatureFlags
|
||||
``` {include=src/api/RTCFeatureFlags.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcInitIntersectArguments
|
||||
``` {include=src/api/rtcInitIntersectArguments.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcInitOccludedArguments
|
||||
``` {include=src/api/rtcInitOccludedArguments.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcInitRayQueryContext
|
||||
``` {include=src/api/rtcInitRayQueryContext.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
@@ -472,43 +546,23 @@
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcIntersect1M
|
||||
``` {include=src/api/rtcIntersect1M.md}
|
||||
## rtcForwardIntersect1
|
||||
``` {include=src/api/rtcForwardIntersect1.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcOccluded1M
|
||||
``` {include=src/api/rtcOccluded1M.md}
|
||||
## rtcForwardOccluded1
|
||||
``` {include=src/api/rtcForwardOccluded1.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcIntersect1Mp
|
||||
``` {include=src/api/rtcIntersect1Mp.md}
|
||||
## rtcForwardIntersect4/8/16
|
||||
``` {include=src/api/rtcForwardIntersect4.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcOccluded1Mp
|
||||
``` {include=src/api/rtcOccluded1Mp.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcIntersectNM
|
||||
``` {include=src/api/rtcIntersectNM.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcOccludedNM
|
||||
``` {include=src/api/rtcOccludedNM.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcIntersectNp
|
||||
``` {include=src/api/rtcIntersectNp.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
## rtcOccludedNp
|
||||
``` {include=src/api/rtcOccludedNp.md}
|
||||
## rtcForwardOccluded4/8/16
|
||||
``` {include=src/api/rtcForwardOccluded4.md}
|
||||
```
|
||||
\pagebreak
|
||||
|
||||
|
||||
+423
-277
@@ -4,299 +4,343 @@ Embree API
|
||||
``` {include=src/intro.md}
|
||||
```
|
||||
|
||||
Upgrading from Embree 2 to Embree 3
|
||||
Embree SYCL API
|
||||
===============
|
||||
|
||||
Embree supports ray tracing on Intel GPUs by using the SYCL
|
||||
programming language. SYCL is a Khronos standardized C++ based
|
||||
language for single source heterogenous programming for
|
||||
acceleration offload, see the [SYCL
|
||||
webpage](https://www.khronos.org/sycl/) for details.
|
||||
|
||||
The Embree SYCL API is designed for photorealistic rendering use
|
||||
cases, where scene setup is performed on the host, and rendering on
|
||||
the device. The Embree SYCL API is very similar to the standard Embree
|
||||
C99 API, and supports most of its features, such as all triangle-type
|
||||
geometries, all curve types and basis functions, point geometry types,
|
||||
user geometries, filter callbacks, multi-level instancing, and motion
|
||||
blur.
|
||||
|
||||
To enable SYCL support you have to include the
|
||||
`sycl.hpp` file before the Embree API headers:
|
||||
|
||||
#include <sycl/sycl.hpp>
|
||||
#include <embree4/rtcore.h>
|
||||
|
||||
Next you need to initializes an Embree SYCL device using the
|
||||
`rtcNewSYCLDevice` API function by providing a SYCL context.
|
||||
|
||||
Embree provides the `rtcIsSYCLDeviceSupported` API function to check
|
||||
if some SYCL device is supported by Embree. You can also use the
|
||||
`rtcSYCLDeviceSelector` to conveniently select the first SYCL device that
|
||||
is supported by Embree, e.g.:
|
||||
|
||||
sycl::device device(rtcSYCLDeviceSelector);
|
||||
sycl::queue queue(device, exception_handler);
|
||||
sycl::context context(device);
|
||||
RTCDevice device = rtcNewSYCLDevice(context,"");
|
||||
|
||||
Scenes created with an Embree SYCL device can only get used to trace
|
||||
rays using SYCL on the GPU, it is not possible to trace rays on the
|
||||
CPU with such a device. To render on the CPU and GPU in parallel, the
|
||||
user has to create a second Embree device and create a second
|
||||
scene to be used on the CPU.
|
||||
|
||||
Files containing SYCL code, have to get compiled with the Intel®
|
||||
oneAPI DPC++ compiler. Please see section [Linux SYCL Compilation] and
|
||||
[Windows SYCL Compilation] for supported compilers. The DPC++ compiler
|
||||
performs a two-phase compilation, where host code is compiled in a
|
||||
first phase, and device code compiled in a second compilation phase.
|
||||
|
||||
Standard Embree API functions for scene construction can get used on
|
||||
the host but not the device. Data buffers that are shared with Embree
|
||||
(e.g. for vertex of index buffers) have to get allocated as SYCL
|
||||
unified shared memory (USM memory), using the `sycl::malloc` or
|
||||
`sycl::aligned_alloc` calls with `sycl::usm::alloc::shared` property,
|
||||
or the sycl::aligned_alloc_shared call, e.g:
|
||||
|
||||
void* ptr = sycl::aligned_alloc(16, bytes, queue, sycl::usm::alloc::shared);
|
||||
|
||||
These shared allocations have to be valid during rendering, as Embree
|
||||
may access contained data when tracing rays. Embree does not support
|
||||
device-only memory allocations, as the BVH builder implemented on the
|
||||
CPU relies on reading the data buffers.
|
||||
|
||||
Device side rendering can get invoked by submitting a SYCL
|
||||
`parallel_for` to the SYCL queue:
|
||||
|
||||
const sycl::specialization_id<RTCFeatureFlags> feature_mask;
|
||||
|
||||
RTCFeatureFlags required_features = RTC_FEATURE_FLAG_TRIANGLE;
|
||||
|
||||
queue.submit([=](sycl::handler& cgh)
|
||||
{
|
||||
cgh.set_specialization_constant<feature_mask>(required_features);
|
||||
|
||||
cgh.parallel_for(sycl::range<1>(1),[=](sycl::id<1> item, sycl::kernel_handler kh)
|
||||
{
|
||||
RTCIntersectArguments args;
|
||||
rtcInitIntersectArguments(&args);
|
||||
|
||||
const RTCFeatureFlags features = kh.get_specialization_constant<feature_mask>();
|
||||
args.feature_mask = features;
|
||||
|
||||
struct RTCRayHit rayhit;
|
||||
rayhit.ray.org_x = ox;
|
||||
rayhit.ray.org_y = oy;
|
||||
rayhit.ray.org_z = oz;
|
||||
rayhit.ray.dir_x = dx;
|
||||
rayhit.ray.dir_y = dy;
|
||||
rayhit.ray.dir_z = dz;
|
||||
rayhit.ray.tnear = 0;
|
||||
rayhit.ray.tfar = std::numeric_limits<float>::infinity();
|
||||
rayhit.ray.mask = -1;
|
||||
rayhit.ray.flags = 0;
|
||||
rayhit.hit.geomID = RTC_INVALID_GEOMETRY_ID;
|
||||
rayhit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID;
|
||||
|
||||
rtcIntersect1(scene, &rayhit, &args);
|
||||
|
||||
result->geomID = rayhit.hit.geomID;
|
||||
result->primID = rayhit.hit.primID;
|
||||
result->tfar = rayhit.ray.tfar;
|
||||
});
|
||||
});
|
||||
queue.wait_and_throw();
|
||||
|
||||
|
||||
This example passes a feature mask using a specialization contant to
|
||||
the `rtcIntersect1` function, which is recommended for GPU
|
||||
rendering. For best performance, this feature mask should get used to
|
||||
enable only features required by the application to render the scene,
|
||||
e.g. just triangles in this example.
|
||||
|
||||
Inside the SYCL `parallel_for` loop you can use rendering related functions,
|
||||
such as the `rtcIntersect1` and `rtcOccluded1` functions to trace rays,
|
||||
`rtcForwardIntersect1/Ex` and `rtcForwardOccluded1/Ex` to continue object
|
||||
traversal from inside a user geometry callback,
|
||||
and `rtcGetGeometryUserDataFromScene` to get the user data pointer of some
|
||||
geometry.
|
||||
|
||||
Have a look at the [Minimal] tutorial for a minimal SYCL example.
|
||||
|
||||
|
||||
SYCL JIT caching
|
||||
-----------------
|
||||
|
||||
Compile times for just in time compilation (JIT compilation) can be
|
||||
large. To resolve this issue we recommend enabling persistent JIT
|
||||
compilation caching inside your application, by setting the
|
||||
`SYCL_CACHE_PERSISTENT` environment variable to `1`, and the
|
||||
`SYCL_CACHE_DIR` environment variable to some proper directory where
|
||||
the JIT cache should get stored. These environment variables have to
|
||||
get set before the SYCL device is created, e.g:
|
||||
|
||||
setenv("SYCL_CACHE_PERSISTENT","1",1);
|
||||
setenv("SYCL_CACHE_DIR","cache_dir",1);
|
||||
|
||||
sycl::device device(rtcSYCLDeviceSelector);
|
||||
...
|
||||
|
||||
|
||||
SYCL Memory Pooling
|
||||
--------------------
|
||||
|
||||
Memory Pooling is a mechanism where small USM memory allocations are
|
||||
packed into larger allocation blocks. This mode is required when your
|
||||
application performs many small USM allocations, as otherwise only a
|
||||
small fraction of GPU memory is usable and data transfer performance
|
||||
will be low.
|
||||
|
||||
Memory pooling is supported for USM allocations that are read-only by
|
||||
the device. The following example allocated device read-only memory
|
||||
with memory pooling support:
|
||||
|
||||
sycl::aligned_alloc_shared(align, bytes, queue,
|
||||
sycl::ext::oneapi::property::usm::device_read_only());
|
||||
|
||||
|
||||
Embree SYCL Limitations
|
||||
-----------------------
|
||||
|
||||
Embree only supports Xe HPC and HPG GPUs as SYCL devices, thus in
|
||||
particular the CPU and other GPUs cannot get used as a SYCL
|
||||
device. To render on the CPU just use the standard C99 API without
|
||||
relying on SYCL.
|
||||
|
||||
The SYCL language spec puts some restrictions to device functions,
|
||||
such as disallowing: global variable access, malloc, invokation of
|
||||
virtual functions, function pointers, runtime type information,
|
||||
exceptions, recursion, etc. See Section `5.4. Language Restrictions
|
||||
for device functions` of the [SYCL
|
||||
specification](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:language.restrictions.kernels)
|
||||
for more details.
|
||||
|
||||
Using Intel's oneAPI DPC++ compiler invoking an indirectly called
|
||||
function is allowed, but we do not recommend this for performance
|
||||
reasons.
|
||||
|
||||
Some features are not supported by the Embree SYCL API thus cannot
|
||||
get used on the GPU:
|
||||
|
||||
- The packet tracing functions `rtcIntersect4/8/16` and
|
||||
`rtcOccluded4/8/16` are not supported in SYCL
|
||||
device side code. Using these functions makes no sense for SYCL, as
|
||||
the programming model is implicitely executed in SIMT mode on the
|
||||
GPU anyway.
|
||||
|
||||
- Filter and user geometry callbacks stored inside the geometry
|
||||
objects are not supported on SYCL. Please use the alternative
|
||||
approach of passing the function pointer through the
|
||||
`RTCIntersectArguments` (or `RTCOccludedArguments`) structures to
|
||||
the tracing function, which enables inlining on the GPU.
|
||||
|
||||
- The `rtcInterpolate` function cannot get used on the the device. For
|
||||
most primitive types the vertex data interpolation is anyway a
|
||||
trivial operation, and an API call just introduces overheads. On the
|
||||
CPU that overhead is acceptable, but on the GPU it is not. The
|
||||
`rtcInterpolate` function does not know the geometry type it is
|
||||
interpolating over, thus its implementation on the GPU would contain
|
||||
a large switch statement for all potential geometry types.
|
||||
|
||||
- Tracing rays using `rtcIntersect1` and `rtcOccluded1` functions from
|
||||
user geometry callbacks is not supported in SYCL. Please use the
|
||||
tail recursive `rtcForwardIntersect1` and `rtcForwardOccluded1`
|
||||
calls instead.
|
||||
|
||||
- Subdivision surfaces are not supported for Embree SYCL devices.
|
||||
|
||||
- Collision detection (`rtcCollide` API call) is not supported in SYCL
|
||||
device side code.
|
||||
|
||||
- Point queries (`rtcPointQuery` API call) are not supported in SYCL
|
||||
device side code.
|
||||
|
||||
|
||||
Embree SYCL Known Issues
|
||||
------------------------
|
||||
|
||||
- The SYCL support of Embree is in beta phase. Current functionality,
|
||||
quality, and GPU performance may not reflect that of the final
|
||||
product.
|
||||
|
||||
- Compilation with build configuration "debug" is currently not working on
|
||||
Windows.
|
||||
|
||||
|
||||
Upgrading from Embree 3 to Embree 4
|
||||
===================================
|
||||
|
||||
We decided to introduce an improved API in Embree 3 that is not
|
||||
backward compatible with the Embree 2 API. This step was required to
|
||||
remove various deprecated API functions that accumulated over time,
|
||||
improve extensibility of the API, fix suboptimal design decisions,
|
||||
fix design mistakes (such as incompatible single ray and ray packet
|
||||
layouts), clean up inconsistent naming, and increase flexibility.
|
||||
This section summarizes API changes between Embree 3 and Embree4. Most
|
||||
of these changes are motivated by GPU performance and having a
|
||||
consistent API that works properly for the CPU and GPU.
|
||||
|
||||
To make porting to the new API easy, we provide a conversion script
|
||||
that can do most of the work, and will annotate the code with
|
||||
remaining changes required. The script can be invoked the following
|
||||
way for CPP files:
|
||||
- The API include folder got renamed from embree3 to embree4, to be
|
||||
able to install Embree 3 and Embree 4 side by side, without having
|
||||
conflicts in API folder.
|
||||
|
||||
./scripts/cpp-patch.py --patch embree2_to_embree3.patch
|
||||
--in infile.cpp --out outfile.cpp
|
||||
- The `RTCIntersectContext` is renamed to `RTCRayQueryContext` and the
|
||||
`RTCIntersectContextFlags` got renamed to `RTCRayQueryFlags`.
|
||||
|
||||
When invoked for Intel® ISPC files, add the `--ispc` option:
|
||||
- There are some changes to the `rtcIntersect` and `rtcOccluded`
|
||||
functions. Most members of the old intersect context have been
|
||||
moved to some optional `RTCIntersectArguments` (and
|
||||
`RTCOccludedArguments`) structures, which also contains a pointer to
|
||||
the new ray query context. The argument structs fulfill the task of
|
||||
providing additional advanced arguments to the traversal
|
||||
functions. The ray query context can get used to pass additional
|
||||
data to callbacks, and to maintain an instID stack in case
|
||||
instancing is done manually inside user geometry callbacks. The
|
||||
arguments struct is not available inside callbacks. This change was
|
||||
in particular necessary for SYCL to allow inlining of function
|
||||
pointers provided to the traversal functions, and to reduce the
|
||||
amount of state passed to callbacks, which both improves GPU
|
||||
performance. Most applications can just drop passing the ray query
|
||||
context to port to Embree 4.
|
||||
|
||||
- The `rtcFilterIntersection` and `rtcFilterOcclusion` API calls that
|
||||
invoke both, the geometry and argument version of the filter
|
||||
callback, from a user geometry callback are no longer
|
||||
supported. Instead applications should use the
|
||||
`rtcInvokeIntersectFilterFromGeometry` and
|
||||
`rtcInvokeOccludedFilterFromGeometry` API calls that invoke just the
|
||||
geometry version of the filter function, and invoke the argument
|
||||
filter function manually if required.
|
||||
|
||||
./scripts/cpp-patch.py --ispc --patch embree2_to_embree3.patch
|
||||
--in infile.ispc --out outfile.ispc
|
||||
- The filter function passed as arguments to `rtcIntersect` and
|
||||
`rtcOccluded` functions is only invoked for some geometry if enabled through
|
||||
`rtcSetGeometryEnableFilterFunctionFromArguments` for that
|
||||
geometry. Alternatively, argument filter functions can get enabled
|
||||
for all geometries using the
|
||||
`RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray query flag.
|
||||
|
||||
Apply the script to each source file of your project that contains
|
||||
Embree API calls or types. The input file and output file can also be
|
||||
identical to perform the patch in-place. Please always backup your
|
||||
original code before running the script, and inspect the code changes
|
||||
done by the script using diff (e.g. `git diff`), to make sure no
|
||||
undesired code locations got changed. Grep the code for comments
|
||||
containing `EMBREE_FIXME` and perform the action described in the
|
||||
comment.
|
||||
- User geometry callbacks get a valid vector as input to identify
|
||||
valid and invalid rays. In Embree 3 the user geometry callback just
|
||||
had to update the ray hit members when an intersection was found and
|
||||
perform no operation otherwise. In Embree 4 the callback
|
||||
additionally has to return valid=-1 when a hit was found, and
|
||||
valid=0 when no hit was found. This allows Embree to properly pass
|
||||
the new hit distance to the ray tracing hardware only in the case a
|
||||
hit was found.
|
||||
|
||||
The following changes need to be performed when switching from Embree
|
||||
2 to Embree 3. Most of these changes are automatically done by the
|
||||
script if not described differently.
|
||||
- Further ray masking is enabled by default now as required by most
|
||||
applications and the default ray mask for geometries got changed
|
||||
from 0xFFFFFFFF to 0x1.
|
||||
|
||||
We strongly recommend to set an error callback function (see
|
||||
`rtcSetDeviceErrorFunction`) when porting to Embree 3 to detect all
|
||||
runtime errors early.
|
||||
- The stream tracing functions `rtcIntersect1M`, `rtcIntersect1Mp`,
|
||||
`rtcIntersectNM`, `rtcIntersectNp`, `rtcOccluded1M`,
|
||||
`rtcOccluded1Mp`, `rtcOccludedNM`, and `rtcOccludedNp` got removed
|
||||
as they were rarely used and did not provide relevant performance
|
||||
benefits. As alternative the application can just iterate over
|
||||
`rtcIntersect1` and potentially `rtcIntersect4/8/16` to get similar
|
||||
performance.
|
||||
|
||||
To use Embree through SYCL on the CPU and GPU additional changes are
|
||||
required:
|
||||
|
||||
Device
|
||||
------
|
||||
- Embree 3 allows to use `rtcIntersect` recursively from a user
|
||||
geometry or intersection filter callback to continue a ray inside an
|
||||
instantiated object. In Embree 4 using `rtcIntersect` recursively is
|
||||
disallowed on the GPU but still supported on the CPU. To properly
|
||||
continue a ray inside an instantiated object use the new
|
||||
`rtcForwardIntersect1` and `rtcForwardOccluded1` functions.
|
||||
|
||||
* `rtcInit` and `rtcExit` got removed. Please use the device concept
|
||||
using the `rtcNewDevice` and `rtcReleaseDevice` functions
|
||||
instead.
|
||||
- The geometry object of Embree 4 is a host side only object, thus
|
||||
accessing it during rendering from the GPU is not allowed. Thus all
|
||||
API functions that take an RTCGeometry object as argument cannot get
|
||||
used during rendering. Thus in particular the
|
||||
`rtcGetGeometryUserData(RTCGeometry)` call cannot get used, but
|
||||
there is an alternative function
|
||||
`rtcGetGeometryUserDataFromScene(RTCScene scene,uint geomID)` that
|
||||
should get used instead.
|
||||
|
||||
* Functions that conceptually should operate on a device but did not
|
||||
get a device argument got removed. The upgrade script replaces
|
||||
these functions by the proper functions that operate on a device,
|
||||
however, manually propagating the device handle to these function
|
||||
calls might still be required.
|
||||
- The user geometry callback and filter callback functions should get
|
||||
passed through the intersection and occlusion argument structures to
|
||||
the `rtcIntersect1` and `rtcOccluded1` functions directly to allow
|
||||
inlining. The experimental geometry version of the callbacks is
|
||||
disabled in SYCL and should not get used.
|
||||
|
||||
Scene
|
||||
-----
|
||||
- The feature flags should get used in SYCL to minimal GPU code for
|
||||
optimal performance.
|
||||
|
||||
* The API no longer distinguishes between a static and a dynamic
|
||||
scene. Some users had issues as they wanted to do minor
|
||||
modifications to static scenes, but maintain high traversal
|
||||
performance.
|
||||
- The `rtcInterpolate` function cannot get used on the device, and
|
||||
vertex data interpolation should get implemented by the application.
|
||||
|
||||
The new approach gives more flexibility, as each scene is
|
||||
changeable, and build quality settings can be changed on a commit
|
||||
basis to balance between build performance and render performance.
|
||||
|
||||
* The `rtcCommitThread` function got removed; use
|
||||
`rtcJoinCommitScene` instead.
|
||||
|
||||
* The scene now supports different build quality settings. Please use
|
||||
those instead of the previous way of `RTC_SCENE_STATIC`,
|
||||
`RTC_SCENE_DYNAMIC`, and `RTC_SCENE_HIGH_QUALITY` flags.
|
||||
|
||||
Geometry
|
||||
--------
|
||||
|
||||
* There is now only one `rtcNewGeometry` function to create geometries
|
||||
which gets passed an enum to specify the type of geometry to create.
|
||||
The number of vertices and primitives of the geometries is inferred
|
||||
from the size of data buffers.
|
||||
|
||||
* We introduced an object type `RTCGeometry` for all geometries.
|
||||
Previously a geometry was not a standalone object and could only
|
||||
exist inside a scene. The new approach comes with more flexibility
|
||||
and more readable code.
|
||||
|
||||
Operations like `rtcInterpolate` can now be performed on the
|
||||
geometry object directly without the need of a scene. Further, an
|
||||
application can choose to create its geometries independent of a
|
||||
scene, e.g. each time a geometry node is added to its scene graph.
|
||||
|
||||
This modification changed many API functions to get passed one
|
||||
`RTCGeometry` object instead of a `RTCScene` and `geomID`. The
|
||||
script does all required changed automatically. However, in some
|
||||
cases the script may introduce `rtcGetGeometry(scene, geomID)`
|
||||
calls to retrieve the geometry handle. Best store the geometry
|
||||
handle inside your scene representation (and release it in the
|
||||
destructor) and access the handle directly instead of calling
|
||||
`rtcGetGeometry`.
|
||||
|
||||
* Geometries are not included inside a scene anymore but can be
|
||||
attached to a multiple scenes using the `rtcAttachGeomety` or
|
||||
`rtcAttachGeometryByID` functions.
|
||||
|
||||
* As geometries are separate objects, commit semantics got introduced
|
||||
for them too. Thus geometries must be committed through the
|
||||
`rtcCommitGeometry` call before getting used. This allows for
|
||||
earlier error checking and pre-calculating internal data per
|
||||
geometry object.
|
||||
|
||||
Such commit points were previously not required in the Embree 2
|
||||
API. The upgrade script attempts to insert the commits
|
||||
automatically, but cannot do so properly under all
|
||||
circumstances. Thus please check if every `rtcCommitGeometry` call
|
||||
inserted by the script is properly placed, and if a
|
||||
`rtcCommitGeometry` call is placed after a sequence of
|
||||
changes to a geometry.
|
||||
|
||||
* Only the latest version of the previous displacement function call
|
||||
(`RTCDisplacementFunc2`) is now supported, and the callback is
|
||||
passed as a structure containing all arguments.
|
||||
|
||||
* The deprecated `RTCBoundaryMode` type and `rtcSetBoundaryMode`
|
||||
function got removed and replaced by `RTCSubdivisionMode` enum and
|
||||
the `rtcSetGeometrySubdivisionMode` function. The script does this
|
||||
replacement automatically.
|
||||
|
||||
* Ribbon curves and lines now avoid self-intersections automatically
|
||||
The application can be simplified by removing special code paths
|
||||
that previously did the self-intersection handling.
|
||||
|
||||
* The previous Embree 2 way of instancing was suboptimal as it
|
||||
required user geometries to update the `instID` field of the ray
|
||||
differently when used inside an instanced scene or inside a
|
||||
top-level scene. The user geometry intersection code now just
|
||||
has to copy the `context.instID` field into the `ray.instID`
|
||||
field to function properly under all circumstances.
|
||||
|
||||
* The internal instancing code will update the `context.instID` field
|
||||
properly when entering or leaving an instance. When instancing is
|
||||
implemented manually through user geometries, the code must be
|
||||
modified to set the `context.instID` field properly and no longer
|
||||
pass `instID` through the ray. This change must done manually
|
||||
and cannot be performed by the script.
|
||||
|
||||
* We flipped the direction of the geometry normal to the widely used
|
||||
convention that a shape with counter-clockwise layout of vertices
|
||||
has the normal pointing upwards (right-hand rule). Most modeling tools
|
||||
follow that convention.
|
||||
|
||||
The conversion script does not perform this change, thus if
|
||||
required adjust your code to flip `Ng` for triangle, quad, and
|
||||
subdivision surfaces.
|
||||
|
||||
Buffers
|
||||
-------
|
||||
|
||||
* With Embree 3 we are introducing explicit `RTCBuffer` objects.
|
||||
However, you can still use the short way of sharing buffers with
|
||||
Embree through the `rtcSetSharedGeometryBuffer` call.
|
||||
|
||||
* The `rtcMapBuffer` and `rtcUnmapBuffer` API calls were removed, and
|
||||
we added the `rtcGetBufferData` call instead.
|
||||
|
||||
Previously the `rtcMapBuffer` call had the semantics of creating
|
||||
an internal buffer when no buffer was shared for the corresponding
|
||||
buffer slot. These invocations of `rtcMapBuffer` must be
|
||||
replaced by an explicit creation of an internally managed buffer
|
||||
using the `rtcNewGeometryBuffer` function.
|
||||
|
||||
The upgrade script cannot always detect if the `rtcMapBuffer` call
|
||||
would create an internal buffer or just map the buffer pointer.
|
||||
Thus check whether the `rtcNewGeometryBuffer` and
|
||||
`rtcGetBufferData` calls are correct after the conversion.
|
||||
|
||||
* The `rtcUpdateGeometryBuffer` function now must be called for
|
||||
every buffer that got modified by the application. Note that the
|
||||
conversion script cannot automatically detect each location where
|
||||
a buffer update is now required.
|
||||
|
||||
* The buffer type no longer encodes the time step or user vertex
|
||||
buffer index. Now `RTC_VERTEX_BUFFER_TYPE` and additional `slot`
|
||||
specifies the vertex buffer for a specific time step, and
|
||||
`RTC_USER_VERTEX_BUFFER_TYPE` and additional `slot` specifies a
|
||||
vertex attribute.
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
* The header files for Embree 3 are now inside the `embree3` folder
|
||||
(instead of `embree2` folder) and `libembree.so` is now called
|
||||
`libembree3.so` to be able to install multiple Embree versions side
|
||||
by side. We made the headers C99 compliant.
|
||||
|
||||
* All API objects are now reference counted with release functions to
|
||||
decrement and retain functions to increment the reference count
|
||||
(if required).
|
||||
|
||||
* Most callback functions no longer get different arguments as input,
|
||||
but a pointer to a structure containing all arguments. This
|
||||
results in more readable code, faster callback invocation (as some
|
||||
arguments do not change between invocations) and is extensible, as
|
||||
new members to the structure can be later added in a backward
|
||||
compatible way (if required).
|
||||
|
||||
The conversion script can convert the definition and declaration
|
||||
of the old callback functions in most cases. Before running the
|
||||
script, make sure that you never type-cast a callback function
|
||||
when assigning it (as this has the danger of assigning a callback
|
||||
function with a wrong type if the conversion did not detect some
|
||||
callbacks as such). If the script does not detect a callback
|
||||
function, make sure the argument types match exactly the types in
|
||||
the header (e.g. write `const int` instead of `int const` or
|
||||
convert the callback manually).
|
||||
|
||||
* An intersection context is now required for each ray query
|
||||
invocation. The context should be initialized using the
|
||||
`rtcInitIntersectContext` function.
|
||||
|
||||
* The `rtcIntersect`-type functions get as input an `RTCRayHit` type,
|
||||
which is similar to before, but has the ray and hit parts split
|
||||
into two sub-structures.
|
||||
|
||||
The `rtcOccluded`-type functions get as input an `RTCRay` type,
|
||||
which does not contain hit data anymore. When an occlusion is
|
||||
found, the `tfar` element of the ray is set to `-inf`.
|
||||
|
||||
Required code changes cannot be done by the upgrade script and
|
||||
need to be done manually.
|
||||
|
||||
* The ray layout for single rays and packets of rays had certain
|
||||
incompatibilities (alignment of `org` and `dir` for single rays
|
||||
caused gaps in the single ray layout that were not in the ray
|
||||
packet layout). This issue never showed up because single rays
|
||||
and ray packets were separate in the system initially. This layout
|
||||
issue is now fixed, and a single ray has the same layout as a ray
|
||||
packet of size 1.
|
||||
|
||||
* Previously Embree supported placing additional data at the end of
|
||||
the ray structure, and accessing that data inside user geometry
|
||||
callbacks and filter callback functions.
|
||||
|
||||
With Embree 3 this is no longer supported, and the ray passed to a
|
||||
callback function may be copied to a different memory location. To
|
||||
attach additional data to your ray, simply extend the intersection
|
||||
context with a pointer to that data.
|
||||
|
||||
This change cannot be done by the script. Further, code will still
|
||||
work if you extend the ray as the implementation did not change yet.
|
||||
|
||||
* The ray structure now contains an additional `id` and `flags`
|
||||
field. The `id` can be used to store the index of the ray with
|
||||
respect to a ray packet or ray stream. The `flags` is reserved for
|
||||
future use, and currently must be set to 0.
|
||||
|
||||
* All previous intersection filter callback variants have been
|
||||
removed, except for the `RTCFilterFuncN` which gets a varying size
|
||||
ray packet as input. The semantics of this filter function type
|
||||
have changed from copying the hit on acceptance to clearing the
|
||||
ray's valid argument in case of non-acceptance. This way, chaining
|
||||
multiple filters is more efficient.
|
||||
|
||||
We kept the guarantee that for `rtcIntersect1/4/8/16` and
|
||||
`rtcOccluded1/4/8/16` calls the packet size and ray order will not
|
||||
change from the initial size and ordering when entering a filter
|
||||
callback.
|
||||
|
||||
* We no longer export Intel® ISPC-specific symbols. This has the advantage
|
||||
that certain linking issues went away, e.g. it is now possible to
|
||||
link an Intel® ISPC application compiled for any combination of ISAs, and
|
||||
link this to an Embree library compiled with a different set of
|
||||
ISAs. Previously the ISAs of the application had to be a subset of
|
||||
the ISAs of Embree, and when the user enabled exactly one ISA, they
|
||||
had to do this in Embree and the application.
|
||||
|
||||
* We no longer export the Intel® ISPC tasking system, which means that the
|
||||
application has the responsibility to implement the Intel® ISPC tasking
|
||||
system itself. Intel® ISPC comes with example code on how to do this. This
|
||||
change is not performed by the script and must be done manually.
|
||||
|
||||
* Fixed many naming inconsistencies, and changed names of further API
|
||||
functions. All these renamings are properly done by the script and
|
||||
need no further attention.
|
||||
- Indirectly called functions must be declared with
|
||||
`RTC_SYCL_INDIRECTLY_CALLABLE` when used as filter or user geometry
|
||||
callbacks.
|
||||
|
||||
\pagebreak
|
||||
|
||||
|
||||
Embree API Reference
|
||||
====================
|
||||
|
||||
``` {include=src/api-ref.md}
|
||||
```
|
||||
|
||||
Performance Recommendations
|
||||
===========================
|
||||
CPU Performance Recommendations
|
||||
===============================
|
||||
|
||||
MXCSR control and status register
|
||||
---------------------------------
|
||||
@@ -345,14 +389,11 @@ Fast Coherent Rays
|
||||
------------------
|
||||
|
||||
For getting the highest performance for highly coherent rays, e.g.
|
||||
primary or hard shadow rays, it is recommended to use packets or
|
||||
streams of single rays/packets with setting the
|
||||
`RTC_INTERSECT_CONTEXT_FLAG_COHERENT` flag in the
|
||||
`RTCIntersectContext` passed to the `rtcIntersect`/`rtcOccluded`
|
||||
calls. The total number of rays in a coherent stream of ray packets
|
||||
should be around 64, e.g. 8 times 8-wide packets, or 4 times 16-wide
|
||||
packets. The rays inside each packet should be grouped as coherent as
|
||||
possible.
|
||||
primary or hard shadow rays, it is recommended to use packets with
|
||||
setting the `RTC_RAY_QUERY_FLAG_COHERENT` flag in the
|
||||
`RTCIntersectArguments` struct passed to the
|
||||
`rtcIntersect`/`rtcOccluded` calls. The rays inside each packet should
|
||||
be grouped as coherent as possible.
|
||||
|
||||
Huge Page Support
|
||||
-----------------
|
||||
@@ -442,3 +483,108 @@ is reading these components using SSE loads later on.
|
||||
\pagebreak
|
||||
|
||||
|
||||
GPU Performance Recommendations
|
||||
================================
|
||||
|
||||
Low Code Complexity
|
||||
-------------------
|
||||
|
||||
As a general rule try to keep code complexity low, to avoid spill code
|
||||
generation. To achieve this we recommend splitting your renderer into
|
||||
separate kernels instead of using a single Uber kernel invokation.
|
||||
|
||||
Code can further get reduced by using SYCL specialization constants to
|
||||
just enable rendering features required to render a given scene.
|
||||
|
||||
Feature Flags
|
||||
-------------
|
||||
|
||||
Use SYCL specialization constants and the feature flags (see section
|
||||
[RTCFeatureFlags]) of the `rtcIntersect1` and `rtcOccluded1` calls to
|
||||
JIT compile minimal code. The passed feature flags should just contain
|
||||
features required to render the current scene. If JIT compile times
|
||||
are an issue, reduce the number of feature masks used and use JIT
|
||||
caching (see section [SYCL JIT caching]).
|
||||
|
||||
Inline Indirect Calls
|
||||
---------------------
|
||||
|
||||
Attaching user geometry and intersection filter callbacks to the
|
||||
geometries of the scene is not supported in SYCL for performance reasons.
|
||||
|
||||
Instead directly pass the user geometry and intersection filter
|
||||
callback functions through the `RTCIntersectArguments` (and
|
||||
`RTCOccludedArguments`) struct to `rtcIntersect1` (and `rtcOccluded1`)
|
||||
API functions as in the following example:
|
||||
|
||||
RTC_SYCL_INDIRECTLY_CALLABLE void intersectionFilter(
|
||||
const RTCFilterFunctionNArguments* args
|
||||
) { ... }
|
||||
|
||||
RTCIntersectArguments args;
|
||||
rtcInitIntersectArguments(&args);
|
||||
args.filter = intersectionFilter;
|
||||
|
||||
rtcIntersect1(scene,&ray,&args);
|
||||
|
||||
If the callback function is directly passed that way, the SYCL
|
||||
compiler can inline the indirect call, which gives a huge performance
|
||||
benefit. Do *not* read a function pointer form some memory location
|
||||
and pass it to `rtcIntersect1` (and `rtcOccluded1`) as this will also
|
||||
prevent inlining.
|
||||
|
||||
7 Bit Ray Mask
|
||||
--------------
|
||||
|
||||
Use just the lower 7 bits of the ray and geometry mask if possible,
|
||||
even though Embree supports 32 bit ray masks for geometry masking. On
|
||||
the CPU using any of the 32 bits yields the same performance, but the
|
||||
ray tracing hardware only supports an 8 bit mask, thus Embree has to
|
||||
emulate 32 bit masking if used. For that reason the lower 7 mask bits are
|
||||
hardware accelerated and fast, while the mask bits 7-31 require some
|
||||
software intervention and using them reduces performance. To turn on 32 bit
|
||||
ray masks use the RTC_FEATURE_FLAG_32_BIT_RAY_MASK (see section [RTCFeatureFlags]).
|
||||
|
||||
Limit Motion Blur Motions
|
||||
-------------------------
|
||||
|
||||
The motion blur implementation on SYCL has some limitations regarding
|
||||
supported motion. Primitive motion should be maximally as large as a
|
||||
small multiple of the primitive size, otherwise performance can
|
||||
degrade a lot. If detailed geometry moves fast, best put the geometry
|
||||
into an instance, and apply motion blur to the instance itself, which
|
||||
efficiently allows larger motions. As a fallback, problematic scenes
|
||||
can always still get rendered robustly on the CPU.
|
||||
|
||||
Generic Pointers
|
||||
----------------
|
||||
|
||||
Embree uses standard C++ pointers in its implementation. SYCL might
|
||||
not be able to detect the memory space these pointers refer to and has
|
||||
to treat them as generic pointers which are not performing optimal. The DPC++
|
||||
compiler has advanced optimizations to infer the proper address space
|
||||
to avoid usage of generic pointers.
|
||||
|
||||
However, if you still encounter the following warning during ahead of
|
||||
time compilation of SYCL kernels, then loads from generic pointer are
|
||||
present:
|
||||
|
||||
warning: Adding XX occurrences of additional control flow due to presence
|
||||
of generic address space operations in function YYY.
|
||||
|
||||
To work around this issue we recommend:
|
||||
|
||||
- Do not use local memory inside kernels that trace rays. In this case
|
||||
the DPC++ compiler knows that no local memory pointer can exist and
|
||||
will optimize generic loads. As this is typically the case for
|
||||
renderers, generic pointer will typically not cause issues.
|
||||
|
||||
- Indirectly callable functions may still cause problems, even if your
|
||||
kernel does not use local memory. Thus best use SYCL pointers like
|
||||
sycl::global_ptr<T> and sycl::private_ptr<T> in indirectly callable
|
||||
functions to avoid generic address space usage.
|
||||
|
||||
- You can also enforce usage of global pointers using the following
|
||||
DPC++ compile flags: `-cl-intel-force-global-mem-allocation
|
||||
-cl-intel-no-local-to-generic`.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
% RTCBufferType(3) | Embree Ray Tracing Kernels 3
|
||||
% RTCBufferType(3) | Embree Ray Tracing Kernels 4
|
||||
|
||||
#### NAME
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#### SYNOPSIS
|
||||
|
||||
#include <embree3/rtcore_ray.h>
|
||||
#include <embree4/rtcore_ray.h>
|
||||
|
||||
enum RTCBufferType
|
||||
{
|
||||
@@ -26,6 +26,8 @@
|
||||
RTC_BUFFER_TYPE_VERTEX_CREASE_INDEX = 20,
|
||||
RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT = 21,
|
||||
RTC_BUFFER_TYPE_HOLE = 22,
|
||||
|
||||
RTC_BUFFER_TYPE_TRANSFORM = 23,
|
||||
|
||||
RTC_BUFFER_TYPE_FLAGS = 32
|
||||
};
|
||||
@@ -60,6 +62,10 @@ The `RTC_BUFFER_TYPE_FACE`, `RTC_BUFFER_TYPE_LEVEL`,
|
||||
special buffers required to create subdivision meshes (see
|
||||
[RTC_GEOMETRY_TYPE_SUBDIVISION]).
|
||||
|
||||
The `RTC_BUFFER_TYPE_TRANSFORM` buffer is used to provide instance
|
||||
transformation information for instance array geometries (see
|
||||
[RTC_GEOMETRY_TYPE_INSTANCE_ARRAY]).
|
||||
|
||||
The `RTC_BUFFER_TYPE_FLAGS` can get used to add additional flag per
|
||||
primitive of a geometry, and is currently only used for linear curves.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
% RTCCurveFlags(3) | Embree Ray Tracing Kernels 3
|
||||
% RTCCurveFlags(3) | Embree Ray Tracing Kernels 4
|
||||
|
||||
#### NAME
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
#### SYNOPSIS
|
||||
|
||||
#include <embree3/rtcore.h>
|
||||
#include <embree4/rtcore.h>
|
||||
|
||||
enum RTCCurveFlags
|
||||
{
|
||||
RTC_CURVE_FLAG_NEIGHBOR_LEFT = (1 << 0),
|
||||
RTC_CURVE_FLAG_NEIGHBOR_RIGHT = (1 << 1)
|
||||
};
|
||||
enum RTCCurveFlags
|
||||
{
|
||||
RTC_CURVE_FLAG_NEIGHBOR_LEFT = (1 << 0),
|
||||
RTC_CURVE_FLAG_NEIGHBOR_RIGHT = (1 << 1)
|
||||
};
|
||||
|
||||
#### DESCRIPTION
|
||||
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
% RTCFeatureFlags(3) | Embree Ray Tracing Kernels 4
|
||||
|
||||
#### NAME
|
||||
|
||||
RTCFeatureFlags - specifies features to enable
|
||||
for ray queries
|
||||
|
||||
#### SYNOPSIS
|
||||
|
||||
#include <embree4/rtcore_ray.h>
|
||||
|
||||
enum RTCFeatureFlags
|
||||
{
|
||||
RTC_FEATURE_FLAG_NONE = 0,
|
||||
|
||||
RTC_FEATURE_FLAG_MOTION_BLUR = 1 << 0,
|
||||
|
||||
RTC_FEATURE_FLAG_TRIANGLE = 1 << 1,
|
||||
RTC_FEATURE_FLAG_QUAD = 1 << 2,
|
||||
RTC_FEATURE_FLAG_GRID = 1 << 3,
|
||||
RTC_FEATURE_FLAG_SUBDIVISION = 1 << 4,
|
||||
RTC_FEATURE_FLAG_POINT = ... ,
|
||||
RTC_FEATURE_FLAG_CURVES = ... ,
|
||||
|
||||
RTC_FEATURE_FLAG_CONE_LINEAR_CURVE = 1 << 5,
|
||||
RTC_FEATURE_FLAG_ROUND_LINEAR_CURVE = 1 << 6,
|
||||
RTC_FEATURE_FLAG_FLAT_LINEAR_CURVE = 1 << 7,
|
||||
|
||||
RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE = 1 << 8,
|
||||
RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE = 1 << 9,
|
||||
RTC_FEATURE_FLAG_NORMAL_ORIENTED_BEZIER_CURVE = 1 << 10,
|
||||
|
||||
RTC_FEATURE_FLAG_ROUND_BSPLINE_CURVE = 1 << 11,
|
||||
RTC_FEATURE_FLAG_FLAT_BSPLINE_CURVE = 1 << 12,
|
||||
RTC_FEATURE_FLAG_NORMAL_ORIENTED_BSPLINE_CURVE = 1 << 13,
|
||||
|
||||
RTC_FEATURE_FLAG_ROUND_HERMITE_CURVE = 1 << 14,
|
||||
RTC_FEATURE_FLAG_FLAT_HERMITE_CURVE = 1 << 15,
|
||||
RTC_FEATURE_FLAG_NORMAL_ORIENTED_HERMITE_CURVE = 1 << 16,
|
||||
|
||||
RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE = 1 << 17,
|
||||
RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE = 1 << 18,
|
||||
RTC_FEATURE_FLAG_NORMAL_ORIENTED_CATMULL_ROM_CURVE = 1 << 19,
|
||||
|
||||
RTC_FEATURE_FLAG_SPHERE_POINT = 1 << 20,
|
||||
RTC_FEATURE_FLAG_DISC_POINT = 1 << 21,
|
||||
RTC_FEATURE_FLAG_ORIENTED_DISC_POINT = 1 << 22,
|
||||
|
||||
RTC_FEATURE_FLAG_ROUND_CURVES = ... ,
|
||||
RTC_FEATURE_FLAG_FLAT_CURVES = ... ,
|
||||
RTC_FEATURE_FLAG_NORMAL_ORIENTED_CURVES = ... ,
|
||||
|
||||
RTC_FEATURE_FLAG_LINEAR_CURVES = ... ,
|
||||
RTC_FEATURE_FLAG_BEZIER_CURVES = ... ,
|
||||
RTC_FEATURE_FLAG_BSPLINE_CURVES = ... ,
|
||||
RTC_FEATURE_FLAG_HERMITE_CURVES = ... ,
|
||||
|
||||
RTC_FEATURE_FLAG_INSTANCE = 1 << 23,
|
||||
|
||||
RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = 1 << 24,
|
||||
RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY = 1 << 25,
|
||||
RTC_FEATURE_FLAG_FILTER_FUNCTION = ... ,
|
||||
|
||||
RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS = 1 << 26,
|
||||
RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_GEOMETRY = 1 << 27,
|
||||
RTC_FEATURE_FLAG_USER_GEOMETRY = ... ,
|
||||
|
||||
RTC_FEATURE_FLAG_32_BIT_RAY_MASK = 1 << 28,
|
||||
|
||||
RTC_FEATURE_FLAG_ALL = 0xffffffff
|
||||
};
|
||||
|
||||
|
||||
#### DESCRIPTION
|
||||
|
||||
The `RTCFeatureFlags` enum specify a bit mask to enable specific ray
|
||||
tracing features for ray query operations. The feature flags are
|
||||
passed to the `rtcIntersect1/4/8/16` and `rtcOccluded1/4/8/16`
|
||||
functions through the `RTCIntersectArguments` and
|
||||
`RTCOccludedArguments` structures. Only a ray tracing feature whose
|
||||
bit is enabled in the feature mask can get used. If a feature bit is
|
||||
not set, the behaviour is undefined, thus the feature may work or
|
||||
not. To enable multiple features the respective features have to get
|
||||
combined using a bitwise `OR` operation.
|
||||
|
||||
The purpose of feature flags is to reduce code size on the GPU by
|
||||
enabling just the features required to render the scene. On the CPU
|
||||
there is no need to use feature flags, and the default of all features
|
||||
enabled (`RTC_FEATURE_FLAG_ALL`) can just be kept.
|
||||
|
||||
The following features can get enabled using feature flags:
|
||||
|
||||
- RTC_FEATURE_FLAG_MOTION_BLUR: Enables motion blur for all geometry types.
|
||||
|
||||
- RTC_FEATURE_FLAG_TRIANGLE: Enables triangle geometries (RTC_GEOMETRY_TYPE_TRIANGLE).
|
||||
|
||||
- RTC_FEATURE_FLAG_QUAD: Enables quad geometries (RTC_GEOMETRY_TYPE_QUAD).
|
||||
|
||||
- RTC_FEATURE_FLAG_GRID: Enables grid geometries (RTC_GEOMETRY_TYPE_GRID).
|
||||
|
||||
- RTC_FEATURE_FLAG_SUBDIVISION: Enables subdivision geometries (RTC_GEOMETRY_TYPE_SUBDIVISION).
|
||||
|
||||
- RTC_FEATURE_FLAG_POINT: Enables all point geometry types (RTC_GEOMETRY_TYPE_XXX_POINT)
|
||||
|
||||
- RTC_FEATURE_FLAG_CURVES: Enables all curve geometry types (RTC_GEOMETRY_TYPE_XXX_YYY_CURVE)
|
||||
|
||||
- RTC_FEATURE_FLAG_ROUND_CURVES: Enables all round curves (RTC_GEOMETRY_TYPE_ROUND_XXX_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FLAT_CURVES: Enables all flat curves (RTC_GEOMETRY_TYPE_FLAT_XXX_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_CURVES: Enables all normal oriented curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_XXX_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_LINEAR_CURVES: Enables all linear curves (RTC_GEOMETRY_TYPE_XXX_LINEAR_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_BEZIER_CURVES: Enables all Bézier curves (RTC_GEOMETRY_TYPE_XXX_BEZIER_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_BSPLINE_CURVES: Enables all B-spline curves (RTC_GEOMETRY_TYPE_XXX_BSPLINE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_HERMITE_CURVES: Enables all Hermite curves (RTC_GEOMETRY_TYPE_XXX_HERMITE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_CONE_LINEAR_CURVE: Enables cone geometry type (RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_ROUND_LINEAR_CURVE: Enables round linear curves (RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FLAT_LINEAR_CURVE: Enables flat linear curves (RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE: Enables round Bézier curves (RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE: Enables flat Bézier curves (RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_BEZIER_CURVE: Enables normal oriented Bézier curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_ROUND_BSPLINE_CURVE: Enables round B-spline curves (RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FLAT_BSPLINE_CURVE: Enables flat B-spline curves (RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_BSPLINE_CURVE: Enables normal oriented B-spline curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_ROUND_HERMITE_CURVE: Enables round Hermite curves (RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FLAT_HERMITE_CURVE: Enables flat Hermite curves (RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_HERMITE_CURVE: Enables normal oriented Hermite curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE: Enables round Catmull Rom curves (RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE: Enables flat Catmull Rom curves (RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_CATMULL_ROM_CURVE: Enables normal oriented Catmull Rom curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE).
|
||||
|
||||
- RTC_FEATURE_FLAG_SPHERE_POINT: Enables sphere geometry type (RTC_GEOMETRY_TYPE_SPHERE_POINT).
|
||||
|
||||
- RTC_FEATURE_FLAG_DISC_POINT: Enables disc geometry type (RTC_GEOMETRY_TYPE_DISC_POINT).
|
||||
|
||||
- RTC_FEATURE_FLAG_ORIENTED_DISC_POINT: Enables oriented disc geometry types (RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT).
|
||||
|
||||
- RTC_FEATURE_FLAG_INSTANCE: Enables instance geometries (RTC_GEOMETRY_TYPE_INSTANCE).
|
||||
|
||||
- RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS: Enables filter functions passed through intersect arguments.
|
||||
|
||||
- RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY: Enable filter functions passed through geometry.
|
||||
|
||||
- RTC_FEATURE_FLAG_FILTER_FUNCTION: Enables filter functions (argument and geometry version).
|
||||
|
||||
- RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS: Enables RTC_GEOMETRY_TYPE_USER with function pointer passed through intersect arguments.
|
||||
|
||||
- RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_GEOMETRY: Enables RTC_GEOMETRY_TYPE_USER with function pointer passed through geometry object.
|
||||
|
||||
- RTC_FEATURE_FLAG_USER_GEOMETRY: Enables RTC_GEOMETRY_TYPE_USER geometries (both argument and geometry callback versions).
|
||||
|
||||
- RTC_FEATURE_FLAG_32_BIT_RAY_MASK: Enables full 32 bit ray masks. If not used, only the lower 7 bits in the ray mask are handled correctly.
|
||||
|
||||
- RTC_FEATURE_FLAG_ALL: Enables all features (default).
|
||||
|
||||
|
||||
#### EXIT STATUS
|
||||
|
||||
#### SEE ALSO
|
||||
|
||||
[rtcIntersect1], [rtcIntersect4/8/16], [rtcOccluded1], [rtcOccluded4/8/16],
|
||||
|
||||
+16
-11
@@ -1,4 +1,4 @@
|
||||
% RTCFormat(3) | Embree Ray Tracing Kernels 3
|
||||
% RTCFormat(3) | Embree Ray Tracing Kernels 4
|
||||
|
||||
#### NAME
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#### SYNOPSIS
|
||||
|
||||
#include <embree3/rtcore_ray.h>
|
||||
#include <embree4/rtcore_ray.h>
|
||||
|
||||
enum RTCFormat
|
||||
{
|
||||
@@ -39,7 +39,9 @@
|
||||
RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,
|
||||
|
||||
RTC_FORMAT_GRID,
|
||||
};
|
||||
|
||||
RTC_FORMAT_QUATERNION_DECOMPOSITION
|
||||
};
|
||||
|
||||
#### DESCRIPTION
|
||||
|
||||
@@ -58,14 +60,16 @@ of (size 2,3,4, etc.). This format is typcally used to specify to
|
||||
format of vertex buffers, e.g. the `RTC_FORMAT_FLOAT3` type for vertex
|
||||
buffers of triangle meshes.
|
||||
|
||||
The `RTC_FORMAT_FLOAT3X4_ROW_MAJOR` and
|
||||
`RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR` formats, specify a 3x4 floating
|
||||
point matrix layed out either row major or column major. The
|
||||
`RTC_FORMAT_FLOAT4X4_ROW_MAJOR` and `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`
|
||||
formats, specify a 4x4 floating point matrix layed out either row
|
||||
major or column major. These matrix formats are used in the
|
||||
[rtcSetGeometryTransform] function in order to set a transformation
|
||||
matrix for geometries.
|
||||
The `RTC_FORMAT_FLOAT3X4_ROW_MAJOR` and `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`
|
||||
formats, specify a 3x4 floating point matrix layed out either row major or
|
||||
column major. The `RTC_FORMAT_FLOAT4X4_ROW_MAJOR` and
|
||||
`RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR` formats, specify a 4x4 floating point matrix
|
||||
layed out either row major or column major. The
|
||||
`RTC_FORMAT_QUATERNION_DECOMPOSITION` format specifies a structure that
|
||||
represents a quaternion decomposition (see [RTCQuaternionDecomposition]) of an affine
|
||||
transformation. These formats are used in the [rtcSetGeometryTransform]
|
||||
function or in geometry buffers with type `RTC_BUFFER_TYPE_TRANSFORM` in order
|
||||
to set a transformation matrix for instance and instance array geometries.
|
||||
|
||||
The `RTC_FORMAT_GRID` is a special data format used to specify grid
|
||||
primitives of layout RTCGrid when creating grid geometries
|
||||
@@ -77,3 +81,4 @@ primitives of layout RTCGrid when creating grid geometries
|
||||
|
||||
[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer],
|
||||
[rtcSetNewGeometryBuffer], [rtcSetGeometryTransform]
|
||||
[RTCQuaternionDecomposition]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user