Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae029e2ff8 | ||
|
|
670df72a3a | ||
|
|
461c10b22c | ||
|
|
949666d795 | ||
|
|
a2b90bd746 | ||
|
|
a1ebb79c24 | ||
|
|
7aff42d392 | ||
|
|
8a5119963e | ||
|
|
efede4b37f | ||
|
|
213eb5214c | ||
|
|
1885d90319 | ||
|
|
0c047fa0c9 | ||
|
|
ce6753cd0d | ||
|
|
9f27037d84 | ||
|
|
04a6c345cb | ||
|
|
2f6d9ec17c | ||
|
|
0247adc528 | ||
|
|
504bb38867 | ||
|
|
d8d4f887ab | ||
|
|
5deeae445f | ||
|
|
6237e6788c | ||
|
|
f29293d687 | ||
|
|
62e0d47552 | ||
|
|
b57b7f4b1b | ||
|
|
f37d2e0a56 | ||
|
|
264d71553d | ||
|
|
7d73b3e5d5 | ||
|
|
4fa7c8b0c7 | ||
|
|
dfa1d5a7d9 | ||
|
|
13da35b584 | ||
|
|
40b1091bc5 | ||
|
|
d46eddf3f3 | ||
|
|
baeef000dd | ||
|
|
384efb70fe | ||
|
|
623960e391 | ||
|
|
c89d3de092 | ||
|
|
a29e363f12 | ||
|
|
2e97c9f92c | ||
|
|
835f2b57a9 | ||
|
|
639fbf8cd9 | ||
|
|
e5a2cea8d5 | ||
|
|
3898940bcd | ||
|
|
056a9e7dc4 | ||
|
|
42d4f38e02 | ||
|
|
4581081641 | ||
|
|
07c64ec106 | ||
|
|
d35320860f | ||
|
|
96ba2bed57 | ||
|
|
f678d63ea7 | ||
|
|
cbfbc969fb | ||
|
|
0731fd0338 | ||
|
|
9ec167bf04 | ||
|
|
0a4d8ec5f1 | ||
|
|
c68f339e1e | ||
|
|
e109203224 | ||
|
|
c0b65981c0 | ||
|
|
85b320a34f | ||
|
|
5ce93dacc2 | ||
|
|
09c1969e03 | ||
|
|
87494d0978 | ||
|
|
eae2870a45 | ||
|
|
be4715e621 | ||
|
|
57ca1510da | ||
|
|
19c8dc2d20 | ||
|
|
f8ad5e55cc | ||
|
|
88cd78e4bd | ||
|
|
d50cbce989 | ||
|
|
654f5f023d | ||
|
|
9304aff7bb | ||
|
|
857473ac60 | ||
|
|
0d9493efc8 | ||
|
|
73a9e77d97 | ||
|
|
9274139733 | ||
|
|
a1a7626226 | ||
|
|
3b15dd2379 | ||
|
|
8b7a02d882 | ||
|
|
48a6471cdf | ||
|
|
69bd4c272f | ||
|
|
94f69c5ca1 | ||
|
|
14b7e53e6c | ||
|
|
329d234d31 | ||
|
|
08c2d4de16 | ||
|
|
01b117b05d | ||
|
|
a35cbd1c36 | ||
|
|
cb6b0a4aba | ||
|
|
d33283f419 | ||
|
|
47066e6ea5 | ||
|
|
0d0a04ef51 | ||
|
|
a05a8143d6 | ||
|
|
02cd963f6f | ||
|
|
e9faadf032 | ||
|
|
c181c51991 | ||
|
|
68cd621791 | ||
|
|
3979d82992 | ||
|
|
8963ee3304 | ||
|
|
7df9121597 | ||
|
|
c6eebe1e5e | ||
|
|
dc490e8e03 | ||
|
|
1a33a89110 | ||
|
|
7ae8045103 | ||
|
|
5bf6edf578 | ||
|
|
b46d1971fb | ||
|
|
0b0daf57f8 | ||
|
|
8f5e318762 | ||
|
|
6311a90ee3 | ||
|
|
b62a7b6e53 | ||
|
|
b89537429f | ||
|
|
7a36f2908b | ||
|
|
3eaf7ac7af | ||
|
|
9ee15a7044 | ||
|
|
c7e824b057 | ||
|
|
475b49da4a | ||
|
|
012b200017 | ||
|
|
fbc0f1ce65 | ||
|
|
61fc84f829 | ||
|
|
69481ba67a | ||
|
|
3d4ceea0b2 | ||
|
|
2246d5277f | ||
|
|
06dae285ec | ||
|
|
51568d1989 | ||
|
|
082f299f27 | ||
|
|
d3b1f8a715 | ||
|
|
c2025fa1dc | ||
|
|
73cb01872d | ||
|
|
dabd228613 | ||
|
|
c3b686664d | ||
|
|
a217074cd7 | ||
|
|
70e27179ff | ||
|
|
979c2d8ecb | ||
|
|
b1abd5cd0f | ||
|
|
9f62336da5 | ||
|
|
ab909013fc | ||
|
|
5089ee7708 | ||
|
|
610dbef48c | ||
|
|
15d55deb23 | ||
|
|
93aa94bc7b | ||
|
|
ff70fbe665 | ||
|
|
d351ebf074 | ||
|
|
55832fe60a | ||
|
|
7d0ddaad44 | ||
|
|
2a5df9e8ac | ||
|
|
5d55bfca80 | ||
|
|
5bf7c3595b | ||
|
|
46f8b9e32d | ||
|
|
2cad0edc7e | ||
|
|
1b9cf10740 | ||
|
|
10dbf82a6d | ||
|
|
baf8870640 | ||
|
|
7ffe6b59cc | ||
|
|
36a0705b17 | ||
|
|
147da10f00 | ||
|
|
f1b5b55c9c | ||
|
|
ea5c985a31 | ||
|
|
89130e60fe | ||
|
|
a7c1759354 | ||
|
|
7e6a13f12e | ||
|
|
338d2a6837 | ||
|
|
24dfe5131f | ||
|
|
0227588aee | ||
|
|
37c9a0c0b2 | ||
|
|
01f2ac269a | ||
|
|
db1d8cd94d | ||
|
|
292a0643b5 | ||
|
|
c2323884b3 | ||
|
|
2c6dd4841f | ||
|
|
c27e845515 | ||
|
|
090da16ccd | ||
|
|
a9db3e26c6 | ||
|
|
426fe69ee6 | ||
|
|
d7440cb45b | ||
|
|
b00870f214 | ||
|
|
bf605799b3 | ||
|
|
fa91d343ab | ||
|
|
4154ee8b7e | ||
|
|
3a4a3cf83c | ||
|
|
4587023c60 | ||
|
|
cc8c3aac00 | ||
|
|
68885d5d11 | ||
|
|
6b6f6db6ec | ||
|
|
6127a79af0 | ||
|
|
1d064a6226 | ||
|
|
a137abfddb | ||
|
|
832fb8c3a1 | ||
|
|
dc33d5e176 | ||
|
|
e3d465ede4 | ||
|
|
cd2a9adb9d | ||
|
|
8458389aee | ||
|
|
64479d9472 | ||
|
|
8601b7460f | ||
|
|
590849e314 | ||
|
|
e136609131 | ||
|
|
df1620c442 | ||
|
|
d079246478 | ||
|
|
9c7553e082 | ||
|
|
a08c891f60 | ||
|
|
f09934af76 | ||
|
|
765f588e6d | ||
|
|
e80e96cc30 | ||
|
|
1dc2b17c65 | ||
|
|
68b448b210 | ||
|
|
67205d1e03 | ||
|
|
cbbb5e2807 | ||
|
|
29aa4b3f96 | ||
|
|
9a16ccb139 | ||
|
|
90d6a8823d | ||
|
|
30d194dd41 | ||
|
|
20aa73a61e | ||
|
|
a55c4ee979 | ||
|
|
7ed0ed5220 | ||
|
|
39568f036e | ||
|
|
cc3928d795 | ||
|
|
b25b1529bd | ||
|
|
c6e77e294f | ||
|
|
91546c27af | ||
|
|
e55f7906dd | ||
|
|
12184e53ce | ||
|
|
b34300b423 | ||
|
|
012733dfc5 | ||
|
|
fad7c4e283 | ||
|
|
357d441fd6 | ||
|
|
188bd89bc4 | ||
|
|
4fc0a766d1 | ||
|
|
22edb0e9d4 | ||
|
|
dcfb1d38ac | ||
|
|
32621d2667 | ||
|
|
75dff00983 | ||
|
|
db682beb0b | ||
|
|
ab14d16d6e | ||
|
|
254bdba763 | ||
|
|
824ea454e1 | ||
|
|
539ff369e1 | ||
|
|
c774a08c50 | ||
|
|
b89460764d | ||
|
|
93f3374083 | ||
|
|
6b9d792c8c | ||
|
|
636bfa2cac | ||
|
|
0e5ea5e425 | ||
|
|
06124d69ee | ||
|
|
2f4d85e80e | ||
|
|
e9c65f3f96 | ||
|
|
317ed257be | ||
|
|
9d1034a76f | ||
|
|
e530f89247 | ||
|
|
e1cc278529 | ||
|
|
fbb09a2e96 | ||
|
|
fed5a318b3 | ||
|
|
9ad77195f1 | ||
|
|
019952b7ac | ||
|
|
8d57383ef9 | ||
|
|
7ee6e3ebaf | ||
|
|
f3655335f2 | ||
|
|
7de87aff83 | ||
|
|
f9ff65e8d4 | ||
|
|
965a8d31fe | ||
|
|
9d1823ffed | ||
|
|
e483fc8cb6 | ||
|
|
32d78ed278 | ||
|
|
4478a78ee5 | ||
|
|
a6531a2eea | ||
|
|
260f98e449 | ||
|
|
ca65c913f3 | ||
|
|
81551a7bb6 | ||
|
|
46563e9929 | ||
|
|
8f9e0532fc | ||
|
|
cdd6321d6c | ||
|
|
712567bc65 | ||
|
|
d2bdec95e1 | ||
|
|
ecb3511fdd | ||
|
|
2713f822ba | ||
|
|
99b9f0c39a | ||
|
|
a757b1c063 | ||
|
|
4af91592cd | ||
|
|
0ea828772c | ||
|
|
df098e9d63 | ||
|
|
30433a1db2 | ||
|
|
88d3c54998 | ||
|
|
b6e1cf4a00 | ||
|
|
325f35fa4c | ||
|
|
594d0498d7 | ||
|
|
efb92e96ce | ||
|
|
47e99d67d2 | ||
|
|
d0087a0753 | ||
|
|
c8d50c84e3 | ||
|
|
c8ccc4b24e | ||
|
|
8feef6a093 | ||
|
|
fdf272a370 | ||
|
|
26b9c35864 | ||
|
|
1ed08b16f2 | ||
|
|
e095364703 | ||
|
|
4e325220b6 | ||
|
|
b305281b5e | ||
|
|
0e78b682dc | ||
|
|
228ecba955 | ||
|
|
cd72fea556 | ||
|
|
a48fd3b394 | ||
|
|
d039710684 | ||
|
|
a5cc72784e | ||
|
|
481a3cb9e2 | ||
|
|
e082e39464 | ||
|
|
d3a5a95b01 | ||
|
|
ca9b5f5855 | ||
|
|
58b51d1494 | ||
|
|
b7f4111af2 | ||
|
|
8f6e4da890 | ||
|
|
124a7945de | ||
|
|
ad35a6794c | ||
|
|
46fd9dd40c | ||
|
|
e508e4ab28 | ||
|
|
67b01b298b | ||
|
|
6c2fd0b6b8 | ||
|
|
1a9100533e | ||
|
|
f2af84f70b | ||
|
|
4ae2da31dc | ||
|
|
17bae5b62d | ||
|
|
56a1a8728c | ||
|
|
e0eb2483c9 | ||
|
|
f7e8b0ebd1 | ||
|
|
4597daf45f | ||
|
|
fd5f7e9a29 | ||
|
|
74b54401ca | ||
|
|
68580264d3 | ||
|
|
94d58f5866 | ||
|
|
3715942ef3 | ||
|
|
61583810a4 | ||
|
|
07fb77cae5 | ||
|
|
c3f716f9c3 | ||
|
|
bcb73c68a8 | ||
|
|
a5a79cd94d | ||
|
|
56388ee2e4 | ||
|
|
ac01607b50 | ||
|
|
dda12552ee | ||
|
|
e040b54180 | ||
|
|
0c10e5a9bc | ||
|
|
0857580df0 | ||
|
|
bbe80e742c | ||
|
|
a9e7564281 | ||
|
|
8724a84733 | ||
|
|
0e37b4b054 | ||
|
|
2a7e8d0b83 | ||
|
|
276eb07160 | ||
|
|
fd1c44fe63 | ||
|
|
b8b1606e0c | ||
|
|
e80c05b783 | ||
|
|
61f7348b9d | ||
|
|
3369ee6b33 | ||
|
|
f6d4adc423 | ||
|
|
ccb4a1ba31 | ||
|
|
9e3f8a81cb | ||
|
|
1894b7a5e9 | ||
|
|
e18bb68a02 | ||
|
|
ba0abc3ac8 | ||
|
|
b7e7b49872 | ||
|
|
694e86d31a | ||
|
|
68c7833740 | ||
|
|
607e57fcd7 | ||
|
|
3c1e103ac0 | ||
|
|
6a5dba51e8 | ||
|
|
8c85728d77 | ||
|
|
029e02da7a | ||
|
|
6bdf0d9d7e | ||
|
|
5917a9858f | ||
|
|
0022db381f | ||
|
|
6ec3133a26 | ||
|
|
7f3fc2a155 | ||
|
|
c95b8ddad9 | ||
|
|
f7efd87817 | ||
|
|
83f39ee2fb | ||
|
|
8e90b3c59b | ||
|
|
5e44ead674 | ||
|
|
260286424d | ||
|
|
fbd7f93a30 | ||
|
|
4a7e39781b | ||
|
|
96b82e1f1f | ||
|
|
cff052c077 | ||
|
|
e66024a315 | ||
|
|
d89736e7db | ||
|
|
f438ebb395 | ||
|
|
f84937abab | ||
|
|
2561bb89b1 | ||
|
|
7edaf3df46 | ||
|
|
18f022f912 | ||
|
|
a9095c55dc | ||
|
|
3307e6c9f4 | ||
|
|
2d1bb47ea8 | ||
|
|
b70b21e331 | ||
|
|
f2c486bb73 | ||
|
|
14b055144d | ||
|
|
597c6d8f59 | ||
|
|
843b750171 | ||
|
|
d761f349a0 | ||
|
|
fb0a8b4e60 | ||
|
|
1752a670bd | ||
|
|
a2aff1e509 |
@@ -9,6 +9,3 @@ kernels/config.h
|
||||
kernels/hash.h
|
||||
include/embree3/rtcore_config.h
|
||||
build
|
||||
models
|
||||
tbb
|
||||
doc/intelstyle
|
||||
|
||||
+331
-316
@@ -1,467 +1,482 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
stages:
|
||||
- test
|
||||
- scan-report
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Continuous Test
|
||||
####################################################################
|
||||
|
||||
continuous-macosx-x64-Debug-ICC2020.1-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
|
||||
tags: [mac]
|
||||
only: [pushes]
|
||||
|
||||
continuous-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-SSE2-TBB2019.2:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2019.2 intensity:2"
|
||||
tags: [win10, v120]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
# script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
|
||||
# tags: [win10, v140]
|
||||
#continuous-macosx-x64-Debug-ICC2020.1-ISPC1.14.1-SSE2-TBB2021.1.1:
|
||||
# script: "scripts/test.py 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-V141-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2 maxinstancelevelcount:8"
|
||||
tags: [win10, v141]
|
||||
only: [pushes]
|
||||
|
||||
continuous-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
|
||||
tags: [mac]
|
||||
continuous-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-SSE2-TBB2019.2:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2019.2 intensity:2"
|
||||
tags: [embree, win10, v120]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-ICC2019.4-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:27
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2 maxinstancelevelcount:4"
|
||||
tags: [docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2"
|
||||
tags: [docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-linux-knl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512KNL-TBB2019.9:
|
||||
# image: embreedocker/fedora:26
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512KNL tasking:TBB2019.9 intensity:2"
|
||||
# tags: [docker-knl]
|
||||
#continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1.12.0-SSE2-TBB2020.2:
|
||||
# script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:2"
|
||||
# tags: [embree, win10, v140]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-linux-x64-Debug-CLANG5.0.0-ISPC1.12.0-AVX2-INT-ADDRSANITIZER:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.12.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON"
|
||||
tags: [docker]
|
||||
continuous-windows-x64-RelWithDebInfo-V141-ISPC1.13.0-SSE2-TBB2020.2:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.13.0 isa:SSE2 tasking:TBB2020.2 intensity:2 maxinstancelevelcount:8"
|
||||
tags: [embree, win10, v141]
|
||||
only: [pushes]
|
||||
|
||||
continuous-macosx-x64-Debug-CLANG-ISPC1.13.0-SSE2-TBB2020.2:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.13.0 isa:SSE2 tasking:TBB2020.2 intensity:2"
|
||||
tags: [embree, mac]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-ICC2019.4-ISPC1.12.0-AVX512-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:27
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2019.9 intensity:2 maxinstancelevelcount:4"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX512-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX512 frequency_level:simd128 tasking:TBB2020.2 GLFW:OFF intensity:2"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-x64-Debug-CLANG5.0.0-ISPC1.13.0-AVX2-INT-ADDRSANITIZER:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.13.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON"
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-ubuntu20.04-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:TBB intensity:1 api_namespace:myembree"
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-ubuntu17.10-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
|
||||
# image: embreedocker/ubuntu:17.10
|
||||
# image: $DOCKER_REGISTRY/embree/ubuntu:17.10
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1 api_namespace:myembree"
|
||||
# tags: [docker]
|
||||
# tags: [embree, docker]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-centos7.4-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1"
|
||||
tags: [docker]
|
||||
continuous-centos7.4-x64-Debug-GCC-ISPC1.13.0-AVX2-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd128 tasking:TBB intensity:1"
|
||||
tags: [embree, docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-fedora32-x64-Debug-GCC-ISPC-AVX512SKX-TBB:
|
||||
image: embreedocker/fedora:32
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512SKX tasking:TBB intensity:2"
|
||||
tags: [docker, avx512vl]
|
||||
continuous-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:32
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512 tasking:TBB COMPACT_POLYS:ON MIN_WIDTH:ON intensity:2"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-x64-Debug-GCC-ISPC1.12.0-SSE2-TBB-KLOCKWORK:
|
||||
image: embree-kw-centos7
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0"
|
||||
tags: [kw-scan-docker]
|
||||
only: [pushes]
|
||||
continuous-linux-x64-Debug-GCC-ISPC1.13.0-SSE2-TBB-KLOCWORK:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0"
|
||||
tags: [embree, docker]
|
||||
dependencies: []
|
||||
artifacts:
|
||||
paths: [klocwork/*]
|
||||
|
||||
continuous-kw-gen-report:
|
||||
stage: scan-report
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
needs: [continuous-linux-x64-Debug-GCC-ISPC1.13.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:
|
||||
image: amd64/openjdk:8
|
||||
script: "scripts/source_scan_protex.sh"
|
||||
tags: [docker]
|
||||
tags: [embree, docker]
|
||||
dependencies: []
|
||||
|
||||
#####################################################################
|
||||
# Intensive Nightly Tests
|
||||
####################################################################
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-SSE2-INT:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:SSE2 tasking:INT intensity:2"
|
||||
tags: [win10, v120]
|
||||
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-SSE2-INT:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:INT intensity:2"
|
||||
tags: [embree, win10, v120]
|
||||
only: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-AVX-TBB2019.2:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:AVX tasking:TBB2019.2 intensity:4"
|
||||
tags: [win10, v120, avx]
|
||||
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-AVX-TBB2019.2:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX tasking:TBB2019.2 intensity:4"
|
||||
tags: [embree, win10, v120, avx]
|
||||
only: [schedules]
|
||||
|
||||
nightly-windows-Win32-RelWithDebInfo-V140-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
|
||||
tags: [win10, v140]
|
||||
nightly-windows-Win32-RelWithDebInfo-V140-ISPC1.12.0-SSE2-TBB2020.2:
|
||||
script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:2"
|
||||
tags: [embree, win10, v140]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.12.0-AVX2-PPL:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:AVX2 tasking:PPL intensity:2"
|
||||
tags: [win10, v140, avx2]
|
||||
script: "python scripts\\test.py 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: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V141-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:2 STATIC_LIB:ON"
|
||||
tags: [win10, v141]
|
||||
nightly-windows-x64-RelWithDebInfo-V141-ISPC1.13.0-AVX2-TBB2019.9-STATIC:
|
||||
script: "python scripts\\test.py 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: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-V142-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V142 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:2"
|
||||
tags: [win10, v142]
|
||||
nightly-windows-x64-RelWithDebInfo-V142-ISPC1.13.0-AVX2-TBB2020.2-STATIC:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V142 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 intensity:2"
|
||||
tags: [embree, win10, v142]
|
||||
only: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-LLVM-CLANG-ISPC1.12.0-AVX2-TBB2019.9-NAMESPACE:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:LLVM_CLANG ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4 api_namespace:myembree"
|
||||
tags: [win10, llvm_clang]
|
||||
nightly-windows-x64-RelWithDebInfo-LLVM-CLANG-ISPC1.13.0-AVX2-TBB2019.9-NAMESPACE:
|
||||
script: "python scripts\\test.py 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: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.12.0-AVX2-TBB2019.2:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC17-VC14 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.2 intensity:4"
|
||||
tags: [win10, icc17]
|
||||
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.13.0-AVX2-TBB2019.2:
|
||||
script: "python scripts\\test.py 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: [schedules]
|
||||
|
||||
#nightly-windows-x64-RelWithDebInfo-ICC18-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
# script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC18-VC14 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2"
|
||||
# tags: [win10, icc18, avx512vl]
|
||||
|
||||
#nightly-windows-x64-RelWithDebInfo-ICC18-ISPC1.13.0-AVX512-TBB2020.2:
|
||||
# script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC18-VC14 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2020.2 intensity:2"
|
||||
# tags: [embree, win10, icc18, avx512vl]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-ICC19-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC19-VC14 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2"
|
||||
tags: [win10, icc19, avx512vl]
|
||||
nightly-windows-x64-RelWithDebInfo-ICC19-ISPC1.13.0-AVX512-TBB2019.9:
|
||||
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC19-VC14 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2019.9 intensity:2"
|
||||
tags: [embree, win10, icc19, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.14.1-AVX2-TBB2021.1.1:
|
||||
script: "python scripts\\test.py platform:x64 build:Release compiler:V142 ispc:ispc1.14.1 isa:AVX2 tasking:TBB2021.1.1 intensity:2"
|
||||
tags: [embree, win10, v142]
|
||||
only: [schedules]
|
||||
|
||||
# CLANG compilation and testing of different ISAs
|
||||
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2019.9-NAMESPACE:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:4"
|
||||
tags: [mac]
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2020.2-NAMESPACE:
|
||||
script: "scripts/test.py 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: [schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-AVX-INT:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:AVX tasking:INT intensity:4"
|
||||
tags: [mac] # avx
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.13.0-AVX-INT:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.13.0 isa:AVX tasking:INT intensity:4"
|
||||
tags: [embree, mac] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2019.9-STATIC:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"
|
||||
tags: [mac] # avx2
|
||||
nightly-macosx-x64-Debug-CLANG-ISPC1.13.0-SSE2-TBB2019.9-STATIC:
|
||||
script: "scripts/test.py 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: [schedules]
|
||||
|
||||
# ICC compilation and testing of different ISAs
|
||||
|
||||
#nightly-macosx-x64-Debug-ICC15-ISPC1.12.0-AVX-INT:
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:ICC15 ispc:ispc1.12.0 isa:AVX tasking:INT intensity:4"
|
||||
# tags: [mac, icc15]
|
||||
#nightly-macosx-x64-Debug-ICC15-ISPC1.13.0-AVX-INT:
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:ICC15 ispc:ispc1.13.0 isa:AVX tasking:INT intensity:4"
|
||||
# tags: [embree, mac, icc15]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-ICC2019.4-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [mac]
|
||||
nightly-macosx-x64-Debug-ICC2019.4-ISPC1.13.0-AVX2-TBB2020.2:
|
||||
script: "scripts/test.py 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: [schedules]
|
||||
|
||||
nightly-macosx-x64-Debug-ICC2020.1-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [mac]
|
||||
nightly-macosx-x64-Debug-ICC2020.1-ISPC1.13.0-AVX2-TBB2019.9:
|
||||
script: "scripts/test.py 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: [schedules]
|
||||
|
||||
|
||||
# CLANG compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-SSE2-TBB-NAMESPACE:
|
||||
image: embreedocker/fedora:25
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:8"
|
||||
tags: [docker]
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX-TBB2019.9-VALGRIND:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX tasking:TBB2019.9 intensity:4 memcheck:ON"
|
||||
tags: [docker] # avx
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX-TBB2019.9-VALGRIND:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX tasking:TBB2019.9 intensity:4 memcheck:ON"
|
||||
tags: [embree, docker] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG5.0.0-ISPC1.12.0-AVX2-INT-ADDRSANITIZER:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.12.0 isa:AVX tasking:INT intensity:2 addrsanitizer:ON"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG5.0.0-ISPC1.13.0-AVX2-INT-ADDRSANITIZER:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.13.0 isa:AVX tasking:INT intensity:2 addrsanitizer:ON"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"
|
||||
tags: [docker] # avx2
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-STATIC:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2020.2 intensity:4 STATIC_LIB:ON"
|
||||
tags: [embree, docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-knl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512KNL-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512KNL tasking:TBB2019.9 intensity:3"
|
||||
tags: [docker-knl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:3"
|
||||
tags: [docker, avx512vl]
|
||||
nightly-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX512-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX512 frequency_level:simd256 tasking:TBB2020.2 intensity:3"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# GCC compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.13.0-SSE2-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:SSE2 tasking:TBB2020.2 intensity:4"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.12.0-AVX-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker] # avx
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.13.0-AVX-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:AVX tasking:TBB2019.9 intensity:4"
|
||||
tags: [embree, docker] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker] # avx2
|
||||
nightly-linux-x64-Debug-GCC-ISPC1.13.0-AVX2-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 intensity:4"
|
||||
tags: [embree, docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# ICC compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-Debug-ICC2015.3-ISPC1.12.0-SSE2-TBB2019.2:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2015.3 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-ICC2015.3-ISPC1.13.0-SSE2-TBB2019.2:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2015.3 ispc:ispc1.13.0 isa:SSE2 tasking:TBB2019.2 intensity:4"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-ICC2016.3-ISPC1.12.0-AVX-TBB2019.2:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2016.3 ispc:ispc1.12.0 isa:AVX tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker] # avx
|
||||
nightly-linux-x64-Debug-ICC2016.3-ISPC1.13.0-AVX-TBB2019.2:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2016.3 ispc:ispc1.13.0 isa:AVX tasking:TBB2019.2 intensity:4"
|
||||
tags: [embree, docker] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-ICC2017.1-ISPC1.12.0-AVX2-TBB2019.2:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2017.1 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker] # avx2
|
||||
nightly-linux-avx512vl-x64-Debug-ICC2017.1-ISPC1.13.0-AVX512-TBB2019.2:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2017.1 ispc:ispc1.13.0 isa:AVX512 frequency_level:simd256 tasking:TBB2019.2 intensity:4"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-knl-x64-Debug-ICC2017.1-ISPC1.12.0-AVX512KNL-TBB2019.2:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2017.1 ispc:ispc1.12.0 isa:AVX512KNL tasking:TBB2019.2 intensity:3"
|
||||
tags: [docker-knl]
|
||||
nightly-linux-avx512vl-x64-Debug-ICC2018.0-ISPC1.13.0-AVX512-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2018.0 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2019.9 intensity:4"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-avx512vl-x64-Debug-ICC2017.1-ISPC1.12.0-AVX512SKX-TBB2019.2:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2017.1 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker, avx512vl]
|
||||
nightly-linux-x64-Debug-ICC2019.4-ISPC1.13.0-AVX2-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 intensity:4"
|
||||
tags: [embree, docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-avx512vl-x64-Debug-ICC2018.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2018.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker, avx512vl]
|
||||
nightly-linux-x64-Debug-ICC2020.1-ISPC1.13.0-AVX2-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [embree, docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-ICC2019.4-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Testing on different Linux distributions
|
||||
|
||||
#nightly-ubuntu17.10-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
# image: embreedocker/ubuntu:17.10
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
# tags: [docker]
|
||||
nightly-ubuntu20.04-x64-Debug-GCC-ISPC1.13.0-AVX2-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-ubuntu20.04-x64-Release-GCC-ISPC1.14.1-AVX2-TBB2021.1.1:
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:GCC ispc:ispc1.14.1 isa:AVX2 tasking:TBB2021.1.1 intensity:2"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-ubuntu16.04-x64-Debug-GCC-ISPC1.13.0-AVX2-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/ubuntu:16.04
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:AVX2 tasking:TBB MIN_WIDTH:ON intensity:3"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-centos7.4-x64-Debug-GCC-ISPC1.13.0-AVX2-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:AVX2 tasking:TBB COMPACT_POLYS:ON intensity:3"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
#nightly-centos7.0-x64-Debug-GCC-ISPC1.13.0-AVX2-TBB:
|
||||
# image: $DOCKER_REGISTRY/embree/centos:7.0
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.13.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
# tags: [embree, docker]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-ubuntu16.04-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/ubuntu:16.04
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
nightly-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:32
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isas:AVX512 tasking:TBB intensity:3"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-centos7.4-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
nightly-fedora28-x64-Debug-GCC-ISPC-AVX512-TBB:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:28
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB intensity:3"
|
||||
tags: [embree, docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
#nightly-centos7.0-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
# image: embreedocker/centos:7.0
|
||||
# script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
# tags: [docker]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-fedora32-x64-Debug-GCC-ISPC-AVX512SKX-TBB:
|
||||
image: embreedocker/fedora:32
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isas:AVX512SKX tasking:TBB intensity:3"
|
||||
tags: [docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora28-x64-Debug-GCC-ISPC-AVX512SKX-TBB:
|
||||
image: embreedocker/fedora:28
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB intensity:3" # AVX512KNL triggers internal compiler bug in GCC 8.0.1
|
||||
tags: [docker, avx512vl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora27-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:27
|
||||
image: $DOCKER_REGISTRY/embree/fedora:27
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora26-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:26
|
||||
image: $DOCKER_REGISTRY/embree/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
nightly-fedora25-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:25
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Compilation test of disabled features
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-AVX2-TBB2019.9-NO-ISPC:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 ISPC_SUPPORT:OFF intensity:0"
|
||||
tags: [docker]
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 ISPC_SUPPORT:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-TUTORIALS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TUTORIALS:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-NO-TUTORIALS:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 TUTORIALS:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-BACKFACECULLING:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 BACKFACE_CULLING:ON intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2019.9-BACKFACECULLING:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 BACKFACE_CULLING:ON intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-IGNORE-INVALID-RAYS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 IGNORE_INVALID_RAYS:ON intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-IGNORE-INVALID-RAYS:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 IGNORE_INVALID_RAYS:ON intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-FILTER-FUNCTION:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 FILTER_FUNCTION:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2019.9-NO-FILTER-FUNCTION:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 FILTER_FUNCTION:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-RAYMASKS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 RAY_MASK:ON intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-RAYMASKS:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 RAY_MASK:ON intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-PACKETS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 RAY_PACKETS:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2019.9-NO-PACKETS:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 RAY_PACKETS:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-STATCOUNTER:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 STAT_COUNTER:ON intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-STATCOUNTER:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 STAT_COUNTER:ON intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Compilation test of individual ISAs
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-SSE2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:SSE2 tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-ISAS-SSE2-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isas:SSE2 tasking:TBB2019.9 intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-SSE42-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:SSE42 tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-ISAS-SSE42-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isas:SSE42 tasking:TBB2020.2 intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-AVX-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:AVX tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-ISAS-AVX-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isas:AVX tasking:TBB2019.9 intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-AVX2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:AVX2 tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-ISAS-AVX2-TBB2020.2:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isas:AVX2 tasking:TBB2020.2 intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:AVX512SKX tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-ISAS-AVX512-TBB2019.9:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isas:AVX512 tasking:TBB2019.9 intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Compilation test of individual primitive types enabled
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-TRI:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-TRI:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-QUAD:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:OFF QUAD:ON GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2019.9-QUAD:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 TRI:OFF QUAD:ON GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-GRID:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:OFF QUAD:OFF GRID:ON CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-GRID:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 TRI:OFF QUAD:OFF GRID:ON CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-CURVE:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:ON SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2019.9-CURVE:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:ON SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-SUBDIV:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:ON USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-SUBDIV:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:ON USERGEOM:OFF INSTANCE:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-USERGEOM:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:ON INSTANCE:OFF intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2019.9-USERGEOM:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:ON INSTANCE:OFF intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-INSTANCE:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:ON intensity:0"
|
||||
tags: [docker]
|
||||
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.13.0-AVX2-TBB2020.2-INSTANCE:
|
||||
image: $DOCKER_REGISTRY/embree/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:ON intensity:0"
|
||||
tags: [embree, docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
@@ -469,9 +484,9 @@ nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-INSTANCE:
|
||||
# Release Builds
|
||||
####################################################################
|
||||
|
||||
release-windows-x64-Release-ICC17-VC12-ISPC1.9.2-TBB2019.2-PACKAGE-ZIP:
|
||||
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC17-VC12 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB2019.2 intensity:4 package:ZIP"
|
||||
tags: [win10, icc17, avx512vl]
|
||||
release-windows-x64-Release-ICC19-VC141-ISPC1.13.0-TBB2021.1.1-PACKAGE-ZIP:
|
||||
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC19-VC141 ispc:ispc1.13.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.1.1 intensity:4 package:ZIP"
|
||||
tags: [embree, win10, icc17, avx512vl]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$env:CI_JOB_NAME"
|
||||
@@ -479,19 +494,9 @@ release-windows-x64-Release-ICC17-VC12-ISPC1.9.2-TBB2019.2-PACKAGE-ZIP:
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-windows-x64-Release-ICC17-VC14-ISPC1.12.0-TBB2019.9-PACKAGE-ZIP:
|
||||
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC17-VC14 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB2019.9 intensity:4 package:ZIP"
|
||||
tags: [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-ICC17-VC14-ISPC1.12.0-TBB2019.9-PACKAGE-MSI:
|
||||
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC17-VC14 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB2019.9 intensity:4 package:MSI"
|
||||
tags: [win10, icc17, avx512vl]
|
||||
release-windows-x64-Release-ICC19-VC141-ISPC1.13.0-TBB2021.1.1-PACKAGE-MSI:
|
||||
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC19-VC141 ispc:ispc1.13.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.1.1 intensity:4 package:MSI"
|
||||
tags: [embree, win10, icc17, avx512vl]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$env:CI_JOB_NAME"
|
||||
@@ -499,9 +504,9 @@ release-windows-x64-Release-ICC17-VC14-ISPC1.12.0-TBB2019.9-PACKAGE-MSI:
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-macosx-x64-Release-ICC2020.1-ISPC1.12.0-TBB2019.9-PACKAGE-ZIP:
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2019.9 intensity:4 package:ZIP"
|
||||
tags: [mac]
|
||||
release-macosx-x64-Release-ICC2020.1-ISPC1.13.0-TBB2021.1.1-PACKAGE-ZIP:
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.13.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2021.1.1 intensity:4 package:ZIP"
|
||||
tags: [embree, mac]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
@@ -509,9 +514,9 @@ release-macosx-x64-Release-ICC2020.1-ISPC1.12.0-TBB2019.9-PACKAGE-ZIP:
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-macosx-x64-Release-ICC2020.1-ISPC1.12.0-TBB-PACKAGE-PKG:
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB intensity:4 package:PKG"
|
||||
tags: [mac]
|
||||
release-macosx-x64-Release-ICC2020.1-ISPC1.13.0-TBB-PACKAGE-PKG:
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.13.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB intensity:4 package:PKG"
|
||||
tags: [embree, mac]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
@@ -519,13 +524,23 @@ release-macosx-x64-Release-ICC2020.1-ISPC1.12.0-TBB-PACKAGE-PKG:
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-linux-x64-Release-ICC2019.4-ISPC1.12.0-TBB2019.9-PACKAGE-ZIP:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2019.4 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2-AVX512KNL-AVX512SKX tasking:TBB2019.9 intensity:4 package:ZIP"
|
||||
tags: [docker, avx512vl]
|
||||
release-linux-x64-Release-ICC2020.1-ISPC1.13.0-TBB2021.1.1-PACKAGE-ZIP:
|
||||
image: $DOCKER_REGISTRY/embree/centos:7.4
|
||||
script:
|
||||
- "scripts/test.py platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.13.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.1.1 intensity:4 package:ZIP"
|
||||
- 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
|
||||
|
||||
|
||||
@@ -1,6 +1,60 @@
|
||||
Version History
|
||||
---------------
|
||||
|
||||
### Embree 3.12.2
|
||||
- Fixed wrong uv and Ng for grid intersector in robust mode for AVX.
|
||||
- Removed optimizations for Knights Landing.
|
||||
- Upgrading release builds to use oneTBB 2021.1.1
|
||||
|
||||
### Embree 3.12.1
|
||||
|
||||
- Changed default frequency level to SIMD128 for Skylake, Cannon Lake, Comet Lake and Tiger Lake CPUs.
|
||||
This change typically improves performance for renderers that just use SSE by maintaining higher
|
||||
CPU frequencies. In case your renderer is AVX optimized you can get higher ray tracing performance
|
||||
by configuring the frequency level to simd256 through passing frequency_level=simd256 to rtcNewDevice.
|
||||
|
||||
### Embree 3.12.0
|
||||
|
||||
- Added linear cone curve geometry support. In this mode a real geometric surface for curves
|
||||
with linear basis is rendered using capped cones. They are discontinuous at edge boundaries.
|
||||
- Enabled fast two level builder for instances when low quality build is requested.
|
||||
- Bugfix for BVH build when geometries got disabled.
|
||||
- Added EMBREE_BACKFACE_CULLING_CURVES cmake option. This allows for a cheaper round
|
||||
linear curve intersection when correct internal tracking and back hits are not required.
|
||||
The new cmake option defaults to OFF.
|
||||
- User geometries with invalid bounds with lower>upper in some dimension will be ignored.
|
||||
- Increased robustness for grid interpolation code and fixed returned out of range u/v
|
||||
coordinates for grid primitive.
|
||||
- Fixed handling of motion blur time range for sphere, discs, and oriented disc geometries.
|
||||
- Fixed missing model data in releases.
|
||||
- Ensure compatibility to newer versions of oneTBB.
|
||||
- Motion blur BVH nodes no longer store NaN values.
|
||||
|
||||
### Embree 3.11.0
|
||||
|
||||
- Round linear curves now automatically check for the existence of left and right
|
||||
connected segments if the flags buffer is empty. Left segments exist if the
|
||||
segment(id-1) + 1 == segment(id) and similarly for right segments.
|
||||
- Implemented the min-width feature for curves and points, which allows to increase the
|
||||
radius in a distance dependent way, such that the curve or points thickness is n pixels wide.
|
||||
- Round linear curves are closed now also at their start.
|
||||
- Embree no longer supports Visual Studio 2013 starting with this release.
|
||||
- Bugfix in subdivision tessellation level assignment for non-quad base primitives
|
||||
- Small meshes are directly added to top level build phase of two-level builder to reduce memory consumption.
|
||||
- Enabled fast two level builder for user geometries when low quality build is requested.
|
||||
|
||||
### Embree 3.10.0
|
||||
|
||||
- Added EMBREE_COMPACT_POLYS CMake option which enables double indexed triangle and quad
|
||||
leaves to reduce memory consumption in compact mode by an additional 40% at about
|
||||
15% performance impact. This new mode is disabled by default.
|
||||
- Compile fix for oneTBB 2021.1-beta05
|
||||
- Releases upgrade to TBB 2020.2
|
||||
- Compile fix for ISPC v1.13.0
|
||||
- Adding RPATH to libembree.so in releases
|
||||
- Increased required CMake version to 3.1.0
|
||||
- Made instID member for array of pointers ray stream layout optional again.
|
||||
|
||||
### Embree 3.9.0
|
||||
|
||||
- Added round linear curve geometry support. In this mode a real geometric surface for curves
|
||||
|
||||
+53
-61
@@ -1,9 +1,9 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
SET(EMBREE_VERSION_MAJOR 3)
|
||||
SET(EMBREE_VERSION_MINOR 9)
|
||||
SET(EMBREE_VERSION_PATCH 0)
|
||||
SET(EMBREE_VERSION_MINOR 12)
|
||||
SET(EMBREE_VERSION_PATCH 2)
|
||||
SET(EMBREE_VERSION_NOTE "")
|
||||
|
||||
SET(EMBREE_VERSION ${EMBREE_VERSION_MAJOR}.${EMBREE_VERSION_MINOR}.${EMBREE_VERSION_PATCH})
|
||||
@@ -12,7 +12,7 @@ SET(CPACK_RPM_PACKAGE_RELEASE 1)
|
||||
|
||||
PROJECT(embree${EMBREE_VERSION_MAJOR})
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
|
||||
|
||||
# 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)
|
||||
@@ -63,6 +63,12 @@ IF(COMMAND cmake_policy)
|
||||
if(POLICY CMP0072)
|
||||
cmake_policy(SET CMP0072 OLD)
|
||||
endif()
|
||||
if(POLICY CMP0022)
|
||||
cmake_policy(SET CMP0022 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
|
||||
@@ -80,6 +86,13 @@ IF (BUILD_TESTING)
|
||||
INCLUDE(test)
|
||||
ENDIF()
|
||||
|
||||
set(BUILD_DOC OFF CACHE INTERNAL "build documentation (internal only)")
|
||||
IF (BUILD_DOC)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
ENDIF()
|
||||
|
||||
OPTION(EMBREE_TUTORIALS "Enable to build Embree tutorials" ON)
|
||||
|
||||
##############################################################
|
||||
# Embree configuration
|
||||
##############################################################
|
||||
@@ -99,7 +112,6 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
OPTION(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." ON)
|
||||
OPTION(EMBREE_TUTORIALS "Enable to build Embree tutorials" ON)
|
||||
SET(EMBREE_API_NAMESPACE "" CACHE STRING "C++ namespace to put API symbols into.")
|
||||
SET(EMBREE_LIBRARY_NAME "embree${EMBREE_VERSION_MAJOR}" CACHE STRING "Name of the embree library file (default is embree${EMBREE_VERSION_MAJOR})")
|
||||
|
||||
@@ -110,6 +122,9 @@ ENDIF()
|
||||
##############################################################################
|
||||
# Configurations (add configurations also to common/cmake/embree-config.cmake)
|
||||
|
||||
OPTION(EMBREE_ZIP_MODE "Create Embree ZIP package" OFF)
|
||||
MARK_AS_ADVANCED(EMBREE_ZIP_MODE)
|
||||
|
||||
OPTION(EMBREE_INSTALL_DEPENDENCIES "Install Embree dependencies in binary packages and install" OFF)
|
||||
MARK_AS_ADVANCED(EMBREE_INSTALL_DEPENDENCIES)
|
||||
|
||||
@@ -120,6 +135,7 @@ OPTION(EMBREE_RAY_MASK "Enables ray mask support.")
|
||||
OPTION(EMBREE_BACKFACE_CULLING "Enables backface culling.")
|
||||
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)
|
||||
@@ -133,6 +149,7 @@ 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_MIN_WIDTH "Enables min-width feature to enlarge curve and point thickness to pixel width." OFF)
|
||||
|
||||
SET(EMBREE_TASKING_SYSTEM "TBB" CACHE STRING "Selects tasking system")
|
||||
IF (WIN32)
|
||||
@@ -181,7 +198,7 @@ IF (WIN32)
|
||||
MESSAGE("Intel Compiler detected")
|
||||
INCLUDE (intel)
|
||||
ELSE()
|
||||
IF (EMBREE_ISA_AVX512KNL OR EMBREE_ISA_AVX512SKX)
|
||||
IF (EMBREE_ISA_AVX512)
|
||||
MESSAGE(FATAL_ERROR "Microsoft Visual C++ Compiler does not support AVX512. Please use Intel Compiler or Clang.")
|
||||
ENDIF()
|
||||
INCLUDE (msvc)
|
||||
@@ -213,43 +230,44 @@ ENDIF (WIN32)
|
||||
# ISA configuration
|
||||
##############################################################
|
||||
|
||||
# just for compatibility with old naming
|
||||
IF(DEFINED EMBREE_ISA_AVX512SKX)
|
||||
UNSET(EMBREE_ISA_AVX512 CACHE)
|
||||
SET(EMBREE_ISA_AVX512 ${EMBREE_ISA_AVX512SKX} CACHE BOOL "")
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
|
||||
SET(EMBREE_MAX_ISA "DEFAULT" CACHE STRING "Selects highest ISA to support.")
|
||||
ELSE()
|
||||
SET(EMBREE_MAX_ISA "NONE" CACHE STRING "Selects highest ISA to support.")
|
||||
ENDIF()
|
||||
SET_PROPERTY(CACHE EMBREE_MAX_ISA PROPERTY STRINGS NONE SSE2 SSE4.2 AVX AVX2 AVX512KNL AVX512SKX DEFAULT)
|
||||
SET_PROPERTY(CACHE EMBREE_MAX_ISA PROPERTY STRINGS NONE SSE2 SSE4.2 AVX AVX2 AVX512 DEFAULT)
|
||||
|
||||
IF (EMBREE_MAX_ISA STREQUAL "NONE")
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX})
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX2 ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX2})
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX512KNL ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX512KNL})
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX512SKX ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX512SKX})
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX})
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX2 ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX2})
|
||||
TRY_COMPILE(COMPILER_SUPPORTS_AVX512 ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX512})
|
||||
|
||||
OPTION(EMBREE_ISA_SSE2 "Enables SSE2 ISA." ON)
|
||||
OPTION(EMBREE_ISA_SSE42 "Enables SSE4.2 ISA." ON)
|
||||
OPTION(EMBREE_ISA_AVX "Enables AVX ISA." ${COMPILER_SUPPORTS_AVX})
|
||||
OPTION(EMBREE_ISA_AVX2 "Enables AVX2 ISA." ${COMPILER_SUPPORTS_AVX2})
|
||||
IF (WIN32 OR APPLE)
|
||||
OPTION(EMBREE_ISA_AVX512KNL "Enables AVX512 ISA for Knights Landing." OFF)
|
||||
OPTION(EMBREE_ISA_AVX512SKX "Enables AVX512 ISA for Skylake." OFF)
|
||||
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." OFF)
|
||||
ELSE()
|
||||
OPTION(EMBREE_ISA_AVX512KNL "Enables AVX512 ISA for Knights Landing." OFF) # compilation on GCC 8 broken
|
||||
OPTION(EMBREE_ISA_AVX512SKX "Enables AVX512 ISA for Skylake." ${COMPILER_SUPPORTS_AVX512SKX})
|
||||
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." ${COMPILER_SUPPORTS_AVX512})
|
||||
ENDIF()
|
||||
ELSEIF (EMBREE_MAX_ISA STREQUAL "DEFAULT")
|
||||
UNSET(EMBREE_ISA_SSE2 CACHE)
|
||||
UNSET(EMBREE_ISA_SSE42 CACHE)
|
||||
UNSET(EMBREE_ISA_AVX CACHE)
|
||||
UNSET(EMBREE_ISA_AVX2 CACHE)
|
||||
UNSET(EMBREE_ISA_AVX512KNL CACHE)
|
||||
UNSET(EMBREE_ISA_AVX512SKX CACHE)
|
||||
UNSET(EMBREE_ISA_AVX512 CACHE)
|
||||
SET(EMBREE_ISA_SSE2 OFF)
|
||||
SET(EMBREE_ISA_SSE42 OFF)
|
||||
SET(EMBREE_ISA_AVX OFF)
|
||||
SET(EMBREE_ISA_AVX2 OFF)
|
||||
SET(EMBREE_ISA_AVX512KNL OFF)
|
||||
SET(EMBREE_ISA_AVX512SKX OFF)
|
||||
SET(EMBREE_ISA_AVX512 OFF)
|
||||
MESSAGE(STATUS "Detecting default ISA...")
|
||||
INCLUDE(check_isa_default)
|
||||
CHECK_ISA_DEFAULT(EMBREE_ISA_DEFAULT)
|
||||
@@ -260,8 +278,7 @@ ELSE()
|
||||
UNSET(EMBREE_ISA_SSE42 CACHE)
|
||||
UNSET(EMBREE_ISA_AVX CACHE)
|
||||
UNSET(EMBREE_ISA_AVX2 CACHE)
|
||||
UNSET(EMBREE_ISA_AVX512KNL CACHE)
|
||||
UNSET(EMBREE_ISA_AVX512SKX CACHE)
|
||||
UNSET(EMBREE_ISA_AVX512 CACHE)
|
||||
|
||||
IF(EMBREE_MAX_ISA STREQUAL "SSE2")
|
||||
SET(ISA 1)
|
||||
@@ -271,10 +288,10 @@ ELSE()
|
||||
SET(ISA 3)
|
||||
ELSEIF(EMBREE_MAX_ISA STREQUAL "AVX2")
|
||||
SET(ISA 4)
|
||||
ELSEIF(EMBREE_MAX_ISA STREQUAL "AVX512KNL")
|
||||
SET(ISA 5)
|
||||
ELSEIF(EMBREE_MAX_ISA STREQUAL "AVX512SKX")
|
||||
SET(ISA 6)
|
||||
ELSEIF(EMBREE_MAX_ISA STREQUAL "AVX512")
|
||||
SET(ISA 5)
|
||||
ELSEIF(EMBREE_MAX_ISA STREQUAL "AVX512SKX") # just for compatibility
|
||||
SET(ISA 5)
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Unsupported ISA specified: " ${EMBREE_MAX_ISA})
|
||||
ENDIF()
|
||||
@@ -283,8 +300,7 @@ ELSE()
|
||||
SET(EMBREE_ISA_SSE42 OFF)
|
||||
SET(EMBREE_ISA_AVX OFF)
|
||||
SET(EMBREE_ISA_AVX2 OFF)
|
||||
SET(EMBREE_ISA_AVX512KNL OFF)
|
||||
SET(EMBREE_ISA_AVX512SKX OFF)
|
||||
SET(EMBREE_ISA_AVX512 OFF)
|
||||
|
||||
IF (ISA GREATER 0)
|
||||
SET(EMBREE_ISA_SSE2 ON)
|
||||
@@ -299,10 +315,7 @@ ELSE()
|
||||
SET(EMBREE_ISA_AVX2 ON)
|
||||
ENDIF ()
|
||||
IF (ISA GREATER 4)
|
||||
SET(EMBREE_ISA_AVX512KNL ON)
|
||||
ENDIF ()
|
||||
IF (ISA GREATER 5)
|
||||
SET(EMBREE_ISA_AVX512SKX ON)
|
||||
SET(EMBREE_ISA_AVX512 ON)
|
||||
ENDIF ()
|
||||
ENDIF()
|
||||
|
||||
@@ -326,17 +339,14 @@ IF (APPLE AND EMBREE_STATIC_LIB)
|
||||
IF (EMBREE_ISA_AVX2)
|
||||
MATH(EXPR NUMISA "${NUMISA}+1")
|
||||
ENDIF()
|
||||
IF (EMBREE_ISA_AVX512KNL)
|
||||
MATH(EXPR NUMISA "${NUMISA}+1")
|
||||
ENDIF()
|
||||
IF (EMBREE_ISA_AVX512SKX)
|
||||
IF (EMBREE_ISA_AVX512)
|
||||
MATH(EXPR NUMISA "${NUMISA}+1")
|
||||
ENDIF()
|
||||
|
||||
IF (NUMISA GREATER 1)
|
||||
IF (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
IF (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^9\\..*")
|
||||
MESSAGE(FATAL_ERROR "Using Embree as static library is not supported with AppleClang 9.X when multiple ISAs are selected. Please either build a shared library or enable only one ISA.")
|
||||
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "9.0.0" OR ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "9.0.0")
|
||||
MESSAGE(FATAL_ERROR "Using Embree as static library is not supported with AppleClang >= 9.0 when multiple ISAs are selected. Please either build a shared library or enable only one ISA.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
@@ -350,8 +360,7 @@ SET(SSE2 0)
|
||||
SET(SSE42 1)
|
||||
SET(AVX 2)
|
||||
SET(AVX2 3)
|
||||
SET(AVX512KNL 4)
|
||||
SET(AVX512SKX 5)
|
||||
SET(AVX512 4)
|
||||
|
||||
UNSET(FLAGS_LOWEST)
|
||||
SET(ISA_LOWEST_AVX 2)
|
||||
@@ -394,23 +403,13 @@ IF (EMBREE_ISA_AVX2)
|
||||
ENDIF()
|
||||
ENDIF ()
|
||||
|
||||
IF (EMBREE_ISA_AVX512KNL)
|
||||
ADD_DEFINITIONS(-DEMBREE_TARGET_AVX512KNL)
|
||||
LIST(APPEND ISPC_TARGETS "avx512knl-i32x16")
|
||||
IF(NOT FLAGS_LOWEST)
|
||||
SET(ISA_LOWEST ${AVX512KNL})
|
||||
SET(ISA_LOWEST_AVX ${AVX512KNL})
|
||||
SET(FLAGS_LOWEST ${FLAGS_AVX512KNL})
|
||||
ENDIF()
|
||||
ENDIF ()
|
||||
|
||||
IF (EMBREE_ISA_AVX512SKX)
|
||||
ADD_DEFINITIONS(-DEMBREE_TARGET_AVX512SKX)
|
||||
IF (EMBREE_ISA_AVX512)
|
||||
ADD_DEFINITIONS(-DEMBREE_TARGET_AVX512)
|
||||
LIST(APPEND ISPC_TARGETS "avx512skx-i32x16")
|
||||
IF(NOT FLAGS_LOWEST)
|
||||
SET(ISA_LOWEST ${AVX512SKX})
|
||||
SET(ISA_LOWEST_AVX ${AVX512SKX})
|
||||
SET(FLAGS_LOWEST ${FLAGS_AVX512SKX})
|
||||
SET(ISA_LOWEST ${AVX512})
|
||||
SET(ISA_LOWEST_AVX ${AVX512})
|
||||
SET(FLAGS_LOWEST ${FLAGS_AVX512})
|
||||
ENDIF()
|
||||
ENDIF ()
|
||||
|
||||
@@ -448,13 +447,6 @@ CONFIGURE_FILE(
|
||||
"${PROJECT_SOURCE_DIR}/kernels/export.macosx.map"
|
||||
)
|
||||
|
||||
##############################################################
|
||||
# Search paths
|
||||
##############################################################
|
||||
IF (TASKING_TBB)
|
||||
FIND_PACKAGE(TBB REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${TBB_INCLUDE_DIRS})
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Output paths
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set(CTEST_PROJECT_NAME "Embree")
|
||||
set(TEST_MODELS_HASH 9f7aa420e2f931c51c8a72a812da0631d04f9ed9)
|
||||
set(TEST_MODELS_HASH ce34e32c5c5a03ccd5cf705e6f0de3a8bf464328)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ADD_SUBDIRECTORY(sys)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ADD_LIBRARY(algorithms OBJECT
|
||||
@@ -16,3 +16,12 @@ ADD_LIBRARY(algorithms OBJECT
|
||||
|
||||
SET_PROPERTY(TARGET algorithms PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET algorithms APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
# ideally we would use target_link_libraries to provide the algorithms target
|
||||
# with the TBB include directory information. Howeve, this is only possible in
|
||||
# very recent versions of TBB and therefore we use the target property instead
|
||||
GET_TARGET_PROPERTY(tasking_include_dirs tasking INCLUDE_DIRECTORIES)
|
||||
if (tasking_include_dirs)
|
||||
TARGET_INCLUDE_DIRECTORIES(algorithms PUBLIC "${tasking_include_dirs}")
|
||||
GET_TARGET_PROPERTY(algorithms_include_dirs algorithms INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -8,36 +8,48 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
template<typename Index, class UnaryPredicate>
|
||||
|
||||
template<typename Index, class UnaryPredicate>
|
||||
__forceinline bool parallel_any_of (Index first, Index last, UnaryPredicate pred)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
#if defined(TASKING_TBB)
|
||||
tbb::parallel_for(tbb::blocked_range<size_t>{first, last}, [&ret,pred](const tbb::blocked_range<size_t>& r) {
|
||||
if (tbb::task::self().is_cancelled()) return;
|
||||
for (size_t i = r.begin(); i != r.end(); ++i) {
|
||||
if (pred(i)) {
|
||||
ret = true;
|
||||
tbb::task::self().cancel_group_execution();
|
||||
}
|
||||
}
|
||||
});
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
tbb::task_group_context context;
|
||||
tbb::parallel_for(tbb::blocked_range<size_t>{first, last}, [&ret,pred,&context](const tbb::blocked_range<size_t>& r) {
|
||||
if (context.is_group_execution_cancelled()) return;
|
||||
for (size_t i = r.begin(); i != r.end(); ++i) {
|
||||
if (pred(i)) {
|
||||
ret = true;
|
||||
context.cancel_group_execution();
|
||||
}
|
||||
}
|
||||
});
|
||||
#else
|
||||
ret = parallel_reduce (first, last, false,
|
||||
[pred](const range<size_t>& r)->bool {
|
||||
bool localret = false;
|
||||
for (auto i=r.begin(); i<r.end(); ++i) {
|
||||
localret |= pred(i);
|
||||
}
|
||||
return localret;
|
||||
},
|
||||
std::bit_or<bool>()
|
||||
);
|
||||
tbb::parallel_for(tbb::blocked_range<size_t>{first, last}, [&ret,pred](const tbb::blocked_range<size_t>& r) {
|
||||
if (tbb::task::self().is_cancelled()) return;
|
||||
for (size_t i = r.begin(); i != r.end(); ++i) {
|
||||
if (pred(i)) {
|
||||
ret = true;
|
||||
tbb::task::self().cancel_group_execution();
|
||||
}
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
ret = parallel_reduce (first, last, false, [pred](const range<size_t>& r)->bool {
|
||||
bool localret = false;
|
||||
for (auto i=r.begin(); i<r.end(); ++i) {
|
||||
localret |= pred(i);
|
||||
}
|
||||
return localret;
|
||||
},
|
||||
std::bit_or<bool>()
|
||||
);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // end namespace
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_filter.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_for.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -25,11 +25,20 @@ namespace embree
|
||||
}
|
||||
|
||||
#elif defined(TASKING_TBB)
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
tbb::task_group_context context;
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},context);
|
||||
if (context.is_group_execution_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#else
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
});
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#endif
|
||||
|
||||
#elif defined(TASKING_PPL)
|
||||
concurrency::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
@@ -51,11 +60,20 @@ namespace embree
|
||||
throw std::runtime_error("task cancelled");
|
||||
|
||||
#elif defined(TASKING_TBB)
|
||||
tbb::parallel_for(tbb::blocked_range<Index>(first,last,minStepSize),[&](const tbb::blocked_range<Index>& r) {
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
tbb::task_group_context context;
|
||||
tbb::parallel_for(tbb::blocked_range<Index>(first,last,minStepSize),[&](const tbb::blocked_range<Index>& r) {
|
||||
func(range<Index>(r.begin(),r.end()));
|
||||
},context);
|
||||
if (context.is_group_execution_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#else
|
||||
tbb::parallel_for(tbb::blocked_range<Index>(first,last,minStepSize),[&](const tbb::blocked_range<Index>& r) {
|
||||
func(range<Index>(r.begin(),r.end()));
|
||||
});
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#endif
|
||||
|
||||
#elif defined(TASKING_PPL)
|
||||
concurrency::parallel_for(first, last, Index(1) /*minStepSize*/, [&](Index i) {
|
||||
@@ -80,11 +98,20 @@ namespace embree
|
||||
template<typename Index, typename Func>
|
||||
__forceinline void parallel_for_static( const Index N, const Func& func)
|
||||
{
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},tbb::simple_partitioner());
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
tbb::task_group_context context;
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},tbb::simple_partitioner(),context);
|
||||
if (context.is_group_execution_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#else
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},tbb::simple_partitioner());
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef tbb::affinity_partitioner affinity_partitioner;
|
||||
@@ -92,11 +119,20 @@ namespace embree
|
||||
template<typename Index, typename Func>
|
||||
__forceinline void parallel_for_affinity( const Index N, const Func& func, tbb::affinity_partitioner& ap)
|
||||
{
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},ap);
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
tbb::task_group_context context;
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},ap,context);
|
||||
if (context.is_group_execution_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#else
|
||||
tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
|
||||
func(i);
|
||||
},ap);
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_for_for.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_for_for_prefix_sum.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_map.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_partition.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_prefix_sum.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_reduce.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -53,12 +53,22 @@ namespace embree
|
||||
return parallel_reduce_internal(taskCount,first,last,minStepSize,identity,func,reduction);
|
||||
|
||||
#elif defined(TASKING_TBB)
|
||||
#if TBB_INTERFACE_VERSION >= 12002
|
||||
tbb::task_group_context context;
|
||||
const Value v = tbb::parallel_reduce(tbb::blocked_range<Index>(first,last,minStepSize),identity,
|
||||
[&](const tbb::blocked_range<Index>& r, const Value& start) { return reduction(start,func(range<Index>(r.begin(),r.end()))); },
|
||||
reduction,context);
|
||||
if (context.is_group_execution_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
return v;
|
||||
#else
|
||||
const Value v = tbb::parallel_reduce(tbb::blocked_range<Index>(first,last,minStepSize),identity,
|
||||
[&](const tbb::blocked_range<Index>& r, const Value& start) { return reduction(start,func(range<Index>(r.begin(),r.end()))); },
|
||||
reduction);
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
return v;
|
||||
#endif
|
||||
#else // TASKING_PPL
|
||||
struct AlignedValue
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_set.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "parallel_sort.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
IF (NOT OPENIMAGEIO_ROOT)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FIND_PATH( PNG_INCLUDE_DIR NAMES png.h )
|
||||
|
||||
+437
-295
@@ -1,49 +1,297 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#===============================================================================
|
||||
# This script will attempt to find TBB and set up a TBB target.
|
||||
#
|
||||
# The user may specify a version and lists of required and optional components:
|
||||
#
|
||||
# find_package(TBB 2017.0 EXACT REQUIRED
|
||||
# tbb tbbmalloc
|
||||
# OPTIONAL_COMPONENTS tbbmalloc_proxy
|
||||
# QUIET)
|
||||
#
|
||||
# If this target exists already, the script will attempt to re-use it, but fail
|
||||
# if version or components do not match the user-specified requirements.
|
||||
#
|
||||
# If all the required component targets (e.g. TBB::tbb) exist, the script will
|
||||
# attempt to create a target TBB and link existing component targets to it.
|
||||
# It will fail if the component target version does not match the user-specified
|
||||
# requirements.
|
||||
#
|
||||
# The user may specify the following variables to help the search process:
|
||||
# - TBB_ROOT
|
||||
# - TBB_INCLUDE_DIR
|
||||
#
|
||||
# After the script has run successfully, there is a target TBB, as well as
|
||||
# component targets TBB::<COMPONENT>, e.g. TBB::tbbmalloc.
|
||||
#
|
||||
# The targets will attempt to link to release versions of TBB in release mode,
|
||||
# and debug versions in debug mode.
|
||||
#
|
||||
# In addition to the targets, the script defines:
|
||||
#
|
||||
# TBB_FOUND
|
||||
# TBB_INCLUDE_DIRS
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
macro(find_tbb TARGET
|
||||
ROOT_VAR
|
||||
INCLUDE_DIR_VAR
|
||||
BIN_DIR_VAR
|
||||
LIB_DIR_VAR
|
||||
TBB_LIBRARY_VAR
|
||||
TBBMALLOC_LIBRARY_VAR
|
||||
TBB_LIBRARY_NAME
|
||||
TBBMALLOC_LIBRARY_NAME)
|
||||
# We use INTERFACE libraries, which are only supported in 3.x
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
if(${ROOT_VAR})
|
||||
message(STATUS "Looking for ${TARGET} (${TBB_LIBRARY_NAME}, ${TBBMALLOC_LIBRARY_NAME})"
|
||||
" in ${${ROOT_VAR}}")
|
||||
# These two are used to automatically find the root and include directories.
|
||||
set(_TBB_INCLUDE_SUBDIR "include")
|
||||
set(_TBB_HEADER "tbb/tbb.h")
|
||||
|
||||
# Initialize cache variable; but use existing non-cache variable as the default,
|
||||
# and fall back to the environment variable.
|
||||
if (NOT TBB_ROOT)
|
||||
set(TBB_ROOT "$ENV{TBB_ROOT}")
|
||||
endif()
|
||||
|
||||
set(TBB_ROOT "${TBB_ROOT}" CACHE PATH "The root path of TBB.")
|
||||
|
||||
#===============================================================================
|
||||
# Error messages that respect the user's wishes about peace and quiet.
|
||||
#===============================================================================
|
||||
|
||||
function(rk_tbb_status)
|
||||
if (NOT TBB_FIND_QUIETLY)
|
||||
message(STATUS "${ARGV}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(rk_tbb_warning)
|
||||
if (NOT TBB_FIND_QUIETLY)
|
||||
message(WARNING "${ARGV}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(rk_tbb_error)
|
||||
if (TBB_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "${ARGV}")
|
||||
else()
|
||||
message(STATUS "Looking for ${TARGET} (${TBB_LIBRARY_NAME}, ${TBBMALLOC_LIBRARY_NAME})"
|
||||
" in standard locations")
|
||||
rk_tbb_warning("${ARGV}")
|
||||
endif()
|
||||
return()
|
||||
endmacro()
|
||||
|
||||
#===============================================================================
|
||||
# Extract a list of required and optional components.
|
||||
#===============================================================================
|
||||
|
||||
macro(rk_tbb_list_components)
|
||||
# cmake provides the TBB_FIND_COMPONENTS and
|
||||
# TBB_FIND_REQUIRED_<C> variables based on the invocation
|
||||
# of find_package.
|
||||
if (TBB_FIND_COMPONENTS STREQUAL "")
|
||||
set(_REQUIRED_COMPONENTS "tbb")
|
||||
set(_OPTIONAL_COMPONENTS "tbbmalloc"
|
||||
"tbbmalloc_proxy"
|
||||
"tbbbind"
|
||||
"tbbpreview")
|
||||
else()
|
||||
set(_REQUIRED_COMPONENTS "")
|
||||
set(_OPTIONAL_COMPONENTS "")
|
||||
foreach (C IN LISTS TBB_FIND_COMPONENTS)
|
||||
if (${TBB_FIND_REQUIRED_${C}})
|
||||
list(APPEND _REQUIRED_COMPONENTS ${C})
|
||||
else()
|
||||
list(APPEND _OPTIONAL_COMPONENTS ${C})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# workaround for parentheses in variable name / CMP0053
|
||||
set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
|
||||
set(PROGRAMFILES32 "$ENV{${PROGRAMFILESx86}}")
|
||||
if(NOT PROGRAMFILES32)
|
||||
set(PROGRAMFILES32 "$ENV{PROGRAMFILES}")
|
||||
endif()
|
||||
if(NOT PROGRAMFILES32)
|
||||
set(PROGRAMFILES32 "C:/Program Files (x86)")
|
||||
endif()
|
||||
find_path(${ROOT_VAR} include/tbb/tbb.h
|
||||
DOC "Root of ${TBB_LIBRARY_NAME} installation"
|
||||
PATHS ${PROJECT_SOURCE_DIR}/tbb
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_path(${ROOT_VAR} include/tbb/tbb.h
|
||||
DOC "Root of ${TBB_LIBRARY_NAME} installation"
|
||||
PATHS
|
||||
${PROJECT_SOURCE_DIR}/../tbb
|
||||
"${PROGRAMFILES32}/IntelSWTools/compilers_and_libraries/windows/tbb"
|
||||
"${PROGRAMFILES32}/Intel/Composer XE/tbb"
|
||||
"${PROGRAMFILES32}/Intel/compilers_and_libraries/windows/tbb"
|
||||
)
|
||||
rk_tbb_status("Looking for TBB components ${_REQUIRED_COMPONENTS}"
|
||||
" (${_OPTIONAL_COMPONENTS})")
|
||||
endmacro()
|
||||
|
||||
#===============================================================================
|
||||
# List components that are available, and check if any REQUIRED components
|
||||
# are missing.
|
||||
#===============================================================================
|
||||
|
||||
macro(rk_tbb_check_components)
|
||||
set(_TBB_MISSING_COMPONENTS "")
|
||||
set(_TBB_AVAILABLE_COMPONENTS "")
|
||||
|
||||
foreach (C IN LISTS _REQUIRED_COMPONENTS)
|
||||
if (TARGET TBB::${C})
|
||||
list(APPEND _TBB_AVAILABLE_COMPONENTS ${C})
|
||||
else()
|
||||
list(APPEND _TBB_MISSING_COMPONENTS ${C})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach (C IN LISTS _OPTIONAL_COMPONENTS)
|
||||
if (TARGET TBB::${C})
|
||||
list(APPEND _TBB_AVAILABLE_COMPONENTS ${C})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
#===============================================================================
|
||||
# Check the version of the TBB root we found.
|
||||
#===============================================================================
|
||||
|
||||
macro(rk_tbb_check_version)
|
||||
# Extract the version we found in our root.
|
||||
if(EXISTS "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h")
|
||||
set(_TBB_VERSION_HEADER "oneapi/tbb/version.h")
|
||||
elseif(EXISTS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h")
|
||||
set(_TBB_VERSION_HEADER "tbb/tbb_stddef.h")
|
||||
elseif(EXISTS "${TBB_INCLUDE_DIR}/tbb/version.h")
|
||||
set(_TBB_VERSION_HEADER "tbb/version.h")
|
||||
else()
|
||||
rk_tbb_error("Missing TBB version information. Could not find"
|
||||
"tbb/tbb_stddef.h or tbb/version.h in ${TBB_INCLUDE_DIR}")
|
||||
endif()
|
||||
file(READ ${TBB_INCLUDE_DIR}/${_TBB_VERSION_HEADER} VERSION_HEADER_CONTENT)
|
||||
string(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9]+)" DUMMY "${VERSION_HEADER_CONTENT}")
|
||||
set(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
string(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9]+)" DUMMY "${VERSION_HEADER_CONTENT}")
|
||||
set(TBB_VERSION_MINOR ${CMAKE_MATCH_1})
|
||||
set(TBB_VERSION "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}")
|
||||
set(TBB_VERSION_STRING "${TBB_VERSION}")
|
||||
|
||||
# If the user provided information about required versions, check them!
|
||||
if (TBB_FIND_VERSION)
|
||||
if (${TBB_FIND_VERSION_EXACT} AND NOT
|
||||
TBB_VERSION VERSION_EQUAL ${TBB_FIND_VERSION})
|
||||
rk_tbb_error("Requested exact TBB version ${TBB_FIND_VERSION},"
|
||||
" but found ${TBB_VERSION}")
|
||||
elseif(TBB_VERSION VERSION_LESS ${TBB_FIND_VERSION})
|
||||
rk_tbb_error("Requested minimum TBB version ${TBB_FIND_VERSION},"
|
||||
" but found ${TBB_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
rk_tbb_status("Found TBB version ${TBB_VERSION} at ${TBB_ROOT}")
|
||||
endmacro()
|
||||
|
||||
#===============================================================================
|
||||
# Reuse existing targets.
|
||||
# NOTE: This must be a macro, as we rely on return() to exit this script.
|
||||
#===============================================================================
|
||||
|
||||
macro(rk_tbb_reuse_existing_target_components)
|
||||
rk_tbb_check_components()
|
||||
|
||||
if (_TBB_MISSING_COMPONENTS STREQUAL "")
|
||||
rk_tbb_status("Found existing TBB component targets: ${_TBB_AVAILABLE_COMPONENTS}")
|
||||
|
||||
# Get TBB_INCLUDE_DIR if not already set to check for the version of the
|
||||
# existing component targets (making the assumption that they all have
|
||||
# the same version)
|
||||
if (NOT TBB_INCLUDE_DIR)
|
||||
list(GET _TBB_AVAILABLE_COMPONENTS 0 first_target)
|
||||
get_target_property(TBB_INCLUDE_DIR TBB::${first_target} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
foreach(TGT IN LISTS _TBB_AVAILABLE_COMPONENTS)
|
||||
get_target_property(_TGT_INCLUDE_DIR TBB::${TGT} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if (NOT _TGT_INCLUDE_DIR STREQUAL "${TBB_INCLUDE_DIR}")
|
||||
rk_tbb_error("Existing TBB component targets have inconsistent include directories.")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
find_path(TBB_INCLUDE_DIR
|
||||
NAMES "${_TBB_HEADER}"
|
||||
PATHS "${TBB_INCLUDE_DIRS}")
|
||||
|
||||
# Extract TBB_ROOT from the include path so that rk_tbb_check_version
|
||||
# prints the correct tbb location
|
||||
string(REPLACE "/${_TBB_INCLUDE_SUBDIR}" "" TBB_ROOT "${TBB_INCLUDE_DIR}")
|
||||
rk_tbb_check_version()
|
||||
|
||||
# Add target TBB and link all available components
|
||||
if (NOT TARGET TBB)
|
||||
add_library(TBB INTERFACE)
|
||||
foreach(C IN LISTS _TBB_AVAILABLE_COMPONENTS)
|
||||
target_link_libraries(TBB INTERFACE TBB::${C})
|
||||
endforeach()
|
||||
endif()
|
||||
set(TBB_FOUND TRUE)
|
||||
set(TBB_INCLUDE_DIRS "${TBB_INCLUDE_DIR}")
|
||||
return()
|
||||
elseif ((TARGET TBB) OR (NOT _TBB_AVAILABLE_COMPONENTS STREQUAL ""))
|
||||
rk_tbb_error("Ignoring existing TBB targets because required components are missing: ${_TBB_MISSING_COMPONENTS}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Find the root directory if a manual override is not specified.
|
||||
# Sets TBB_ROOT in the parent scope, but does not check for failure.
|
||||
#===============================================================================
|
||||
|
||||
function(rk_tbb_find_root)
|
||||
if (NOT TBB_ROOT OR TBB_ROOT STREQUAL "")
|
||||
set(TBB_HINTS "")
|
||||
set(TBB_PATHS "")
|
||||
|
||||
if (WIN32)
|
||||
# workaround for parentheses in variable name / CMP0053
|
||||
set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
|
||||
set(PROGRAMFILES32 "$ENV{${PROGRAMFILESx86}}")
|
||||
if(NOT PROGRAMFILES32)
|
||||
set(PROGRAMFILES32 "$ENV{PROGRAMFILES}")
|
||||
endif()
|
||||
if(NOT PROGRAMFILES32)
|
||||
set(PROGRAMFILES32 "C:/Program Files (x86)")
|
||||
endif()
|
||||
set(TBB_PATHS
|
||||
"${PROJECT_SOURCE_DIR}/../tbb"
|
||||
"${PROGRAMFILES32}/IntelSWTools/compilers_and_libraries/windows/tbb"
|
||||
"${PROGRAMFILES32}/Intel/Composer XE/tbb"
|
||||
"${PROGRAMFILES32}/Intel/compilers_and_libraries/windows/tbb")
|
||||
else()
|
||||
set(TBB_HINTS "/usr/local")
|
||||
set(TBB_PATHS
|
||||
"${PROJECT_SOURCE_DIR}/tbb"
|
||||
"/opt/intel/composerxe/tbb"
|
||||
"/opt/intel/compilers_and_libraries/tbb"
|
||||
"/opt/intel/compilers_and_libraries/linux/tbb"
|
||||
"/opt/intel/tbb")
|
||||
endif()
|
||||
|
||||
set(TBB_ROOT "TBB_ROOT-NOTFOUND")
|
||||
find_path(TBB_ROOT
|
||||
NAMES "${_TBB_INCLUDE_SUBDIR}/${_TBB_HEADER}"
|
||||
HINTS ${TBB_HINTS}
|
||||
PATHS ${TBB_PATHS}
|
||||
NO_PACKAGE_ROOT_PATH)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#===============================================================================
|
||||
# Find the include directory if a manual override is not specified.
|
||||
# Assumes TBB_ROOT to be set.
|
||||
#===============================================================================
|
||||
|
||||
function(rk_tbb_find_include_directory)
|
||||
find_path(TBB_INCLUDE_DIR
|
||||
NAMES "${_TBB_HEADER}"
|
||||
HINTS "${TBB_ROOT}/${_TBB_INCLUDE_SUBDIR}"
|
||||
NO_PACKAGE_ROOT_PATH)
|
||||
endfunction()
|
||||
|
||||
#===============================================================================
|
||||
# Find a specific library and create a target for it.
|
||||
#===============================================================================
|
||||
|
||||
function(rk_tbb_find_library COMPONENT_NAME BUILD_CONFIG)
|
||||
set(LIB_VAR "${COMPONENT_NAME}_LIBRARY_${BUILD_CONFIG}")
|
||||
set(BIN_DIR_VAR "${COMPONENT_NAME}_BIN_DIR_${BUILD_CONFIG}")
|
||||
set(DLL_VAR "${COMPONENT_NAME}_DLL_${BUILD_CONFIG}")
|
||||
if (BUILD_CONFIG STREQUAL "DEBUG")
|
||||
set(LIB_NAME "${COMPONENT_NAME}_debug")
|
||||
else()
|
||||
set(LIB_NAME "${COMPONENT_NAME}")
|
||||
endif()
|
||||
|
||||
unset(LIB_PATHS)
|
||||
|
||||
if (WIN32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(TBB_ARCH intel64)
|
||||
else()
|
||||
@@ -60,281 +308,175 @@ macro(find_tbb TARGET
|
||||
set(TBB_VCVER vc14)
|
||||
endif()
|
||||
|
||||
if(${ROOT_VAR} STREQUAL "")
|
||||
find_path(${INCLUDE_DIR_VAR} tbb/task_scheduler_init.h)
|
||||
find_path(${BIN_DIR_VAR} "${TBB_LIBRARY_NAME}.dll")
|
||||
find_library(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_NAME})
|
||||
find_library(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_NAME})
|
||||
else()
|
||||
set(${INCLUDE_DIR_VAR} ${INCLUDE_DIR_VAR}-NOTFOUND)
|
||||
set(${BIN_DIR_VAR} ${BIN_DIR_VAR}-NOTFOUND)
|
||||
set(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_VAR}-NOTFOUND)
|
||||
set(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_VAR}-NOTFOUND)
|
||||
|
||||
find_path(${INCLUDE_DIR_VAR} tbb/task_scheduler_init.h PATHS ${${ROOT_VAR}}/include NO_DEFAULT_PATH)
|
||||
|
||||
find_path(${BIN_DIR_VAR} "${TBB_LIBRARY_NAME}.dll"
|
||||
HINTS
|
||||
${${ROOT_VAR}}/bin/${TBB_ARCH}/${TBB_VCVER}
|
||||
${${ROOT_VAR}}/bin
|
||||
${${ROOT_VAR}}/../redist/${TBB_ARCH}/tbb/${TBB_VCVER}
|
||||
${${ROOT_VAR}}/../redist/${TBB_ARCH}_win/tbb/${TBB_VCVER}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
set(${LIB_DIR_VAR} ${${ROOT_VAR}}/lib/${TBB_ARCH}/${TBB_VCVER})
|
||||
|
||||
find_library(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_NAME}
|
||||
PATHS
|
||||
${${LIB_DIR_VAR}}
|
||||
${${ROOT_VAR}}/lib
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_library(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_NAME}
|
||||
PATHS
|
||||
${${LIB_DIR_VAR}}
|
||||
${${ROOT_VAR}}/lib
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
find_path(${ROOT_VAR} include/tbb/tbb.h
|
||||
DOC "Root of ${TBB_LIBRARY_NAME} installation"
|
||||
PATHS ${PROJECT_SOURCE_DIR}/tbb
|
||||
NO_DEFAULT_PATH
|
||||
set(LIB_PATHS
|
||||
${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER}
|
||||
${TBB_ROOT}/lib
|
||||
)
|
||||
find_path(${ROOT_VAR} include/tbb/tbb.h
|
||||
DOC "Root of ${TBB_LIBRARY_NAME} installation"
|
||||
HINTS ${${ROOT_VAR}}
|
||||
|
||||
# On window, also search the DLL so that the client may install it.
|
||||
set(DLL_NAME "${LIB_NAME}.dll")
|
||||
|
||||
# lib name with version suffix to handle oneTBB tbb12.dll
|
||||
set(LIB_NAME_VERSION "")
|
||||
if (${COMPONENT_NAME} STREQUAL "tbb")
|
||||
if (BUILD_CONFIG STREQUAL "DEBUG")
|
||||
set(LIB_NAME_VERSION "tbb12_debug")
|
||||
else()
|
||||
set(LIB_NAME_VERSION "tbb12")
|
||||
endif()
|
||||
endif()
|
||||
set(DLL_NAME_VERSION "${LIB_NAME_VERSION}.dll")
|
||||
|
||||
find_file(BIN_FILE
|
||||
NAMES ${DLL_NAME} ${DLL_NAME_VERSION}
|
||||
PATHS
|
||||
${PROJECT_SOURCE_DIR}/tbb
|
||||
/opt/intel/composerxe/tbb
|
||||
/opt/intel/compilers_and_libraries/tbb
|
||||
/opt/intel/tbb
|
||||
)
|
||||
|
||||
if(${ROOT_VAR} STREQUAL "")
|
||||
find_path(${INCLUDE_DIR_VAR} tbb/task_scheduler_init.h)
|
||||
find_library(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_NAME})
|
||||
find_library(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_NAME})
|
||||
elseif(EXISTS ${${ROOT_VAR}}/cmake/TBBBuild.cmake AND EXISTS ${${ROOT_VAR}}/src/tbb/tbb_version.h)
|
||||
option(TBB_STATIC_LIB "Build TBB as a static library (building TBB as a static library is NOT recommended)")
|
||||
if(TBB_STATIC_LIB)
|
||||
include(${${ROOT_VAR}}/cmake/TBBBuild.cmake)
|
||||
tbb_build(TBB_ROOT ${${ROOT_VAR}} CONFIG_DIR TBB_DIR MAKE_ARGS extra_inc=big_iron.inc)
|
||||
|
||||
set(${INCLUDE_DIR_VAR} ${${ROOT_VAR}}/include)
|
||||
set(${TBB_LIBRARY_VAR} ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/lib${TBB_LIBRARY_NAME}.a)
|
||||
set(${TBBMALLOC_LIBRARY_VAR} ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/lib${TBBMALLOC_LIBRARY_NAME}.a)
|
||||
else()
|
||||
include(${${ROOT_VAR}}/cmake/TBBBuild.cmake)
|
||||
tbb_build(TBB_ROOT ${${ROOT_VAR}} CONFIG_DIR TBB_DIR)
|
||||
set(${INCLUDE_DIR_VAR} ${${ROOT_VAR}}/include)
|
||||
set(${TBB_LIBRARY_VAR} ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/lib${TBB_LIBRARY_NAME}.so.2)
|
||||
set(${TBBMALLOC_LIBRARY_VAR} ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/lib${TBBMALLOC_LIBRARY_NAME}.so.2)
|
||||
endif()
|
||||
else()
|
||||
set(${INCLUDE_DIR_VAR} ${INCLUDE_DIR_VAR}-NOTFOUND)
|
||||
set(${BIN_DIR_VAR} ${BIN_DIR_VAR}-NOTFOUND)
|
||||
set(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_VAR}-NOTFOUND)
|
||||
set(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_VAR}-NOTFOUND)
|
||||
if(APPLE)
|
||||
find_path(${INCLUDE_DIR_VAR} tbb/task_scheduler_init.h PATHS ${${ROOT_VAR}}/include NO_DEFAULT_PATH)
|
||||
find_library(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_NAME} PATHS ${${ROOT_VAR}}/lib NO_DEFAULT_PATH)
|
||||
find_library(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_NAME} PATHS ${${ROOT_VAR}}/lib NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path(${INCLUDE_DIR_VAR} tbb/task_scheduler_init.h PATHS ${${ROOT_VAR}}/include NO_DEFAULT_PATH)
|
||||
file(GLOB ALL_HINTS PATHS ${${ROOT_VAR}}/lib/intel64/gcc*)
|
||||
list(REVERSE ALL_HINTS)
|
||||
set(ALL_HINTS
|
||||
HINTS
|
||||
${ALL_HINTS}
|
||||
${${ROOT_VAR}}/lib
|
||||
${${ROOT_VAR}}/lib/x86_64-linux-gnu
|
||||
${${ROOT_VAR}}/lib64
|
||||
${${ROOT_VAR}}/libx86_64-linux-gnu
|
||||
NO_DEFAULT_PATH)
|
||||
find_library(${TBB_LIBRARY_VAR} ${TBB_LIBRARY_NAME} ${ALL_HINTS})
|
||||
find_library(${TBBMALLOC_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_NAME} ${ALL_HINTS})
|
||||
endif()
|
||||
endif()
|
||||
"${TBB_ROOT}/bin/${TBB_ARCH}/${TBB_VCVER}"
|
||||
"${TBB_ROOT}/bin"
|
||||
"${TBB_ROOT}/redist/${TBB_ARCH}/${TBB_VCVER}"
|
||||
"${TBB_ROOT}/../redist/${TBB_ARCH}/tbb/${TBB_VCVER}"
|
||||
"${TBB_ROOT}/../redist/${TBB_ARCH}_win/tbb/${TBB_VCVER}"
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(${BIN_DIR_VAR} ${BIN_FILE} DIRECTORY)
|
||||
set(${DLL_VAR} "${BIN_FILE}" CACHE PATH "${COMPONENT_NAME} ${BUILD_CONFIG} dll path")
|
||||
elseif(APPLE)
|
||||
set(LIB_PATHS ${TBB_ROOT}/lib)
|
||||
else()
|
||||
file(GLOB LIB_PATHS PATHS ${TBB_ROOT}/lib/intel64/gcc*)
|
||||
list(REVERSE LIB_PATHS)
|
||||
list(APPEND LIB_PATHS
|
||||
${TBB_ROOT}/lib
|
||||
${TBB_ROOT}/lib/x86_64-linux-gnu
|
||||
${TBB_ROOT}/lib64
|
||||
${TBB_ROOT}/libx86_64-linux-gnu)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(${TARGET}
|
||||
DEFAULT_MSG ${INCLUDE_DIR_VAR} ${TBB_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_VAR})
|
||||
# We prefer finding the versioned file on Unix so that the library path
|
||||
# variable will not point to a symlink. This makes installing TBB as a
|
||||
# dependency easier.
|
||||
if (UNIX)
|
||||
set(LIB_NAME lib${LIB_NAME}.so.2 ${LIB_NAME})
|
||||
endif()
|
||||
|
||||
# Do not display these variables in GUIs unless the advanced flag is on.
|
||||
mark_as_advanced(${INCLUDE_DIR_VAR})
|
||||
mark_as_advanced(${BIN_DIR_VAR})
|
||||
mark_as_advanced(${LIB_DIR_VAR})
|
||||
mark_as_advanced(${TBB_LIBRARY_VAR})
|
||||
mark_as_advanced(${TBBMALLOC_LIBRARY_VAR})
|
||||
find_library(${LIB_VAR}
|
||||
NAMES ${LIB_NAME}
|
||||
PATHS ${LIB_PATHS}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# Create an imported library target for TBB.
|
||||
if(${TARGET}_FOUND)
|
||||
add_library(${TARGET}::tbb SHARED IMPORTED)
|
||||
set_target_properties(${TARGET}::tbb PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${${INCLUDE_DIR_VAR}}
|
||||
# Hide this variable if we found something, otherwise display it for
|
||||
# easy override.
|
||||
if(${LIB_VAR})
|
||||
mark_as_advanced(${LIB_VAR})
|
||||
endif()
|
||||
if(${BIN_DIR_VAR})
|
||||
mark_as_advanced(${BIN_DIR_VAR})
|
||||
endif()
|
||||
if(${DLL_VAR})
|
||||
mark_as_advanced(${DLL_VAR})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#===============================================================================
|
||||
# Find the given component.
|
||||
# This macro attempts to find both release and debug versions, and falls back
|
||||
# appropriately if only one can be found.
|
||||
# On success, it creates a target ${TARGET}::${COMPONENT_NAME} and links
|
||||
# it to the overall ${TARGET}.
|
||||
#
|
||||
# For more information on the variables set here, see
|
||||
# https://cmake.org/cmake/help/v3.17/manual/cmake-developer.7.html#a-sample-find-module
|
||||
#===============================================================================
|
||||
|
||||
function(rk_tbb_find_and_link_component COMPONENT_NAME)
|
||||
set(COMPONENT_TARGET "TBB::${COMPONENT_NAME}")
|
||||
|
||||
rk_tbb_find_library("${COMPONENT_NAME}" RELEASE)
|
||||
rk_tbb_find_library("${COMPONENT_NAME}" DEBUG)
|
||||
|
||||
if (${COMPONENT_NAME}_LIBRARY_RELEASE OR ${COMPONENT_NAME}_LIBRARY_DEBUG)
|
||||
# Note: We *must* use SHARED here rather than UNKNOWN as our
|
||||
# IMPORTED_NO_SONAME trick a few lines down does not work with
|
||||
# UNKNOWN.
|
||||
add_library(${COMPONENT_TARGET} SHARED IMPORTED)
|
||||
|
||||
if (${COMPONENT_NAME}_LIBRARY_RELEASE)
|
||||
set_property(TARGET ${COMPONENT_TARGET} APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
if(WIN32)
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${${COMPONENT_NAME}_DLL_RELEASE}")
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_IMPLIB_RELEASE "${${COMPONENT_NAME}_LIBRARY_RELEASE}")
|
||||
else()
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${${COMPONENT_NAME}_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (${COMPONENT_NAME}_LIBRARY_DEBUG)
|
||||
set_property(TARGET ${COMPONENT_TARGET} APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
if(WIN32)
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${${COMPONENT_NAME}_DLL_DEBUG}")
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_IMPLIB_DEBUG "${${COMPONENT_NAME}_LIBRARY_DEBUG}")
|
||||
else()
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${${COMPONENT_NAME}_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${TBB_INCLUDE_DIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "__TBB_NO_IMPLICIT_LINKAGE=1"
|
||||
)
|
||||
add_library(${TARGET}::tbbmalloc SHARED IMPORTED)
|
||||
set_target_properties(${TARGET}::tbbmalloc PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "__TBBMALLOC_NO_IMPLICIT_LINKAGE=1"
|
||||
)
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET}::tbb PROPERTIES
|
||||
IMPORTED_IMPLIB ${${TBB_LIBRARY_VAR}}
|
||||
)
|
||||
set_target_properties(${TARGET}::tbbmalloc PROPERTIES
|
||||
IMPORTED_IMPLIB ${${TBBMALLOC_LIBRARY_VAR}}
|
||||
)
|
||||
else()
|
||||
|
||||
|
||||
if(NOT WIN32)
|
||||
# Note: IMPORTED_NO_SONAME must be set or cmake will attempt
|
||||
# to link to the full path of libtbb.so. Instead, we
|
||||
# rely on the linker to find libtbb.so.2.
|
||||
set_target_properties(${TARGET}::tbb PROPERTIES
|
||||
IMPORTED_LOCATION ${${TBB_LIBRARY_VAR}}
|
||||
IMPORTED_NO_SONAME TRUE
|
||||
)
|
||||
set_target_properties(${TARGET}::tbbmalloc PROPERTIES
|
||||
IMPORTED_LOCATION ${${TBBMALLOC_LIBRARY_VAR}}
|
||||
set_target_properties(${COMPONENT_TARGET} PROPERTIES
|
||||
IMPORTED_NO_SONAME TRUE
|
||||
)
|
||||
endif()
|
||||
get_filename_component(${LIB_DIR_VAR} ${${TBB_LIBRARY_VAR}} DIRECTORY)
|
||||
message(STATUS "FOUND ${TARGET} AT ${${LIB_DIR_VAR}}")
|
||||
|
||||
target_link_libraries(TBB INTERFACE ${COMPONENT_TARGET})
|
||||
endif()
|
||||
endmacro()
|
||||
endfunction()
|
||||
|
||||
#===============================================================================
|
||||
# User configuration.
|
||||
#===============================================================================
|
||||
|
||||
SET(EMBREE_TBB_ROOT "" CACHE PATH "Sets the root path of the release version of TBB.")
|
||||
SET(EMBREE_TBB_DEBUG_ROOT "" CACHE PATH "Sets the root path of the debug version of TBB.")
|
||||
SET(EMBREE_TBB_POSTFIX "" CACHE STRING "Link to tbb<EMBREE_TBB_POSTFIX>.(dll,lib,so) in release mode.")
|
||||
SET(EMBREE_TBB_DEBUG_POSTFIX "_debug" CACHE STRING "Link to tbb<EMBREE_TBB_DEBUG_POSTFIX>.(dll,lib,so) in debug mode.")
|
||||
# Note: The order of these is important.
|
||||
# Some of these macros create variables that are used in later calls.
|
||||
rk_tbb_list_components()
|
||||
rk_tbb_reuse_existing_target_components()
|
||||
|
||||
if (NOT EMBREE_TBB_ROOT)
|
||||
set(EMBREE_TBB_ROOT $ENV{EMBREE_TBB_ROOT})
|
||||
if(NOT EMBREE_TBB_ROOT)
|
||||
set(EMBREE_TBB_ROOT $ENV{EMBREE_TBBROOT})
|
||||
endif()
|
||||
rk_tbb_find_root()
|
||||
if (NOT EXISTS "${TBB_ROOT}")
|
||||
rk_tbb_error("Unable to find root directory ${TBB_ROOT}")
|
||||
endif()
|
||||
mark_as_advanced(TBB_ROOT) # Hide, we found something.
|
||||
|
||||
rk_tbb_find_include_directory()
|
||||
if (NOT EXISTS "${TBB_INCLUDE_DIR}")
|
||||
rk_tbb_error("Unable to find include directory ${TBB_INCLUDE_DIR}")
|
||||
endif()
|
||||
mark_as_advanced(TBB_INCLUDE_DIR) # Hide, we found something.
|
||||
|
||||
rk_tbb_check_version()
|
||||
|
||||
add_library(TBB INTERFACE)
|
||||
|
||||
foreach(C IN LISTS _REQUIRED_COMPONENTS _OPTIONAL_COMPONENTS)
|
||||
rk_tbb_find_and_link_component(${C})
|
||||
endforeach()
|
||||
|
||||
rk_tbb_check_components()
|
||||
if (_TBB_MISSING_COMPONENTS)
|
||||
rk_tbb_error("Cannot find required components: "
|
||||
"${_TBB_MISSING_COMPONENTS}")
|
||||
endif()
|
||||
|
||||
# For the debug root we fall back to TBB_ROOT!
|
||||
if (NOT EMBREE_TBB_DEBUG_ROOT)
|
||||
set(EMBREE_TBB_DEBUG_ROOT $ENV{EMBREE_TBB_DEBUG_ROOT})
|
||||
if(NOT EMBREE_TBB_DEBUG_ROOT)
|
||||
set(EMBREE_TBB_DEBUG_ROOT $ENV{EMBREE_TBBDEBUGROOT})
|
||||
if(NOT EMBREE_TBB_DEBUG_ROOT)
|
||||
set(EMBREE_TBB_DEBUG_ROOT ${EMBREE_TBB_ROOT})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EMBREE_TBB_LIBRARY_NAME)
|
||||
set(EMBREE_TBB_LIBRARY_NAME $ENV{EMBREE_TBB_LIBRARY_NAME})
|
||||
if (NOT EMBREE_TBB_LIBRARY_NAME)
|
||||
set(EMBREE_TBB_LIBRARY_NAME "tbb${EMBREE_TBB_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EMBREE_TBBMALLOC_LIBRARY_NAME)
|
||||
set(EMBREE_TBBMALLOC_LIBRARY_NAME $ENV{EMBREE_TBBMALLOC_LIBRARY_NAME})
|
||||
if (NOT EMBREE_TBBMALLOC_LIBRARY_NAME)
|
||||
set(EMBREE_TBBMALLOC_LIBRARY_NAME "tbbmalloc${EMBREE_TBB_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EMBREE_TBB_DEBUG_LIBRARY_NAME)
|
||||
set(EMBREE_TBB_DEBUG_LIBRARY_NAME $ENV{EMBREE_TBB_DEBUG_LIBRARY_NAME})
|
||||
if (NOT EMBREE_TBB_DEBUG_LIBRARY_NAME)
|
||||
set(EMBREE_TBB_DEBUG_LIBRARY_NAME "tbb${EMBREE_TBB_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME)
|
||||
set(EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME $ENV{EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME})
|
||||
if (NOT EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME)
|
||||
set(EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME "tbbmalloc${EMBREE_TBB_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_tbb(TBB
|
||||
EMBREE_TBB_ROOT
|
||||
EMBREE_TBB_INCLUDE_DIR
|
||||
EMBREE_TBB_BIN_DIR
|
||||
EMBREE_TBB_LIB_DIR
|
||||
EMBREE_TBB_LIBRARY
|
||||
EMBREE_TBBMALLOC_LIBRARY
|
||||
${EMBREE_TBB_LIBRARY_NAME}
|
||||
${EMBREE_TBBMALLOC_LIBRARY_NAME})
|
||||
|
||||
find_tbb(TBB_DEBUG
|
||||
EMBREE_TBB_DEBUG_ROOT
|
||||
EMBREE_TBB_DEBUG_INCLUDE_DIR
|
||||
EMBREE_TBB_DEBUG_BIN_DIR
|
||||
EMBREE_TBB_DEBUG_LIB_DIR
|
||||
EMBREE_TBB_DEBUG_LIBRARY
|
||||
EMBREE_TBBMALLOC_DEBUG_LIBRARY
|
||||
${EMBREE_TBB_DEBUG_LIBRARY_NAME}
|
||||
${EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME})
|
||||
|
||||
#===============================================================================
|
||||
# For linking, attempt to differentiate between release and debug builds,
|
||||
# but fall back if possible to avoid breaking existing build pipelines.
|
||||
#===============================================================================
|
||||
|
||||
if(TBB_FOUND AND TBB_DEBUG_FOUND)
|
||||
set(TBB_LIBRARIES
|
||||
optimized TBB::tbbmalloc
|
||||
optimized TBB::tbb
|
||||
debug TBB_DEBUG::tbbmalloc
|
||||
debug TBB_DEBUG::tbb)
|
||||
set(TBB_INCLUDE_DIRS ${EMBREE_TBB_INCLUDE_DIR} ${EMBREE_TBB_DEBUG_INCLUDE_DIR})
|
||||
elseif(TBB_FOUND)
|
||||
# This is a status message only because there is no performance penalty in
|
||||
# falling back to the release version of TBB. This fallback is quite likely
|
||||
# to happen because users may use tbb as provided by their OS distribution.
|
||||
message(STATUS "Could not find TBB_DEBUG. Falling back to TBB in Debug mode. Consider setting EMBREE_TBB_DEBUG_ROOT or EMBREE_TBB_DEBUG_POSTIFX.")
|
||||
set(TBB_LIBRARIES TBB::tbbmalloc TBB::tbb)
|
||||
set(TBB_INCLUDE_DIRS ${EMBREE_TBB_INCLUDE_DIR})
|
||||
elseif(TBB_DEBUG_FOUND)
|
||||
# Warn in this case because we are falling back to debug mode!
|
||||
message(WARNING "Could not find TBB. Falling back to TBB_DEBUG in Release mode. Consider setting EMBREE_TBB_ROOT or EMBREE_TBB_POSTIFX.")
|
||||
set(TBB_LIBRARIES TBB_DEBUG::tbbmalloc TBB_DEBUG::tbb)
|
||||
set(TBB_INCLUDE_DIRS ${EMBREE_TBB_DEBUG_INCLUDE_DIR})
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find TBB or TBB_DEBUG. Consider setting EMBREE_TBB_ROOT and EMBREE_TBB_DEBUG_ROOT.")
|
||||
endif()
|
||||
|
||||
##############################################################
|
||||
# Install TBB
|
||||
##############################################################
|
||||
|
||||
IF (EMBREE_INSTALL_DEPENDENCIES)
|
||||
IF (TBB_FOUND)
|
||||
IF (WIN32)
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_LIBRARY_NAME}.dll ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBBMALLOC_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_LIBRARY_NAME}.lib ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBBMALLOC_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSEIF (APPLE)
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY} ${EMBREE_TBBMALLOC_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSE()
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_LIBRARY}.2 ${EMBREE_TBBMALLOC_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF (TBB_DEBUG_FOUND)
|
||||
IF (WIN32)
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_BIN_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.dll ${EMBREE_TBB_DEBUG_BIN_DIR}/${EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME}.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_LIB_DIR}/${EMBREE_TBB_DEBUG_LIBRARY_NAME}.lib ${EMBREE_TBB_DEBUG_LIB_DIR}/${EMBREE_TBBMALLOC_DEBUG_LIBRARY_NAME}.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSEIF (APPLE)
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY} ${EMBREE_TBBMALLOC_DEBUG_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSE()
|
||||
INSTALL(PROGRAMS ${EMBREE_TBB_DEBUG_LIBRARY}.2 ${EMBREE_TBBMALLOC_DEBUG_LIBRARY}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
set(TBB_FOUND TRUE)
|
||||
set(TBB_INCLUDE_DIRS "${TBB_INCLUDE_DIR}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
IF (WIN32 OR APPLE)
|
||||
|
||||
@@ -17,11 +17,7 @@
|
||||
#if \
|
||||
defined(__AVX512F__) && defined(__AVX512CD__) && \
|
||||
defined(__AVX512DQ__) && defined(__AVX512BW__) && defined(__AVX512VL__)
|
||||
char const *info_isa = "ISA" ":" "AVX512SKX";
|
||||
#elif \
|
||||
defined(__AVX512F__) && defined(__AVX512CD__) && \
|
||||
defined(__AVX512ER__) && defined(__AVX512PF__)
|
||||
char const *info_isa = "ISA" ":" "AVX512KNL";
|
||||
char const *info_isa = "ISA" ":" "AVX512";
|
||||
#elif defined(__AVX2__)
|
||||
char const *info_isa = "ISA" ":" "AVX2";
|
||||
#elif defined(__AVX__)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
IF (WIN32 OR APPLE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
@@ -11,8 +11,7 @@ _SET_IF_EMPTY(FLAGS_SSE2 "-msse2")
|
||||
_SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX "-mavx")
|
||||
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512KNL "-march=knl")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512SKX "-march=skx")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
|
||||
|
||||
IF (WIN32)
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@ SET(FLAGS_SSE2 "-target-cpu=x86_64")
|
||||
SET(FLAGS_SSE42 "NOT_SUPPORTED")
|
||||
SET(FLAGS_AVX "-target-cpu=sandybridge")
|
||||
SET(FLAGS_AVX2 "-target-cpu=haswell")
|
||||
SET(FLAGS_AVX512KNL "-target-cpu=mic-knl")
|
||||
SET(FLAGS_AVX512SKX "-target-cpu=x86-skylake")
|
||||
SET(FLAGS_AVX512 "-target-cpu=x86-skylake")
|
||||
|
||||
STRING(TOLOWER "${CMAKE_CXX_COMPILER_ID}" _lower_compiler_id)
|
||||
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/${_lower_compiler_id}.cmake" OPTIONAL)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
file(WRITE ${dst} "#include \"${src}\"\n")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# use default install config
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
SET(PACKAGE_VERSION @EMBREE_VERSION@)
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIV_ROOT_DIR@)
|
||||
SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIVE_ROOT_DIR@)
|
||||
GET_FILENAME_COMPONENT(EMBREE_ROOT_DIR "${EMBREE_ROOT_DIR}" ABSOLUTE)
|
||||
|
||||
SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@)
|
||||
SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@)
|
||||
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
|
||||
|
||||
MARK_AS_ADVANCED(embree_DIR)
|
||||
|
||||
SET(EMBREE_VERSION @EMBREE_VERSION@)
|
||||
SET(EMBREE_VERSION_MAJOR @EMBREE_VERSION_MAJOR@)
|
||||
SET(EMBREE_VERSION_MINOR @EMBREE_VERSION_MINOR@)
|
||||
@@ -21,8 +19,8 @@ SET(EMBREE_ISA_SSE2 @EMBREE_ISA_SSE2@)
|
||||
SET(EMBREE_ISA_SSE42 @EMBREE_ISA_SSE42@)
|
||||
SET(EMBREE_ISA_AVX @EMBREE_ISA_AVX@)
|
||||
SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@)
|
||||
SET(EMBREE_ISA_AVX512KNL @EMBREE_ISA_AVX512KNL@)
|
||||
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512SKX@)
|
||||
SET(EMBREE_ISA_AVX512 @EMBREE_ISA_AVX512@)
|
||||
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512@) # just for compatibility
|
||||
|
||||
SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@)
|
||||
SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@)
|
||||
@@ -35,6 +33,7 @@ SET(EMBREE_BACKFACE_CULLING @EMBREE_BACKFACE_CULLING@)
|
||||
SET(EMBREE_FILTER_FUNCTION @EMBREE_FILTER_FUNCTION@)
|
||||
SET(EMBREE_IGNORE_INVALID_RAYS @EMBREE_IGNORE_INVALID_RAYS@)
|
||||
SET(EMBREE_TASKING_SYSTEM @EMBREE_TASKING_SYSTEM@)
|
||||
SET(EMBREE_COMPACT_POLYS @EMBREE_COMPACT_POLYS@)
|
||||
|
||||
SET(EMBREE_GEOMETRY_TRIANGLE @EMBREE_GEOMETRY_TRIANGLE@)
|
||||
SET(EMBREE_GEOMETRY_QUAD @EMBREE_GEOMETRY_QUAD@)
|
||||
@@ -45,11 +44,21 @@ SET(EMBREE_GEOMETRY_POINT @EMBREE_GEOMETRY_POINT@)
|
||||
|
||||
SET(EMBREE_RAY_PACKETS @EMBREE_RAY_PACKETS@)
|
||||
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT @EMBREE_MAX_INSTANCE_LEVEL_COUNT@)
|
||||
SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR @EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR@)
|
||||
SET(EMBREE_MIN_WIDTH @EMBREE_MIN_WIDTH@)
|
||||
|
||||
IF(EMBREE_STATIC_LIB)
|
||||
FILE(GLOB CONFIG_FILES "${EMBREE_ROOT_DIR}/@EMBREE_CMAKECONFIG_DIR@/*-targets.cmake")
|
||||
FOREACH(f ${CONFIG_FILES})
|
||||
INCLUDE(${f})
|
||||
ENDFOREACH()
|
||||
LINK_DIRECTORIES(${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@)
|
||||
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")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/lexers-targets.cmake")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake")
|
||||
|
||||
add_library(TBB::tbb SHARED IMPORTED)
|
||||
set_target_properties(TBB::tbb PROPERTIES IMPORTED_LOCATION "${EMBREE_ROOT_DIR}/@EMBREE_INSTALLED_TBB@")
|
||||
|
||||
ENDIF()
|
||||
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake")
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
@@ -11,8 +11,7 @@ _SET_IF_EMPTY(FLAGS_SSE2 "-msse2")
|
||||
_SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX "-mavx")
|
||||
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512KNL "-mavx512f -mavx512pf -mavx512er -mavx512cd -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512SKX "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mprefer-vector-width=256")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512 "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mprefer-vector-width=256")
|
||||
|
||||
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
|
||||
IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
|
||||
@@ -23,6 +22,12 @@ 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} -Wno-class-memaccess") # disables clearing an object of type ‘XXX’ with no trivial copy-assignment; use assignment or value-initialization instead
|
||||
|
||||
# these prevent compile to optimize away security checks
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-overflow") # assume that signed overflow occurs
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks") # keep all checks for NULL pointers
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fwrapv") # this option instructs the compiler to assume that signed arithmetic overflow warps around.
|
||||
|
||||
IF (NOT APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
|
||||
ENDIF()
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
## 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::tbb)
|
||||
GET_TARGET_PROPERTY(LIB_PATH TBB::tbb IMPORTED_LOCATION_RELEASE)
|
||||
IF(WIN32)
|
||||
INSTALL(FILES ${LIB_PATH} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
|
||||
GET_TARGET_PROPERTY(IMPLIB_PATH TBB::tbb IMPORTED_IMPLIB_RELEASE)
|
||||
INSTALL(FILES ${IMPLIB_PATH} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSE()
|
||||
GET_FILENAME_COMPONENT(LIB_DIR ${LIB_PATH} DIRECTORY)
|
||||
FILE(GLOB LIB_FILES ${LIB_DIR}/libtbb.*)
|
||||
INSTALL(FILES ${LIB_FILES} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE(SEND_ERROR "Target TBB::tbb not found during install.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
@@ -13,8 +13,7 @@ IF (WIN32)
|
||||
_SET_IF_EMPTY(FLAGS_SSE42 "/QxSSE4.2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX "/arch:AVX")
|
||||
_SET_IF_EMPTY(FLAGS_AVX2 "/QxCORE-AVX2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512KNL "/QxMIC-AVX512")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512SKX "/QxCORE-AVX512")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512 "/QxCORE-AVX512")
|
||||
|
||||
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
|
||||
@@ -76,12 +75,17 @@ IF (WIN32)
|
||||
|
||||
# remove libmmd dependency
|
||||
IF (NOT EMBREE_STATIC_RUNTIME)
|
||||
# Use the default math library instead of libmmd[d]
|
||||
STRING(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib")
|
||||
STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmd.lib")
|
||||
STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib")
|
||||
STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib")
|
||||
STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmd.lib")
|
||||
STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib")
|
||||
|
||||
# Link the static version of SVML
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /defaultlib:svml_dispmt.lib")
|
||||
string(APPEND CMAKE_SHARED_LINKER_FLAGS " /defaultlib:svml_dispmt.lib")
|
||||
ENDIF()
|
||||
|
||||
ELSE()
|
||||
@@ -94,8 +98,7 @@ ELSE()
|
||||
_SET_IF_EMPTY(FLAGS_SSE42 "-xsse4.2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX "-xAVX")
|
||||
_SET_IF_EMPTY(FLAGS_AVX2 "-xCORE-AVX2")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512KNL "-xMIC-AVX512")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512SKX "-xCORE-AVX512")
|
||||
_SET_IF_EMPTY(FLAGS_AVX512 "-xCORE-AVX512")
|
||||
|
||||
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
|
||||
IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
|
||||
@@ -105,6 +108,12 @@ ELSE()
|
||||
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
|
||||
|
||||
# these prevent compile to optimize away security checks
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-overflow") # assume that signed overflow occurs
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks") # keep all checks for NULL pointers
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fwrapv") # this option instructs the compiler to assume that signed arithmetic overflow warps around.
|
||||
|
||||
IF (NOT APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftls-model=local-dynamic") # otherwise ICC2019 cannot compile code with -fPIE enabled
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# ##################################################################
|
||||
@@ -125,10 +125,7 @@ MACRO (ISPC_COMPILE)
|
||||
LIST(LENGTH ISPC_TARGETS NUM_TARGETS)
|
||||
IF (NUM_TARGETS GREATER 1)
|
||||
FOREACH(target ${ISPC_TARGETS})
|
||||
# in v1.9.0 ISPC changed the ISA suffix of avx512knl-i32x16 to just 'avx512knl'
|
||||
IF (${target} STREQUAL "avx512knl-i32x16" AND NOT ISPC_VERSION VERSION_LESS "1.9.0")
|
||||
SET(target "avx512knl")
|
||||
ELSEIF (${target} STREQUAL "avx512skx-i32x16")
|
||||
IF (${target} STREQUAL "avx512skx-i32x16")
|
||||
SET(target "avx512skx")
|
||||
ENDIF()
|
||||
SET(results ${results} "${outdir}/${fname}.dev_${target}${ISPC_TARGET_EXT}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
SET(FLAGS_SSE2 "/D__SSE__ /D__SSE2__")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# optionally use static runtime library
|
||||
|
||||
+34
-15
@@ -1,12 +1,8 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
if (NOT DEFINED EMBREE_ZIP_MODE)
|
||||
set(EMBREE_ZIP_MODE OFF)
|
||||
endif()
|
||||
|
||||
IF (NOT EMBREE_ZIP_MODE AND NOT WIN32 AND NOT APPLE)
|
||||
SET(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR}/embree${EMBREE_VERSION_MAJOR})
|
||||
SET(CMAKE_INSTALL_FULL_BINDIR ${CMAKE_INSTALL_FULL_BINDIR}/embree${EMBREE_VERSION_MAJOR})
|
||||
@@ -15,14 +11,26 @@ ENDIF()
|
||||
# use full absolute path as install name
|
||||
IF (NOT EMBREE_ZIP_MODE)
|
||||
SET(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
ELSE()
|
||||
IF(APPLE)
|
||||
SET(CMAKE_INSTALL_RPATH "@loader_path/../lib")
|
||||
SET(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}")
|
||||
ELSE()
|
||||
SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
|
||||
SET(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Install MSVC runtime
|
||||
##############################################################
|
||||
|
||||
IF (WIN32)
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP 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)
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Install Headers
|
||||
##############################################################
|
||||
@@ -98,16 +106,23 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32 OR EMBREE_ZIP_MODE)
|
||||
#IF (WIN32 OR EMBREE_ZIP_MODE)
|
||||
# for local "installs" and on Windows we want the cmake config files placed
|
||||
# in the install root, such that users can point the CMake variable
|
||||
# embree_DIR just to the install folder
|
||||
SET(EMBREE_CMAKECONFIG_DIR ".")
|
||||
SET(EMBREE_RELATIV_ROOT_DIR ".")
|
||||
# SET(EMBREE_CMAKECONFIG_DIR ".")
|
||||
# SET(EMBREE_CMAKEEXPORT_DIR "cmake")
|
||||
# SET(EMBREE_RELATIVE_ROOT_DIR ".")
|
||||
#ELSE()
|
||||
SET(EMBREE_CMAKECONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
|
||||
SET(EMBREE_CMAKEEXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
|
||||
IF (WIN32)
|
||||
SET(EMBREE_RELATIVE_ROOT_DIR "../../../")
|
||||
ELSE()
|
||||
SET(EMBREE_CMAKECONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
|
||||
FILE(RELATIVE_PATH EMBREE_RELATIV_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/")
|
||||
FILE(RELATIVE_PATH EMBREE_RELATIVE_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/")
|
||||
ENDIF()
|
||||
#ENDIF()
|
||||
|
||||
CONFIGURE_FILE(common/cmake/embree-config.cmake embree-config-install.cmake @ONLY)
|
||||
CONFIGURE_FILE(common/cmake/embree-config-version.cmake embree-config-version.cmake @ONLY)
|
||||
# create a config file for the build directory
|
||||
@@ -120,7 +135,7 @@ INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION ${
|
||||
# CPack specific stuff
|
||||
##############################################################
|
||||
|
||||
SET(CPACK_PACKAGE_NAME "Embree Ray Tracing Kernels")
|
||||
SET(CPACK_PACKAGE_NAME "Intel(R) Embree Ray Tracing Kernels")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")
|
||||
#SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
|
||||
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
@@ -129,7 +144,7 @@ SET(CPACK_STRIP_FILES TRUE)
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${EMBREE_VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${EMBREE_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${EMBREE_VERSION_PATCH})
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Embree: High Performance Ray Tracing Kernels")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Embree implements high performance ray tracing kernels including accelertion structure construction and traversal.")
|
||||
SET(CPACK_PACKAGE_VENDOR "Intel Corporation")
|
||||
SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)
|
||||
|
||||
@@ -171,7 +186,7 @@ IF(WIN32)
|
||||
IF (NOT EMBREE_ZIP_MODE)
|
||||
SET(CPACK_GENERATOR WIX)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.${VCVER}")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree${EMBREE_VERSION_MAJOR} ${ARCH}")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\Embree${EMBREE_VERSION_MAJOR}")
|
||||
SET(CPACK_WIX_PRODUCT_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_NUMBER}")
|
||||
SET(CPACK_WIX_UPGRADE_GUID "331BD5A9-DAD6-486B-A435-18AAB80${EMBREE_VERSION_MAJOR}0000") # upgrade as long as major version is the same
|
||||
SET(CPACK_WIX_CMAKE_PACKAGE_REGISTRY TRUE)
|
||||
@@ -257,3 +272,7 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_TESTING_PACKAGE)
|
||||
SET_TESTS_PROPERTIES(BuildPackage PROPERTIES TIMEOUT 1200)
|
||||
ENDIF()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/sbin/ldconfig
|
||||
|
||||
+12
-15
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
INCLUDE(CTest)
|
||||
@@ -30,28 +30,25 @@ IF (EMBREE_TESTING_MODEL_DIR)
|
||||
SET(EMBREE_MODEL_DIR ${EMBREE_TESTING_MODEL_DIR})
|
||||
ENDIF()
|
||||
|
||||
MACRO (ADD_EMBREE_NORMAL_TEST name reference executable args)
|
||||
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()
|
||||
|
||||
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
|
||||
IF (BUILD_TESTING)
|
||||
ADD_TEST(NAME ${name}_ispc
|
||||
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
|
||||
COMMAND ${executable}_ispc --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (ADD_EMBREE_TEST_WITHOUT_ISPC name)
|
||||
IF (BUILD_TESTING)
|
||||
ADD_TEST(NAME ${name}
|
||||
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} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
|
||||
ENDIF()
|
||||
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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# additional parameters (beyond the name) are treated as additional dependencies
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ADD_LIBRARY(lexers STATIC
|
||||
@@ -11,6 +11,7 @@ SET_PROPERTY(TARGET lexers APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INSTALL(TARGETS lexers EXPORT lexers-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
INSTALL(EXPORT lexers-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
SIGN_TARGET(lexers)
|
||||
INSTALL(EXPORT lexers-targets DESTINATION ${EMBREE_CMAKEEXPORT_DIR} COMPONENT devel)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "stringstream.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
static const std::string stringChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 _.,+-=:/*\\";
|
||||
|
||||
/* creates map for fast categorization of characters */
|
||||
static void createCharMap(bool map[256], const std::string& chrs) {
|
||||
for (size_t i=0; i<256; i++) map[i] = false;
|
||||
@@ -16,6 +18,7 @@ namespace embree
|
||||
: cin(cin), endl(endl), multiLine(multiLine)
|
||||
{
|
||||
createCharMap(isSepMap,seps);
|
||||
createCharMap(isValidCharMap,stringChars);
|
||||
}
|
||||
|
||||
std::string StringStream::next()
|
||||
@@ -34,8 +37,11 @@ namespace embree
|
||||
|
||||
/* parse everything until the next separator */
|
||||
std::vector<char> str; str.reserve(64);
|
||||
while (cin->peek() != EOF && !isSeparator(cin->peek()))
|
||||
str.push_back((char)cin->get());
|
||||
while (cin->peek() != EOF && !isSeparator(cin->peek())) {
|
||||
int c = cin->get();
|
||||
if (!isValidChar(c)) throw std::runtime_error("invalid character "+std::string(1,c)+" in input");
|
||||
str.push_back((char)c);
|
||||
}
|
||||
str.push_back(0);
|
||||
return std::string(str.data());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -17,10 +17,12 @@ namespace embree
|
||||
ParseLocation location() { return cin->loc(); }
|
||||
std::string next();
|
||||
private:
|
||||
__forceinline bool isSeparator(int c) const { return c<256 && isSepMap[c]; }
|
||||
__forceinline bool isSeparator(unsigned int c) const { return c<256 && isSepMap[c]; }
|
||||
__forceinline bool isValidChar(unsigned int c) const { return c<256 && isValidCharMap[c]; }
|
||||
private:
|
||||
Ref<Stream<int> > cin; /*! source character stream */
|
||||
bool isSepMap[256]; /*! map for fast classification of separators */
|
||||
bool isValidCharMap[256]; /*! map for valid characters */
|
||||
std::string endl; /*! the token of the end of line */
|
||||
bool multiLine; /*! whether to parse lines wrapped with \ */
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "tokenstream.h"
|
||||
@@ -11,6 +11,7 @@ namespace embree
|
||||
const std::string TokenStream::ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
const std::string TokenStream::numbers = "0123456789";
|
||||
const std::string TokenStream::separators = "\n\t\r ";
|
||||
const std::string TokenStream::stringChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 _.,+-=:/*\\";
|
||||
|
||||
/* creates map for fast categorization of characters */
|
||||
static void createCharMap(bool map[256], const std::string& chrs) {
|
||||
@@ -27,6 +28,7 @@ namespace embree
|
||||
{
|
||||
createCharMap(isAlphaMap,alpha);
|
||||
createCharMap(isSepMap,seps);
|
||||
createCharMap(isStringCharMap,stringChars);
|
||||
}
|
||||
|
||||
bool TokenStream::decDigits(std::string& str_o)
|
||||
@@ -136,7 +138,11 @@ namespace embree
|
||||
std::string str;
|
||||
if (cin->peek() != '\"') return false;
|
||||
cin->drop();
|
||||
while (cin->peek() != '\"') str += (char)cin->get();
|
||||
while (cin->peek() != '\"') {
|
||||
const int c = cin->get();
|
||||
if (!isStringChar(c)) THROW_RUNTIME_ERROR("invalid string character "+std::string(1,c)+" at "+loc.str());
|
||||
str += (char)c;
|
||||
}
|
||||
cin->drop();
|
||||
token = Token(str,Token::TY_STRING,loc);
|
||||
return true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -120,6 +120,7 @@ namespace embree
|
||||
static const std::string ALPHA;
|
||||
static const std::string numbers;
|
||||
static const std::string separators;
|
||||
static const std::string stringChars;
|
||||
|
||||
public:
|
||||
TokenStream(const Ref<Stream<int> >& cin,
|
||||
@@ -144,16 +145,20 @@ namespace embree
|
||||
Ref<Stream<int> > cin;
|
||||
bool isSepMap[256];
|
||||
bool isAlphaMap[256];
|
||||
bool isStringCharMap[256];
|
||||
std::vector<std::string> symbols;
|
||||
|
||||
/*! checks if a character is a separator */
|
||||
__forceinline bool isSeparator(int c) const { return c<256 && isSepMap[c]; }
|
||||
__forceinline bool isSeparator(unsigned int c) const { return c<256 && isSepMap[c]; }
|
||||
|
||||
/*! checks if a character is a number */
|
||||
__forceinline bool isDigit(int c) const { return c >= '0' && c <= '9';}
|
||||
__forceinline bool isDigit(unsigned int c) const { return c >= '0' && c <= '9'; }
|
||||
|
||||
/*! checks if a character is valid inside a string */
|
||||
__forceinline bool isStringChar(unsigned int c) const { return c<256 && isStringCharMap[c]; }
|
||||
|
||||
/*! checks if a character is legal for an identifier */
|
||||
__forceinline bool isAlpha(int c) const { return c<256 && isAlphaMap[c]; }
|
||||
__forceinline bool isAlphaNum(int c) const { return isAlpha(c) || isDigit(c); }
|
||||
__forceinline bool isAlpha(unsigned int c) const { return c<256 && isAlphaMap[c]; }
|
||||
__forceinline bool isAlphaNum(unsigned int c) const { return isAlpha(c) || isDigit(c); }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ADD_LIBRARY(math STATIC constants.cpp)
|
||||
@@ -7,7 +7,6 @@ SET_PROPERTY(TARGET math APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INSTALL(TARGETS math EXPORT math-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
INSTALL(EXPORT math-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
SIGN_TARGET(math)
|
||||
INSTALL(EXPORT math-targets DESTINATION ${EMBREE_CMAKEEXPORT_DIR} COMPONENT devel)
|
||||
ENDIF()
|
||||
|
||||
|
||||
+12
-10
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -72,7 +72,7 @@ namespace embree
|
||||
|
||||
// template specialization to get correct identity matrix for type AffineSpace3fa
|
||||
template<>
|
||||
__forceinline AffineSpaceT<LinearSpace3fa>::AffineSpaceT( OneTy ) : l(one), p(0.f, 0.f, 0.f, 1.f) {}
|
||||
__forceinline AffineSpaceT<LinearSpace3ff>::AffineSpaceT( OneTy ) : l(one), p(0.f, 0.f, 0.f, 1.f) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Unary Operators
|
||||
@@ -147,6 +147,8 @@ namespace embree
|
||||
typedef AffineSpaceT<LinearSpace2f> AffineSpace2f;
|
||||
typedef AffineSpaceT<LinearSpace3f> AffineSpace3f;
|
||||
typedef AffineSpaceT<LinearSpace3fa> AffineSpace3fa;
|
||||
typedef AffineSpaceT<LinearSpace3fx> AffineSpace3fx;
|
||||
typedef AffineSpaceT<LinearSpace3ff> AffineSpace3ff;
|
||||
typedef AffineSpaceT<Quaternion3f > OrthonormalSpace3f;
|
||||
|
||||
template<int N> using AffineSpace3vf = AffineSpaceT<LinearSpace3<Vec3<vfloat<N>>>>;
|
||||
@@ -154,7 +156,7 @@ namespace embree
|
||||
typedef AffineSpaceT<LinearSpace3<Vec3<vfloat<8>>>> AffineSpace3vf8;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec3<vfloat<16>>>> AffineSpace3vf16;
|
||||
|
||||
template<int N> using AffineSpace3vfa = AffineSpaceT<LinearSpace3<Vec4<vfloat<N>>>>;
|
||||
template<int N> using AffineSpace3vff = AffineSpaceT<LinearSpace3<Vec4<vfloat<N>>>>;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec4<vfloat<4>>>> AffineSpace3vfa4;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec4<vfloat<8>>>> AffineSpace3vfa8;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec4<vfloat<16>>>> AffineSpace3vfa16;
|
||||
@@ -196,8 +198,8 @@ namespace embree
|
||||
|
||||
// this is a specialized version for Vec3fa because that does
|
||||
// not play along nicely with the other templated Vec3/Vec4 types
|
||||
__forceinline AffineSpace3fa slerp(const AffineSpace3fa& M0,
|
||||
const AffineSpace3fa& M1,
|
||||
__forceinline AffineSpace3fa slerp(const AffineSpace3ff& M0,
|
||||
const AffineSpace3ff& M1,
|
||||
const float& t)
|
||||
{
|
||||
Quaternion3f q0(M0.p.w, M0.l.vx.w, M0.l.vy.w, M0.l.vz.w);
|
||||
@@ -217,7 +219,7 @@ namespace embree
|
||||
return D * R * S;
|
||||
}
|
||||
|
||||
__forceinline AffineSpace3fa quaternionDecompositionToAffineSpace(const AffineSpace3fa& qd)
|
||||
__forceinline AffineSpace3fa quaternionDecompositionToAffineSpace(const AffineSpace3ff& qd)
|
||||
{
|
||||
// compute affine transform from quaternion decomposition
|
||||
Quaternion3f q(qd.p.w, qd.l.vx.w, qd.l.vy.w, qd.l.vz.w);
|
||||
@@ -233,7 +235,7 @@ namespace embree
|
||||
return D * R * M;
|
||||
}
|
||||
|
||||
__forceinline void quaternionDecomposition(const AffineSpace3fa& qd, Vec3fa& T, Quaternion3f& q, AffineSpace3fa& S)
|
||||
__forceinline void quaternionDecomposition(const AffineSpace3ff& qd, Vec3fa& T, Quaternion3f& q, AffineSpace3fa& S)
|
||||
{
|
||||
q = Quaternion3f(qd.p.w, qd.l.vx.w, qd.l.vy.w, qd.l.vz.w);
|
||||
S = qd;
|
||||
@@ -245,9 +247,9 @@ namespace embree
|
||||
S.l.vy.z = 0;
|
||||
}
|
||||
|
||||
__forceinline AffineSpace3fa quaternionDecomposition(Vec3fa const& T, Quaternion3f const& q, AffineSpace3fa const& S)
|
||||
__forceinline AffineSpace3fx quaternionDecomposition(Vec3fa const& T, Quaternion3f const& q, AffineSpace3fa const& S)
|
||||
{
|
||||
AffineSpace3fa M = S;
|
||||
AffineSpace3ff M = S;
|
||||
M.l.vx.w = q.i;
|
||||
M.l.vy.w = q.j;
|
||||
M.l.vz.w = q.k;
|
||||
@@ -278,7 +280,7 @@ namespace embree
|
||||
float translation_z = 0.f;
|
||||
};
|
||||
|
||||
__forceinline QuaternionDecomposition quaternionDecomposition(AffineSpace3fa const& M)
|
||||
__forceinline QuaternionDecomposition quaternionDecomposition(AffineSpace3ff const& M)
|
||||
{
|
||||
QuaternionDecomposition qd;
|
||||
qd.scale_x = M.l.vx.x;
|
||||
|
||||
+20
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -25,7 +25,8 @@ namespace embree
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline BBox ( ) { }
|
||||
__forceinline BBox ( const BBox& other ) { lower = other.lower; upper = other.upper; }
|
||||
template<typename T1>
|
||||
__forceinline BBox ( const BBox<T1>& other ) : lower(other.lower), upper(other.upper) {}
|
||||
__forceinline BBox& operator=( const BBox& other ) { lower = other.lower; upper = other.upper; return *this; }
|
||||
|
||||
__forceinline BBox ( const T& v ) : lower(v), upper(v) {}
|
||||
@@ -80,6 +81,9 @@ namespace embree
|
||||
template<> __forceinline bool BBox<Vec3fa>::empty() const {
|
||||
return !all(le_mask(lower,upper));
|
||||
}
|
||||
template<> __forceinline bool BBox<Vec3fx>::empty() const {
|
||||
return !all(le_mask(lower,upper));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*! tests if box is finite */
|
||||
@@ -87,6 +91,11 @@ namespace embree
|
||||
return all(gt_mask(v.lower,Vec3fa_t(-FLT_LARGE)) & lt_mask(v.upper,Vec3fa_t(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
/*! tests if box is finite and non-empty*/
|
||||
__forceinline bool isvalid_non_empty( const BBox<Vec3fa>& v ) {
|
||||
return all(gt_mask(v.lower,Vec3fa_t(-FLT_LARGE)) & lt_mask(v.upper,Vec3fa_t(+FLT_LARGE)) & le_mask(v.lower,v.upper));
|
||||
}
|
||||
|
||||
/*! tests if box has finite entries */
|
||||
__forceinline bool is_finite( const BBox<Vec3fa>& b) {
|
||||
return is_finite(b.lower) && is_finite(b.upper);
|
||||
@@ -115,6 +124,9 @@ namespace embree
|
||||
__forceinline float halfArea( const BBox<Vec3fa>& b ) { return halfArea(b.size()); }
|
||||
__forceinline float area( const BBox<Vec3fa>& b ) { return 2.0f*halfArea(b); }
|
||||
|
||||
__forceinline float halfArea( const BBox<Vec3fx>& b ) { return halfArea(b.size()); }
|
||||
__forceinline float area( const BBox<Vec3fx>& b ) { return 2.0f*halfArea(b); }
|
||||
|
||||
template<typename Vec> __forceinline float safeArea( const BBox<Vec>& b ) { if (b.empty()) return 0.0f; else return area(b); }
|
||||
|
||||
template<typename T> __forceinline float expectedApproxHalfArea(const BBox<T>& box) {
|
||||
@@ -186,6 +198,10 @@ namespace embree
|
||||
template<> __inline bool subset( const BBox<Vec3fa>& a, const BBox<Vec3fa>& b ) {
|
||||
return all(ge_mask(a.lower,b.lower)) & all(le_mask(a.upper,b.upper));
|
||||
}
|
||||
|
||||
template<> __inline bool subset( const BBox<Vec3fx>& a, const BBox<Vec3fx>& b ) {
|
||||
return all(ge_mask(a.lower,b.lower)) & all(le_mask(a.upper,b.upper));
|
||||
}
|
||||
|
||||
/*! blending */
|
||||
template<typename T>
|
||||
@@ -204,6 +220,8 @@ namespace embree
|
||||
typedef BBox<Vec2fa> BBox2fa;
|
||||
typedef BBox<Vec3f> BBox3f;
|
||||
typedef BBox<Vec3fa> BBox3fa;
|
||||
typedef BBox<Vec3fx> BBox3fx;
|
||||
typedef BBox<Vec3ff> BBox3ff;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "constants.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+16
-7
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -23,9 +23,10 @@ namespace embree
|
||||
public:
|
||||
__forceinline LBBox () {}
|
||||
|
||||
__forceinline LBBox ( const LBBox& other ) {
|
||||
bounds0 = other.bounds0; bounds1 = other.bounds1;
|
||||
}
|
||||
template<typename T1>
|
||||
__forceinline LBBox ( const LBBox<T1>& other )
|
||||
: bounds0(other.bounds0), bounds1(other.bounds1) {}
|
||||
|
||||
__forceinline LBBox& operator= ( const LBBox& other ) {
|
||||
bounds0 = other.bounds0; bounds1 = other.bounds1; return *this;
|
||||
}
|
||||
@@ -221,9 +222,11 @@ namespace embree
|
||||
}
|
||||
|
||||
/*! Comparison Operators */
|
||||
template<typename TT> friend __forceinline bool operator==( const LBBox<TT>& a, const LBBox<TT>& b ) { return a.bounds0 == b.bounds0 && a.bounds1 == b.bounds1; }
|
||||
template<typename TT> friend __forceinline bool operator!=( const LBBox<TT>& a, const LBBox<TT>& b ) { return a.bounds0 != b.bounds0 || a.bounds1 != b.bounds1; }
|
||||
|
||||
//template<typename TT> friend __forceinline bool operator==( const LBBox<TT>& a, const LBBox<TT>& b ) { return a.bounds0 == b.bounds0 && a.bounds1 == b.bounds1; }
|
||||
//template<typename TT> friend __forceinline bool operator!=( const LBBox<TT>& a, const LBBox<TT>& b ) { return a.bounds0 != b.bounds0 || a.bounds1 != b.bounds1; }
|
||||
friend __forceinline bool operator==( const LBBox& a, const LBBox& b ) { return a.bounds0 == b.bounds0 && a.bounds1 == b.bounds1; }
|
||||
friend __forceinline bool operator!=( const LBBox& a, const LBBox& b ) { return a.bounds0 != b.bounds0 || a.bounds1 != b.bounds1; }
|
||||
|
||||
/*! output operator */
|
||||
friend __forceinline embree_ostream operator<<(embree_ostream cout, const LBBox& box) {
|
||||
return cout << "LBBox { " << box.bounds0 << "; " << box.bounds1 << " }";
|
||||
@@ -238,6 +241,11 @@ namespace embree
|
||||
__forceinline bool isvalid( const LBBox<T>& v ) {
|
||||
return isvalid(v.bounds0) && isvalid(v.bounds1);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
__forceinline bool isvalid_non_empty( const LBBox<T>& v ) {
|
||||
return isvalid_non_empty(v.bounds0) && isvalid_non_empty(v.bounds1);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
__forceinline T expectedArea(const T& a0, const T& a1, const T& b0, const T& b1)
|
||||
@@ -277,4 +285,5 @@ namespace embree
|
||||
typedef LBBox<Vec2f> LBBox2f;
|
||||
typedef LBBox<Vec3f> LBBox3f;
|
||||
typedef LBBox<Vec3fa> LBBox3fa;
|
||||
typedef LBBox<Vec3fx> LBBox3fx;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -171,6 +171,15 @@ namespace embree
|
||||
return LinearSpace3<T>(select(s,t.vx,f.vx),select(s,t.vy,f.vy),select(s,t.vz,f.vz));
|
||||
}
|
||||
|
||||
/*! blending */
|
||||
template<typename T>
|
||||
__forceinline LinearSpace3<T> lerp(const LinearSpace3<T>& l0, const LinearSpace3<T>& l1, const float t)
|
||||
{
|
||||
return LinearSpace3<T>(lerp(l0.vx,l1.vx,t),
|
||||
lerp(l0.vy,l1.vy,t),
|
||||
lerp(l0.vz,l1.vz,t));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -182,6 +191,8 @@ namespace embree
|
||||
/*! Shortcuts for common linear spaces. */
|
||||
typedef LinearSpace3<Vec3f> LinearSpace3f;
|
||||
typedef LinearSpace3<Vec3fa> LinearSpace3fa;
|
||||
typedef LinearSpace3<Vec3fx> LinearSpace3fx;
|
||||
typedef LinearSpace3<Vec3ff> LinearSpace3ff;
|
||||
|
||||
template<int N> using LinearSpace3vf = LinearSpace3<Vec3<vfloat<N>>>;
|
||||
typedef LinearSpace3<Vec3<vfloat<4>>> LinearSpace3vf4;
|
||||
|
||||
+14
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <immintrin.h>
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if (__MSV_VER <= 1700)
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
|
||||
namespace std
|
||||
{
|
||||
__forceinline bool isinf ( const float x ) { return _finite(x) == 0; }
|
||||
@@ -86,7 +86,7 @@ namespace embree
|
||||
return _mm_cvtss_f32(c);
|
||||
}
|
||||
|
||||
#if defined(__WIN32__) && (__MSC_VER <= 1700)
|
||||
#if defined(__WIN32__) && defined(_MSC_VER) && (_MSC_VER <= 1700)
|
||||
__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); }
|
||||
@@ -273,6 +273,17 @@ namespace embree
|
||||
/*! 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)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -418,7 +418,7 @@ __forceinline void __rangeReduceLog(const T &input,
|
||||
}
|
||||
|
||||
template <typename T> struct ExponentType { };
|
||||
template <int N> struct ExponentType<vfloat<N>> { typedef vint<N> Ty; };
|
||||
template <int N> struct ExponentType<vfloat_impl<N>> { typedef vint<N> Ty; };
|
||||
template <> struct ExponentType<float> { typedef int Ty; };
|
||||
|
||||
template <typename T>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -294,7 +294,7 @@ namespace embree
|
||||
#elif defined(__SSE__)
|
||||
template<>
|
||||
__forceinline Vec3<vfloat4>::Vec3(const Vec3fa& a) {
|
||||
const vfloat4 v = vfloat4(a); x = shuffle<0,0,0,0>(v); y = shuffle<1,1,1,1>(v); z = shuffle<2,2,2,2>(v);
|
||||
const vfloat4 v = vfloat4(a.m128); x = shuffle<0,0,0,0>(v); y = shuffle<1,1,1,1>(v); z = shuffle<2,2,2,2>(v);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -19,7 +19,7 @@ namespace embree
|
||||
|
||||
union {
|
||||
__m128 m128;
|
||||
struct { int x,y,z; int a; };
|
||||
struct { int x,y,z; };
|
||||
};
|
||||
|
||||
typedef int Scalar;
|
||||
@@ -108,6 +108,8 @@ namespace embree
|
||||
__forceinline bool any ( const Vec3ba& b ) { return (_mm_movemask_ps(b) & 0x7) != 0x0; }
|
||||
__forceinline bool none ( const Vec3ba& b ) { return (_mm_movemask_ps(b) & 0x7) == 0x0; }
|
||||
|
||||
__forceinline size_t movemask(const Vec3ba& a) { return _mm_movemask_ps(a) & 0x7; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+411
-53
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -21,7 +21,7 @@ namespace embree
|
||||
enum { N = 3 };
|
||||
union {
|
||||
__m128 m128;
|
||||
struct { float x,y,z; union { int a; unsigned u; float w; }; };
|
||||
struct { float x,y,z; };
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -31,40 +31,24 @@ namespace embree
|
||||
__forceinline Vec3fa( ) {}
|
||||
__forceinline Vec3fa( const __m128 a ) : m128(a) {}
|
||||
|
||||
__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 Vec3<float>& other ) { m128 = _mm_set_ps(0, other.z, other.y, other.x); }
|
||||
//__forceinline Vec3fa& operator =( const Vec3<float>& other ) { m128 = _mm_set_ps(0, other.z, other.y, other.x); return *this; }
|
||||
|
||||
__forceinline Vec3fa ( const Vec3fa& other ) { m128 = other.m128; }
|
||||
|
||||
__forceinline Vec3fa& operator =( const Vec3fa& other ) { m128 = other.m128; return *this; }
|
||||
|
||||
__forceinline explicit Vec3fa( const float a ) : m128(_mm_set1_ps(a)) {}
|
||||
__forceinline Vec3fa( const float x, const float y, const float z) : m128(_mm_set_ps(0, z, y, x)) {}
|
||||
|
||||
__forceinline Vec3fa( const Vec3fa& other, const int a1) { m128 = other.m128; a = a1; }
|
||||
__forceinline Vec3fa( const Vec3fa& other, const unsigned a1) { m128 = other.m128; u = a1; }
|
||||
__forceinline Vec3fa( const Vec3fa& other, const float w1) {
|
||||
#if defined (__SSE4_1__)
|
||||
m128 = _mm_insert_ps(other.m128, _mm_set_ss(w1),3 << 4);
|
||||
#else
|
||||
const vint4 mask(-1,-1,-1,0);
|
||||
m128 = select(vboolf4(_mm_castsi128_ps(mask)),vfloat4(other.m128),vfloat4(w1));
|
||||
#endif
|
||||
}
|
||||
//__forceinline Vec3fa( const float x, const float y, const float z, const int a) : x(x), y(y), z(z), a(a) {} // not working properly!
|
||||
//__forceinline Vec3fa( const float x, const float y, const float z, const unsigned a) : x(x), y(y), z(z), u(a) {} // not working properly!
|
||||
__forceinline Vec3fa( const float x, const float y, const float z, const float w) : m128(_mm_set_ps(w, z, y, x)) {}
|
||||
|
||||
__forceinline explicit Vec3fa( const __m128i a ) : m128(_mm_cvtepi32_ps(a)) {}
|
||||
|
||||
__forceinline operator const __m128&() const { return m128; }
|
||||
__forceinline operator __m128&() { return m128; }
|
||||
|
||||
#if defined (__SSE4_1__)
|
||||
friend __forceinline Vec3fa copy_a( const Vec3fa& a, const Vec3fa& b ) { return _mm_insert_ps(a, b, (3 << 4) | (3 << 6)); }
|
||||
#else
|
||||
friend __forceinline Vec3fa copy_a( const Vec3fa& a, const Vec3fa& b ) { Vec3fa c = a; c.a = b.a; return c; }
|
||||
#endif
|
||||
__forceinline explicit operator const vfloat4() const { return vfloat4(m128); }
|
||||
__forceinline explicit operator const vint4() const { return vint4(_mm_cvtps_epi32(m128)); }
|
||||
__forceinline explicit operator const Vec2fa() const { return Vec2fa(m128); }
|
||||
__forceinline explicit operator const Vec3ia() const { return Vec3ia(_mm_cvtps_epi32(m128)); }
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Loads and Stores
|
||||
@@ -79,7 +63,7 @@ namespace embree
|
||||
}
|
||||
|
||||
static __forceinline void storeu ( void* ptr, const Vec3fa& v ) {
|
||||
_mm_storeu_ps((float*)ptr,v);
|
||||
_mm_storeu_ps((float*)ptr,v.m128);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -113,7 +97,7 @@ namespace embree
|
||||
return _mm_and_ps(a.m128, mask);
|
||||
}
|
||||
__forceinline Vec3fa sign ( const Vec3fa& a ) {
|
||||
return blendv_ps(Vec3fa(one), -Vec3fa(one), _mm_cmplt_ps (a,Vec3fa(zero)));
|
||||
return blendv_ps(Vec3fa(one).m128, (-Vec3fa(one)).m128, _mm_cmplt_ps (a.m128,Vec3fa(zero).m128));
|
||||
}
|
||||
|
||||
__forceinline Vec3fa rcp ( const Vec3fa& a )
|
||||
@@ -125,9 +109,9 @@ namespace embree
|
||||
#endif
|
||||
|
||||
#if defined(__AVX2__)
|
||||
const Vec3fa res = _mm_mul_ps(r,_mm_fnmadd_ps(r, a, vfloat4(2.0f)));
|
||||
const Vec3fa res = _mm_mul_ps(r.m128,_mm_fnmadd_ps(r.m128, a.m128, vfloat4(2.0f)));
|
||||
#else
|
||||
const Vec3fa res = _mm_mul_ps(r,_mm_sub_ps(vfloat4(2.0f), _mm_mul_ps(r, a)));
|
||||
const Vec3fa res = _mm_mul_ps(r.m128,_mm_sub_ps(vfloat4(2.0f), _mm_mul_ps(r.m128, a.m128)));
|
||||
//return _mm_sub_ps(_mm_add_ps(r, r), _mm_mul_ps(_mm_mul_ps(r, r), a));
|
||||
#endif
|
||||
|
||||
@@ -135,7 +119,7 @@ namespace embree
|
||||
}
|
||||
|
||||
__forceinline Vec3fa sqrt ( const Vec3fa& a ) { return _mm_sqrt_ps(a.m128); }
|
||||
__forceinline Vec3fa sqr ( const Vec3fa& a ) { return _mm_mul_ps(a,a); }
|
||||
__forceinline Vec3fa sqr ( const Vec3fa& a ) { return _mm_mul_ps(a.m128,a.m128); }
|
||||
|
||||
__forceinline Vec3fa rsqrt( const Vec3fa& a )
|
||||
{
|
||||
@@ -144,11 +128,11 @@ namespace embree
|
||||
#else
|
||||
__m128 r = _mm_rsqrt_ps(a.m128);
|
||||
#endif
|
||||
return _mm_add_ps(_mm_mul_ps(_mm_set1_ps(1.5f),r), _mm_mul_ps(_mm_mul_ps(_mm_mul_ps(a, _mm_set1_ps(-0.5f)), r), _mm_mul_ps(r, r)));
|
||||
return _mm_add_ps(_mm_mul_ps(_mm_set1_ps(1.5f),r), _mm_mul_ps(_mm_mul_ps(_mm_mul_ps(a.m128, _mm_set1_ps(-0.5f)), r), _mm_mul_ps(r, r)));
|
||||
}
|
||||
|
||||
__forceinline Vec3fa zero_fix(const Vec3fa& a) {
|
||||
return blendv_ps(a, _mm_set1_ps(min_rcp_input), _mm_cmplt_ps (abs(a).m128, _mm_set1_ps(min_rcp_input)));
|
||||
return blendv_ps(a.m128, _mm_set1_ps(min_rcp_input), _mm_cmplt_ps (abs(a).m128, _mm_set1_ps(min_rcp_input)));
|
||||
}
|
||||
__forceinline Vec3fa rcp_safe(const Vec3fa& a) {
|
||||
return rcp(zero_fix(a));
|
||||
@@ -179,8 +163,8 @@ namespace embree
|
||||
|
||||
#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 ai = _mm_castps_si128(a.m128);
|
||||
const vint4 bi = _mm_castps_si128(b.m128);
|
||||
const vint4 ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
@@ -188,8 +172,8 @@ namespace embree
|
||||
|
||||
#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 ai = _mm_castps_si128(a.m128);
|
||||
const vint4 bi = _mm_castps_si128(b.m128);
|
||||
const vint4 ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
@@ -204,10 +188,10 @@ namespace embree
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__AVX2__)
|
||||
__forceinline Vec3fa madd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fmadd_ps(a,b,c); }
|
||||
__forceinline Vec3fa msub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fmsub_ps(a,b,c); }
|
||||
__forceinline Vec3fa nmadd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fnmadd_ps(a,b,c); }
|
||||
__forceinline Vec3fa nmsub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fnmsub_ps(a,b,c); }
|
||||
__forceinline Vec3fa madd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fmadd_ps(a.m128,b.m128,c.m128); }
|
||||
__forceinline Vec3fa msub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fmsub_ps(a.m128,b.m128,c.m128); }
|
||||
__forceinline Vec3fa nmadd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fnmadd_ps(a.m128,b.m128,c.m128); }
|
||||
__forceinline Vec3fa nmsub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return _mm_fnmsub_ps(a.m128,b.m128,c.m128); }
|
||||
#else
|
||||
__forceinline Vec3fa madd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return a*b+c; }
|
||||
__forceinline Vec3fa msub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return a*b-c; }
|
||||
@@ -236,7 +220,7 @@ namespace embree
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float reduce_add(const Vec3fa& v) {
|
||||
const vfloat4 a(v);
|
||||
const vfloat4 a(v.m128);
|
||||
const vfloat4 b = shuffle<1>(a);
|
||||
const vfloat4 c = shuffle<2>(a);
|
||||
return _mm_cvtss_f32(a+b+c);
|
||||
@@ -268,13 +252,21 @@ namespace embree
|
||||
return all(ge_mask(a,Vec3fa(-FLT_MAX)) & le_mask(a,Vec3fa(+FLT_MAX)));
|
||||
}
|
||||
|
||||
__forceinline bool isvalid4 ( const Vec3fa& v ) {
|
||||
return all((vfloat4(v.m128) > vfloat4(-FLT_LARGE)) & (vfloat4(v.m128) < vfloat4(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
__forceinline bool is_finite4 ( const Vec3fa& a ) {
|
||||
return all((vfloat4(a.m128) >= vfloat4(-FLT_MAX)) & (vfloat4(a.m128) <= vfloat4(+FLT_MAX)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline float dot ( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return _mm_cvtss_f32(_mm_dp_ps(a,b,0x7F));
|
||||
return _mm_cvtss_f32(_mm_dp_ps(a.m128,b.m128,0x7F));
|
||||
}
|
||||
#else
|
||||
__forceinline float dot ( const Vec3fa& a, const Vec3fa& b ) {
|
||||
@@ -284,10 +276,10 @@ namespace embree
|
||||
|
||||
__forceinline Vec3fa cross ( const Vec3fa& a, const Vec3fa& b )
|
||||
{
|
||||
vfloat4 a0 = vfloat4(a);
|
||||
vfloat4 b0 = shuffle<1,2,0,3>(vfloat4(b));
|
||||
vfloat4 a1 = shuffle<1,2,0,3>(vfloat4(a));
|
||||
vfloat4 b1 = vfloat4(b);
|
||||
vfloat4 a0 = vfloat4(a.m128);
|
||||
vfloat4 b0 = shuffle<1,2,0,3>(vfloat4(b.m128));
|
||||
vfloat4 a1 = shuffle<1,2,0,3>(vfloat4(a.m128));
|
||||
vfloat4 b1 = vfloat4(b.m128);
|
||||
return Vec3fa(shuffle<1,2,0,3>(msub(a0,b0,a1*b1)));
|
||||
}
|
||||
|
||||
@@ -318,11 +310,11 @@ namespace embree
|
||||
|
||||
__forceinline Vec3fa select( bool s, const Vec3fa& t, const Vec3fa& f ) {
|
||||
__m128 mask = s ? _mm_castsi128_ps(_mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())) : _mm_setzero_ps();
|
||||
return blendv_ps(f, t, mask);
|
||||
return blendv_ps(f.m128, t.m128, mask);
|
||||
}
|
||||
|
||||
__forceinline Vec3fa select( const Vec3ba& s, const Vec3fa& t, const Vec3fa& f ) {
|
||||
return blendv_ps(f, t, s);
|
||||
return blendv_ps(f.m128, t.m128, s);
|
||||
}
|
||||
|
||||
__forceinline Vec3fa lerp(const Vec3fa& v0, const Vec3fa& v1, const float t) {
|
||||
@@ -344,9 +336,9 @@ namespace embree
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined (__SSE4_1__)
|
||||
__forceinline Vec3fa trunc( const Vec3fa& a ) { return _mm_round_ps(a, _MM_FROUND_TO_NEAREST_INT); }
|
||||
__forceinline Vec3fa floor( const Vec3fa& a ) { return _mm_round_ps(a, _MM_FROUND_TO_NEG_INF ); }
|
||||
__forceinline Vec3fa ceil ( const Vec3fa& a ) { return _mm_round_ps(a, _MM_FROUND_TO_POS_INF ); }
|
||||
__forceinline Vec3fa trunc( const Vec3fa& a ) { return _mm_round_ps(a.m128, _MM_FROUND_TO_NEAREST_INT); }
|
||||
__forceinline Vec3fa floor( const Vec3fa& a ) { return _mm_round_ps(a.m128, _MM_FROUND_TO_NEG_INF ); }
|
||||
__forceinline Vec3fa ceil ( const Vec3fa& a ) { return _mm_round_ps(a.m128, _MM_FROUND_TO_POS_INF ); }
|
||||
#else
|
||||
__forceinline Vec3fa trunc( const Vec3fa& a ) { return Vec3fa(truncf(a.x),truncf(a.y),truncf(a.z)); }
|
||||
__forceinline Vec3fa floor( const Vec3fa& a ) { return Vec3fa(floorf(a.x),floorf(a.y),floorf(a.z)); }
|
||||
@@ -362,4 +354,370 @@ namespace embree
|
||||
}
|
||||
|
||||
typedef Vec3fa Vec3fa_t;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3fx Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3fx
|
||||
{
|
||||
ALIGNED_STRUCT_(16);
|
||||
|
||||
typedef float Scalar;
|
||||
enum { N = 3 };
|
||||
union {
|
||||
__m128 m128;
|
||||
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 Vec3fa& v) : m128(v.m128) {}
|
||||
__forceinline operator Vec3fa () const { return Vec3fa(m128); }
|
||||
|
||||
__forceinline explicit Vec3fx ( const Vec3<float>& other ) { m128 = _mm_set_ps(0, other.z, other.y, other.x); }
|
||||
//__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)) {}
|
||||
__forceinline Vec3fx( const float x, const float y, const float z) : m128(_mm_set_ps(0, z, y, x)) {}
|
||||
|
||||
__forceinline Vec3fx( const Vec3fa& other, const int a1) { m128 = other.m128; a = a1; }
|
||||
__forceinline Vec3fx( const Vec3fa& other, const unsigned a1) { m128 = other.m128; u = a1; }
|
||||
__forceinline Vec3fx( const Vec3fa& other, const float w1) {
|
||||
#if defined (__SSE4_1__)
|
||||
m128 = _mm_insert_ps(other.m128, _mm_set_ss(w1),3 << 4);
|
||||
#else
|
||||
const vint4 mask(-1,-1,-1,0);
|
||||
m128 = select(vboolf4(_mm_castsi128_ps(mask)),vfloat4(other.m128),vfloat4(w1));
|
||||
#endif
|
||||
}
|
||||
//__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) : m128(_mm_set_ps(w, z, y, x)) {}
|
||||
|
||||
//__forceinline explicit Vec3fx( const __m128i a ) : m128(_mm_cvtepi32_ps(a)) {}
|
||||
|
||||
__forceinline explicit operator const vfloat4() const { return vfloat4(m128); }
|
||||
__forceinline explicit operator const vint4() const { return vint4(_mm_cvtps_epi32(m128)); }
|
||||
__forceinline explicit operator const Vec2fa() const { return Vec2fa(m128); }
|
||||
__forceinline explicit operator const Vec3ia() const { return Vec3ia(_mm_cvtps_epi32(m128)); }
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Loads and Stores
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static __forceinline Vec3fx load( const void* const a ) {
|
||||
return Vec3fx(_mm_and_ps(_mm_load_ps((float*)a),_mm_castsi128_ps(_mm_set_epi32(0, -1, -1, -1))));
|
||||
}
|
||||
|
||||
static __forceinline Vec3fx loadu( const void* const a ) {
|
||||
return Vec3fx(_mm_loadu_ps((float*)a));
|
||||
}
|
||||
|
||||
static __forceinline void storeu ( void* ptr, const Vec3fx& v ) {
|
||||
_mm_storeu_ps((float*)ptr,v.m128);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx( ZeroTy ) : m128(_mm_setzero_ps()) {}
|
||||
__forceinline Vec3fx( OneTy ) : m128(_mm_set1_ps(1.0f)) {}
|
||||
__forceinline Vec3fx( PosInfTy ) : m128(_mm_set1_ps(pos_inf)) {}
|
||||
__forceinline Vec3fx( NegInfTy ) : m128(_mm_set1_ps(neg_inf)) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// 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 ) {
|
||||
const __m128 mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000));
|
||||
return _mm_xor_ps(a.m128, mask);
|
||||
}
|
||||
__forceinline Vec3fx abs ( const Vec3fx& a ) {
|
||||
const __m128 mask = _mm_castsi128_ps(_mm_set1_epi32(0x7fffffff));
|
||||
return _mm_and_ps(a.m128, mask);
|
||||
}
|
||||
__forceinline Vec3fx sign ( const Vec3fx& a ) {
|
||||
return blendv_ps(Vec3fx(one).m128, (-Vec3fx(one)).m128, _mm_cmplt_ps (a.m128,Vec3fx(zero).m128));
|
||||
}
|
||||
|
||||
__forceinline Vec3fx rcp ( const Vec3fx& a )
|
||||
{
|
||||
#if defined(__AVX512VL__)
|
||||
const Vec3fx r = _mm_rcp14_ps(a.m128);
|
||||
#else
|
||||
const Vec3fx r = _mm_rcp_ps(a.m128);
|
||||
#endif
|
||||
|
||||
#if defined(__AVX2__)
|
||||
const Vec3fx res = _mm_mul_ps(r.m128,_mm_fnmadd_ps(r.m128, a.m128, vfloat4(2.0f)));
|
||||
#else
|
||||
const Vec3fx res = _mm_mul_ps(r.m128,_mm_sub_ps(vfloat4(2.0f), _mm_mul_ps(r.m128, a.m128)));
|
||||
//return _mm_sub_ps(_mm_add_ps(r, r), _mm_mul_ps(_mm_mul_ps(r, r), a));
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
__forceinline Vec3fx sqrt ( const Vec3fx& a ) { return _mm_sqrt_ps(a.m128); }
|
||||
__forceinline Vec3fx sqr ( const Vec3fx& a ) { return _mm_mul_ps(a.m128,a.m128); }
|
||||
|
||||
__forceinline Vec3fx rsqrt( const Vec3fx& a )
|
||||
{
|
||||
#if defined(__AVX512VL__)
|
||||
__m128 r = _mm_rsqrt14_ps(a.m128);
|
||||
#else
|
||||
__m128 r = _mm_rsqrt_ps(a.m128);
|
||||
#endif
|
||||
return _mm_add_ps(_mm_mul_ps(_mm_set1_ps(1.5f),r), _mm_mul_ps(_mm_mul_ps(_mm_mul_ps(a.m128, _mm_set1_ps(-0.5f)), r), _mm_mul_ps(r, r)));
|
||||
}
|
||||
|
||||
__forceinline Vec3fx zero_fix(const Vec3fx& a) {
|
||||
return blendv_ps(a.m128, _mm_set1_ps(min_rcp_input), _mm_cmplt_ps (abs(a).m128, _mm_set1_ps(min_rcp_input)));
|
||||
}
|
||||
__forceinline Vec3fx rcp_safe(const Vec3fx& a) {
|
||||
return rcp(zero_fix(a));
|
||||
}
|
||||
__forceinline Vec3fx log ( const Vec3fx& a ) {
|
||||
return Vec3fx(logf(a.x),logf(a.y),logf(a.z));
|
||||
}
|
||||
|
||||
__forceinline Vec3fx exp ( const Vec3fx& a ) {
|
||||
return Vec3fx(expf(a.x),expf(a.y),expf(a.z));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fx operator +( const Vec3fx& a, const Vec3fx& b ) { return _mm_add_ps(a.m128, b.m128); }
|
||||
__forceinline Vec3fx operator -( const Vec3fx& a, const Vec3fx& b ) { return _mm_sub_ps(a.m128, b.m128); }
|
||||
__forceinline Vec3fx operator *( const Vec3fx& a, const Vec3fx& b ) { return _mm_mul_ps(a.m128, b.m128); }
|
||||
__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 _mm_div_ps(a.m128,b.m128); }
|
||||
__forceinline Vec3fx operator /( const Vec3fx& a, const float b ) { return _mm_div_ps(a.m128,_mm_set1_ps(b)); }
|
||||
__forceinline Vec3fx operator /( const float a, const Vec3fx& b ) { return _mm_div_ps(_mm_set1_ps(a),b.m128); }
|
||||
|
||||
__forceinline Vec3fx min( const Vec3fx& a, const Vec3fx& b ) { return _mm_min_ps(a.m128,b.m128); }
|
||||
__forceinline Vec3fx max( const Vec3fx& a, const Vec3fx& b ) { return _mm_max_ps(a.m128,b.m128); }
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fx mini(const Vec3fx& a, const Vec3fx& b) {
|
||||
const vint4 ai = _mm_castps_si128(a.m128);
|
||||
const vint4 bi = _mm_castps_si128(b.m128);
|
||||
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.m128);
|
||||
const vint4 bi = _mm_castps_si128(b.m128);
|
||||
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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__AVX2__)
|
||||
__forceinline Vec3fx madd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return _mm_fmadd_ps(a.m128,b.m128,c.m128); }
|
||||
__forceinline Vec3fx msub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return _mm_fmsub_ps(a.m128,b.m128,c.m128); }
|
||||
__forceinline Vec3fx nmadd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return _mm_fnmadd_ps(a.m128,b.m128,c.m128); }
|
||||
__forceinline Vec3fx nmsub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return _mm_fnmsub_ps(a.m128,b.m128,c.m128); }
|
||||
#else
|
||||
__forceinline Vec3fx madd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return a*b+c; }
|
||||
__forceinline Vec3fx msub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return a*b-c; }
|
||||
__forceinline Vec3fx nmadd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return -a*b+c;}
|
||||
__forceinline Vec3fx nmsub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return -a*b-c; }
|
||||
#endif
|
||||
|
||||
__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) {
|
||||
const vfloat4 a(v.m128);
|
||||
const vfloat4 b = shuffle<1>(a);
|
||||
const vfloat4 c = shuffle<2>(a);
|
||||
return _mm_cvtss_f32(a+b+c);
|
||||
}
|
||||
|
||||
__forceinline float reduce_mul(const Vec3fx& v) { return v.x*v.y*v.z; }
|
||||
__forceinline float reduce_min(const Vec3fx& v) { return min(v.x,v.y,v.z); }
|
||||
__forceinline float reduce_max(const Vec3fx& v) { return max(v.x,v.y,v.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3fx& a, const Vec3fx& b ) { return (_mm_movemask_ps(_mm_cmpeq_ps (a.m128, b.m128)) & 7) == 7; }
|
||||
__forceinline bool operator !=( const Vec3fx& a, const Vec3fx& b ) { return (_mm_movemask_ps(_mm_cmpneq_ps(a.m128, b.m128)) & 7) != 0; }
|
||||
|
||||
__forceinline Vec3ba eq_mask( const Vec3fx& a, const Vec3fx& b ) { return _mm_cmpeq_ps (a.m128, b.m128); }
|
||||
__forceinline Vec3ba neq_mask(const Vec3fx& a, const Vec3fx& b ) { return _mm_cmpneq_ps(a.m128, b.m128); }
|
||||
__forceinline Vec3ba lt_mask( const Vec3fx& a, const Vec3fx& b ) { return _mm_cmplt_ps (a.m128, b.m128); }
|
||||
__forceinline Vec3ba le_mask( const Vec3fx& a, const Vec3fx& b ) { return _mm_cmple_ps (a.m128, b.m128); }
|
||||
__forceinline Vec3ba gt_mask( const Vec3fx& a, const Vec3fx& b ) { return _mm_cmpnle_ps(a.m128, b.m128); }
|
||||
__forceinline Vec3ba ge_mask( const Vec3fx& a, const Vec3fx& b ) { return _mm_cmpnlt_ps(a.m128, b.m128); }
|
||||
|
||||
__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 ) {
|
||||
return all((vfloat4(v.m128) > vfloat4(-FLT_LARGE)) & (vfloat4(v.m128) < vfloat4(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
__forceinline bool is_finite4 ( const Vec3fx& a ) {
|
||||
return all((vfloat4(a.m128) >= vfloat4(-FLT_MAX)) & (vfloat4(a.m128) <= vfloat4(+FLT_MAX)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline float dot ( const Vec3fx& a, const Vec3fx& b ) {
|
||||
return _mm_cvtss_f32(_mm_dp_ps(a.m128,b.m128,0x7F));
|
||||
}
|
||||
#else
|
||||
__forceinline float dot ( const Vec3fx& a, const Vec3fx& b ) {
|
||||
return reduce_add(a*b);
|
||||
}
|
||||
#endif
|
||||
|
||||
__forceinline Vec3fx cross ( const Vec3fx& a, const Vec3fx& b )
|
||||
{
|
||||
vfloat4 a0 = vfloat4(a.m128);
|
||||
vfloat4 b0 = shuffle<1,2,0,3>(vfloat4(b.m128));
|
||||
vfloat4 a1 = shuffle<1,2,0,3>(vfloat4(a.m128));
|
||||
vfloat4 b1 = vfloat4(b.m128);
|
||||
return Vec3fx(shuffle<1,2,0,3>(msub(a0,b0,a1*b1)));
|
||||
}
|
||||
|
||||
__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 ) {
|
||||
__m128 mask = s ? _mm_castsi128_ps(_mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())) : _mm_setzero_ps();
|
||||
return blendv_ps(f.m128, t.m128, mask);
|
||||
}
|
||||
|
||||
__forceinline Vec3fx select( const Vec3ba& s, const Vec3fx& t, const Vec3fx& f ) {
|
||||
return blendv_ps(f.m128, t.m128, s);
|
||||
}
|
||||
|
||||
__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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined (__SSE4_1__)
|
||||
__forceinline Vec3fx trunc( const Vec3fx& a ) { return _mm_round_ps(a.m128, _MM_FROUND_TO_NEAREST_INT); }
|
||||
__forceinline Vec3fx floor( const Vec3fx& a ) { return _mm_round_ps(a.m128, _MM_FROUND_TO_NEG_INF ); }
|
||||
__forceinline Vec3fx ceil ( const Vec3fx& a ) { return _mm_round_ps(a.m128, _MM_FROUND_TO_POS_INF ); }
|
||||
#else
|
||||
__forceinline Vec3fx trunc( const Vec3fx& a ) { return Vec3fx(truncf(a.x),truncf(a.y),truncf(a.z)); }
|
||||
__forceinline Vec3fx floor( const Vec3fx& a ) { return Vec3fx(floorf(a.x),floorf(a.y),floorf(a.z)); }
|
||||
__forceinline Vec3fx ceil ( const Vec3fx& a ) { return Vec3fx(ceilf (a.x),ceilf (a.y),ceilf (a.z)); }
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator<<(embree_ostream cout, const Vec3fx& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
|
||||
}
|
||||
|
||||
|
||||
typedef Vec3fx Vec3ff;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -19,7 +19,7 @@ namespace embree
|
||||
|
||||
union {
|
||||
__m128i m128;
|
||||
struct { int x,y,z; int a; };
|
||||
struct { int x,y,z; };
|
||||
};
|
||||
|
||||
typedef int Scalar;
|
||||
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -34,7 +34,7 @@ namespace embree
|
||||
__forceinline Vec4( const Vec3<T>& xyz, const T& w ) : x(xyz.x), y(xyz.y), z(xyz.z), w(w) {}
|
||||
|
||||
__forceinline Vec4( const Vec4& other ) { x = other.x; y = other.y; z = other.z; w = other.w; }
|
||||
__forceinline Vec4( const Vec3fa& other );
|
||||
__forceinline Vec4( const Vec3fx& other );
|
||||
|
||||
template<typename T1> __forceinline Vec4( const Vec4<T1>& a ) : x(T(a.x)), y(T(a.y)), z(T(a.z)), w(T(a.w)) {}
|
||||
template<typename T1> __forceinline Vec4& operator =(const Vec4<T1>& other) { x = other.x; y = other.y; z = other.z; w = other.w; return *this; }
|
||||
@@ -219,15 +219,15 @@ namespace embree
|
||||
|
||||
namespace embree
|
||||
{
|
||||
template<> __forceinline Vec4<float>::Vec4( const Vec3fa& a ) { x = a.x; y = a.y; z = a.z; w = a.w; }
|
||||
template<> __forceinline Vec4<float>::Vec4( const Vec3fx& a ) { x = a.x; y = a.y; z = a.z; w = a.w; }
|
||||
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fa& a ) {
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fx& a ) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
}
|
||||
#elif defined(__SSE__)
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fa& a ) {
|
||||
const vfloat4 v = vfloat4(a); x = shuffle<0,0,0,0>(v); y = shuffle<1,1,1,1>(v); z = shuffle<2,2,2,2>(v); w = shuffle<3,3,3,3>(v);
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fx& a ) {
|
||||
const vfloat4 v = vfloat4(a.m128); x = shuffle<0,0,0,0>(v); y = shuffle<1,1,1,1>(v); z = shuffle<2,2,2,2>(v); w = shuffle<3,3,3,3>(v);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace embree
|
||||
#endif
|
||||
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec4<vfloat8>::Vec4( const Vec3fa& a ) {
|
||||
template<> __forceinline Vec4<vfloat8>::Vec4( const Vec3fx& a ) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
}
|
||||
__forceinline Vec4<vfloat4> broadcast4f( const Vec4<vfloat8>& a, const size_t k ) {
|
||||
@@ -253,6 +253,6 @@ namespace embree
|
||||
#endif
|
||||
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec4<vfloat16>::Vec4( const Vec3fa& a ) : x(a.x), y(a.y), z(a.z), w(a.w) {}
|
||||
template<> __forceinline Vec4<vfloat16>::Vec4( const Vec3fx& a ) : x(a.x), y(a.y), z(a.z), w(a.w) {}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## Copyright 2009-2021 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ADD_LIBRARY(simd STATIC sse.cpp)
|
||||
@@ -7,6 +7,5 @@ SET_PROPERTY(TARGET simd APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
INSTALL(TARGETS simd EXPORT simd-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
INSTALL(EXPORT simd-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
SIGN_TARGET(simd)
|
||||
INSTALL(EXPORT simd-targets DESTINATION ${EMBREE_CMAKEEXPORT_DIR} COMPONENT devel)
|
||||
ENDIF()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include "sse.h"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
+42
-29
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -9,7 +9,7 @@ namespace embree
|
||||
{
|
||||
/* Varying numeric types */
|
||||
template<int N>
|
||||
struct vfloat
|
||||
struct vfloat_impl
|
||||
{
|
||||
union { float f[N]; int i[N]; };
|
||||
__forceinline const float& operator [](size_t index) const { assert(index < N); return f[index]; }
|
||||
@@ -17,7 +17,7 @@ namespace embree
|
||||
};
|
||||
|
||||
template<int N>
|
||||
struct vdouble
|
||||
struct vdouble_impl
|
||||
{
|
||||
union { double f[N]; long long i[N]; };
|
||||
__forceinline const double& operator [](size_t index) const { assert(index < N); return f[index]; }
|
||||
@@ -25,7 +25,7 @@ namespace embree
|
||||
};
|
||||
|
||||
template<int N>
|
||||
struct vint
|
||||
struct vint_impl
|
||||
{
|
||||
int i[N];
|
||||
__forceinline const int& operator [](size_t index) const { assert(index < N); return i[index]; }
|
||||
@@ -33,7 +33,7 @@ namespace embree
|
||||
};
|
||||
|
||||
template<int N>
|
||||
struct vuint
|
||||
struct vuint_impl
|
||||
{
|
||||
unsigned int i[N];
|
||||
__forceinline const unsigned int& operator [](size_t index) const { assert(index < N); return i[index]; }
|
||||
@@ -41,7 +41,7 @@ namespace embree
|
||||
};
|
||||
|
||||
template<int N>
|
||||
struct vllong
|
||||
struct vllong_impl
|
||||
{
|
||||
long long i[N];
|
||||
__forceinline const long long& operator [](size_t index) const { assert(index < N); return i[index]; }
|
||||
@@ -49,20 +49,13 @@ namespace embree
|
||||
};
|
||||
|
||||
/* Varying bool types */
|
||||
template<int N> struct vboolf { int i[N]; }; // for float/int
|
||||
template<int N> struct vboold { long long i[N]; }; // for double/long long
|
||||
|
||||
/* Aliases to default types */
|
||||
template<int N> using vreal = vfloat<N>;
|
||||
template<int N> using vbool = vboolf<N>;
|
||||
|
||||
template<int N> struct vboolf_impl { int i[N]; }; // for float/int
|
||||
template<int N> struct vboold_impl { long long i[N]; }; // for double/long long
|
||||
|
||||
/* Varying size constants */
|
||||
#if defined(__AVX512VL__) // SKX
|
||||
const int VSIZEX = 8; // default size
|
||||
const int VSIZEL = 16; // large size
|
||||
#elif defined(__AVX512F__) // KNL
|
||||
const int VSIZEX = 16;
|
||||
const int VSIZEL = 16;
|
||||
#elif defined(__AVX__)
|
||||
const int VSIZEX = 8;
|
||||
const int VSIZEL = 8;
|
||||
@@ -71,21 +64,41 @@ namespace embree
|
||||
const int VSIZEL = 4;
|
||||
#endif
|
||||
|
||||
/* Extends varying size N to optimal or up to max(N, N2) */
|
||||
template<int N, int N2 = VSIZEX>
|
||||
struct vextend
|
||||
{
|
||||
#if defined(__AVX512F__) && !defined(__AVX512VL__) // KNL
|
||||
/* use 16-wide SIMD calculations on KNL even for 4 and 8 wide SIMD */
|
||||
static const int size = (N2 == VSIZEX) ? VSIZEX : N;
|
||||
#define SIMD_MODE(N) N, 16
|
||||
#else
|
||||
/* calculate with same SIMD width otherwise */
|
||||
static const int size = N;
|
||||
#define SIMD_MODE(N) N, N
|
||||
#endif
|
||||
template<int N>
|
||||
struct vtypes {
|
||||
using vbool = vboolf_impl<N>;
|
||||
using vboolf = vboolf_impl<N>;
|
||||
using vboold = vboold_impl<N>;
|
||||
using vint = vint_impl<N>;
|
||||
using vuint = vuint_impl<N>;
|
||||
using vllong = vllong_impl<N>;
|
||||
using vfloat = vfloat_impl<N>;
|
||||
using vdouble = vdouble_impl<N>;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct vtypes<1> {
|
||||
using vbool = bool;
|
||||
using vboolf = bool;
|
||||
using vboold = bool;
|
||||
using vint = int;
|
||||
using vuint = unsigned int;
|
||||
using vllong = long long;
|
||||
using vfloat = float;
|
||||
using vdouble = double;
|
||||
};
|
||||
|
||||
/* Aliases to default types */
|
||||
template<int N> using vbool = typename vtypes<N>::vbool;
|
||||
template<int N> using vboolf = typename vtypes<N>::vboolf;
|
||||
template<int N> using vboold = typename vtypes<N>::vboold;
|
||||
template<int N> using vint = typename vtypes<N>::vint;
|
||||
template<int N> using vuint = typename vtypes<N>::vuint;
|
||||
template<int N> using vllong = typename vtypes<N>::vllong;
|
||||
template<int N> using vreal = typename vtypes<N>::vfloat;
|
||||
template<int N> using vfloat = typename vtypes<N>::vfloat;
|
||||
template<int N> using vdouble = typename vtypes<N>::vdouble;
|
||||
|
||||
/* 4-wide shortcuts */
|
||||
typedef vfloat<4> vfloat4;
|
||||
typedef vdouble<4> vdouble4;
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 4-wide AVX bool type for 64bit data types*/
|
||||
@@ -153,3 +161,11 @@ namespace embree
|
||||
<< a[4] << ", " << a[5] << ", " << a[6] << ", " << a[7] << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 4-wide AVX-512 bool type */
|
||||
@@ -138,3 +146,11 @@ namespace embree
|
||||
return cout << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 8-wide AVX-512 bool type */
|
||||
@@ -146,3 +154,11 @@ namespace embree
|
||||
return cout << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 16-wide AVX-512 bool type */
|
||||
@@ -148,3 +156,11 @@ namespace embree
|
||||
return cout << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 4-wide AVX-512 bool type */
|
||||
@@ -141,3 +149,11 @@ namespace embree
|
||||
return cout << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 4-wide SSE bool type */
|
||||
@@ -171,3 +179,11 @@ namespace embree
|
||||
return cout << "<" << a[0] << ", " << a[1] << ", " << a[2] << ", " << a[3] << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 8-wide AVX bool type */
|
||||
@@ -184,3 +192,11 @@ namespace embree
|
||||
<< a[4] << ", " << a[5] << ", " << a[6] << ", " << a[7] << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 8-wide AVX-512 bool type */
|
||||
@@ -141,3 +149,11 @@ namespace embree
|
||||
return cout << ">";
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#define vboolf vboolf_impl
|
||||
#define vboold vboold_impl
|
||||
#define vint vint_impl
|
||||
#define vuint vuint_impl
|
||||
#define vllong vllong_impl
|
||||
#define vfloat vfloat_impl
|
||||
#define vdouble vdouble_impl
|
||||
|
||||
namespace embree
|
||||
{
|
||||
/* 4-wide AVX 64-bit double type */
|
||||
@@ -315,3 +323,11 @@ namespace embree
|
||||
return cout;
|
||||
}
|
||||
}
|
||||
|
||||
#undef vboolf
|
||||
#undef vboold
|
||||
#undef vint
|
||||
#undef vuint
|
||||
#undef vllong
|
||||
#undef vfloat
|
||||
#undef vdouble
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user