Compare commits
358
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c539c3e9b | ||
|
|
db6e680325 | ||
|
|
c8288045ea | ||
|
|
a2f51f16bf | ||
|
|
22ca07cb3f | ||
|
|
77fed4d218 | ||
|
|
43bfb0966a | ||
|
|
a804fcd873 | ||
|
|
2b5581a581 | ||
|
|
78ef8476ca | ||
|
|
1a3c3ef2bb | ||
|
|
1c591829bb | ||
|
|
b051d35e4d | ||
|
|
501d81964a | ||
|
|
0a25869c0d | ||
|
|
15d50637e9 | ||
|
|
a17eb57780 | ||
|
|
d204039384 | ||
|
|
e839fb310f | ||
|
|
c8900a5a4c | ||
|
|
f525bf88fc | ||
|
|
8a5acfceb3 | ||
|
|
25ecb8b35c | ||
|
|
3966b99862 | ||
|
|
f86ac79968 | ||
|
|
255ad42fea | ||
|
|
e05d2c0b9d | ||
|
|
5f52ff3583 | ||
|
|
22e64801ce | ||
|
|
26b929734e | ||
|
|
86f6ec6433 | ||
|
|
4ea282f0c8 | ||
|
|
c232392335 | ||
|
|
6360dcba5c | ||
|
|
163636399e | ||
|
|
725f0e6259 | ||
|
|
d3a2a5e872 | ||
|
|
3da1dc0bad | ||
|
|
e9e3387dda | ||
|
|
ca8af6f7e9 | ||
|
|
45a1667211 | ||
|
|
a64ea4c043 | ||
|
|
08ac6ce20f | ||
|
|
b473755889 | ||
|
|
f3a1200841 | ||
|
|
7621a6bea1 | ||
|
|
6994e405cc | ||
|
|
c48ce76adc | ||
|
|
6a7daed2bb | ||
|
|
fd5ea59117 | ||
|
|
f28f7eb4f5 | ||
|
|
84f61f9c71 | ||
|
|
0f884c9342 | ||
|
|
d4d32c392a | ||
|
|
826eb9aef2 | ||
|
|
fbab9d87a4 | ||
|
|
e978963b89 | ||
|
|
a0e4508a00 | ||
|
|
86dcc2a40b | ||
|
|
9de5bacd81 | ||
|
|
8f1db409e6 | ||
|
|
a4baf0db09 | ||
|
|
5d9fb4937e | ||
|
|
34919811b6 | ||
|
|
f6e3b5a1ca | ||
|
|
46c89c537f | ||
|
|
8da10d31ee | ||
|
|
a814f62039 | ||
|
|
195f28336c | ||
|
|
9b413172b7 | ||
|
|
c22b17f5d1 | ||
|
|
fb430f58a0 | ||
|
|
b2337f7c1e | ||
|
|
e6a0bb88aa | ||
|
|
d55eb12d0e | ||
|
|
abe4c5a200 | ||
|
|
f03eeb9fa4 | ||
|
|
9197ab0095 | ||
|
|
3e45b6b1e2 | ||
|
|
8569234919 | ||
|
|
bdd40710b7 | ||
|
|
80f54b3a4d | ||
|
|
7e0798f329 | ||
|
|
0dbbe1986e | ||
|
|
183c7e00df | ||
|
|
696d09d41f | ||
|
|
e899659072 | ||
|
|
81e6aea43b | ||
|
|
75fdff2daf | ||
|
|
1ac4e0e7d0 | ||
|
|
f02ffaf2a3 | ||
|
|
efe4bbf708 | ||
|
|
e53bd68813 | ||
|
|
aff1b8a892 | ||
|
|
d4555d6a93 | ||
|
|
a7ed267a88 | ||
|
|
e25ebea61d | ||
|
|
c6c56e8faf | ||
|
|
1cdc1da6e1 | ||
|
|
d3b86a6ce0 | ||
|
|
654960f178 | ||
|
|
c0416b600c | ||
|
|
af0458922f | ||
|
|
1047a791a9 | ||
|
|
e2ee296b51 | ||
|
|
bcb4d3ec41 | ||
|
|
5fcd9ede79 | ||
|
|
6616c827ff | ||
|
|
644c81fdeb | ||
|
|
48090a347e | ||
|
|
791b07a297 | ||
|
|
eafceb14d7 | ||
|
|
26c77304c8 | ||
|
|
7741c659bc | ||
|
|
6a217105ff | ||
|
|
09f938aa79 | ||
|
|
8cff1df627 | ||
|
|
2fcc39aaec | ||
|
|
8fc8c7d745 | ||
|
|
02745407c1 | ||
|
|
5af7ce6b1c | ||
|
|
5710b2b993 | ||
|
|
f46e3e88a7 | ||
|
|
767ac7bb0a | ||
|
|
dfc03fe694 | ||
|
|
723bcd004a | ||
|
|
38b62acdd6 | ||
|
|
4ffcd740f5 | ||
|
|
383e254a94 | ||
|
|
ed98afda4a | ||
|
|
cf3abbec82 | ||
|
|
1db62bfe5b | ||
|
|
e877c78acc | ||
|
|
657a1f9751 | ||
|
|
44363d2bff | ||
|
|
9a46b465be | ||
|
|
8edf29d179 | ||
|
|
5c0b258b91 | ||
|
|
f33716072e | ||
|
|
16e295ca29 | ||
|
|
cd176187d7 | ||
|
|
db47037198 | ||
|
|
b4d10fc0fe | ||
|
|
de15d9cb6b | ||
|
|
e9bcc59877 | ||
|
|
661d3631c0 | ||
|
|
14af2c3e00 | ||
|
|
f2ef01c6a8 | ||
|
|
4e2760f76e | ||
|
|
6d3ff20b84 | ||
|
|
3a545c34e9 | ||
|
|
e10f199e55 | ||
|
|
65dddf452c | ||
|
|
bdbbb6a844 | ||
|
|
ebfc9116f4 | ||
|
|
71449762ed | ||
|
|
e062cbf14d | ||
|
|
1d79f7dfac | ||
|
|
37715726a0 | ||
|
|
d8d16b46e5 | ||
|
|
ce9e70be73 | ||
|
|
c248db1c75 | ||
|
|
23a3d91246 | ||
|
|
c22fedde2f | ||
|
|
b1ce99a1bf | ||
|
|
cf4601cbf5 | ||
|
|
1c01ef0541 | ||
|
|
ec67b001ac | ||
|
|
8340afdc48 | ||
|
|
0ba7904e10 | ||
|
|
83d03f5ff4 | ||
|
|
120572f140 | ||
|
|
2a9d7686fc | ||
|
|
19a669d294 | ||
|
|
2d41acb4db | ||
|
|
bf9e2f1791 | ||
|
|
425b572b6f | ||
|
|
58f305e645 | ||
|
|
c705db5f14 | ||
|
|
2ff35d4ef8 | ||
|
|
615110d256 | ||
|
|
e729819e3e | ||
|
|
23c82d464d | ||
|
|
ee8aa70fc6 | ||
|
|
bc9622b7dd | ||
|
|
0292f7c00c | ||
|
|
b70f70d24a | ||
|
|
584d55c7bf | ||
|
|
64b0c34769 | ||
|
|
57860ac6f5 | ||
|
|
d7e2c1cb3b | ||
|
|
6ac028e83c | ||
|
|
daeb2f0768 | ||
|
|
94f68bc100 | ||
|
|
ea57db0e49 | ||
|
|
0049d4d100 | ||
|
|
fadf381751 | ||
|
|
f9210cb471 | ||
|
|
84be1637c7 | ||
|
|
eeb3748819 | ||
|
|
f96ebc5fb3 | ||
|
|
2c18e8eb9f | ||
|
|
981a9390e5 | ||
|
|
919280b8fc | ||
|
|
ae73fa051e | ||
|
|
d7b663f1ac | ||
|
|
be717ff6c6 | ||
|
|
9a43f88e5c | ||
|
|
e52d56ff8c | ||
|
|
f85322566e | ||
|
|
faa8303382 | ||
|
|
a7ebec62ee | ||
|
|
f8861be1ce | ||
|
|
e32f0b7f24 | ||
|
|
976b13711c | ||
|
|
423b0b6d65 | ||
|
|
72eeeed34d | ||
|
|
218a004f7d | ||
|
|
24c4619d67 | ||
|
|
a431274108 | ||
|
|
a487f021a8 | ||
|
|
16d33a3268 | ||
|
|
f999c79ddf | ||
|
|
8476f5fe74 | ||
|
|
ef0f6ba977 | ||
|
|
21dd453dec | ||
|
|
6d8d752a83 | ||
|
|
4fb35c1144 | ||
|
|
9496d741e1 | ||
|
|
bcb54b9099 | ||
|
|
c95b346fc4 | ||
|
|
b9c84040f1 | ||
|
|
deccb6eb63 | ||
|
|
283514078f | ||
|
|
94db952ef6 | ||
|
|
4fe317bb52 | ||
|
|
f695109205 | ||
|
|
fe601f8509 | ||
|
|
c1df3629e0 | ||
|
|
1f430a9c3b | ||
|
|
e83ea3039e | ||
|
|
5a160bfdd5 | ||
|
|
428cefec6c | ||
|
|
308a67442e | ||
|
|
891a352967 | ||
|
|
7a4494efe0 | ||
|
|
1810141d97 | ||
|
|
d3701fdd36 | ||
|
|
3c22966cec | ||
|
|
aabee86bc3 | ||
|
|
d7882d4b81 | ||
|
|
3e4fa9613c | ||
|
|
31f5b20de8 | ||
|
|
71d3c6409d | ||
|
|
801220ed5d | ||
|
|
ea5133fe9d | ||
|
|
c5bb4b2e40 | ||
|
|
130b455be0 | ||
|
|
f2934a9f5d | ||
|
|
2a73d3f97d | ||
|
|
21492a112c | ||
|
|
ee76baca76 | ||
|
|
cf430a3ac4 | ||
|
|
1b7116b333 | ||
|
|
67f3f1d33f | ||
|
|
96ee4d5917 | ||
|
|
11d99d6722 | ||
|
|
6f7e3ecca4 | ||
|
|
ab1d6a7b49 | ||
|
|
c35c788a09 | ||
|
|
445810a1e7 | ||
|
|
92701d1e8c | ||
|
|
30a4760fa7 | ||
|
|
7f9c24005a | ||
|
|
74d838c981 | ||
|
|
d90b52f0bb | ||
|
|
5481b9fa16 | ||
|
|
ab711bb34a | ||
|
|
38c1b8f701 | ||
|
|
11c29c8561 | ||
|
|
26870da323 | ||
|
|
cd55a49d63 | ||
|
|
7907538a53 | ||
|
|
b44d736167 | ||
|
|
daf4450820 | ||
|
|
2a5ae73d01 | ||
|
|
e99200ca6e | ||
|
|
957475814f | ||
|
|
2cf4d08bad | ||
|
|
a9e03a598f | ||
|
|
ea33e05bea | ||
|
|
50ba2ab635 | ||
|
|
7b522de25b | ||
|
|
1eec731b10 | ||
|
|
a9a3a60efe | ||
|
|
41414000d4 | ||
|
|
a435db84ca | ||
|
|
96363fbdcf | ||
|
|
8b6e6ac862 | ||
|
|
2a77b9b624 | ||
|
|
38f801411a | ||
|
|
d57f7b7905 | ||
|
|
da2ffd6368 | ||
|
|
cebcc1d216 | ||
|
|
d8053e29ab | ||
|
|
d54d4fb03c | ||
|
|
1eae987941 | ||
|
|
6bc8231cfe | ||
|
|
91b80b2c0b | ||
|
|
cd4be2844f | ||
|
|
000acc1358 | ||
|
|
99677bb22d | ||
|
|
49b98b168f | ||
|
|
9a0f9a610e | ||
|
|
1157bb3384 | ||
|
|
ef28a21b63 | ||
|
|
ffe7d21945 | ||
|
|
c83f601508 | ||
|
|
3ea6f3ef8f | ||
|
|
9800fe45d8 | ||
|
|
d08cb07fcf | ||
|
|
f17d7c627a | ||
|
|
2fd16c26bb | ||
|
|
15c81b8218 | ||
|
|
058e9ce72a | ||
|
|
55f0680d3b | ||
|
|
e0dc1ee8fe | ||
|
|
fbca0fc7cc | ||
|
|
57b56531f3 | ||
|
|
7fa9f08b7b | ||
|
|
1b636a88ba | ||
|
|
7e80b37265 | ||
|
|
7abf88af73 | ||
|
|
9e2a8dcab4 | ||
|
|
5414ab5fcc | ||
|
|
8a5d3b6500 | ||
|
|
bfc0798962 | ||
|
|
b62ad99982 | ||
|
|
ab550c2381 | ||
|
|
b74e6d6ab0 | ||
|
|
3a85df53c6 | ||
|
|
350f214d95 | ||
|
|
48dced1260 | ||
|
|
f141ed5fae | ||
|
|
574ac598b1 | ||
|
|
023ee677d6 | ||
|
|
16753a99d1 | ||
|
|
d0fa655775 | ||
|
|
78eb9c2693 | ||
|
|
32a7efcecd | ||
|
|
b1b145c253 | ||
|
|
c21d7a5e7c | ||
|
|
b259057f2a | ||
|
|
8edf00e43a | ||
|
|
b190878fb0 | ||
|
|
c9bad6a566 | ||
|
|
5201912a41 | ||
|
|
684a3316ab |
@@ -0,0 +1,550 @@
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2017 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
#####################################################################
|
||||
# Continuous Test
|
||||
####################################################################
|
||||
|
||||
continuous-macosx-x64-RelWithDebInfo-ICC2019.4-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2019.4 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-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]
|
||||
# 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-RelWithDebInfo-CLANG-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
|
||||
tags: [mac]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-skx-x64-RelWithDebInfo-ICC2019.4-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:27
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2 maxinstancelevelcount:4"
|
||||
tags: [docker, skx]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-skx-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2"
|
||||
tags: [docker, skx]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-linux-knl-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX512KNL-TBB2019.9:
|
||||
# image: embreedocker/fedora:26
|
||||
# script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512KNL tasking:TBB2019.9 intensity:2"
|
||||
# tags: [docker-knl]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-linux-x64-RelWithDebInfo-CLANG5.0.0-ISPC1.12.0-AVX2-INT-ADDRSANITIZER:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG5.0.0 ispc:ispc1.12.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON"
|
||||
tags: [docker]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-ubuntu17.10-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
|
||||
# image: embreedocker/ubuntu:17.10
|
||||
# script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1 api_namespace:myembree"
|
||||
# tags: [docker]
|
||||
# only: [pushes]
|
||||
|
||||
continuous-centos7.4-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1"
|
||||
tags: [docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-fedora27-x64-RelWithDebInfo-GCC-ISPC-AVX512SKX-TBB:
|
||||
image: embreedocker/fedora:27
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc isa:AVX512SKX tasking:TBB intensity:2"
|
||||
tags: [docker, skx]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-x64-RelWithDebInfo-GCC-ISPC1.12.0-SSE2-TBB-KLOCKWORK:
|
||||
image: embree-kw-centos7
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0"
|
||||
tags: [kw-scan-docker]
|
||||
only: [pushes]
|
||||
|
||||
continuous-linux-x64-PROTEX:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/source_scan_protex.sh"
|
||||
tags: [docker]
|
||||
only: [pushes]
|
||||
|
||||
|
||||
#####################################################################
|
||||
# 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]
|
||||
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
|
||||
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]
|
||||
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
|
||||
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]
|
||||
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]
|
||||
only: [schedules]
|
||||
|
||||
#nightly-windows-x64-RelWithDebInfo-ICC16-ISPC1.12.0-AVX2-TBB2019.2:
|
||||
# script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC16 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.2 intensity:2"
|
||||
# #tags: [win10, icc16]
|
||||
# #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]
|
||||
only: [schedules]
|
||||
|
||||
#nightly-windows-x64-RelWithDebInfo-ICC18-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
# script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC18-VC14 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:3"
|
||||
# tags: [win10, icc18]
|
||||
# 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:1 sde:skx"
|
||||
# tags: [win10, icc18]
|
||||
# only: [schedules]
|
||||
|
||||
|
||||
# CLANG compilation and testing of different ISAs
|
||||
|
||||
nightly-macosx-x64-RelWithDebInfo-CLANG-ISPC1.12.0-SSE2-TBB2019.9-NAMESPACE:
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:4"
|
||||
tags: [mac]
|
||||
only: [schedules]
|
||||
|
||||
nightly-macosx-x64-RelWithDebInfo-CLANG-ISPC1.12.0-AVX-INT:
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.12.0 isa:AVX tasking:INT intensity:4"
|
||||
tags: [mac] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-macosx-x64-RelWithDebInfo-CLANG-ISPC1.12.0-SSE2-TBB2019.9-STATIC:
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"
|
||||
tags: [mac] # avx2
|
||||
only: [schedules]
|
||||
|
||||
# ICC compilation and testing of different ISAs
|
||||
|
||||
#nightly-macosx-x64-RelWithDebInfo-ICC15-ISPC1.12.0-AVX-INT:
|
||||
# script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC15 ispc:ispc1.12.0 isa:AVX tasking:INT intensity:4"
|
||||
# tags: [mac, icc15]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-macosx-x64-RelWithDebInfo-ICC2019.4-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [mac]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# CLANG compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-SSE2-TBB-NAMESPACE:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:8"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX-TBB2019.9-VALGRIND:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX tasking:TBB2019.9 intensity:4 memcheck:ON"
|
||||
tags: [docker] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG5.0.0-ISPC1.12.0-AVX2-INT-ADDRSANITIZER:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG5.0.0 ispc:ispc1.12.0 isa:AVX tasking:INT intensity:2 addrsanitizer:ON"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"
|
||||
tags: [docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-knl-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX512KNL-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512KNL tasking:TBB2019.9 intensity:3"
|
||||
tags: [docker-knl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-skx-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:3"
|
||||
tags: [docker, skx]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# GCC compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-GCC-ISPC1.12.0-SSE2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# ICC compilation and testing of different ISAs
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-ICC2015.3-ISPC1.12.0-SSE2-TBB2019.2:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2015.3 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-ICC2016.3-ISPC1.12.0-AVX-TBB2019.2:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2016.3 ispc:ispc1.12.0 isa:AVX tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker] # avx
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-ICC2017.1-ISPC1.12.0-AVX2-TBB2019.2:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2017.1 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker] # avx2
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-knl-x64-RelWithDebInfo-ICC2017.1-ISPC1.12.0-AVX512KNL-TBB2019.2:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2017.1 ispc:ispc1.12.0 isa:AVX512KNL tasking:TBB2019.2 intensity:3"
|
||||
tags: [docker-knl]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-skx-x64-RelWithDebInfo-ICC2017.1-ISPC1.12.0-AVX512SKX-TBB2019.2:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2017.1 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.2 intensity:4"
|
||||
tags: [docker, skx]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-skx-x64-RelWithDebInfo-ICC2018.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC2018.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:4"
|
||||
tags: [docker, skx]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-ICC2019.4-ISPC1.12.0-AVX2-TBB2019.9:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
# image: embreedocker/ubuntu:17.10
|
||||
# script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
# tags: [docker]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-ubuntu16.04-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/ubuntu:16.04
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-centos7.4-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/centos:7.4
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
#nightly-centos7.0-x64-RelWithDebInfo-GCC-ISPC1.12.0-AVX2-TBB:
|
||||
# image: embreedocker/centos:7.0
|
||||
# script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
# tags: [docker]
|
||||
# only: [schedules]
|
||||
|
||||
nightly-centos6.0-x64-RelWithDebInfo-GCC4.8.2-ISPC1.12.0-AVX2-TBB:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora28-x64-RelWithDebInfo-GCC-ISPC-AVX512SKX-TBB:
|
||||
image: embreedocker/fedora:28
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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, skx]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora27-x64-RelWithDebInfo-GCC-ISPC-AVX512SKX-TBB:
|
||||
image: embreedocker/fedora:27
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc isa:AVX512SKX tasking:TBB intensity:3"
|
||||
tags: [docker, skx]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora26-x64-RelWithDebInfo-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora25-x64-RelWithDebInfo-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Compilation test of disabled features
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-AVX2-TBB2019.9-NO-ISPC:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 ISPC_SUPPORT:OFF intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-TUTORIALS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 TUTORIALS:OFF intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-BACKFACECULLING:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 BACKFACE_CULLING:ON intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-IGNORE-INVALID-RAYS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 IGNORE_INVALID_RAYS:ON intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-FILTER-FUNCTION:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 FILTER_FUNCTION:OFF intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-RAYMASKS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 RAY_MASK:ON intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-PACKETS:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 RAY_PACKETS:OFF intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-STATCOUNTER:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 STAT_COUNTER:ON intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Compilation test of individual ISAs
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-ISAS-SSE2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:SSE2 tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-ISAS-SSE42-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:SSE42 tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-ISAS-AVX-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:AVX tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-ISAS-AVX2-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:AVX2 tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-ISAS-AVX512SKX-TBB2019.9:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4.0.0 ispc:ispc1.12.0 isas:AVX512SKX tasking:TBB2019.9 intensity:0"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
# Compilation test of individual primitive types enabled
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-TRI:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-QUAD:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-GRID:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-CURVE:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-SUBDIV:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-USERGEOM:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
nightly-linux-x64-RelWithDebInfo-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-INSTANCE:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:RelWithDebInfo 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]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
#####################################################################
|
||||
# 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]
|
||||
only: [web]
|
||||
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-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]
|
||||
only: [web]
|
||||
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]
|
||||
only: [web]
|
||||
artifacts:
|
||||
name: "$env:CI_JOB_NAME"
|
||||
paths: [build/*.msi]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-macosx-x64-Release-ICC2019.4-ISPC1.12.0-TBB2019.9-PACKAGE-ZIP:
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2019.4 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2019.9 intensity:4 package:ZIP"
|
||||
tags: [mac]
|
||||
only: [web]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.zip]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-macosx-x64-Release-ICC2019.4-ISPC1.12.0-TBB-PACKAGE-PKG:
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2019.4 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB intensity:4 package:PKG"
|
||||
tags: [mac]
|
||||
only: [web]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.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:ICC2017.1 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2-AVX512KNL-AVX512SKX tasking:TBB2019.9 intensity:4 package:ZIP"
|
||||
tags: [docker]
|
||||
only: [web]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.tar.gz]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
|
||||
release-linux-x64-Release-ICC2019.4-ISPC1.12.0-TBB-PACKAGE-RPM:
|
||||
image: embreedocker/centos:6.0
|
||||
script: "scripts/test.py platform:x64 build:Release compiler:ICC2017.1 ispc:ispc1.12.0 isas:SSE2-SSE42-AVX-AVX2-AVX512KNL-AVX512SKX tasking:TBB intensity:4 package:RPM"
|
||||
tags: [docker]
|
||||
only: [web]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.tar.gz]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
@@ -1,7 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -11,4 +11,3 @@
|
||||
*.jpg binary
|
||||
*.png binary
|
||||
*.pdf binary
|
||||
*.rc text working-tree-encoding=UTF-16LE-BOM eol=CRLF
|
||||
|
||||
-531
@@ -1,531 +0,0 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#####################################################################
|
||||
# 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]
|
||||
# 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]
|
||||
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]
|
||||
# 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]
|
||||
only: [pushes]
|
||||
|
||||
#continuous-ubuntu17.10-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
|
||||
# image: embreedocker/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]
|
||||
# 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]
|
||||
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]
|
||||
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-PROTEX:
|
||||
image: amd64/openjdk:8
|
||||
script: "scripts/source_scan_protex.sh"
|
||||
tags: [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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
# 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]
|
||||
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]
|
||||
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
|
||||
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
|
||||
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]
|
||||
# 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]
|
||||
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]
|
||||
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
|
||||
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]
|
||||
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
|
||||
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]
|
||||
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
|
||||
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]
|
||||
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]
|
||||
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
|
||||
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
|
||||
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]
|
||||
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
|
||||
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
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
# 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]
|
||||
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]
|
||||
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
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora26-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:26
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [docker]
|
||||
only: [schedules]
|
||||
|
||||
nightly-fedora25-x64-Debug-GCC-ISPC-AVX2-TBB:
|
||||
image: embreedocker/fedora:25
|
||||
script: "scripts/test.py platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"
|
||||
tags: [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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
only: [schedules]
|
||||
|
||||
|
||||
#####################################################################
|
||||
# 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]
|
||||
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-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]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$env:CI_JOB_NAME"
|
||||
paths: [build/*.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]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.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]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.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]
|
||||
only: [web, schedules]
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME"
|
||||
paths: [build/*.tar.gz]
|
||||
when: always
|
||||
expire_in: 2 mos
|
||||
@@ -1,56 +1,6 @@
|
||||
Version History
|
||||
---------------
|
||||
|
||||
### Embree 3.9.0
|
||||
|
||||
- Added round linear curve geometry support. In this mode a real geometric surface for curves
|
||||
with linear basis is rendered using capped cones with spherical filling between
|
||||
the curve segments.
|
||||
- Added rtcGetSceneDevice API function, that returns the device a scene got created in.
|
||||
- Improved performance of round curve rendering by up to 1.8x.
|
||||
- Bugfix to sphere intersection filter invokation for back hit.
|
||||
- Fixed wrong assertion that triggered for invalid curves which anyway get filtered out.
|
||||
- RelWithDebInfo mode no longer enables assertions.
|
||||
- Fixed an issue in FindTBB.cmake that caused compile error with Debug build under Linux.
|
||||
- Embree releases no longer provide RPMs for Linux. Please use the RPMs coming with the package
|
||||
manager of your Linux distribution.
|
||||
|
||||
### Embree 3.8.0
|
||||
|
||||
- Added collision detection support for user geometries (see rtcCollide API function)
|
||||
- Passing geomID to user geometry callbacks.
|
||||
- Bugfix in AVX512VL codepath for rtcIntersect1
|
||||
- For sphere geometries the intersection filter gets now invoked for
|
||||
front and back hit.
|
||||
- Fixed some bugs for quaternion motion blur.
|
||||
- RTCIntersectContext always non-const in Embree API
|
||||
- Made RTCHit aligned to 16 bytes in Embree API
|
||||
|
||||
### New Features in Embree 3.7.0
|
||||
- Added quaternion motion blur for correct interpolation of rotational transformations.
|
||||
- Fixed wrong bounding calculations when a motion blurred instance did
|
||||
instantiate a motion blurred scene.
|
||||
- In robust mode the depth test consistently uses tnear <= t <= tfar now in order
|
||||
to robustly continue traversal at a previous hit point
|
||||
in a way that guarentees reaching all hits, even hits at the same place.
|
||||
- Fixed depth test in robust mode to be precise at tnear and tfar.
|
||||
- Added next_hit tutorial to demonstrate robustly collecting all hits
|
||||
along a ray using multiple ray queries.
|
||||
- Implemented robust mode for curves. This has a small performance impact but
|
||||
fixes bounding problems with flat curves.
|
||||
- Improved quality of motion blur BVH by using linear bounds during binning.
|
||||
- Implemented issue with motion blur builder where number of time segments
|
||||
for SAH heuristic were counted wrong due to some numerical issues.
|
||||
- Fixed an accuracy issue with rendering very short fat curves.
|
||||
- rtcCommitScene can now get called during rendering from multiple threads
|
||||
to lazily build geometry. When TBB is used this causes a much lower overhead
|
||||
than using rtcJoinCommitScene.
|
||||
- Geometries can now get attached to multiple scenes at the same time, which
|
||||
simplifies mapping general scene graphs to API.
|
||||
- Updated to TBB 2019.9 for release builds.
|
||||
- Fixed a bug in the BVH builder for Grid geometries.
|
||||
- Added macOS Catalina support to Embree releases.
|
||||
|
||||
### New Features in Embree 3.6.1
|
||||
- Restored binary compatibility between Embree 3.6 and 3.5 when single-level instancing is used.
|
||||
- Fixed bug in subgrid intersector
|
||||
|
||||
+45
-10
@@ -1,10 +1,23 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
SET(EMBREE_VERSION_MAJOR 3)
|
||||
SET(EMBREE_VERSION_MINOR 9)
|
||||
SET(EMBREE_VERSION_PATCH 0)
|
||||
SET(EMBREE_VERSION_NOTE "")
|
||||
SET(EMBREE_VERSION_MINOR 6)
|
||||
SET(EMBREE_VERSION_PATCH 2)
|
||||
SET(EMBREE_VERSION_NOTE "-alpha.0")
|
||||
|
||||
SET(EMBREE_VERSION ${EMBREE_VERSION_MAJOR}.${EMBREE_VERSION_MINOR}.${EMBREE_VERSION_PATCH})
|
||||
MATH(EXPR EMBREE_VERSION_NUMBER "10000*${EMBREE_VERSION_MAJOR} + 100*${EMBREE_VERSION_MINOR} + ${EMBREE_VERSION_PATCH}")
|
||||
@@ -76,9 +89,7 @@ MARK_AS_ADVANCED(CLEAR CMAKE_CXX_COMPILER)
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/common/cmake ${CMAKE_MODULE_PATH})
|
||||
|
||||
IF (BUILD_TESTING)
|
||||
INCLUDE(test)
|
||||
ENDIF()
|
||||
INCLUDE(test)
|
||||
|
||||
##############################################################
|
||||
# Embree configuration
|
||||
@@ -86,7 +97,7 @@ ENDIF()
|
||||
|
||||
GET_PROPERTY(SHARED_LIBS_SUPPORTED GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
|
||||
IF(SHARED_LIBS_SUPPORTED)
|
||||
OPTION(EMBREE_STATIC_LIB "Build Embree as a static library.")
|
||||
OPTION(EMBREE_STATIC_LIB "Build Embree as a static library." ON)
|
||||
MARK_AS_ADVANCED(CLEAR EMBREE_STATIC_LIB)
|
||||
ELSE()
|
||||
SET(EMBREE_STATIC_LIB ON CACHE BOOL "Build Embree as a static library." FORCE)
|
||||
@@ -116,6 +127,8 @@ MARK_AS_ADVANCED(EMBREE_INSTALL_DEPENDENCIES)
|
||||
OPTION(EMBREE_STAT_COUNTERS "Enables statistic counters.")
|
||||
OPTION(EMBREE_STACK_PROTECTOR "When enabled Embree compiles with stack protection against return address overrides." OFF)
|
||||
|
||||
OPTION(EMBREE_DPCPP_SUPPORT "Enables DPC++ support." ON)
|
||||
|
||||
OPTION(EMBREE_RAY_MASK "Enables ray mask support.")
|
||||
OPTION(EMBREE_BACKFACE_CULLING "Enables backface culling.")
|
||||
OPTION(EMBREE_FILTER_FUNCTION "Enables filter functions." ON)
|
||||
@@ -167,6 +180,14 @@ ENDIF()
|
||||
|
||||
SET(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
|
||||
|
||||
# Validate build type
|
||||
IF (CMAKE_BUILD_TYPE)
|
||||
string(FIND "${CONFIGURATION_TYPES}" "${CMAKE_BUILD_TYPE}" MATCHED_CONFIG)
|
||||
IF (${MATCHED_CONFIG} EQUAL -1)
|
||||
message(FATAL_ERROR "CMAKE_BUILD_TYPE (${CMAKE_BUILD_TYPE}) allows only the following values: ${CONFIGURATION_TYPES}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32)
|
||||
IF (NOT DEFAULT_CMAKE_CONFIGURATION_TYPES_SET)
|
||||
SET(CMAKE_CONFIGURATION_TYPES "${CONFIGURATION_TYPES}" CACHE STRING "List of generated configurations." FORCE)
|
||||
@@ -216,7 +237,8 @@ ENDIF (WIN32)
|
||||
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.")
|
||||
# SET(EMBREE_MAX_ISA "NONE" CACHE STRING "Selects highest ISA to support.")
|
||||
SET(EMBREE_MAX_ISA "SSE2" 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)
|
||||
|
||||
@@ -226,6 +248,10 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
|
||||
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})
|
||||
|
||||
IF (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||
SET(COMPILER_SUPPORTS_AVX512SKX OFF) # we disable this by default as GCC agressively produces AVX512 heavy instructions which reduce CPU frequency
|
||||
ENDIF()
|
||||
|
||||
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})
|
||||
@@ -342,6 +368,12 @@ IF (APPLE AND EMBREE_STATIC_LIB)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||
IF (EMBREE_ISA_AVX512SKX)
|
||||
MESSAGE(WARNING "Enabling AVX512SKX on GCC may reduce CPU frequency.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
##############################################################
|
||||
# ISA configuration continued
|
||||
##############################################################
|
||||
@@ -473,6 +505,9 @@ IF (EMBREE_TUTORIALS)
|
||||
ADD_SUBDIRECTORY(tutorials)
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(tutorials/sycl_test)
|
||||
|
||||
|
||||
##############################################################
|
||||
# Uninstall
|
||||
##############################################################
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
set(CTEST_PROJECT_NAME "Embree")
|
||||
set(TEST_MODELS_HASH 9f7aa420e2f931c51c8a72a812da0631d04f9ed9)
|
||||
set(TEST_MODELS_HASH d8ff08474068fb803768f226b7af49a85a3dfed9)
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
ADD_SUBDIRECTORY(sys)
|
||||
ADD_SUBDIRECTORY(math)
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
ADD_LIBRARY(algorithms OBJECT
|
||||
parallel_for.cpp
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_filter.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_for.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_for_for.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_for_for_prefix_sum.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_map.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_partition.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_prefix_sum.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_reduce.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_set.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "parallel_sort.h"
|
||||
#include "../sys/regression.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
IF (NOT OPENIMAGEIO_ROOT)
|
||||
SET(OPENIMAGEIO_ROOT $ENV{OPENIMAGEIO_ROOT})
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
FIND_PATH( PNG_INCLUDE_DIR NAMES png.h )
|
||||
FIND_LIBRARY( PNG_LIBRARIES NAMES png )
|
||||
|
||||
+146
-320
@@ -1,340 +1,166 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
IF (NOT TBB_ROOT)
|
||||
SET(TBB_ROOT $ENV{TBB_ROOT})
|
||||
ENDIF()
|
||||
IF (NOT TBB_ROOT)
|
||||
SET(TBB_ROOT $ENV{TBBROOT})
|
||||
ENDIF()
|
||||
|
||||
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)
|
||||
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(EMBREE_TBB_ROOT include/tbb/tbb.h
|
||||
DOC "Root of TBB installation"
|
||||
PATHS ${PROJECT_SOURCE_DIR}/tbb
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
FIND_PATH(EMBREE_TBB_ROOT include/tbb/tbb.h
|
||||
HINTS ${TBB_ROOT}
|
||||
PATHS
|
||||
${PROJECT_SOURCE_DIR}/../tbb
|
||||
"${PROGRAMFILES32}/IntelSWTools/compilers_and_libraries/windows/tbb"
|
||||
"${PROGRAMFILES32}/Intel/Composer XE/tbb"
|
||||
"${PROGRAMFILES32}/Intel/compilers_and_libraries/windows/tbb"
|
||||
)
|
||||
|
||||
if(${ROOT_VAR})
|
||||
message(STATUS "Looking for ${TARGET} (${TBB_LIBRARY_NAME}, ${TBBMALLOC_LIBRARY_NAME})"
|
||||
" in ${${ROOT_VAR}}")
|
||||
else()
|
||||
message(STATUS "Looking for ${TARGET} (${TBB_LIBRARY_NAME}, ${TBBMALLOC_LIBRARY_NAME})"
|
||||
" in standard locations")
|
||||
endif()
|
||||
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET(TBB_ARCH intel64)
|
||||
ELSE()
|
||||
SET(TBB_ARCH ia32)
|
||||
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"
|
||||
)
|
||||
# precompiled TBB packages currently only support VC12 and VC14
|
||||
IF (MSVC12)
|
||||
SET(TBB_VCVER vc12)
|
||||
ELSEIF(MSVC14)
|
||||
SET(TBB_VCVER vc14)
|
||||
ENDIF()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(TBB_ARCH intel64)
|
||||
SET(TBB_LIBDIR ${EMBREE_TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
|
||||
SET(TBB_BINDIR ${EMBREE_TBB_ROOT}/bin/${TBB_ARCH}/${TBB_VCVER})
|
||||
|
||||
IF (EMBREE_TBB_ROOT STREQUAL "")
|
||||
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h)
|
||||
FIND_LIBRARY(TBB_LIBRARY tbb)
|
||||
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc)
|
||||
ELSE()
|
||||
SET(TBB_INCLUDE_DIR TBB_INCLUDE_DIR-NOTFOUND)
|
||||
SET(TBB_LIBRARY TBB_LIBRARY-NOTFOUND)
|
||||
SET(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
|
||||
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${EMBREE_TBB_ROOT}/include NO_DEFAULT_PATH)
|
||||
FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_LIBDIR} ${EMBREE_TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIBDIR} ${EMBREE_TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
ENDIF()
|
||||
|
||||
ELSE ()
|
||||
|
||||
FIND_PATH(EMBREE_TBB_ROOT include/tbb/tbb.h
|
||||
DOC "Root of TBB installation"
|
||||
PATHS ${PROJECT_SOURCE_DIR}/tbb
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
FIND_PATH(EMBREE_TBB_ROOT include/tbb/tbb.h
|
||||
DOC "Root of TBB installation"
|
||||
HINTS ${TBB_ROOT}
|
||||
PATHS
|
||||
${PROJECT_SOURCE_DIR}/tbb
|
||||
/opt/intel/composerxe/tbb
|
||||
/opt/intel/compilers_and_libraries/tbb
|
||||
/opt/intel/tbb
|
||||
)
|
||||
|
||||
IF (EMBREE_TBB_ROOT STREQUAL "")
|
||||
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h)
|
||||
FIND_LIBRARY(TBB_LIBRARY tbb)
|
||||
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc)
|
||||
|
||||
ELSEIF (EXISTS ${EMBREE_TBB_ROOT}/cmake/TBBBuild.cmake AND EXISTS ${EMBREE_TBB_ROOT}/src/tbb/tbb_version.h)
|
||||
OPTION(EMBREE_TBB_STATIC_LIB "Build TBB as a static library (building TBB as a static library is NOT recommended)")
|
||||
if (EMBREE_TBB_STATIC_LIB)
|
||||
include(${EMBREE_TBB_ROOT}/cmake/TBBBuild.cmake)
|
||||
tbb_build(TBB_ROOT ${EMBREE_TBB_ROOT} CONFIG_DIR TBB_DIR MAKE_ARGS extra_inc=big_iron.inc)
|
||||
SET(TBB_INCLUDE_DIR ${EMBREE_TBB_ROOT}/include)
|
||||
SET(TBB_LIBRARY ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/libtbb.a)
|
||||
SET(TBB_LIBRARY_MALLOC ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/libtbbmalloc.a)
|
||||
else()
|
||||
set(TBB_ARCH ia32)
|
||||
include(${EMBREE_TBB_ROOT}/cmake/TBBBuild.cmake)
|
||||
tbb_build(TBB_ROOT ${EMBREE_TBB_ROOT} CONFIG_DIR TBB_DIR)
|
||||
SET(TBB_INCLUDE_DIR ${EMBREE_TBB_ROOT}/include)
|
||||
SET(TBB_LIBRARY ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/libtbb.so.2)
|
||||
SET(TBB_LIBRARY_MALLOC ${PROJECT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir_release/libtbbmalloc.so.2)
|
||||
endif()
|
||||
|
||||
ELSE()
|
||||
SET(TBB_INCLUDE_DIR TBB_INCLUDE_DIR-NOTFOUND)
|
||||
SET(TBB_LIBRARY TBB_LIBRARY-NOTFOUND)
|
||||
SET(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
|
||||
IF (APPLE)
|
||||
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${EMBREE_TBB_ROOT}/include NO_DEFAULT_PATH)
|
||||
FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${EMBREE_TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${EMBREE_TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
ELSE()
|
||||
FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${EMBREE_TBB_ROOT}/include NO_DEFAULT_PATH)
|
||||
SET(TBB_HINTS HINTS
|
||||
${EMBREE_TBB_ROOT}/lib/intel64/gcc4.8
|
||||
${EMBREE_TBB_ROOT}/lib/intel64/gcc4.7
|
||||
${EMBREE_TBB_ROOT}/lib/intel64/gcc4.4
|
||||
${EMBREE_TBB_ROOT}/lib/intel64/gcc4.1
|
||||
${EMBREE_TBB_ROOT}/lib
|
||||
${EMBREE_TBB_ROOT}/lib64
|
||||
PATHS /usr/libx86_64-linux-gnu/)
|
||||
FIND_LIBRARY(TBB_LIBRARY tbb ${TBB_HINTS})
|
||||
FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_HINTS})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
if(MSVC10)
|
||||
set(TBB_VCVER vc10)
|
||||
elseif(MSVC11)
|
||||
set(TBB_VCVER vc11)
|
||||
elseif(MSVC12)
|
||||
set(TBB_VCVER vc12)
|
||||
else()
|
||||
set(TBB_VCVER vc14)
|
||||
endif()
|
||||
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)
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_MALLOC)
|
||||
|
||||
find_path(${INCLUDE_DIR_VAR} tbb/task_scheduler_init.h PATHS ${${ROOT_VAR}}/include NO_DEFAULT_PATH)
|
||||
IF (TBB_FOUND)
|
||||
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||
SET(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC})
|
||||
ENDIF()
|
||||
|
||||
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
|
||||
)
|
||||
find_path(${ROOT_VAR} include/tbb/tbb.h
|
||||
DOC "Root of ${TBB_LIBRARY_NAME} installation"
|
||||
HINTS ${${ROOT_VAR}}
|
||||
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()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(${TARGET}
|
||||
DEFAULT_MSG ${INCLUDE_DIR_VAR} ${TBB_LIBRARY_VAR} ${TBBMALLOC_LIBRARY_VAR})
|
||||
|
||||
# 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})
|
||||
|
||||
# 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}}
|
||||
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()
|
||||
# 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}}
|
||||
IMPORTED_NO_SONAME TRUE
|
||||
)
|
||||
endif()
|
||||
get_filename_component(${LIB_DIR_VAR} ${${TBB_LIBRARY_VAR}} DIRECTORY)
|
||||
message(STATUS "FOUND ${TARGET} AT ${${LIB_DIR_VAR}}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#===============================================================================
|
||||
# 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.")
|
||||
|
||||
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()
|
||||
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()
|
||||
MARK_AS_ADVANCED(TBB_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(TBB_LIBRARY)
|
||||
MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC)
|
||||
|
||||
##############################################################
|
||||
# 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()
|
||||
IF (WIN32)
|
||||
INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
|
||||
INSTALL(PROGRAMS ${TBB_LIBDIR}/tbb.lib ${TBB_LIBDIR}/tbbmalloc.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSEIF (APPLE)
|
||||
INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ELSE()
|
||||
INSTALL(PROGRAMS ${TBB_LIBRARY}.2 ${TBB_LIBRARY_MALLOC}.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
IF (WIN32 OR APPLE)
|
||||
return()
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
IF (WIN32 OR APPLE)
|
||||
return()
|
||||
|
||||
+49
-14
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
IF(NOT ${VAR})
|
||||
@@ -22,7 +35,6 @@ IF (WIN32)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR") # enable runtime type information (on by default)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /w") # disable all warnings
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Gy") # package individual functions
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS") # protects against return address overrides
|
||||
ELSE()
|
||||
@@ -37,7 +49,6 @@ IF (WIN32)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
|
||||
@@ -45,10 +56,15 @@ IF (WIN32)
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Gy") # package individual functions
|
||||
# SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-vectorize") # disable auto vectorization
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}")
|
||||
# SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Gy") # package individual functions
|
||||
# SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-vectorize") # disable auto vectorization
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
|
||||
|
||||
@@ -84,7 +100,9 @@ ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
|
||||
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
|
||||
ENDIF()
|
||||
@@ -94,24 +112,37 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
IF (EMBREE_ADDRESS_SANITIZER)
|
||||
IF (EMBREE_ADDRESS_SANITIZER)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
ENDIF()
|
||||
|
||||
IF (EMBREE_DPCPP_SUPPORT)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-mismatched-tags -Wno-pessimizing-move -Wno-reorder -Wno-unneeded-internal-declaration -Wno-delete-non-abstract-non-virtual-dtor -Wno-dangling-field -Wno-unknown-pragmas -fsycl -fsycl-unnamed-lambda -Xclang -fsycl-allow-func-ptr") # disable DPC++ warnings
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEMBREE_DPCPP_SUPPORT") # enable DPC++ code in Embree
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lOpenCL -lsycl") # link against DPC++ libs
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lOpenCL -lsycl") # we do not need an executable stack
|
||||
|
||||
ENDIF(EMBREE_DPCPP_SUPPORT)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") # allow inlining of intrinsics
|
||||
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDEBUG") # enable assertions
|
||||
# SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
IF (APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions
|
||||
@@ -120,11 +151,15 @@ ELSE()
|
||||
IF (NOT EMBREE_ADDRESS_SANITIZER) # for address sanitizer this causes link errors
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
IF (EMBREE_DPCPP_SUPPORT)
|
||||
ELSE (EMBREE_DPCPP_SUPPORT)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
|
||||
ENDIF (EMBREE_DPCPP_SUPPORT)
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable
|
||||
ENDIF()
|
||||
ENDIF(APPLE)
|
||||
|
||||
|
||||
ENDIF()
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
file(WRITE ${dst} "#include \"${src}\"\n")
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
# use default install config
|
||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/embree-config-install.cmake)
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
SET(PACKAGE_VERSION @EMBREE_VERSION@)
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIV_ROOT_DIR@)
|
||||
GET_FILENAME_COMPONENT(EMBREE_ROOT_DIR "${EMBREE_ROOT_DIR}" ABSOLUTE)
|
||||
|
||||
+24
-10
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
IF(NOT ${VAR})
|
||||
@@ -12,7 +25,7 @@ _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_AVX512SKX "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
|
||||
|
||||
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
|
||||
IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
|
||||
@@ -22,7 +35,6 @@ ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess") # disables clearing an object of type ‘XXX’ with no trivial copy-assignment; use assignment or value-initialization instead
|
||||
IF (NOT APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
|
||||
ENDIF()
|
||||
@@ -33,7 +45,6 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes al
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
|
||||
ENDIF()
|
||||
@@ -44,19 +55,22 @@ MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
|
||||
ENDMACRO()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") # allow inlining of intrinsics
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
IF (APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions
|
||||
|
||||
+40
-19
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
MACRO(_SET_IF_EMPTY VAR VALUE)
|
||||
IF(NOT ${VAR})
|
||||
@@ -117,7 +130,6 @@ ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-ansi-alias") # disables strict aliasing rules
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-vec") # disable auto vectorizer
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fasm-blocks") # enable assembly blocks
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
|
||||
ENDIF()
|
||||
@@ -127,31 +139,40 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict") # enable restrict keyword
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-inline-max-total-size") # no size limit when performing inlining
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-inline-max-per-compile") # no maximal number of inlinings per compilation unit
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -inline-factor=150") # increase default inline factors by 2x
|
||||
|
||||
IF(NOT CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
|
||||
IF(NOT CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel") # links intel runtime statically
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-intel-extensions") # disables some intel extensions which cause symbols to be exported
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enables assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG") # configure TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") # allow inlining of intrinsics
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -restrict") # enable restrict keyword
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -no-inline-max-total-size") # no size limit when performing inlining
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -no-inline-max-per-compile") # no maximal number of inlinings per compilation unit
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -inline-factor=150") # increase default inline factors limits by 2x
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDEBUG") # enables assertions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g") # generate debug information
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -restrict") # enable restrict keyword
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -no-inline-max-total-size") # no size limit when performing inlining
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -no-inline-max-per-compile") # no maximal number of inlinings per compilation unit
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -inline-factor=150") # increase default inline factors by 2x
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
|
||||
|
||||
#SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -debug inline-debug-info")
|
||||
#SET(CMAKE_EXE_LINKER_FLAGS "-g")
|
||||
|
||||
IF (APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # link against libc++ which supports C++11 features
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
# ##################################################################
|
||||
# add macro INCLUDE_DIRECTORIES_ISPC() that allows to specify search
|
||||
|
||||
+18
-5
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
SET(FLAGS_SSE2 "/D__SSE__ /D__SSE2__")
|
||||
SET(FLAGS_SSE42 "${FLAGS_SSE2} /D__SSE3__ /D__SSSE3__ /D__SSE4_1__ /D__SSE4_2__")
|
||||
@@ -10,7 +23,6 @@ SET(COMMON_CXX_FLAGS "")
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /EHsc") # catch C++ exceptions only and extern "C" functions never throw a C++ exception
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP") # compile source files in parallel
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR") # enable runtime type information (on by default)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Gy") # package individual functions
|
||||
IF (EMBREE_STACK_PROTECTOR)
|
||||
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS") # protects against return address overrides
|
||||
ELSE()
|
||||
@@ -23,10 +35,8 @@ MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
|
||||
ENDMACRO()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
|
||||
STRING(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) # disable native runtime checks
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
|
||||
@@ -34,10 +44,13 @@ SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Gy") # package individual functions
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}")
|
||||
#SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /DTBB_USE_DEBUG") # configures TBB in debug mode
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox") # enable full optimizations
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi") # inline intrinsic functions
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Gy") # package individual functions
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
# optionally use static runtime library
|
||||
OPTION(EMBREE_STATIC_RUNTIME "Use the static version of the C/C++ runtime library." OFF)
|
||||
@@ -8,6 +21,6 @@ IF (EMBREE_STATIC_RUNTIME)
|
||||
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
|
||||
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
ENDIF()
|
||||
|
||||
|
||||
# remove define NDEBUG and instead set define DEBUG for config RelWithDebInfo
|
||||
STRING(REPLACE "NDEBUG" "DEBUG" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
@@ -48,8 +61,6 @@ INSTALL(FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCD
|
||||
INSTALL(FILES ${PROJECT_SOURCE_DIR}/CHANGELOG.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
|
||||
INSTALL(FILES ${PROJECT_SOURCE_DIR}/README.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
|
||||
INSTALL(FILES ${PROJECT_SOURCE_DIR}/readme.pdf DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
|
||||
INSTALL(FILES ${PROJECT_SOURCE_DIR}/third-party-programs.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
|
||||
INSTALL(FILES ${PROJECT_SOURCE_DIR}/third-party-programs-TBB.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)
|
||||
|
||||
##############################################################
|
||||
# Install scripts to set embree paths
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/sbin/ldconfig
|
||||
|
||||
+17
-4
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
INCLUDE(CTest)
|
||||
|
||||
@@ -41,7 +54,7 @@ MACRO (ADD_EMBREE_NORMAL_TEST name reference executable args)
|
||||
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})
|
||||
COMMAND ${executable} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
@@ -73,7 +86,7 @@ MACRO (ADD_EMBREE_MODEL_TEST name reference executable args model)
|
||||
IF (BUILD_TESTING)
|
||||
ADD_TEST(NAME ${name}_ispc
|
||||
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
|
||||
COMMAND COMMAND ${executable}_ispc -c ${EMBREE_MODEL_DIR}/${model} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
|
||||
COMMAND COMMAND ${executable} -c ${EMBREE_MODEL_DIR}/${model} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
# additional parameters (beyond the name) are treated as additional dependencies
|
||||
# if ADDITIONAL_LIBRARIES is set these will be included during linking
|
||||
|
||||
MACRO (ADD_TUTORIAL TUTORIAL_NAME)
|
||||
ADD_EXECUTABLE(${TUTORIAL_NAME} ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
|
||||
ADD_EXECUTABLE(${TUTORIAL_NAME} ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME} embree image tutorial noise ${ADDITIONAL_LIBRARIES})
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME} APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
@@ -13,9 +26,19 @@ MACRO (ADD_TUTORIAL TUTORIAL_NAME)
|
||||
SIGN_TARGET(${TUTORIAL_NAME})
|
||||
ENDMACRO ()
|
||||
|
||||
MACRO (ADD_TUTORIAL_SYCL TUTORIAL_NAME)
|
||||
ADD_EXECUTABLE(${TUTORIAL_NAME}_sycl ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_sycl.cpp ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME}_sycl embree image tutorial noise ${ADDITIONAL_LIBRARIES} -foffload-static-lib=../../libembree${EMBREE_VERSION_MAJOR}.a)
|
||||
TARGET_COMPILE_DEFINITIONS(${TUTORIAL_NAME}_sycl PUBLIC EMBREE_SYCL_TUTORIAL)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_sycl PROPERTY FOLDER tutorials/sycl)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_sycl APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
INSTALL(TARGETS ${TUTORIAL_NAME}_sycl DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
|
||||
SIGN_TARGET(${TUTORIAL_NAME}_sycl)
|
||||
ENDMACRO ()
|
||||
|
||||
MACRO (ADD_TUTORIAL_ISPC TUTORIAL_NAME)
|
||||
IF (EMBREE_ISPC_SUPPORT)
|
||||
ADD_EMBREE_ISPC_EXECUTABLE(${TUTORIAL_NAME}_ispc ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc ${ARGN})
|
||||
ADD_EMBREE_ISPC_EXECUTABLE(${TUTORIAL_NAME}_ispc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc ${ARGN})
|
||||
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME}_ispc embree image tutorial_ispc noise noise_ispc)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
|
||||
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2015 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
ADD_LIBRARY(lexers STATIC
|
||||
stringstream.cpp
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "stringstream.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "tokenstream.h"
|
||||
#include "../math/math.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
ADD_LIBRARY(math STATIC constants.cpp)
|
||||
SET_PROPERTY(TARGET math PROPERTY FOLDER common)
|
||||
|
||||
+33
-172
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -7,7 +20,6 @@
|
||||
#include "linearspace3.h"
|
||||
#include "quaternion.h"
|
||||
#include "bbox.h"
|
||||
#include "vec4.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
@@ -29,9 +41,13 @@ namespace embree
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline AffineSpaceT ( ) { }
|
||||
#if !defined(__SYCL_DEVICE_ONLY__) // FIXME: workaround for SYCL bug
|
||||
__forceinline AffineSpaceT ( const AffineSpaceT& other ) { l = other.l; p = other.p; }
|
||||
#endif
|
||||
__forceinline AffineSpaceT ( const L & other ) { l = other ; p = VectorT(zero); }
|
||||
#if !defined(__SYCL_DEVICE_ONLY__) // FIXME: workaround for SYCL bug
|
||||
__forceinline AffineSpaceT& operator=( const AffineSpaceT& other ) { l = other.l; p = other.p; return *this; }
|
||||
#endif
|
||||
|
||||
__forceinline AffineSpaceT( const VectorT& vx, const VectorT& vy, const VectorT& vz, const VectorT& p ) : l(vx,vy,vz), p(p) {}
|
||||
__forceinline AffineSpaceT( const L& l, const VectorT& p ) : l(l), p(p) {}
|
||||
@@ -69,10 +85,6 @@ 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) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Unary Operators
|
||||
@@ -132,11 +144,17 @@ namespace embree
|
||||
return AffineSpaceT<L>(select(s,t.l,f.l),select(s,t.p,f.p));
|
||||
}
|
||||
|
||||
/*! blending */
|
||||
template<typename T>
|
||||
__forceinline AffineSpaceT<T> lerp(const AffineSpaceT<T>& l0, const AffineSpaceT<T>& l1, const float t) {
|
||||
return AffineSpaceT<T>(lerp(l0.l,l1.l,t),lerp(l0.p,l1.p,t));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename L> static embree_ostream operator<<(embree_ostream cout, const AffineSpaceT<L>& m) {
|
||||
template<typename L> static std::ostream& operator<<(std::ostream& cout, const AffineSpaceT<L>& m) {
|
||||
return cout << "{ l = " << m.l << ", p = " << m.p << " }";
|
||||
}
|
||||
|
||||
@@ -149,172 +167,15 @@ namespace embree
|
||||
typedef AffineSpaceT<LinearSpace3fa> AffineSpace3fa;
|
||||
typedef AffineSpaceT<Quaternion3f > OrthonormalSpace3f;
|
||||
|
||||
template<int N> using AffineSpace3vf = AffineSpaceT<LinearSpace3<Vec3<vfloat<N>>>>;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec3<vfloat<4>>>> AffineSpace3vf4;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec3<vfloat<8>>>> AffineSpace3vf8;
|
||||
typedef AffineSpaceT<LinearSpace3<Vec3<vfloat<16>>>> AffineSpace3vf16;
|
||||
|
||||
template<int N> using AffineSpace3vfa = 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;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// Interpolation
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<typename T, typename R>
|
||||
__forceinline AffineSpaceT<T> lerp(const AffineSpaceT<T>& M0,
|
||||
const AffineSpaceT<T>& M1,
|
||||
const R& t)
|
||||
{
|
||||
return AffineSpaceT<T>(lerp(M0.l,M1.l,t),lerp(M0.p,M1.p,t));
|
||||
}
|
||||
|
||||
// slerp interprets the 16 floats of the matrix M = D * R * S as components of
|
||||
// three matrizes (D, R, S) that are interpolated individually.
|
||||
template<typename T> __forceinline AffineSpaceT<LinearSpace3<Vec3<T>>>
|
||||
slerp(const AffineSpaceT<LinearSpace3<Vec4<T>>>& M0,
|
||||
const AffineSpaceT<LinearSpace3<Vec4<T>>>& M1,
|
||||
const T& t)
|
||||
{
|
||||
QuaternionT<T> q0(M0.p.w, M0.l.vx.w, M0.l.vy.w, M0.l.vz.w);
|
||||
QuaternionT<T> q1(M1.p.w, M1.l.vx.w, M1.l.vy.w, M1.l.vz.w);
|
||||
QuaternionT<T> q = slerp(q0, q1, t);
|
||||
|
||||
AffineSpaceT<LinearSpace3<Vec3<T>>> S = lerp(M0, M1, t);
|
||||
AffineSpaceT<LinearSpace3<Vec3<T>>> D(one);
|
||||
D.p.x = S.l.vx.y;
|
||||
D.p.y = S.l.vx.z;
|
||||
D.p.z = S.l.vy.z;
|
||||
S.l.vx.y = 0;
|
||||
S.l.vx.z = 0;
|
||||
S.l.vy.z = 0;
|
||||
|
||||
AffineSpaceT<LinearSpace3<Vec3<T>>> R = LinearSpace3<Vec3<T>>(q);
|
||||
return D * R * S;
|
||||
}
|
||||
|
||||
// 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,
|
||||
const float& t)
|
||||
{
|
||||
Quaternion3f q0(M0.p.w, M0.l.vx.w, M0.l.vy.w, M0.l.vz.w);
|
||||
Quaternion3f q1(M1.p.w, M1.l.vx.w, M1.l.vy.w, M1.l.vz.w);
|
||||
Quaternion3f q = slerp(q0, q1, t);
|
||||
|
||||
AffineSpace3fa S = lerp(M0, M1, t);
|
||||
AffineSpace3fa D(one);
|
||||
D.p.x = S.l.vx.y;
|
||||
D.p.y = S.l.vx.z;
|
||||
D.p.z = S.l.vy.z;
|
||||
S.l.vx.y = 0;
|
||||
S.l.vx.z = 0;
|
||||
S.l.vy.z = 0;
|
||||
|
||||
AffineSpace3fa R = LinearSpace3fa(q);
|
||||
return D * R * S;
|
||||
}
|
||||
|
||||
__forceinline AffineSpace3fa quaternionDecompositionToAffineSpace(const AffineSpace3fa& qd)
|
||||
{
|
||||
// compute affine transform from quaternion decomposition
|
||||
Quaternion3f q(qd.p.w, qd.l.vx.w, qd.l.vy.w, qd.l.vz.w);
|
||||
AffineSpace3fa M = qd;
|
||||
AffineSpace3fa D(one);
|
||||
D.p.x = M.l.vx.y;
|
||||
D.p.y = M.l.vx.z;
|
||||
D.p.z = M.l.vy.z;
|
||||
M.l.vx.y = 0;
|
||||
M.l.vx.z = 0;
|
||||
M.l.vy.z = 0;
|
||||
AffineSpace3fa R = LinearSpace3fa(q);
|
||||
return D * R * M;
|
||||
}
|
||||
|
||||
__forceinline void quaternionDecomposition(const AffineSpace3fa& 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;
|
||||
T.x = qd.l.vx.y;
|
||||
T.y = qd.l.vx.z;
|
||||
T.z = qd.l.vy.z;
|
||||
S.l.vx.y = 0;
|
||||
S.l.vx.z = 0;
|
||||
S.l.vy.z = 0;
|
||||
}
|
||||
|
||||
__forceinline AffineSpace3fa quaternionDecomposition(Vec3fa const& T, Quaternion3f const& q, AffineSpace3fa const& S)
|
||||
{
|
||||
AffineSpace3fa M = S;
|
||||
M.l.vx.w = q.i;
|
||||
M.l.vy.w = q.j;
|
||||
M.l.vz.w = q.k;
|
||||
M.p.w = q.r;
|
||||
M.l.vx.y = T.x;
|
||||
M.l.vx.z = T.y;
|
||||
M.l.vy.z = T.z;
|
||||
return M;
|
||||
}
|
||||
|
||||
struct __aligned(16) QuaternionDecomposition
|
||||
{
|
||||
float scale_x = 1.f;
|
||||
float scale_y = 1.f;
|
||||
float scale_z = 1.f;
|
||||
float skew_xy = 0.f;
|
||||
float skew_xz = 0.f;
|
||||
float skew_yz = 0.f;
|
||||
float shift_x = 0.f;
|
||||
float shift_y = 0.f;
|
||||
float shift_z = 0.f;
|
||||
float quaternion_r = 1.f;
|
||||
float quaternion_i = 0.f;
|
||||
float quaternion_j = 0.f;
|
||||
float quaternion_k = 0.f;
|
||||
float translation_x = 0.f;
|
||||
float translation_y = 0.f;
|
||||
float translation_z = 0.f;
|
||||
};
|
||||
|
||||
__forceinline QuaternionDecomposition quaternionDecomposition(AffineSpace3fa const& M)
|
||||
{
|
||||
QuaternionDecomposition qd;
|
||||
qd.scale_x = M.l.vx.x;
|
||||
qd.scale_y = M.l.vy.y;
|
||||
qd.scale_z = M.l.vz.z;
|
||||
qd.shift_x = M.p.x;
|
||||
qd.shift_y = M.p.y;
|
||||
qd.shift_z = M.p.z;
|
||||
qd.translation_x = M.l.vx.y;
|
||||
qd.translation_y = M.l.vx.z;
|
||||
qd.translation_z = M.l.vy.z;
|
||||
qd.skew_xy = M.l.vy.x;
|
||||
qd.skew_xz = M.l.vz.x;
|
||||
qd.skew_yz = M.l.vz.y;
|
||||
qd.quaternion_r = M.p.w;
|
||||
qd.quaternion_i = M.l.vx.w;
|
||||
qd.quaternion_j = M.l.vy.w;
|
||||
qd.quaternion_k = M.l.vz.w;
|
||||
return qd;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* ! Template Specialization for 2D: return matrix for rotation around point
|
||||
* (rotation around arbitrarty vector is not meaningful in 2D)
|
||||
*/
|
||||
template<> __forceinline
|
||||
AffineSpace2f AffineSpace2f::rotate(const Vec2f& p, const float& r) {
|
||||
return translate(+p)*AffineSpace2f(LinearSpace2f::rotate(r))*translate(-p);
|
||||
}
|
||||
|
||||
/*! Template Specialization for 2D: return matrix for rotation around point (rotation around arbitrarty vector is not meaningful in 2D) */
|
||||
template<> __forceinline AffineSpace2f AffineSpace2f::rotate(const Vec2f& p, const float& r) { return translate(+p) * AffineSpace2f(LinearSpace2f::rotate(r)) * translate(-p); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Similarity Transform
|
||||
//
|
||||
// checks, if M is a similarity transformation, i.e if there exists a factor D
|
||||
// such that for all x,y: distance(Mx, My) = D * distance(x, y)
|
||||
// such that for all x,y: distance(Mx, My) = D * distance(x, y)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
__forceinline bool similarityTransform(const AffineSpace3fa& M, float* D)
|
||||
{
|
||||
@@ -327,15 +188,15 @@ namespace embree
|
||||
const float D_y = dot(M.l.vy, M.l.vy);
|
||||
const float D_z = dot(M.l.vz, M.l.vz);
|
||||
|
||||
if (abs(D_x - D_y) > 1e-5f ||
|
||||
abs(D_x - D_z) > 1e-5f ||
|
||||
if (abs(D_x - D_y) > 1e-5f ||
|
||||
abs(D_x - D_z) > 1e-5f ||
|
||||
abs(D_y - D_z) > 1e-5f)
|
||||
return false;
|
||||
|
||||
if (D) *D = sqrtf(D_x);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
__forceinline void AffineSpace3fa_store_unaligned(const AffineSpace3fa &source, AffineSpace3fa* ptr)
|
||||
{
|
||||
Vec3fa::storeu(&ptr->l.vx, source.l.vx);
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -194,7 +207,7 @@ namespace embree
|
||||
}
|
||||
|
||||
/*! output operator */
|
||||
template<typename T> __forceinline embree_ostream operator<<(embree_ostream cout, const BBox<T>& box) {
|
||||
template<typename T> __forceinline std::ostream& operator<<(std::ostream& cout, const BBox<T>& box) {
|
||||
return cout << "[" << box.lower << "; " << box.upper << "]";
|
||||
}
|
||||
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -37,7 +50,7 @@ namespace embree
|
||||
};
|
||||
|
||||
/*! output operator */
|
||||
template<typename T> __forceinline embree_ostream operator<<(embree_ostream cout, const Col3<T>& a) {
|
||||
template<typename T> inline std::ostream& operator<<(std::ostream& cout, const Col3<T>& a) {
|
||||
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
|
||||
}
|
||||
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -37,7 +50,7 @@ namespace embree
|
||||
};
|
||||
|
||||
/*! output operator */
|
||||
template<typename T> __forceinline embree_ostream operator<<(embree_ostream cout, const Col4<T>& a) {
|
||||
template<typename T> inline std::ostream& operator<<(std::ostream& cout, const Col4<T>& a) {
|
||||
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ", " << a.a << ")";
|
||||
}
|
||||
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -235,7 +248,7 @@ namespace embree
|
||||
__forceinline float luminance (const Color& a) { return madd(0.212671f,a.r,madd(0.715160f,a.g,0.072169f*a.b)); }
|
||||
|
||||
/*! output operator */
|
||||
__forceinline embree_ostream operator<<(embree_ostream cout, const Color& a) {
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Color& a) {
|
||||
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "constants.h"
|
||||
|
||||
|
||||
+15
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -10,7 +23,6 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h> // using cmath causes issues under Windows
|
||||
#include <cfloat>
|
||||
#include <climits>
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
+16
-34
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -71,7 +84,7 @@ namespace embree
|
||||
__forceinline friend const Interval intersect( const Interval& a, const Interval& b, const Interval& c ) { return intersect(a,intersect(b,c)); }
|
||||
__forceinline friend const Interval intersect( const Interval& a, const Interval& b, const Interval& c, const Interval& d ) { return intersect(intersect(a,b),intersect(c,d)); }
|
||||
|
||||
friend embree_ostream operator<<(embree_ostream cout, const Interval& a) {
|
||||
friend std::ostream& operator<<(std::ostream& cout, const Interval& a) {
|
||||
return cout << "[" << a.lower << ", " << a.upper << "]";
|
||||
}
|
||||
|
||||
@@ -127,35 +140,4 @@ namespace embree
|
||||
typedef Interval<float> Interval1f;
|
||||
typedef Vec2<Interval<float>> Interval2f;
|
||||
typedef Vec3<Interval<float>> Interval3f;
|
||||
|
||||
inline void swap(float& a, float& b) { float tmp = a; a = b; b = tmp; }
|
||||
|
||||
inline Interval1f shift(const Interval1f& v, float shift) { return Interval1f(v.lower + shift, v.upper + shift); }
|
||||
|
||||
#define TWO_PI (2.0*M_PI)
|
||||
inline Interval1f sin(Interval1f interval)
|
||||
{
|
||||
if (interval.upper-interval.lower >= M_PI) { return Interval1f(-1.0, 1.0); }
|
||||
if (interval.upper > TWO_PI) { interval = shift(interval, -TWO_PI*floor(interval.upper/TWO_PI)); }
|
||||
if (interval.lower < 0) { interval = shift(interval, -TWO_PI*floor(interval.lower/TWO_PI)); }
|
||||
float sinLower = sin(interval.lower);
|
||||
float sinUpper = sin(interval.upper);
|
||||
if (sinLower > sinUpper) swap(sinLower, sinUpper);
|
||||
if (interval.lower < M_PI / 2.0 && interval.upper > M_PI / 2.0) sinUpper = 1.0;
|
||||
if (interval.lower < 3.0 * M_PI / 2.0 && interval.upper > 3.0 * M_PI / 2.0) sinLower = -1.0;
|
||||
return Interval1f(sinLower, sinUpper);
|
||||
}
|
||||
|
||||
inline Interval1f cos(Interval1f interval)
|
||||
{
|
||||
if (interval.upper-interval.lower >= M_PI) { return Interval1f(-1.0, 1.0); }
|
||||
if (interval.upper > TWO_PI) { interval = shift(interval, -TWO_PI*floor(interval.upper/TWO_PI)); }
|
||||
if (interval.lower < 0) { interval = shift(interval, -TWO_PI*floor(interval.lower/TWO_PI)); }
|
||||
float cosLower = cos(interval.lower);
|
||||
float cosUpper = cos(interval.upper);
|
||||
if (cosLower > cosUpper) swap(cosLower, cosUpper);
|
||||
if (interval.lower < M_PI && interval.upper > M_PI) cosLower = -1.0;
|
||||
return Interval1f(cosLower, cosUpper);
|
||||
}
|
||||
#undef TWO_PI
|
||||
}
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -225,7 +238,7 @@ namespace embree
|
||||
template<typename TT> friend __forceinline bool operator!=( const LBBox<TT>& a, const LBBox<TT>& b ) { return a.bounds0 != b.bounds0 || a.bounds1 != b.bounds1; }
|
||||
|
||||
/*! output operator */
|
||||
friend __forceinline embree_ostream operator<<(embree_ostream cout, const LBBox& box) {
|
||||
friend __forceinline std::ostream& operator<<(std::ostream& cout, const LBBox& box) {
|
||||
return cout << "LBBox { " << box.bounds0 << "; " << box.bounds1 << " }";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -138,7 +151,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> static embree_ostream operator<<(embree_ostream cout, const LinearSpace2<T>& m) {
|
||||
template<typename T> static std::ostream& operator<<(std::ostream& cout, const LinearSpace2<T>& m) {
|
||||
return cout << "{ vx = " << m.vx << ", vy = " << m.vy << "}";
|
||||
}
|
||||
|
||||
|
||||
+33
-22
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -19,8 +32,11 @@ namespace embree
|
||||
|
||||
/*! default matrix constructor */
|
||||
__forceinline LinearSpace3 ( ) {}
|
||||
|
||||
#if !defined(__SYCL_DEVICE_ONLY__) // FIXME: workaround for SYCL bug
|
||||
__forceinline LinearSpace3 ( const LinearSpace3& other ) { vx = other.vx; vy = other.vy; vz = other.vz; }
|
||||
__forceinline LinearSpace3& operator=( const LinearSpace3& other ) { vx = other.vx; vy = other.vy; vz = other.vz; return *this; }
|
||||
#endif
|
||||
|
||||
template<typename L1> __forceinline LinearSpace3( const LinearSpace3<L1>& s ) : vx(s.vx), vy(s.vy), vz(s.vz) {}
|
||||
|
||||
@@ -90,17 +106,20 @@ namespace embree
|
||||
Vector vx,vy,vz;
|
||||
};
|
||||
|
||||
#if !defined(EMBREE_SYCL_SIMD_LIBRARY) || !defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
/*! compute transposed matrix */
|
||||
template<> __forceinline const LinearSpace3<Vec3fa> LinearSpace3<Vec3fa>::transposed() const {
|
||||
vfloat4 rx,ry,rz; transpose((vfloat4&)vx,(vfloat4&)vy,(vfloat4&)vz,vfloat4(zero),rx,ry,rz);
|
||||
return LinearSpace3<Vec3fa>(Vec3fa(rx),Vec3fa(ry),Vec3fa(rz));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
__forceinline const LinearSpace3<T> transposed(const LinearSpace3<T>& xfm) {
|
||||
return xfm.transposed();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -171,32 +190,24 @@ 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> static embree_ostream operator<<(embree_ostream cout, const LinearSpace3<T>& m) {
|
||||
template<typename T> static std::ostream& operator<<(std::ostream& cout, const LinearSpace3<T>& m) {
|
||||
return cout << "{ vx = " << m.vx << ", vy = " << m.vy << ", vz = " << m.vz << "}";
|
||||
}
|
||||
|
||||
/*! Shortcuts for common linear spaces. */
|
||||
typedef LinearSpace3<Vec3f> LinearSpace3f;
|
||||
typedef LinearSpace3<Vec3fa> LinearSpace3fa;
|
||||
|
||||
template<int N> using LinearSpace3vf = LinearSpace3<Vec3<vfloat<N>>>;
|
||||
typedef LinearSpace3<Vec3<vfloat<4>>> LinearSpace3vf4;
|
||||
typedef LinearSpace3<Vec3<vfloat<8>>> LinearSpace3vf8;
|
||||
typedef LinearSpace3<Vec3<vfloat<16>>> LinearSpace3vf16;
|
||||
|
||||
/*! blending */
|
||||
template<typename T, typename S>
|
||||
__forceinline LinearSpace3<T> lerp(const LinearSpace3<T>& l0,
|
||||
const LinearSpace3<T>& l1,
|
||||
const S& t)
|
||||
{
|
||||
return LinearSpace3<T>(lerp(l0.vx,l1.vx,t),
|
||||
lerp(l0.vy,l1.vy,t),
|
||||
lerp(l0.vz,l1.vz,t));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+23
-6
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -8,6 +21,12 @@
|
||||
#include "constants.h"
|
||||
#include <cmath>
|
||||
|
||||
#if defined(EMBREE_SYCL_SIMD_LIBRARY) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#include "math_sycl.h"
|
||||
|
||||
#else
|
||||
|
||||
#include <emmintrin.h>
|
||||
#include <xmmintrin.h>
|
||||
#include <immintrin.h>
|
||||
@@ -37,9 +56,6 @@ namespace embree
|
||||
union { float f; int i; } v; v.i = i; return v.f;
|
||||
}
|
||||
|
||||
__forceinline int toInt (const float& a) { return int(a); }
|
||||
__forceinline float toFloat(const int& a) { return float(a); }
|
||||
|
||||
#if defined(__WIN32__)
|
||||
__forceinline bool finite ( const float x ) { return _finite(x) != 0; }
|
||||
#endif
|
||||
@@ -259,7 +275,6 @@ namespace embree
|
||||
__forceinline int select(bool s, int t, int f) { return s ? t : f; }
|
||||
__forceinline float select(bool s, float t, float f) { return s ? t : f; }
|
||||
|
||||
__forceinline bool all(bool s) { return s; }
|
||||
|
||||
__forceinline float lerp(const float v0, const float v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
@@ -350,3 +365,5 @@ namespace embree
|
||||
return x | (y << 1) | (z << 2);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/platform.h"
|
||||
#include "../sys/intrinsics.h"
|
||||
#include "constants.h"
|
||||
#include <cmath>
|
||||
|
||||
#include "../../kernels/gpu/common.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
__forceinline bool isvalid ( const float& v ) {
|
||||
return (v > -FLT_LARGE) & (v < +FLT_LARGE);
|
||||
}
|
||||
|
||||
__forceinline int cast_f2i(float f) {
|
||||
return __builtin_bit_cast(int,f);
|
||||
}
|
||||
|
||||
__forceinline float cast_i2f(int i) {
|
||||
return __builtin_bit_cast(float,i);
|
||||
}
|
||||
|
||||
//__forceinline bool finite ( const float x ) { return _finite(x) != 0; }
|
||||
//__forceinline float sign ( const float x ) { return x<0?-1.0f:1.0f; }
|
||||
__forceinline float sqr ( const float x ) { return x*x; }
|
||||
|
||||
__forceinline float rcp ( const float x ) {
|
||||
return cl::sycl::native::recip(x);
|
||||
}
|
||||
|
||||
//__forceinline float signmsk ( const float x ) {
|
||||
// return _mm_cvtss_f32(_mm_and_ps(_mm_set_ss(x),_mm_castsi128_ps(_mm_set1_epi32(0x80000000))));
|
||||
//}
|
||||
//__forceinline float xorf( const float x, const float y ) {
|
||||
// return _mm_cvtss_f32(_mm_xor_ps(_mm_set_ss(x),_mm_set_ss(y)));
|
||||
//}
|
||||
//__forceinline float andf( const float x, const unsigned y ) {
|
||||
// return _mm_cvtss_f32(_mm_and_ps(_mm_set_ss(x),_mm_castsi128_ps(_mm_set1_epi32(y))));
|
||||
//}
|
||||
|
||||
__forceinline float rsqrt( const float x ) {
|
||||
return cl::sycl::rsqrt(x);
|
||||
}
|
||||
|
||||
//__forceinline float nextafter(float x, float y) { if ((x<y) == (x>0)) return x*(1.1f+float(ulp)); else return x*(0.9f-float(ulp)); }
|
||||
//__forceinline double nextafter(double x, double y) { return _nextafter(x, y); }
|
||||
//__forceinline int roundf(float f) { return (int)(f + 0.5f); }
|
||||
|
||||
__forceinline float abs ( const float x ) { return cl::sycl::fabs(x); }
|
||||
__forceinline float acos ( const float x ) { return cl::sycl::acos(x); }
|
||||
__forceinline float asin ( const float x ) { return cl::sycl::asin(x); }
|
||||
__forceinline float atan ( const float x ) { return cl::sycl::atan(x); }
|
||||
__forceinline float atan2( const float y, const float x ) { return cl::sycl::atan2(y, x); }
|
||||
__forceinline float cos ( const float x ) { return cl::sycl::cos(x); }
|
||||
__forceinline float cosh ( const float x ) { return cl::sycl::cosh(x); }
|
||||
__forceinline float exp ( const float x ) { return cl::sycl::exp(x); }
|
||||
__forceinline float fmod ( const float x, const float y ) { return cl::sycl::fmod(x, y); }
|
||||
__forceinline float log ( const float x ) { return cl::sycl::log(x); }
|
||||
__forceinline float log10( const float x ) { return cl::sycl::log10(x); }
|
||||
__forceinline float pow ( const float x, const float y ) { return cl::sycl::pow(x, y); }
|
||||
__forceinline float sin ( const float x ) { return cl::sycl::sin(x); }
|
||||
__forceinline float sinh ( const float x ) { return cl::sycl::sinh(x); }
|
||||
__forceinline float sqrt ( const float x ) { return cl::sycl::sqrt(x); }
|
||||
__forceinline float tan ( const float x ) { return cl::sycl::tan(x); }
|
||||
__forceinline float tanh ( const float x ) { return cl::sycl::tanh(x); }
|
||||
__forceinline float floor( const float x ) { return cl::sycl::floor(x); }
|
||||
__forceinline float ceil ( const float x ) { return cl::sycl::ceil(x); }
|
||||
__forceinline float frac ( const float x ) { return x-floor(x); }
|
||||
|
||||
//__forceinline double abs ( const double x ) { return ::fabs(x); }
|
||||
//__forceinline double sign ( const double x ) { return x<0?-1.0:1.0; }
|
||||
//__forceinline double acos ( const double x ) { return ::acos (x); }
|
||||
//__forceinline double asin ( const double x ) { return ::asin (x); }
|
||||
//__forceinline double atan ( const double x ) { return ::atan (x); }
|
||||
//__forceinline double atan2( const double y, const double x ) { return ::atan2(y, x); }
|
||||
//__forceinline double cos ( const double x ) { return ::cos (x); }
|
||||
//__forceinline double cosh ( const double x ) { return ::cosh (x); }
|
||||
//__forceinline double exp ( const double x ) { return ::exp (x); }
|
||||
//__forceinline double fmod ( const double x, const double y ) { return ::fmod (x, y); }
|
||||
//__forceinline double log ( const double x ) { return ::log (x); }
|
||||
//__forceinline double log10( const double x ) { return ::log10(x); }
|
||||
//__forceinline double pow ( const double x, const double y ) { return ::pow (x, y); }
|
||||
//__forceinline double rcp ( const double x ) { return 1.0/x; }
|
||||
//__forceinline double rsqrt( const double x ) { return 1.0/::sqrt(x); }
|
||||
//__forceinline double sin ( const double x ) { return ::sin (x); }
|
||||
//__forceinline double sinh ( const double x ) { return ::sinh (x); }
|
||||
//__forceinline double sqr ( const double x ) { return x*x; }
|
||||
//__forceinline double sqrt ( const double x ) { return ::sqrt (x); }
|
||||
//__forceinline double tan ( const double x ) { return ::tan (x); }
|
||||
//__forceinline double tanh ( const double x ) { return ::tanh (x); }
|
||||
//__forceinline double floor( const double x ) { return ::floor (x); }
|
||||
//__forceinline double ceil ( const double x ) { return ::ceil (x); }
|
||||
|
||||
/*
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline float mini(float a, float b) {
|
||||
const __m128i ai = _mm_castps_si128(_mm_set_ss(a));
|
||||
const __m128i bi = _mm_castps_si128(_mm_set_ss(b));
|
||||
const __m128i ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_cvtss_f32(_mm_castsi128_ps(ci));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline float maxi(float a, float b) {
|
||||
const __m128i ai = _mm_castps_si128(_mm_set_ss(a));
|
||||
const __m128i bi = _mm_castps_si128(_mm_set_ss(b));
|
||||
const __m128i ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_cvtss_f32(_mm_castsi128_ps(ci));
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
__forceinline T twice(const T& a) { return a+a; }
|
||||
|
||||
__forceinline int min(int a, int b) { return cl::sycl::min(a,b); }
|
||||
__forceinline unsigned min(unsigned a, unsigned b) { return cl::sycl::min(a,b); }
|
||||
__forceinline int64_t min(int64_t a, int64_t b) { return cl::sycl::min(a,b); }
|
||||
__forceinline float min(float a, float b) { return cl::sycl::fmin(a,b); }
|
||||
__forceinline double min(double a, double b) { return cl::sycl::fmin(a,b); }
|
||||
#if defined(__X86_64__)
|
||||
__forceinline size_t min(size_t a, size_t b) { return cl::sycl::min(a,b); }
|
||||
#endif
|
||||
|
||||
template<typename T> __forceinline T min(const T& a, const T& b, const T& c) { return min(min(a,b),c); }
|
||||
template<typename T> __forceinline T min(const T& a, const T& b, const T& c, const T& d) { return min(min(a,b),min(c,d)); }
|
||||
template<typename T> __forceinline T min(const T& a, const T& b, const T& c, const T& d, const T& e) { return min(min(min(a,b),min(c,d)),e); }
|
||||
|
||||
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c) { return mini(mini(a,b),c); }
|
||||
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d) { return mini(mini(a,b),mini(c,d)); }
|
||||
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d, const T& e) { return mini(mini(mini(a,b),mini(c,d)),e); }
|
||||
|
||||
__forceinline int max(int a, int b) { return cl::sycl::max(a,b); }
|
||||
__forceinline unsigned max(unsigned a, unsigned b) { return cl::sycl::max(a,b); }
|
||||
__forceinline int64_t max(int64_t a, int64_t b) { return cl::sycl::max(a,b); }
|
||||
__forceinline float max(float a, float b) { return cl::sycl::fmax(a,b); }
|
||||
__forceinline double max(double a, double b) { return cl::sycl::fmax(a,b); }
|
||||
#if defined(__X86_64__)
|
||||
__forceinline size_t max(size_t a, size_t b) { return cl::sycl::max(a,b); }
|
||||
#endif
|
||||
|
||||
template<typename T> __forceinline T max(const T& a, const T& b, const T& c) { return max(max(a,b),c); }
|
||||
template<typename T> __forceinline T max(const T& a, const T& b, const T& c, const T& d) { return max(max(a,b),max(c,d)); }
|
||||
template<typename T> __forceinline T max(const T& a, const T& b, const T& c, const T& d, const T& e) { return max(max(max(a,b),max(c,d)),e); }
|
||||
|
||||
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c) { return maxi(maxi(a,b),c); }
|
||||
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c, const T& d) { return maxi(maxi(a,b),maxi(c,d)); }
|
||||
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c, const T& d, const T& e) { return maxi(maxi(maxi(a,b),maxi(c,d)),e); }
|
||||
|
||||
template<typename T> __forceinline T clamp(const T& x, const T& lower = T(zero), const T& upper = T(one)) { return max(min(x,upper),lower); }
|
||||
template<typename T> __forceinline T clampz(const T& x, const T& upper) { return max(T(zero), min(x,upper)); }
|
||||
|
||||
template<typename T> __forceinline T deg2rad ( const T& x ) { return x * T(1.74532925199432957692e-2f); }
|
||||
template<typename T> __forceinline T rad2deg ( const T& x ) { return x * T(5.72957795130823208768e1f); }
|
||||
template<typename T> __forceinline T sin2cos ( const T& x ) { return sqrt(max(T(zero),T(one)-x*x)); }
|
||||
template<typename T> __forceinline T cos2sin ( const T& x ) { return sin2cos(x); }
|
||||
|
||||
__forceinline float madd ( const float a, const float b, const float c) { return +cl::sycl::fma(+a,b,+c); }
|
||||
__forceinline float msub ( const float a, const float b, const float c) { return +cl::sycl::fma(+a,b,-c); }
|
||||
__forceinline float nmadd ( const float a, const float b, const float c) { return +cl::sycl::fma(-a,b,+c); }
|
||||
__forceinline float nmsub ( const float a, const float b, const float c) { return -cl::sycl::fma(+a,b,+c); }
|
||||
|
||||
/*! random functions */
|
||||
/*
|
||||
template<typename T> T random() { return T(0); }
|
||||
template<> __forceinline int random() { return int(rand()); }
|
||||
template<> __forceinline uint32_t random() { return uint32_t(rand()) ^ (uint32_t(rand()) << 16); }
|
||||
template<> __forceinline float random() { return rand()/float(RAND_MAX); }
|
||||
template<> __forceinline double random() { return rand()/double(RAND_MAX); }
|
||||
*/
|
||||
|
||||
/*! selects */
|
||||
__forceinline bool select(bool s, bool t , bool f) { return s ? t : f; }
|
||||
__forceinline int select(bool s, int t, int f) { return s ? t : f; }
|
||||
__forceinline float select(bool s, float t, float f) { return s ? t : f; }
|
||||
|
||||
__forceinline float lerp(const float v0, const float v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
__forceinline T lerp2(const float x0, const float x1, const float x2, const float x3, const T& u, const T& v) {
|
||||
return madd((1.0f-u),madd((1.0f-v),T(x0),v*T(x2)),u*madd((1.0f-v),T(x1),v*T(x3)));
|
||||
}
|
||||
|
||||
/*! exchange */
|
||||
template<typename T> __forceinline void xchg ( T& a, T& b ) { const T tmp = a; a = b; b = tmp; }
|
||||
|
||||
/*! bit reverse operation */
|
||||
template<class T>
|
||||
__forceinline T bitReverse(const T& vin)
|
||||
{
|
||||
T v = vin;
|
||||
v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1);
|
||||
v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2);
|
||||
v = ((v >> 4) & 0x0F0F0F0F) | ((v & 0x0F0F0F0F) << 4);
|
||||
v = ((v >> 8) & 0x00FF00FF) | ((v & 0x00FF00FF) << 8);
|
||||
v = ( v >> 16 ) | ( v << 16);
|
||||
return v;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
/*! bit interleave operation */
|
||||
template<class T>
|
||||
__forceinline T bitInterleave(const T& xin, const T& yin, const T& zin)
|
||||
{
|
||||
T x = xin, y = yin, z = zin;
|
||||
x = (x | (x << 16)) & 0x030000FF;
|
||||
x = (x | (x << 8)) & 0x0300F00F;
|
||||
x = (x | (x << 4)) & 0x030C30C3;
|
||||
x = (x | (x << 2)) & 0x09249249;
|
||||
|
||||
y = (y | (y << 16)) & 0x030000FF;
|
||||
y = (y | (y << 8)) & 0x0300F00F;
|
||||
y = (y | (y << 4)) & 0x030C30C3;
|
||||
y = (y | (y << 2)) & 0x09249249;
|
||||
|
||||
z = (z | (z << 16)) & 0x030000FF;
|
||||
z = (z | (z << 8)) & 0x0300F00F;
|
||||
z = (z | (z << 4)) & 0x030C30C3;
|
||||
z = (z | (z << 2)) & 0x09249249;
|
||||
|
||||
return x | (y << 1) | (z << 2);
|
||||
}
|
||||
|
||||
/*! bit interleave operation for 64bit data types*/
|
||||
template<class T>
|
||||
__forceinline T bitInterleave64(const T& xin, const T& yin, const T& zin){
|
||||
T x = xin & 0x1fffff;
|
||||
T y = yin & 0x1fffff;
|
||||
T z = zin & 0x1fffff;
|
||||
|
||||
x = (x | x << 32) & 0x1f00000000ffff;
|
||||
x = (x | x << 16) & 0x1f0000ff0000ff;
|
||||
x = (x | x << 8) & 0x100f00f00f00f00f;
|
||||
x = (x | x << 4) & 0x10c30c30c30c30c3;
|
||||
x = (x | x << 2) & 0x1249249249249249;
|
||||
|
||||
y = (y | y << 32) & 0x1f00000000ffff;
|
||||
y = (y | y << 16) & 0x1f0000ff0000ff;
|
||||
y = (y | y << 8) & 0x100f00f00f00f00f;
|
||||
y = (y | y << 4) & 0x10c30c30c30c30c3;
|
||||
y = (y | y << 2) & 0x1249249249249249;
|
||||
|
||||
z = (z | z << 32) & 0x1f00000000ffff;
|
||||
z = (z | z << 16) & 0x1f0000ff0000ff;
|
||||
z = (z | z << 8) & 0x100f00f00f00f00f;
|
||||
z = (z | z << 4) & 0x10c30c30c30c30c3;
|
||||
z = (z | z << 2) & 0x1249249249249249;
|
||||
|
||||
return x | (y << 1) | (z << 2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
+17
-4
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -25,8 +38,8 @@ namespace embree
|
||||
__forceinline OBBox (const LinearSpace3<T>& space, const BBox<T>& bounds)
|
||||
: space(space), bounds(bounds) {}
|
||||
|
||||
friend embree_ostream operator<<(embree_ostream cout, const OBBox& p) {
|
||||
return cout << "{ space = " << p.space << ", bounds = " << p.bounds << "}";
|
||||
friend std::ostream& operator<<(std::ostream& cout, const OBBox& p) {
|
||||
return std::cout << "{ space = " << p.space << ", bounds = " << p.bounds << "}";
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
+18
-79
@@ -1,12 +1,22 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "vec3.h"
|
||||
#include "vec4.h"
|
||||
|
||||
#include "transcendental.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
@@ -29,7 +39,6 @@ namespace embree
|
||||
|
||||
__forceinline QuaternionT( const T& r ) : r(r), i(zero), j(zero), k(zero) {}
|
||||
__forceinline explicit QuaternionT( const Vec3<T>& v ) : r(zero), i(v.x), j(v.y), k(v.z) {}
|
||||
__forceinline explicit QuaternionT( const Vec4<T>& v ) : r(v.x), i(v.y), j(v.z), k(v.w) {}
|
||||
__forceinline QuaternionT( const T& r, const T& i, const T& j, const T& k ) : r(r), i(i), j(j), k(k) {}
|
||||
__forceinline QuaternionT( const T& r, const Vec3<T>& v ) : r(r), i(v.x), j(v.y), k(v.z) {}
|
||||
|
||||
@@ -69,25 +78,6 @@ namespace embree
|
||||
template<typename T> __forceinline QuaternionT<T> rcp ( const QuaternionT<T>& a ) { return conj(a)*rcp(a.r*a.r + a.i*a.i + a.j*a.j + a.k*a.k); }
|
||||
template<typename T> __forceinline QuaternionT<T> normalize ( const QuaternionT<T>& a ) { return a*rsqrt(a.r*a.r + a.i*a.i + a.j*a.j + a.k*a.k); }
|
||||
|
||||
// evaluates a*q-r
|
||||
template<typename T> __forceinline QuaternionT<T>
|
||||
msub(const T& a, const QuaternionT<T>& q, const QuaternionT<T>& p)
|
||||
{
|
||||
return QuaternionT<T>(msub(a, q.r, p.r),
|
||||
msub(a, q.i, p.i),
|
||||
msub(a, q.j, p.j),
|
||||
msub(a, q.k, p.k));
|
||||
}
|
||||
// evaluates a*q-r
|
||||
template<typename T> __forceinline QuaternionT<T>
|
||||
madd (const T& a, const QuaternionT<T>& q, const QuaternionT<T>& p)
|
||||
{
|
||||
return QuaternionT<T>(madd(a, q.r, p.r),
|
||||
madd(a, q.i, p.i),
|
||||
madd(a, q.j, p.j),
|
||||
madd(a, q.k, p.k));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Binary Operators
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -119,22 +109,10 @@ namespace embree
|
||||
template<typename T> __forceinline QuaternionT<T>& operator /=( QuaternionT<T>& a, const T & b ) { return a = a*rcp(b); }
|
||||
template<typename T> __forceinline QuaternionT<T>& operator /=( QuaternionT<T>& a, const QuaternionT<T>& b ) { return a = a*rcp(b); }
|
||||
|
||||
template<typename T, typename M> __forceinline QuaternionT<T>
|
||||
select(const M& m, const QuaternionT<T>& q, const QuaternionT<T>& p)
|
||||
{
|
||||
return QuaternionT<T>(select(m, q.r, p.r),
|
||||
select(m, q.i, p.i),
|
||||
select(m, q.j, p.j),
|
||||
select(m, q.k, p.k));
|
||||
}
|
||||
|
||||
|
||||
template<typename T> __forceinline Vec3<T> xfmPoint ( const QuaternionT<T>& a, const Vec3<T>& b ) { return (a*QuaternionT<T>(b)*conj(a)).v(); }
|
||||
template<typename T> __forceinline Vec3<T> xfmVector( const QuaternionT<T>& a, const Vec3<T>& b ) { return (a*QuaternionT<T>(b)*conj(a)).v(); }
|
||||
template<typename T> __forceinline Vec3<T> xfmNormal( const QuaternionT<T>& a, const Vec3<T>& b ) { return (a*QuaternionT<T>(b)*conj(a)).v(); }
|
||||
|
||||
template<typename T> __forceinline T dot(const QuaternionT<T>& a, const QuaternionT<T>& b) { return a.r*b.r + a.i*b.i + a.j*b.j + a.k*b.k; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -201,54 +179,15 @@ namespace embree
|
||||
k = sro*cya*cpi - cro*sya*spi;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> static embree_ostream operator<<(embree_ostream cout, const QuaternionT<T>& q) {
|
||||
template<typename T> static std::ostream& operator<<(std::ostream& cout, const QuaternionT<T>& q) {
|
||||
return cout << "{ r = " << q.r << ", i = " << q.i << ", j = " << q.j << ", k = " << q.k << " }";
|
||||
}
|
||||
|
||||
/*! default template instantiations */
|
||||
typedef QuaternionT<float> Quaternion3f;
|
||||
typedef QuaternionT<double> Quaternion3d;
|
||||
|
||||
template<int N> using Quaternion3vf = QuaternionT<vfloat<N>>;
|
||||
typedef QuaternionT<vfloat<4>> Quaternion3vf4;
|
||||
typedef QuaternionT<vfloat<8>> Quaternion3vf8;
|
||||
typedef QuaternionT<vfloat<16>> Quaternion3vf16;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// Interpolation
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
__forceinline QuaternionT<T>lerp(const QuaternionT<T>& q0,
|
||||
const QuaternionT<T>& q1,
|
||||
const T& factor)
|
||||
{
|
||||
QuaternionT<T> q;
|
||||
q.r = lerp(q0.r, q1.r, factor);
|
||||
q.i = lerp(q0.i, q1.i, factor);
|
||||
q.j = lerp(q0.j, q1.j, factor);
|
||||
q.k = lerp(q0.k, q1.k, factor);
|
||||
return q;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
__forceinline QuaternionT<T> slerp(const QuaternionT<T>& q0,
|
||||
const QuaternionT<T>& q1_,
|
||||
const T& t)
|
||||
{
|
||||
T cosTheta = dot(q0, q1_);
|
||||
QuaternionT<T> q1 = select(cosTheta < 0.f, -q1_, q1_);
|
||||
cosTheta = select(cosTheta < 0.f, -cosTheta, cosTheta);
|
||||
if (unlikely(all(cosTheta > 0.9995f))) {
|
||||
return normalize(lerp(q0, q1, t));
|
||||
}
|
||||
const T phi = t * fastapprox::acos(cosTheta);
|
||||
T sinPhi, cosPhi;
|
||||
fastapprox::sincos(phi, sinPhi, cosPhi);
|
||||
QuaternionT<T> qperp = sinPhi * normalize(msub(cosTheta, q0, q1));
|
||||
return msub(cosPhi, q0, qperp);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-4
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -74,7 +87,7 @@ namespace embree
|
||||
return r0.size() < r1.size();
|
||||
}
|
||||
|
||||
friend embree_ostream operator<<(embree_ostream cout, const range& r) {
|
||||
friend std::ostream& operator<<(std::ostream& cout, const range& r) {
|
||||
return cout << "range [" << r.begin() << ", " << r.end() << "]";
|
||||
}
|
||||
|
||||
@@ -128,7 +141,7 @@ namespace embree
|
||||
_ext_end += plus;
|
||||
}
|
||||
|
||||
friend embree_ostream operator<<(embree_ostream cout, const extended_range& r) {
|
||||
friend std::ostream& operator<<(std::ostream& cout, const extended_range& r) {
|
||||
return cout << "extended_range [" << r.begin() << ", " << r.end() << " (" << r.ext_end() << ")]";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,525 +0,0 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
||||
// Transcendental functions from "ispc": https://github.com/ispc/ispc/
|
||||
// Most of the transcendental implementations in ispc code come from
|
||||
// Solomon Boulos's "syrah": https://github.com/boulos/syrah/
|
||||
|
||||
#include "../simd/simd.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
|
||||
namespace fastapprox
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
__forceinline T sin(const T &v)
|
||||
{
|
||||
static const float piOverTwoVec = 1.57079637050628662109375;
|
||||
static const float twoOverPiVec = 0.636619746685028076171875;
|
||||
auto scaled = v * twoOverPiVec;
|
||||
auto kReal = floor(scaled);
|
||||
auto k = toInt(kReal);
|
||||
|
||||
// Reduced range version of x
|
||||
auto x = v - kReal * piOverTwoVec;
|
||||
auto kMod4 = k & 3;
|
||||
auto sinUseCos = (kMod4 == 1 | kMod4 == 3);
|
||||
auto flipSign = (kMod4 > 1);
|
||||
|
||||
// These coefficients are from sollya with fpminimax(sin(x)/x, [|0, 2,
|
||||
// 4, 6, 8, 10|], [|single...|], [0;Pi/2]);
|
||||
static const float sinC2 = -0.16666667163372039794921875;
|
||||
static const float sinC4 = +8.333347737789154052734375e-3;
|
||||
static const float sinC6 = -1.9842604524455964565277099609375e-4;
|
||||
static const float sinC8 = +2.760012648650445044040679931640625e-6;
|
||||
static const float sinC10 = -2.50293279435709337121807038784027099609375e-8;
|
||||
|
||||
static const float cosC2 = -0.5;
|
||||
static const float cosC4 = +4.166664183139801025390625e-2;
|
||||
static const float cosC6 = -1.388833043165504932403564453125e-3;
|
||||
static const float cosC8 = +2.47562347794882953166961669921875e-5;
|
||||
static const float cosC10 = -2.59630184018533327616751194000244140625e-7;
|
||||
|
||||
auto outside = select(sinUseCos, 1., x);
|
||||
auto c2 = select(sinUseCos, T(cosC2), T(sinC2));
|
||||
auto c4 = select(sinUseCos, T(cosC4), T(sinC4));
|
||||
auto c6 = select(sinUseCos, T(cosC6), T(sinC6));
|
||||
auto c8 = select(sinUseCos, T(cosC8), T(sinC8));
|
||||
auto c10 = select(sinUseCos, T(cosC10), T(sinC10));
|
||||
|
||||
auto x2 = x * x;
|
||||
auto formula = x2 * c10 + c8;
|
||||
formula = x2 * formula + c6;
|
||||
formula = x2 * formula + c4;
|
||||
formula = x2 * formula + c2;
|
||||
formula = x2 * formula + 1.;
|
||||
formula *= outside;
|
||||
|
||||
formula = select(flipSign, -formula, formula);
|
||||
return formula;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T cos(const T &v)
|
||||
{
|
||||
static const float piOverTwoVec = 1.57079637050628662109375;
|
||||
static const float twoOverPiVec = 0.636619746685028076171875;
|
||||
auto scaled = v * twoOverPiVec;
|
||||
auto kReal = floor(scaled);
|
||||
auto k = toInt(kReal);
|
||||
|
||||
// Reduced range version of x
|
||||
auto x = v - kReal * piOverTwoVec;
|
||||
|
||||
auto kMod4 = k & 3;
|
||||
auto cosUseCos = (kMod4 == 0 | kMod4 == 2);
|
||||
auto flipSign = (kMod4 == 1 | kMod4 == 2);
|
||||
|
||||
const float sinC2 = -0.16666667163372039794921875;
|
||||
const float sinC4 = +8.333347737789154052734375e-3;
|
||||
const float sinC6 = -1.9842604524455964565277099609375e-4;
|
||||
const float sinC8 = +2.760012648650445044040679931640625e-6;
|
||||
const float sinC10 = -2.50293279435709337121807038784027099609375e-8;
|
||||
|
||||
const float cosC2 = -0.5;
|
||||
const float cosC4 = +4.166664183139801025390625e-2;
|
||||
const float cosC6 = -1.388833043165504932403564453125e-3;
|
||||
const float cosC8 = +2.47562347794882953166961669921875e-5;
|
||||
const float cosC10 = -2.59630184018533327616751194000244140625e-7;
|
||||
|
||||
auto outside = select(cosUseCos, 1., x);
|
||||
auto c2 = select(cosUseCos, T(cosC2), T(sinC2));
|
||||
auto c4 = select(cosUseCos, T(cosC4), T(sinC4));
|
||||
auto c6 = select(cosUseCos, T(cosC6), T(sinC6));
|
||||
auto c8 = select(cosUseCos, T(cosC8), T(sinC8));
|
||||
auto c10 = select(cosUseCos, T(cosC10), T(sinC10));
|
||||
|
||||
auto x2 = x * x;
|
||||
auto formula = x2 * c10 + c8;
|
||||
formula = x2 * formula + c6;
|
||||
formula = x2 * formula + c4;
|
||||
formula = x2 * formula + c2;
|
||||
formula = x2 * formula + 1.;
|
||||
formula *= outside;
|
||||
|
||||
formula = select(flipSign, -formula, formula);
|
||||
return formula;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline void sincos(const T &v, T &sinResult, T &cosResult)
|
||||
{
|
||||
const float piOverTwoVec = 1.57079637050628662109375;
|
||||
const float twoOverPiVec = 0.636619746685028076171875;
|
||||
auto scaled = v * twoOverPiVec;
|
||||
auto kReal = floor(scaled);
|
||||
auto k = toInt(kReal);
|
||||
|
||||
// Reduced range version of x
|
||||
auto x = v - kReal * piOverTwoVec;
|
||||
auto kMod4 = k & 3;
|
||||
auto cosUseCos = ((kMod4 == 0) | (kMod4 == 2));
|
||||
auto sinUseCos = ((kMod4 == 1) | (kMod4 == 3));
|
||||
auto sinFlipSign = (kMod4 > 1);
|
||||
auto cosFlipSign = ((kMod4 == 1) | (kMod4 == 2));
|
||||
|
||||
const float oneVec = +1.;
|
||||
const float sinC2 = -0.16666667163372039794921875;
|
||||
const float sinC4 = +8.333347737789154052734375e-3;
|
||||
const float sinC6 = -1.9842604524455964565277099609375e-4;
|
||||
const float sinC8 = +2.760012648650445044040679931640625e-6;
|
||||
const float sinC10 = -2.50293279435709337121807038784027099609375e-8;
|
||||
|
||||
const float cosC2 = -0.5;
|
||||
const float cosC4 = +4.166664183139801025390625e-2;
|
||||
const float cosC6 = -1.388833043165504932403564453125e-3;
|
||||
const float cosC8 = +2.47562347794882953166961669921875e-5;
|
||||
const float cosC10 = -2.59630184018533327616751194000244140625e-7;
|
||||
|
||||
auto x2 = x * x;
|
||||
|
||||
auto sinFormula = x2 * sinC10 + sinC8;
|
||||
auto cosFormula = x2 * cosC10 + cosC8;
|
||||
sinFormula = x2 * sinFormula + sinC6;
|
||||
cosFormula = x2 * cosFormula + cosC6;
|
||||
|
||||
sinFormula = x2 * sinFormula + sinC4;
|
||||
cosFormula = x2 * cosFormula + cosC4;
|
||||
|
||||
sinFormula = x2 * sinFormula + sinC2;
|
||||
cosFormula = x2 * cosFormula + cosC2;
|
||||
|
||||
sinFormula = x2 * sinFormula + oneVec;
|
||||
cosFormula = x2 * cosFormula + oneVec;
|
||||
|
||||
sinFormula *= x;
|
||||
|
||||
sinResult = select(sinUseCos, cosFormula, sinFormula);
|
||||
cosResult = select(cosUseCos, cosFormula, sinFormula);
|
||||
|
||||
sinResult = select(sinFlipSign, -sinResult, sinResult);
|
||||
cosResult = select(cosFlipSign, -cosResult, cosResult);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T tan(const T &v)
|
||||
{
|
||||
const float piOverFourVec = 0.785398185253143310546875;
|
||||
const float fourOverPiVec = 1.27323949337005615234375;
|
||||
|
||||
auto xLt0 = v < 0.;
|
||||
auto y = select(xLt0, -v, v);
|
||||
auto scaled = y * fourOverPiVec;
|
||||
|
||||
auto kReal = floor(scaled);
|
||||
auto k = toInt(kReal);
|
||||
|
||||
auto x = y - kReal * piOverFourVec;
|
||||
|
||||
// If k & 1, x -= Pi/4
|
||||
auto needOffset = (k & 1) != 0;
|
||||
x = select(needOffset, x - piOverFourVec, x);
|
||||
|
||||
// If k & 3 == (0 or 3) let z = tan_In...(y) otherwise z = -cot_In0To...
|
||||
auto kMod4 = k & 3;
|
||||
auto useCotan = (kMod4 == 1) | (kMod4 == 2);
|
||||
|
||||
const float oneVec = 1.0;
|
||||
|
||||
const float tanC2 = +0.33333075046539306640625;
|
||||
const float tanC4 = +0.13339905440807342529296875;
|
||||
const float tanC6 = +5.3348250687122344970703125e-2;
|
||||
const float tanC8 = +2.46033705770969390869140625e-2;
|
||||
const float tanC10 = +2.892402000725269317626953125e-3;
|
||||
const float tanC12 = +9.500005282461643218994140625e-3;
|
||||
|
||||
const float cotC2 = -0.3333333432674407958984375;
|
||||
const float cotC4 = -2.222204394638538360595703125e-2;
|
||||
const float cotC6 = -2.11752182804048061370849609375e-3;
|
||||
const float cotC8 = -2.0846328698098659515380859375e-4;
|
||||
const float cotC10 = -2.548247357481159269809722900390625e-5;
|
||||
const float cotC12 = -3.5257363606433500535786151885986328125e-7;
|
||||
|
||||
auto x2 = x * x;
|
||||
T z;
|
||||
if (any(useCotan))
|
||||
{
|
||||
auto cotVal = x2 * cotC12 + cotC10;
|
||||
cotVal = x2 * cotVal + cotC8;
|
||||
cotVal = x2 * cotVal + cotC6;
|
||||
cotVal = x2 * cotVal + cotC4;
|
||||
cotVal = x2 * cotVal + cotC2;
|
||||
cotVal = x2 * cotVal + oneVec;
|
||||
// The equation is for x * cot(x) but we need -x * cot(x) for the tan part.
|
||||
cotVal /= -x;
|
||||
z = cotVal;
|
||||
}
|
||||
auto useTan = !useCotan;
|
||||
if (any(useTan))
|
||||
{
|
||||
auto tanVal = x2 * tanC12 + tanC10;
|
||||
tanVal = x2 * tanVal + tanC8;
|
||||
tanVal = x2 * tanVal + tanC6;
|
||||
tanVal = x2 * tanVal + tanC4;
|
||||
tanVal = x2 * tanVal + tanC2;
|
||||
tanVal = x2 * tanVal + oneVec;
|
||||
// Equation was for tan(x)/x
|
||||
tanVal *= x;
|
||||
z = select(useTan, tanVal, z);
|
||||
}
|
||||
return select(xLt0, -z, z);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T asin(const T &x0)
|
||||
{
|
||||
auto isneg = (x0 < 0.f);
|
||||
auto x = abs(x0);
|
||||
auto isnan = (x > 1.f);
|
||||
|
||||
// sollya
|
||||
// fpminimax(((asin(x)-pi/2)/-sqrt(1-x)), [|0,1,2,3,4,5|],[|single...|],
|
||||
// [1e-20;.9999999999999999]);
|
||||
// avg error: 1.1105439e-06, max error 1.3187528e-06
|
||||
auto v = 1.57079517841339111328125f +
|
||||
x * (-0.21450997889041900634765625f +
|
||||
x * (8.78556668758392333984375e-2f +
|
||||
x * (-4.489909112453460693359375e-2f +
|
||||
x * (1.928029954433441162109375e-2f +
|
||||
x * (-4.3095736764371395111083984375e-3f)))));
|
||||
|
||||
v *= -sqrt(1.f - x);
|
||||
v = v + 1.57079637050628662109375f;
|
||||
|
||||
v = select(v < 0.f, T(0.f), v);
|
||||
v = select(isneg, -v, v);
|
||||
v = select(isnan, T(cast_i2f(0x7fc00000)), v);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T acos(const T &v)
|
||||
{
|
||||
return 1.57079637050628662109375f - asin(v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T atan(const T &v)
|
||||
{
|
||||
const float piOverTwoVec = 1.57079637050628662109375;
|
||||
// atan(-x) = -atan(x) (so flip from negative to positive first)
|
||||
// If x > 1 -> atan(x) = Pi/2 - atan(1/x)
|
||||
auto xNeg = v < 0.f;
|
||||
auto xFlipped = select(xNeg, -v, v);
|
||||
|
||||
auto xGt1 = xFlipped > 1.;
|
||||
auto x = select(xGt1, rcpSafe(xFlipped), xFlipped);
|
||||
|
||||
// These coefficients approximate atan(x)/x
|
||||
const float atanC0 = +0.99999988079071044921875;
|
||||
const float atanC2 = -0.3333191573619842529296875;
|
||||
const float atanC4 = +0.199689209461212158203125;
|
||||
const float atanC6 = -0.14015688002109527587890625;
|
||||
const float atanC8 = +9.905083477497100830078125e-2;
|
||||
const float atanC10 = -5.93664981424808502197265625e-2;
|
||||
const float atanC12 = +2.417283318936824798583984375e-2;
|
||||
const float atanC14 = -4.6721356920897960662841796875e-3;
|
||||
|
||||
auto x2 = x * x;
|
||||
auto result = x2 * atanC14 + atanC12;
|
||||
result = x2 * result + atanC10;
|
||||
result = x2 * result + atanC8;
|
||||
result = x2 * result + atanC6;
|
||||
result = x2 * result + atanC4;
|
||||
result = x2 * result + atanC2;
|
||||
result = x2 * result + atanC0;
|
||||
result *= x;
|
||||
|
||||
result = select(xGt1, piOverTwoVec - result, result);
|
||||
result = select(xNeg, -result, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T atan2(const T &y, const T &x)
|
||||
{
|
||||
const float piVec = 3.1415926536;
|
||||
// atan2(y, x) =
|
||||
//
|
||||
// atan2(y > 0, x = +-0) -> Pi/2
|
||||
// atan2(y < 0, x = +-0) -> -Pi/2
|
||||
// atan2(y = +-0, x < +0) -> +-Pi
|
||||
// atan2(y = +-0, x >= +0) -> +-0
|
||||
//
|
||||
// atan2(y >= 0, x < 0) -> Pi + atan(y/x)
|
||||
// atan2(y < 0, x < 0) -> -Pi + atan(y/x)
|
||||
// atan2(y, x > 0) -> atan(y/x)
|
||||
//
|
||||
// and then a bunch of code for dealing with infinities.
|
||||
auto yOverX = y * rcpSafe(x);
|
||||
auto atanArg = atan(yOverX);
|
||||
auto xLt0 = x < 0.f;
|
||||
auto yLt0 = y < 0.f;
|
||||
auto offset = select(xLt0,
|
||||
select(yLt0, T(-piVec), T(piVec)), 0.f);
|
||||
return offset + atanArg;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T exp(const T &v)
|
||||
{
|
||||
const float ln2Part1 = 0.6931457519;
|
||||
const float ln2Part2 = 1.4286067653e-6;
|
||||
const float oneOverLn2 = 1.44269502162933349609375;
|
||||
|
||||
auto scaled = v * oneOverLn2;
|
||||
auto kReal = floor(scaled);
|
||||
auto k = toInt(kReal);
|
||||
|
||||
// Reduced range version of x
|
||||
auto x = v - kReal * ln2Part1;
|
||||
x -= kReal * ln2Part2;
|
||||
|
||||
// These coefficients are for e^x in [0, ln(2)]
|
||||
const float one = 1.;
|
||||
const float c2 = 0.4999999105930328369140625;
|
||||
const float c3 = 0.166668415069580078125;
|
||||
const float c4 = 4.16539050638675689697265625e-2;
|
||||
const float c5 = 8.378830738365650177001953125e-3;
|
||||
const float c6 = 1.304379315115511417388916015625e-3;
|
||||
const float c7 = 2.7555381529964506626129150390625e-4;
|
||||
|
||||
auto result = x * c7 + c6;
|
||||
result = x * result + c5;
|
||||
result = x * result + c4;
|
||||
result = x * result + c3;
|
||||
result = x * result + c2;
|
||||
result = x * result + one;
|
||||
result = x * result + one;
|
||||
|
||||
// Compute 2^k (should differ for float and double, but I'll avoid
|
||||
// it for now and just do floats)
|
||||
const int fpbias = 127;
|
||||
auto biasedN = k + fpbias;
|
||||
auto overflow = kReal > fpbias;
|
||||
// Minimum exponent is -126, so if k is <= -127 (k + 127 <= 0)
|
||||
// we've got underflow. -127 * ln(2) -> -88.02. So the most
|
||||
// negative float input that doesn't result in zero is like -88.
|
||||
auto underflow = kReal <= -fpbias;
|
||||
const int infBits = 0x7f800000;
|
||||
biasedN <<= 23;
|
||||
// Reinterpret this thing as float
|
||||
auto twoToTheN = asFloat(biasedN);
|
||||
// Handle both doubles and floats (hopefully eliding the copy for float)
|
||||
auto elemtype2n = twoToTheN;
|
||||
result *= elemtype2n;
|
||||
result = select(overflow, cast_i2f(infBits), result);
|
||||
result = select(underflow, 0., result);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Range reduction for logarithms takes log(x) -> log(2^n * y) -> n
|
||||
// * log(2) + log(y) where y is the reduced range (usually in [1/2, 1)).
|
||||
template <typename T, typename R>
|
||||
__forceinline void __rangeReduceLog(const T &input,
|
||||
T &reduced,
|
||||
R &exponent)
|
||||
{
|
||||
auto intVersion = asInt(input);
|
||||
// single precision = SEEE EEEE EMMM MMMM MMMM MMMM MMMM MMMM
|
||||
// exponent mask = 0111 1111 1000 0000 0000 0000 0000 0000
|
||||
// 0x7 0xF 0x8 0x0 0x0 0x0 0x0 0x0
|
||||
// non-exponent = 1000 0000 0111 1111 1111 1111 1111 1111
|
||||
// = 0x8 0x0 0x7 0xF 0xF 0xF 0xF 0xF
|
||||
|
||||
//const int exponentMask(0x7F800000)
|
||||
static const int nonexponentMask = 0x807FFFFF;
|
||||
|
||||
// We want the reduced version to have an exponent of -1 which is
|
||||
// -1 + 127 after biasing or 126
|
||||
static const int exponentNeg1 = (126l << 23);
|
||||
// NOTE(boulos): We don't need to mask anything out since we know
|
||||
// the sign bit has to be 0. If it's 1, we need to return infinity/nan
|
||||
// anyway (log(x), x = +-0 -> infinity, x < 0 -> NaN).
|
||||
auto biasedExponent = intVersion >> 23; // This number is [0, 255] but it means [-127, 128]
|
||||
|
||||
auto offsetExponent = biasedExponent + 1; // Treat the number as if it were 2^{e+1} * (1.m)/2
|
||||
exponent = offsetExponent - 127; // get the real value
|
||||
|
||||
// Blend the offset_exponent with the original input (do this in
|
||||
// int for now, until I decide if float can have & and ¬)
|
||||
auto blended = (intVersion & nonexponentMask) | (exponentNeg1);
|
||||
reduced = asFloat(blended);
|
||||
}
|
||||
|
||||
template <typename T> struct ExponentType { };
|
||||
template <int N> struct ExponentType<vfloat<N>> { typedef vint<N> Ty; };
|
||||
template <> struct ExponentType<float> { typedef int Ty; };
|
||||
|
||||
template <typename T>
|
||||
__forceinline T log(const T &v)
|
||||
{
|
||||
T reduced;
|
||||
typename ExponentType<T>::Ty exponent;
|
||||
|
||||
const int nanBits = 0x7fc00000;
|
||||
const int negInfBits = 0xFF800000;
|
||||
const float nan = cast_i2f(nanBits);
|
||||
const float negInf = cast_i2f(negInfBits);
|
||||
auto useNan = v < 0.;
|
||||
auto useInf = v == 0.;
|
||||
auto exceptional = useNan | useInf;
|
||||
const float one = 1.0;
|
||||
|
||||
auto patched = select(exceptional, one, v);
|
||||
__rangeReduceLog(patched, reduced, exponent);
|
||||
|
||||
const float ln2 = 0.693147182464599609375;
|
||||
|
||||
auto x1 = one - reduced;
|
||||
const float c1 = +0.50000095367431640625;
|
||||
const float c2 = +0.33326041698455810546875;
|
||||
const float c3 = +0.2519190013408660888671875;
|
||||
const float c4 = +0.17541764676570892333984375;
|
||||
const float c5 = +0.3424419462680816650390625;
|
||||
const float c6 = -0.599632322788238525390625;
|
||||
const float c7 = +1.98442304134368896484375;
|
||||
const float c8 = -2.4899270534515380859375;
|
||||
const float c9 = +1.7491014003753662109375;
|
||||
|
||||
auto result = x1 * c9 + c8;
|
||||
result = x1 * result + c7;
|
||||
result = x1 * result + c6;
|
||||
result = x1 * result + c5;
|
||||
result = x1 * result + c4;
|
||||
result = x1 * result + c3;
|
||||
result = x1 * result + c2;
|
||||
result = x1 * result + c1;
|
||||
result = x1 * result + one;
|
||||
|
||||
// Equation was for -(ln(red)/(1-red))
|
||||
result *= -x1;
|
||||
result += toFloat(exponent) * ln2;
|
||||
|
||||
return select(exceptional,
|
||||
select(useNan, T(nan), T(negInf)),
|
||||
result);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T pow(const T &x, const T &y)
|
||||
{
|
||||
auto x1 = abs(x);
|
||||
auto z = exp(y * log(x1));
|
||||
|
||||
// Handle special cases
|
||||
const float twoOver23 = 8388608.0f;
|
||||
auto yInt = y == round(y);
|
||||
auto yOddInt = select(yInt, asInt(abs(y) + twoOver23) << 31, 0); // set sign bit
|
||||
|
||||
// x == 0
|
||||
z = select(x == 0.0f,
|
||||
select(y < 0.0f, T(inf) | signmsk(x),
|
||||
select(y == 0.0f, T(1.0f), asFloat(yOddInt) & x)), z);
|
||||
|
||||
// x < 0
|
||||
auto xNegative = x < 0.0f;
|
||||
if (any(xNegative))
|
||||
{
|
||||
auto z1 = z | asFloat(yOddInt);
|
||||
z1 = select(yInt, z1, std::numeric_limits<float>::quiet_NaN());
|
||||
z = select(xNegative, z1, z);
|
||||
}
|
||||
|
||||
auto xFinite = isfinite(x);
|
||||
auto yFinite = isfinite(y);
|
||||
if (all(xFinite & yFinite))
|
||||
return z;
|
||||
|
||||
// x finite and y infinite
|
||||
z = select(andn(xFinite, yFinite),
|
||||
select(x1 == 1.0f, 1.0f,
|
||||
select((x1 > 1.0f) ^ (y < 0.0f), inf, T(0.0f))), z);
|
||||
|
||||
// x infinite
|
||||
z = select(xFinite, z,
|
||||
select(y == 0.0f, 1.0f,
|
||||
select(y < 0.0f, T(0.0f), inf) | (asFloat(yOddInt) & x)));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
__forceinline T pow(const T &x, float y)
|
||||
{
|
||||
return pow(x, T(y));
|
||||
}
|
||||
|
||||
} // namespace fastapprox
|
||||
|
||||
} // namespace embree
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -190,7 +203,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> __forceinline embree_ostream operator<<(embree_ostream cout, const Vec2<T>& a) {
|
||||
template<typename T> inline std::ostream& operator<<(std::ostream& cout, const Vec2<T>& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ")";
|
||||
}
|
||||
|
||||
|
||||
+16
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -289,7 +302,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator<<(embree_ostream cout, const Vec2fa& a) {
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec2fa& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ")";
|
||||
}
|
||||
|
||||
|
||||
+23
-7
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -200,11 +213,10 @@ namespace embree
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> __forceinline T sqr ( const Vec3<T>& a ) { return dot(a,a); }
|
||||
template<typename T> __forceinline T dot ( const Vec3<T>& a, const Vec3<T>& b ) { return madd(a.x,b.x,madd(a.y,b.y,a.z*b.z)); }
|
||||
template<typename T> __forceinline T length ( const Vec3<T>& a ) { return sqrt(sqr(a)); }
|
||||
template<typename T> __forceinline T rcp_length( const Vec3<T>& a ) { return rsqrt(sqr(a)); }
|
||||
template<typename T> __forceinline Vec3<T> normalize( const Vec3<T>& a ) { return a*rsqrt(sqr(a)); }
|
||||
template<typename T> __forceinline T length ( const Vec3<T>& a ) { return sqrt(dot(a,a)); }
|
||||
template<typename T> __forceinline T rcp_length( const Vec3<T>& a ) { return rsqrt(dot(a,a)); }
|
||||
template<typename T> __forceinline Vec3<T> normalize( const Vec3<T>& a ) { return a*rsqrt(dot(a,a)); }
|
||||
template<typename T> __forceinline T distance ( const Vec3<T>& a, const Vec3<T>& b ) { return length(a-b); }
|
||||
template<typename T> __forceinline Vec3<T> cross ( const Vec3<T>& a, const Vec3<T>& b ) { return Vec3<T>(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x)); }
|
||||
|
||||
@@ -249,7 +261,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> __forceinline embree_ostream operator<<(embree_ostream cout, const Vec3<T>& a) {
|
||||
template<typename T> inline std::ostream& operator<<(std::ostream& cout, const Vec3<T>& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
|
||||
}
|
||||
|
||||
@@ -287,6 +299,8 @@ namespace embree
|
||||
|
||||
template<> __forceinline Vec3<float>::Vec3(const Vec3fa& a) { x = a.x; y = a.y; z = a.z; }
|
||||
|
||||
#if !defined(EMBREE_SYCL_SIMD_LIBRARY) || !defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec3<vfloat4>::Vec3(const Vec3fa& a) {
|
||||
x = a.x; y = a.y; z = a.z;
|
||||
@@ -347,4 +361,6 @@ namespace embree
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec3<vfloat16>::Vec3(const Vec3fa& a) : x(a.x), y(a.y), z(a.z) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
+25
-3
@@ -1,10 +1,30 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SIMD_LIBRARY) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#include "vec3ba_sycl.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -112,7 +132,9 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator<<(embree_ostream cout, const Vec3ba& a) {
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec3ba& a) {
|
||||
return cout << "(" << (a.x ? "1" : "0") << ", " << (a.y ? "1" : "0") << ", " << (a.z ? "1" : "0") << ")";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
#include "../../kernels/gpu/common.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3ba Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3ba
|
||||
{
|
||||
//ALIGNED_STRUCT_(16);
|
||||
|
||||
struct { bool x,y,z; };
|
||||
|
||||
typedef bool Scalar;
|
||||
enum { N = 3 };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba( ) {}
|
||||
//__forceinline Vec3ba( const __m128 input ) : m128(input) {}
|
||||
//__forceinline Vec3ba( const Vec3ba& other ) : m128(other.m128) {}
|
||||
//__forceinline Vec3ba& operator =(const Vec3ba& other) { m128 = other.m128; return *this; }
|
||||
|
||||
__forceinline explicit Vec3ba( bool a ) : x(a), y(a), z(a) {}
|
||||
__forceinline Vec3ba( bool a, bool b, bool c) : x(a), y(b), z(c) {}
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba( FalseTy ) : x(false), y(false), z(false) {}
|
||||
__forceinline Vec3ba( TrueTy ) : x(true), y(true), z(true) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//__forceinline const int& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
//__forceinline int& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba operator !( const Vec3ba& a ) { return Vec3ba(!a.x,!a.y,!a.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba operator &( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x & b.x, a.y & b.y, a.z & b.z); }
|
||||
__forceinline Vec3ba operator |( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x | b.x, a.y | b.y, a.z | b.z); }
|
||||
__forceinline Vec3ba operator ^( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ba& operator &=( Vec3ba& a, const Vec3ba& b ) { return a = a & b; }
|
||||
__forceinline Vec3ba& operator |=( Vec3ba& a, const Vec3ba& b ) { return a = a | b; }
|
||||
__forceinline Vec3ba& operator ^=( Vec3ba& a, const Vec3ba& b ) { return a = a ^ b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators + Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3ba& a, const Vec3ba& b ) {
|
||||
return a.x == b.x && a.y == b.y && a.z == b.z;
|
||||
}
|
||||
__forceinline bool operator !=( const Vec3ba& a, const Vec3ba& b ) {
|
||||
return a.x != b.x || a.y != b.y || a.z != b.z;
|
||||
}
|
||||
/*
|
||||
__forceinline bool operator < ( const Vec3ba& a, const Vec3ba& b ) {
|
||||
if (a.x != b.x) return a.x < b.x;
|
||||
if (a.y != b.y) return a.y < b.y;
|
||||
if (a.z != b.z) return a.z < b.z;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reduction Operations
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool reduce_and( const Vec3ba& a ) { return a.x & a.y & a.z; }
|
||||
__forceinline bool reduce_or ( const Vec3ba& a ) { return a.x | a.y | a.z; }
|
||||
|
||||
__forceinline bool all ( const Vec3ba& b ) { return reduce_and(b); }
|
||||
__forceinline bool any ( const Vec3ba& b ) { return reduce_or(b); }
|
||||
__forceinline bool none ( const Vec3ba& b ) { return !reduce_or(b); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec3ba& a) {
|
||||
return cout;
|
||||
}
|
||||
}
|
||||
+26
-4
@@ -1,10 +1,30 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SIMD_LIBRARY) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#include "vec3fa_sycl.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -39,7 +59,7 @@ namespace embree
|
||||
__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 float x, const float y, const float z) : m128(_mm_set_ps(z, 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; }
|
||||
@@ -357,9 +377,11 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator<<(embree_ostream cout, const Vec3fa& a) {
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec3fa& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
|
||||
}
|
||||
|
||||
typedef Vec3fa Vec3fa_t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
#include "../../kernels/gpu/common.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3fa Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3fa
|
||||
{
|
||||
//ALIGNED_STRUCT_(16);
|
||||
|
||||
typedef float Scalar;
|
||||
enum { N = 3 };
|
||||
struct { float x,y,z; union { int a; unsigned u; float w; }; };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline 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 Vec3fa& other ) { m128 = other.m128; }
|
||||
|
||||
//__forceinline Vec3fa& operator =( const Vec3fa& other ) { m128 = other.m128; return *this; }
|
||||
|
||||
__forceinline explicit Vec3fa( const float a ) : x(a), y(a), z(a), w(a) {}
|
||||
__forceinline Vec3fa( const float x, const float y, const float z) : x(x), y(y), z(z), w(z) {}
|
||||
|
||||
__forceinline Vec3fa( const Vec3fa& other, const int a1) : x(other.x), y(other.y), z(other.z), a(a1) {}
|
||||
__forceinline Vec3fa( const Vec3fa& other, const unsigned a1) : x(other.x), y(other.y), z(other.z), u(a1) {}
|
||||
__forceinline Vec3fa( const Vec3fa& other, const float w1) : x(other.x), y(other.y), z(other.z), w(w1) {}
|
||||
|
||||
//__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) : x(x), y(y), z(z), w(w) {}
|
||||
|
||||
__forceinline explicit Vec3fa( const Vec3ia& a ) : x((float)a.x), y((float)a.y), z((float)a.z), w(0.0f) {}
|
||||
|
||||
//__forceinline operator const __m128&() const { return m128; }
|
||||
//__forceinline operator __m128&() { return m128; }
|
||||
|
||||
friend __forceinline Vec3fa copy_a( const Vec3fa& a, const Vec3fa& b ) { Vec3fa c = a; c.a = b.a; return c; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Loads and Stores
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static __forceinline Vec3fa load( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec3fa(ptr[0],ptr[1],ptr[2],ptr[3]);
|
||||
}
|
||||
|
||||
static __forceinline Vec3fa loadu( const void* const a ) {
|
||||
const float* ptr = (const float*)a;
|
||||
return Vec3fa(ptr[0],ptr[1],ptr[2],ptr[3]);
|
||||
}
|
||||
|
||||
static __forceinline void storeu ( void* a, const Vec3fa& v ) {
|
||||
float* ptr = (float*)a;
|
||||
ptr[0] = v.x; ptr[1] = v.y; ptr[2] = v.z; ptr[3] = v.w;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa( ZeroTy ) : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
|
||||
__forceinline Vec3fa( OneTy ) : x(1.0f), y(1.0f), z(1.0f), w(1.0f) {}
|
||||
__forceinline Vec3fa( PosInfTy ) : x(+INFINITY), y(+INFINITY), z(+INFINITY), w(+INFINITY) {}
|
||||
__forceinline Vec3fa( NegInfTy ) : x(-INFINITY), y(-INFINITY), z(-INFINITY), w(-INFINITY) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//__forceinline const float& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
//__forceinline float& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa operator +( const Vec3fa& a ) { return a; }
|
||||
__forceinline Vec3fa operator -( const Vec3fa& a ) { return Vec3fa(-a.x,-a.y,-a.z); }
|
||||
__forceinline Vec3fa abs ( const Vec3fa& a ) { return Vec3fa(cl::sycl::fabs(a.x),cl::sycl::fabs(a.y),cl::sycl::fabs(a.z)); }
|
||||
__forceinline Vec3fa sign ( const Vec3fa& a ) { return Vec3fa(cl::sycl::sign(a.x),cl::sycl::sign(a.y),cl::sycl::sign(a.z)); }
|
||||
|
||||
//__forceinline Vec3fa rcp ( const Vec3fa& a ) { return Vec3fa(cl::sycl::recip(a.x),cl::sycl::recip(a.y),cl::sycl::recip(a.z)); }
|
||||
__forceinline Vec3fa rcp ( const Vec3fa& a ) { return Vec3fa(__sycl_std::__invoke_native_recip<float>(a.x),__sycl_std::__invoke_native_recip<float>(a.y),__sycl_std::__invoke_native_recip<float>(a.z)); }
|
||||
__forceinline Vec3fa sqrt ( const Vec3fa& a ) { return Vec3fa(cl::sycl::sqrt(a.x),cl::sycl::sqrt(a.y),cl::sycl::sqrt(a.z)); }
|
||||
__forceinline Vec3fa sqr ( const Vec3fa& a ) { return Vec3fa(a.x*a.x,a.y*a.y,a.z*a.z); }
|
||||
|
||||
__forceinline Vec3fa rsqrt( const Vec3fa& a ) { return Vec3fa(cl::sycl::rsqrt(a.x),cl::sycl::rsqrt(a.y),cl::sycl::rsqrt(a.z)); }
|
||||
|
||||
__forceinline Vec3fa zero_fix(const Vec3fa& a) {
|
||||
const float x = cl::sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
|
||||
const float y = cl::sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
|
||||
const float z = cl::sycl::fabs(a.z) < min_rcp_input ? min_rcp_input : a.z;
|
||||
return Vec3fa(x,y,z);
|
||||
}
|
||||
__forceinline Vec3fa rcp_safe(const Vec3fa& a) {
|
||||
return rcp(zero_fix(a));
|
||||
}
|
||||
__forceinline Vec3fa log ( const Vec3fa& a ) {
|
||||
return Vec3fa(cl::sycl::log(a.x),cl::sycl::log(a.y),cl::sycl::log(a.z));
|
||||
}
|
||||
|
||||
__forceinline Vec3fa exp ( const Vec3fa& a ) {
|
||||
return Vec3fa(cl::sycl::exp(a.x),cl::sycl::exp(a.y),cl::sycl::exp(a.z));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa operator +( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x+b.x, a.y+b.y, a.z+b.z); }
|
||||
__forceinline Vec3fa operator -( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x-b.x, a.y-b.y, a.z-b.z); }
|
||||
__forceinline Vec3fa operator *( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x*b.x, a.y*b.y, a.z*b.z); }
|
||||
__forceinline Vec3fa operator *( const Vec3fa& a, const float b ) { return a * Vec3fa(b); }
|
||||
__forceinline Vec3fa operator *( const float a, const Vec3fa& b ) { return Vec3fa(a) * b; }
|
||||
__forceinline Vec3fa operator /( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x/b.x, a.y/b.y, a.z/b.z); }
|
||||
__forceinline Vec3fa operator /( const Vec3fa& a, const float b ) { return Vec3fa(a.x/b, a.y/b, a.z/b); }
|
||||
__forceinline Vec3fa operator /( const float a, const Vec3fa& b ) { return Vec3fa(a/b.x, a/b.y, a/b.z); }
|
||||
|
||||
__forceinline Vec3fa min( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return Vec3fa(cl::sycl::fmin(a.x,b.x), cl::sycl::fmin(a.y,b.y), cl::sycl::fmin(a.z,b.z));
|
||||
}
|
||||
__forceinline Vec3fa max( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return Vec3fa(cl::sycl::fmax(a.x,b.x), cl::sycl::fmax(a.y,b.y), cl::sycl::fmax(a.z,b.z));
|
||||
}
|
||||
|
||||
/*
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fa mini(const Vec3fa& a, const Vec3fa& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_min_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__SSE4_1__)
|
||||
__forceinline Vec3fa maxi(const Vec3fa& a, const Vec3fa& b) {
|
||||
const vint4 ai = _mm_castps_si128(a);
|
||||
const vint4 bi = _mm_castps_si128(b);
|
||||
const vint4 ci = _mm_max_epi32(ai,bi);
|
||||
return _mm_castsi128_ps(ci);
|
||||
}
|
||||
#endif
|
||||
|
||||
__forceinline Vec3fa pow ( const Vec3fa& a, const float& b ) {
|
||||
return Vec3fa(powf(a.x,b),powf(a.y,b),powf(a.z,b));
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Ternary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa madd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y), madd(a.z,b.z,c.z)); }
|
||||
__forceinline Vec3fa msub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y), msub(a.z,b.z,c.z)); }
|
||||
__forceinline Vec3fa nmadd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y), nmadd(a.z,b.z,c.z)); }
|
||||
__forceinline Vec3fa nmsub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y), nmsub(a.z,b.z,c.z)); }
|
||||
|
||||
__forceinline Vec3fa madd ( const float a, const Vec3fa& b, const Vec3fa& c) { return madd(Vec3fa(a),b,c); }
|
||||
__forceinline Vec3fa msub ( const float a, const Vec3fa& b, const Vec3fa& c) { return msub(Vec3fa(a),b,c); }
|
||||
__forceinline Vec3fa nmadd ( const float a, const Vec3fa& b, const Vec3fa& c) { return nmadd(Vec3fa(a),b,c); }
|
||||
__forceinline Vec3fa nmsub ( const float a, const Vec3fa& b, const Vec3fa& c) { return nmsub(Vec3fa(a),b,c); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa& operator +=( Vec3fa& a, const Vec3fa& b ) { return a = a + b; }
|
||||
__forceinline Vec3fa& operator -=( Vec3fa& a, const Vec3fa& b ) { return a = a - b; }
|
||||
__forceinline Vec3fa& operator *=( Vec3fa& a, const Vec3fa& b ) { return a = a * b; }
|
||||
__forceinline Vec3fa& operator *=( Vec3fa& a, const float b ) { return a = a * b; }
|
||||
__forceinline Vec3fa& operator /=( Vec3fa& a, const Vec3fa& b ) { return a = a / b; }
|
||||
__forceinline Vec3fa& operator /=( Vec3fa& a, const float b ) { return a = a / b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float reduce_add(const Vec3fa& v) { return v.x+v.y+v.z; }
|
||||
__forceinline float reduce_mul(const Vec3fa& v) { return v.x*v.y*v.z; }
|
||||
__forceinline float reduce_min(const Vec3fa& v) { return cl::sycl::fmin(cl::sycl::fmin(v.x,v.y),v.z); }
|
||||
__forceinline float reduce_max(const Vec3fa& v) { return cl::sycl::fmax(cl::sycl::fmax(v.x,v.y),v.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3fa& a, const Vec3fa& b ) { return a.x == b.x && a.y == b.y && a.z == b.z; }
|
||||
__forceinline bool operator !=( const Vec3fa& a, const Vec3fa& b ) { return a.x != b.x || a.y != b.y || a.z != b.z; }
|
||||
|
||||
__forceinline Vec3ba eq_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
|
||||
__forceinline Vec3ba neq_mask(const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
|
||||
__forceinline Vec3ba lt_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
|
||||
__forceinline Vec3ba le_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x <= b.x, a.y <= b.y, a.z <= b.z); }
|
||||
__forceinline Vec3ba gt_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
|
||||
__forceinline Vec3ba ge_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x >= b.x, a.y >= b.y, a.z >= b.z); }
|
||||
|
||||
__forceinline bool isvalid ( const Vec3fa& v ) {
|
||||
return all(gt_mask(v,Vec3fa(-FLT_LARGE)) & lt_mask(v,Vec3fa(+FLT_LARGE)));
|
||||
}
|
||||
|
||||
__forceinline bool is_finite ( const Vec3fa& a ) {
|
||||
return all(ge_mask(a,Vec3fa(-FLT_MAX)) & le_mask(a,Vec3fa(+FLT_MAX)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Euclidian Space Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline float dot ( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return reduce_add(a*b);
|
||||
}
|
||||
|
||||
__forceinline Vec3fa cross ( const Vec3fa& a, const Vec3fa& b ) {
|
||||
return Vec3fa(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x));
|
||||
}
|
||||
|
||||
__forceinline float sqr_length ( const Vec3fa& a ) { return dot(a,a); }
|
||||
__forceinline float rcp_length ( const Vec3fa& a ) { return rsqrt(dot(a,a)); }
|
||||
__forceinline float rcp_length2( const Vec3fa& a ) { return rcp(dot(a,a)); }
|
||||
__forceinline float length ( const Vec3fa& a ) { return sqrt(dot(a,a)); }
|
||||
__forceinline Vec3fa normalize( const Vec3fa& a ) { return a*rsqrt(dot(a,a)); }
|
||||
__forceinline float distance ( const Vec3fa& a, const Vec3fa& b ) { return length(a-b); }
|
||||
__forceinline float halfArea ( const Vec3fa& d ) { return madd(d.x,(d.y+d.z),d.y*d.z); }
|
||||
__forceinline float area ( const Vec3fa& d ) { return 2.0f*halfArea(d); }
|
||||
|
||||
__forceinline Vec3fa normalize_safe( const Vec3fa& a ) {
|
||||
const float d = dot(a,a); if (unlikely(d == 0.0f)) return a; else return a*rsqrt(d);
|
||||
}
|
||||
|
||||
/*! differentiated normalization */
|
||||
__forceinline Vec3fa dnormalize(const Vec3fa& p, const Vec3fa& dp)
|
||||
{
|
||||
const float pp = dot(p,p);
|
||||
const float pdp = dot(p,dp);
|
||||
return (pp*dp-pdp*p)*rcp(pp)*rsqrt(pp);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa select( bool s, const Vec3fa& t, const Vec3fa& f ) {
|
||||
return Vec3fa(s ? t.x : f.x, s ? t.y : f.y, s ? t.z : f.z);
|
||||
}
|
||||
|
||||
/*
|
||||
__forceinline Vec3fa select( const Vec3ba& s, const Vec3fa& t, const Vec3fa& f ) {
|
||||
return blendv_ps(f, t, s);
|
||||
}
|
||||
*/
|
||||
|
||||
__forceinline Vec3fa lerp(const Vec3fa& v0, const Vec3fa& v1, const float t) {
|
||||
return madd(1.0f-t,v0,t*v1);
|
||||
}
|
||||
|
||||
__forceinline int maxDim ( const Vec3fa& a )
|
||||
{
|
||||
const Vec3fa b = abs(a);
|
||||
if (b.x > b.y) {
|
||||
if (b.x > b.z) return 0; else return 2;
|
||||
} else {
|
||||
if (b.y > b.z) return 1; else return 2;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Rounding Functions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3fa trunc( const Vec3fa& a ) { return Vec3fa(cl::sycl::trunc(a.x),cl::sycl::trunc(a.y),cl::sycl::trunc(a.z)); }
|
||||
__forceinline Vec3fa floor( const Vec3fa& a ) { return Vec3fa(cl::sycl::floor(a.x),cl::sycl::floor(a.y),cl::sycl::floor(a.z)); }
|
||||
__forceinline Vec3fa ceil ( const Vec3fa& a ) { return Vec3fa(cl::sycl::ceil (a.x),cl::sycl::ceil (a.y),cl::sycl::ceil (a.z)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec3fa& a) {
|
||||
return cout;
|
||||
}
|
||||
|
||||
typedef Vec3fa Vec3fa_t;
|
||||
}
|
||||
+25
-3
@@ -1,10 +1,30 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SIMD_LIBRARY) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#include "vec3ia_sycl.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "../simd/sse.h"
|
||||
|
||||
namespace embree
|
||||
@@ -180,7 +200,9 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator<<(embree_ostream cout, const Vec3ia& a) {
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec3ia& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/alloc.h"
|
||||
#include "math.h"
|
||||
#include "../simd/sse.h"
|
||||
|
||||
#include "../../kernels/gpu/common.h"
|
||||
|
||||
namespace embree
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SSE Vec3ia Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __aligned(16) Vec3ia
|
||||
{
|
||||
ALIGNED_STRUCT_(16);
|
||||
|
||||
struct { int x,y,z; };
|
||||
|
||||
typedef int Scalar;
|
||||
enum { N = 3 };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constructors, Assignment & Cast Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia( ) {}
|
||||
//__forceinline Vec3ia( const __m128i a ) : m128(a) {}
|
||||
//__forceinline Vec3ia( const Vec3ia& other ) : m128(other.m128) {}
|
||||
//__forceinline Vec3ia& operator =(const Vec3ia& other) { m128 = other.m128; return *this; }
|
||||
|
||||
__forceinline explicit Vec3ia( const int a ) : x(a), y(a), z(a) {}
|
||||
__forceinline Vec3ia( const int x, const int y, const int z) : x(x), y(y), z(z) {}
|
||||
//__forceinline explicit Vec3ia( const __m128 a ) : m128(_mm_cvtps_epi32(a)) {}
|
||||
|
||||
//__forceinline operator const __m128i&() const { return m128; }
|
||||
//__forceinline operator __m128i&() { return m128; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia( ZeroTy ) : x(0), y(0), z(0) {}
|
||||
__forceinline Vec3ia( OneTy ) : x(1), y(1), z(1) {}
|
||||
__forceinline Vec3ia( PosInfTy ) : x(0x7FFFFFFF), y(0x7FFFFFFF), z(0x7FFFFFFF) {}
|
||||
__forceinline Vec3ia( NegInfTy ) : x(0x80000000), y(0x80000000), z(0x80000000) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Array Access
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//__forceinline const int& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
|
||||
//__forceinline int& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia operator +( const Vec3ia& a ) { return Vec3ia(+a.x,+a.y,+a.z); }
|
||||
__forceinline Vec3ia operator -( const Vec3ia& a ) { return Vec3ia(-a.x,-a.y,-a.z); }
|
||||
__forceinline Vec3ia abs ( const Vec3ia& a ) { return Vec3ia(cl::sycl::abs(a.x),cl::sycl::abs(a.y),cl::sycl::abs(a.z)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Binary Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia operator +( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x+b.x, a.y+b.y, a.z+b.z); }
|
||||
__forceinline Vec3ia operator +( const Vec3ia& a, const int b ) { return a+Vec3ia(b); }
|
||||
__forceinline Vec3ia operator +( const int a, const Vec3ia& b ) { return Vec3ia(a)+b; }
|
||||
|
||||
__forceinline Vec3ia operator -( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x-b.x, a.y-b.y, a.z-b.z); }
|
||||
__forceinline Vec3ia operator -( const Vec3ia& a, const int b ) { return a-Vec3ia(b); }
|
||||
__forceinline Vec3ia operator -( const int a, const Vec3ia& b ) { return Vec3ia(a)-b; }
|
||||
|
||||
__forceinline Vec3ia operator *( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x*b.x, a.y*b.y, a.z*b.z); }
|
||||
__forceinline Vec3ia operator *( const Vec3ia& a, const int b ) { return a * Vec3ia(b); }
|
||||
__forceinline Vec3ia operator *( const int a, const Vec3ia& b ) { return Vec3ia(a) * b; }
|
||||
|
||||
__forceinline Vec3ia operator &( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x&b.x, a.y&b.y, a.z&b.z); }
|
||||
__forceinline Vec3ia operator &( const Vec3ia& a, const int b ) { return a & Vec3ia(b); }
|
||||
__forceinline Vec3ia operator &( const int a, const Vec3ia& b ) { return Vec3ia(a) & b; }
|
||||
|
||||
__forceinline Vec3ia operator |( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x|b.x, a.y|b.y, a.z|b.z); }
|
||||
__forceinline Vec3ia operator |( const Vec3ia& a, const int b ) { return a | Vec3ia(b); }
|
||||
__forceinline Vec3ia operator |( const int a, const Vec3ia& b ) { return Vec3ia(a) | b; }
|
||||
|
||||
__forceinline Vec3ia operator ^( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x^b.x, a.y^b.y, a.z^b.z); }
|
||||
__forceinline Vec3ia operator ^( const Vec3ia& a, const int b ) { return a ^ Vec3ia(b); }
|
||||
__forceinline Vec3ia operator ^( const int a, const Vec3ia& b ) { return Vec3ia(a) ^ b; }
|
||||
|
||||
__forceinline Vec3ia operator <<( const Vec3ia& a, const int n ) { return Vec3ia(a.x<<n, a.y<<n, a.z<<n); }
|
||||
__forceinline Vec3ia operator >>( const Vec3ia& a, const int n ) { return Vec3ia(a.x>>n, a.y>>n, a.z>>n); }
|
||||
|
||||
__forceinline Vec3ia sll ( const Vec3ia& a, const int b ) { return Vec3ia(a.x<<b, a.y<<b, a.z<<b); }
|
||||
__forceinline Vec3ia sra ( const Vec3ia& a, const int b ) { return Vec3ia(a.x>>b, a.y>>b, a.z>>b); }
|
||||
__forceinline Vec3ia srl ( const Vec3ia& a, const int b ) { return Vec3ia(unsigned(a.x)>>b, unsigned(a.y)>>b, unsigned(a.z)>>b); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Assignment Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia& operator +=( Vec3ia& a, const Vec3ia& b ) { return a = a + b; }
|
||||
__forceinline Vec3ia& operator +=( Vec3ia& a, const int& b ) { return a = a + b; }
|
||||
|
||||
__forceinline Vec3ia& operator -=( Vec3ia& a, const Vec3ia& b ) { return a = a - b; }
|
||||
__forceinline Vec3ia& operator -=( Vec3ia& a, const int& b ) { return a = a - b; }
|
||||
|
||||
__forceinline Vec3ia& operator *=( Vec3ia& a, const Vec3ia& b ) { return a = a * b; }
|
||||
__forceinline Vec3ia& operator *=( Vec3ia& a, const int& b ) { return a = a * b; }
|
||||
|
||||
__forceinline Vec3ia& operator &=( Vec3ia& a, const Vec3ia& b ) { return a = a & b; }
|
||||
__forceinline Vec3ia& operator &=( Vec3ia& a, const int& b ) { return a = a & b; }
|
||||
|
||||
__forceinline Vec3ia& operator |=( Vec3ia& a, const Vec3ia& b ) { return a = a | b; }
|
||||
__forceinline Vec3ia& operator |=( Vec3ia& a, const int& b ) { return a = a | b; }
|
||||
|
||||
__forceinline Vec3ia& operator <<=( Vec3ia& a, const int& b ) { return a = a << b; }
|
||||
__forceinline Vec3ia& operator >>=( Vec3ia& a, const int& b ) { return a = a >> b; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Reductions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline int reduce_add(const Vec3ia& v) { return v.x+v.y+v.z; }
|
||||
__forceinline int reduce_mul(const Vec3ia& v) { return v.x*v.y*v.z; }
|
||||
__forceinline int reduce_min(const Vec3ia& v) { return cl::sycl::min(cl::sycl::min(v.x,v.y),v.z); }
|
||||
__forceinline int reduce_max(const Vec3ia& v) { return cl::sycl::max(cl::sycl::max(v.x,v.y),v.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Comparison Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline bool operator ==( const Vec3ia& a, const Vec3ia& b ) { return a.x == b.x & a.y == b.y & a.z == b.z; }
|
||||
__forceinline bool operator !=( const Vec3ia& a, const Vec3ia& b ) { return a.x != b.x & a.y != b.y & a.z != b.z; }
|
||||
|
||||
/*
|
||||
__forceinline bool operator < ( const Vec3ia& a, const Vec3ia& b ) {
|
||||
if (a.x != b.x) return a.x < b.x;
|
||||
if (a.y != b.y) return a.y < b.y;
|
||||
if (a.z != b.z) return a.z < b.z;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
__forceinline Vec3ba eq_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
|
||||
__forceinline Vec3ba lt_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
|
||||
__forceinline Vec3ba gt_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Select
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline Vec3ia select( const Vec3ba& m, const Vec3ia& t, const Vec3ia& f ) {
|
||||
const int x = m.x ? t.x : f.x;
|
||||
const int y = m.y ? t.y : f.y;
|
||||
const int z = m.z ? t.z : f.z;
|
||||
return Vec3ia(x,y,z);
|
||||
}
|
||||
|
||||
__forceinline Vec3ia min( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(cl::sycl::min(a.x,b.x), cl::sycl::min(a.y,b.y), cl::sycl::min(a.z,b.z)); }
|
||||
__forceinline Vec3ia max( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(cl::sycl::max(a.x,b.x), cl::sycl::max(a.y,b.y), cl::sycl::max(a.z,b.z)); }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& cout, const Vec3ia& a) {
|
||||
return cout;
|
||||
}
|
||||
}
|
||||
+21
-3
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -183,7 +196,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T> __forceinline embree_ostream operator<<(embree_ostream cout, const Vec4<T>& a) {
|
||||
template<typename T> inline std::ostream& operator<<(std::ostream& cout, const Vec4<T>& a) {
|
||||
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ", " << a.w << ")";
|
||||
}
|
||||
|
||||
@@ -221,6 +234,8 @@ namespace embree
|
||||
{
|
||||
template<> __forceinline Vec4<float>::Vec4( const Vec3fa& a ) { x = a.x; y = a.y; z = a.z; w = a.w; }
|
||||
|
||||
#if !defined(EMBREE_SYCL_SIMD_LIBRARY) || !defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
#if defined(__AVX__)
|
||||
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fa& a ) {
|
||||
x = a.x; y = a.y; z = a.z; w = a.w;
|
||||
@@ -255,4 +270,7 @@ namespace embree
|
||||
#if defined(__AVX512F__)
|
||||
template<> __forceinline Vec4<vfloat16>::Vec4( const Vec3fa& a ) : x(a.x), y(a.y), z(a.z), w(a.w) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
## Copyright 2009-2020 Intel Corporation
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
## ======================================================================== ##
|
||||
## Copyright 2009-2019 Intel Corporation ##
|
||||
## ##
|
||||
## Licensed under the Apache License, Version 2.0 (the "License"); ##
|
||||
## you may not use this file except in compliance with the License. ##
|
||||
## You may obtain a copy of the License at ##
|
||||
## ##
|
||||
## http://www.apache.org/licenses/LICENSE-2.0 ##
|
||||
## ##
|
||||
## Unless required by applicable law or agreed to in writing, software ##
|
||||
## distributed under the License is distributed on an "AS IS" BASIS, ##
|
||||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
|
||||
## See the License for the specific language governing permissions and ##
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
ADD_LIBRARY(simd STATIC sse.cpp)
|
||||
SET_PROPERTY(TARGET simd PROPERTY FOLDER common)
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+22
-9
@@ -1,9 +1,27 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../math/math.h"
|
||||
#include "../../kernels/gpu/common.h"
|
||||
|
||||
#if defined(EMBREE_SYCL_SIMD_LIBRARY) && defined(__SYCL_DEVICE_ONLY__)
|
||||
# include "sycl.h"
|
||||
#else
|
||||
|
||||
/* include SSE wrapper classes */
|
||||
#if defined(__SSE__)
|
||||
@@ -22,13 +40,6 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
template <int N>
|
||||
__forceinline vbool<N> isfinite(const vfloat<N>& v)
|
||||
{
|
||||
return (v >= vfloat<N>(-std::numeric_limits<float>::max()))
|
||||
& (v <= vfloat<N>( std::numeric_limits<float>::max()));
|
||||
}
|
||||
|
||||
/* foreach unique */
|
||||
template<typename vbool, typename vint, typename Closure>
|
||||
__forceinline void foreach_unique(const vbool& valid0, const vint& vi, const Closure& closure)
|
||||
@@ -108,3 +119,5 @@ namespace embree
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#include "sse.h"
|
||||
|
||||
|
||||
+15
-2
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../sys/platform.h"
|
||||
#include "../sys/intrinsics.h"
|
||||
#include "../sys/alloc.h"
|
||||
#include "../math/constants.h"
|
||||
#include "varying.h"
|
||||
|
||||
#include "vbooln_sycl.h"
|
||||
#include "vintn_sycl.h"
|
||||
#include "vfloatn_sycl.h"
|
||||
+49
-5
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -7,6 +20,35 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
#if defined(EMBREE_SYCL_SIMD_LIBRARY) && defined(__SYCL_DEVICE_ONLY__)
|
||||
|
||||
/* Varying numeric types */
|
||||
template<int N> struct vfloat;
|
||||
template<int N> struct vdouble;
|
||||
template<int N> struct vint;
|
||||
template<int N> struct vuint;
|
||||
template<int N> struct vllong;
|
||||
template<int N> struct vboolf; // for float/int
|
||||
template<int N> struct vboold; // for double/long long
|
||||
|
||||
/* Aliases to default types */
|
||||
template<int N> using vreal = vfloat<N>;
|
||||
template<int N> using vbool = vboolf<N>;
|
||||
|
||||
/* Varying size constants */
|
||||
const int VSIZEX = 16; // default size
|
||||
const int VSIZEL = 16; // large size
|
||||
|
||||
/* Extends varying size N to optimal or up to max(N, N2) */
|
||||
template<int N, int N2 = VSIZEX>
|
||||
struct vextend
|
||||
{
|
||||
static const int size = N;
|
||||
#define SIMD_MODE(N) N, N
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
/* Varying numeric types */
|
||||
template<int N>
|
||||
struct vfloat
|
||||
@@ -15,7 +57,7 @@ namespace embree
|
||||
__forceinline const float& operator [](size_t index) const { assert(index < N); return f[index]; }
|
||||
__forceinline float& operator [](size_t index) { assert(index < N); return f[index]; }
|
||||
};
|
||||
|
||||
|
||||
template<int N>
|
||||
struct vdouble
|
||||
{
|
||||
@@ -31,7 +73,7 @@ namespace embree
|
||||
__forceinline const int& operator [](size_t index) const { assert(index < N); return i[index]; }
|
||||
__forceinline int& operator [](size_t index) { assert(index < N); return i[index]; }
|
||||
};
|
||||
|
||||
|
||||
template<int N>
|
||||
struct vuint
|
||||
{
|
||||
@@ -51,7 +93,7 @@ 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>;
|
||||
@@ -86,6 +128,8 @@ namespace embree
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* 4-wide shortcuts */
|
||||
typedef vfloat<4> vfloat4;
|
||||
typedef vdouble<4> vdouble4;
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -148,7 +161,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator <<(embree_ostream cout, const vboold4& a) {
|
||||
inline std::ostream& operator <<(std::ostream& cout, const vboold4& a) {
|
||||
return cout << "<" << a[0] << ", " << a[1] << ", " << a[2] << ", " << a[3] << ", "
|
||||
<< a[4] << ", " << a[5] << ", " << a[6] << ", " << a[7] << ">";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -129,7 +142,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator <<(embree_ostream cout, const vboold4& a)
|
||||
inline std::ostream& operator <<(std::ostream& cout, const vboold4& a)
|
||||
{
|
||||
cout << "<";
|
||||
for (size_t i=0; i<4; i++) {
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -137,7 +150,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator <<(embree_ostream cout, const vboold8& a)
|
||||
inline std::ostream& operator <<(std::ostream& cout, const vboold8& a)
|
||||
{
|
||||
cout << "<";
|
||||
for (size_t i=0; i<8; i++) {
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -139,7 +152,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator <<(embree_ostream cout, const vboolf16& a)
|
||||
inline std::ostream& operator <<(std::ostream& cout, const vboolf16& a)
|
||||
{
|
||||
cout << "<";
|
||||
for (size_t i=0; i<16; i++) {
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// ======================================================================== //
|
||||
// Copyright 2009-2019 Intel Corporation //
|
||||
// //
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"); //
|
||||
// you may not use this file except in compliance with the License. //
|
||||
// You may obtain a copy of the License at //
|
||||
// //
|
||||
// http://www.apache.org/licenses/LICENSE-2.0 //
|
||||
// //
|
||||
// Unless required by applicable law or agreed to in writing, software //
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, //
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
|
||||
// See the License for the specific language governing permissions and //
|
||||
// limitations under the License. //
|
||||
// ======================================================================== //
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -132,7 +145,7 @@ namespace embree
|
||||
/// Output Operators
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__forceinline embree_ostream operator <<(embree_ostream cout, const vboolf4& a)
|
||||
inline std::ostream& operator <<(std::ostream& cout, const vboolf4& a)
|
||||
{
|
||||
cout << "<";
|
||||
for (size_t i=0; i<4; i++) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user