Compare commits

..
4 Commits
Author SHA1 Message Date
Sven Woop 86dbc8a437 fixed comments 2018-12-13 08:41:14 +01:00
Sven Woop 4c93274a31 added support for arbitrary SAH block size 2018-12-13 08:39:06 +01:00
Sven Woop bd7ea15f50 replaced logBlockSize by sahBlockSize 2018-12-13 08:22:12 +01:00
Sven Woop 1df9591a8c replaced logBlockSize by sahBlockSize 2018-12-13 07:53:13 +01:00
945 changed files with 21954 additions and 78723 deletions
-7
View File
@@ -1,7 +0,0 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
-1
View File
@@ -11,4 +11,3 @@
*.jpg binary
*.png binary
*.pdf binary
*.rc text working-tree-encoding=UTF-16LE-BOM eol=CRLF
+1 -1
View File
@@ -7,8 +7,8 @@ x64
.DS_Store
kernels/config.h
kernels/hash.h
include/embree3/rtcore_config.h
build
models
tbb
doc/intelstyle
+246 -239
View File
@@ -1,466 +1,462 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## 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-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]
continuous-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:3"
tags: [win7, v120]
only: [pushes]
continuous-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-SSE2-TBB2019.2:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2019.2 intensity:2"
tags: [win10, v120]
only: [pushes]
#continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1.12.0-SSE2-TBB2019.9:
# script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
# tags: [win10, v140]
#continuous-windows-Win32-RelWithDebInfo-V140-ISPC1.9.2-AVX2-TBB2017:
# script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:2"
# tags: [win7, 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]
continuous-windows-x64-RelWithDebInfo-V141-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:3"
tags: [win7, v141]
only: [pushes]
continuous-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2019.9:
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
tags: [mac]
continuous-macosx-x64-RelWithDebInfo-CLANG-ISPC1.9.2-AVX2-TBB2017:
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:3"
tags: [mac, clang]
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]
continuous-linux-skx-x64-RelWithDebInfo-ICC17-ISPC1.9.2-AVX512SKX-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC17 ispc:ispc1.9.2 isa:AVX512SKX tasking:TBB2017 intensity:3"
tags: [docker, skx]
only: [pushes]
continuous-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
continuous-linux-skx-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX512SKX-TBB2017:
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]
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX512SKX tasking:TBB2017 intensity:3"
tags: [docker, skx]
only: [pushes]
#continuous-linux-knl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512KNL-TBB2019.9:
#continuous-linux-knl-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX512KNL-TBB2017:
# 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"
# script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX512KNL tasking:TBB2017 intensity:3"
# tags: [docker-knl]
# only: [pushes]
continuous-linux-x64-Debug-CLANG5.0.0-ISPC1.12.0-AVX2-INT-ADDRSANITIZER:
continuous-linux-x64-RelWithDebInfo-CLANG5-ISPC1.9.2-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG5 ispc:ispc1.9.2 isa:AVX2 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-ubuntu17.10-x64-RelWithDebInfo-GCC-ISPC1.9.2-AVX2-TBB:
image: embreedocker/ubuntu:17.10
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 tasking:TBB intensity:3"
tags: [docker]
only: [pushes]
continuous-centos7.4-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
continuous-centos7.4-x64-RelWithDebInfo-GCC-ISPC1.9.2-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 tasking:TBB intensity:3"
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]
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:3"
tags: [docker, skx]
only: [pushes]
continuous-linux-x64-Debug-GCC-ISPC1.12.0-SSE2-TBB-KLOCKWORK:
continuous-linux-x64-RelWithDebInfo-GCC-ISPC1.9.2-AVX2-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 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]
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:SSE2 tasking:INT intensity:4"
tags: [win7, v120]
only: [schedules]
nightly-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-AVX-TBB2019.2:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:AVX tasking:TBB2019.2 intensity:4"
tags: [win10, v120, avx]
nightly-windows-x64-RelWithDebInfo-V120-ISPC1.9.2-AVX-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V120 ispc:ispc1.9.2 isa:AVX tasking:TBB2017 intensity:4"
tags: [win7, v120] # avx
only: [schedules]
nightly-windows-Win32-RelWithDebInfo-V140-ISPC1.12.0-SSE2-TBB2019.9:
script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:2"
tags: [win10, v140]
nightly-windows-Win32-RelWithDebInfo-V140-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:2"
tags: [win7, 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]
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-AVX2-PPL:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX2 tasking:PPL intensity:4"
tags: [win7, v140] # avx2
only: [schedules]
nightly-windows-x64-RelWithDebInfo-V141-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:2 STATIC_LIB:ON"
tags: [win10, v141]
nightly-windows-x64-RelWithDebInfo-V141-ISPC1.9.2-AVX2-TBB2017-STATIC:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4 STATIC_LIB:ON"
tags: [win7, v141]
only: [schedules]
nightly-windows-x64-RelWithDebInfo-V142-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:V142 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:2"
tags: [win10, v142]
nightly-windows-x64-RelWithDebInfo-CLANG-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4"
tags: [win7, clang]
only: [schedules]
nightly-windows-x64-RelWithDebInfo-LLVM-CLANG-ISPC1.12.0-AVX2-TBB2019.9-NAMESPACE:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:LLVM_CLANG ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4 api_namespace:myembree"
tags: [win10, llvm_clang]
nightly-windows-x64-RelWithDebInfo-ICC16-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC16 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4"
tags: [win7, 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]
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC17 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4"
tags: [win7, 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-ICC18-ISPC1.9.2-AVX2-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC18 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:3"
tags: [win7, icc18]
only: [schedules]
nightly-windows-x64-RelWithDebInfo-ICC19-ISPC1.12.0-AVX512SKX-TBB2019.9:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC19-VC14 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:2"
tags: [win10, icc19, avx512vl]
nightly-windows-x64-RelWithDebInfo-ICC18-ISPC1.9.2-AVX512SKX-TBB2017:
script: "python scripts\\test.py platform:x64 build:RelWithDebInfo compiler:ICC18 ispc:ispc1.9.2 isa:AVX512SKX tasking:TBB2017 intensity:1 sde:skx"
tags: [win7, icc18]
only: [schedules]
# CLANG compilation and testing of different ISAs
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2019.9-NAMESPACE:
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:4"
tags: [mac]
nightly-macosx-x64-RelWithDebInfo-CLANG-ISPC1.9.2-SSE2-TBB2017:
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.9.2 isa:SSE2 tasking:TBB2017 intensity:4"
tags: [mac, clang]
only: [schedules]
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-AVX-INT:
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:AVX tasking:INT intensity:4"
tags: [mac] # avx
nightly-macosx-x64-RelWithDebInfo-CLANG-ISPC1.9.2-AVX-INT:
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.9.2 isa:AVX tasking:INT intensity:4"
tags: [mac, clang] # avx
only: [schedules]
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2019.9-STATIC:
script: "scripts/test.py platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"
tags: [mac] # avx2
nightly-macosx-x64-RelWithDebInfo-CLANG-ISPC1.9.2-AVX2-TBB2017-STATIC:
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4 STATIC_LIB:ON"
tags: [mac, clang] # 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]
nightly-macosx-x64-RelWithDebInfo-ICC15-ISPC1.9.2-AVX-INT:
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC15 ispc:ispc1.9.2 isa:AVX tasking:INT intensity:4"
tags: [mac, icc15]
only: [schedules]
nightly-macosx-x64-Debug-ICC2020.1-ISPC1.12.0-AVX2-TBB2019.9:
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.12.0 isa:AVX2 tasking:TBB2019.9 intensity:4"
tags: [mac]
nightly-macosx-x64-RelWithDebInfo-ICC16-ISPC1.9.2-AVX2-TBB2017:
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC16 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4"
tags: [mac, icc16]
only: [schedules]
# CLANG compilation and testing of different ISAs
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-SSE2-TBB-NAMESPACE:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-SSE2-TBB:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2017 intensity:4"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX-TBB2019.9-VALGRIND:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX tasking:TBB2017 intensity:4 memcheck:ON"
tags: [docker] # avx
only: [schedules]
nightly-linux-x64-Debug-CLANG5.0.0-ISPC1.12.0-AVX2-INT-ADDRSANITIZER:
nightly-linux-x64-RelWithDebInfo-CLANG5-ISPC1.9.2-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG5 ispc:ispc1.9.2 isa:AVX2 tasking:INT intensity:2 addrsanitizer:ON"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-STATIC:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 intensity:4 STATIC_LIB:ON"
tags: [docker] # avx2
only: [schedules]
nightly-linux-knl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512KNL-TBB2019.9:
nightly-linux-knl-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX512KNL-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX512KNL tasking:TBB2017 intensity:3"
tags: [docker-knl]
only: [schedules]
nightly-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
nightly-linux-skx-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX512SKX-TBB2017:
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]
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX512SKX tasking:TBB2017 intensity:3"
tags: [docker, skx]
only: [schedules]
# GCC compilation and testing of different ISAs
nightly-linux-x64-Debug-GCC-ISPC1.12.0-SSE2-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-GCC-ISPC1.9.2-SSE2-TBB2017:
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]
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:SSE2 tasking:TBB2017 intensity:4"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-GCC-ISPC1.12.0-AVX-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-GCC-ISPC1.9.2-AVX-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX tasking:TBB2017 intensity:4"
tags: [docker] # avx
only: [schedules]
nightly-linux-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-GCC-ISPC1.9.2-AVX2-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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"
nightly-linux-x64-RelWithDebInfo-ICC15-ISPC1.9.2-SSE2-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC15 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2017 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"
nightly-linux-x64-RelWithDebInfo-ICC16-ISPC1.9.2-AVX-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC16 ispc:ispc1.9.2 isa:AVX tasking:TBB2017 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"
nightly-linux-x64-RelWithDebInfo-ICC17-ISPC1.9.2-AVX2-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC17 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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"
nightly-linux-knl-x64-RelWithDebInfo-ICC17-ISPC1.9.2-AVX512KNL-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC17 ispc:ispc1.9.2 isa:AVX512KNL tasking:TBB2017 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]
nightly-linux-skx-x64-RelWithDebInfo-ICC17-ISPC1.9.2-AVX512SKX-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC17 ispc:ispc1.9.2 isa:AVX512SKX tasking:TBB2017 intensity:4"
tags: [docker, skx]
only: [schedules]
nightly-linux-avx512vl-x64-Debug-ICC2018.0-ISPC1.12.0-AVX512SKX-TBB2019.9:
image: embreedocker/fedora:26
script: "scripts/test.py platform:x64 build:Debug compiler:ICC2018.0 ispc:ispc1.12.0 isa:AVX512SKX tasking:TBB2019.9 intensity:4"
tags: [docker, avx512vl]
nightly-linux-skx-x64-RelWithDebInfo-ICC18-ISPC1.9.2-AVX512SKX-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC18 ispc:ispc1.9.2 isa:AVX512SKX tasking:TBB2017 intensity:4"
tags: [docker, skx]
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"
nightly-linux-x64-RelWithDebInfo-ICC19-ISPC1.9.2-AVX2-TBB2017:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:ICC19 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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-ubuntu17.10-x64-RelWithDebInfo-GCC-ISPC1.9.2-AVX2-TBB:
image: embreedocker/ubuntu:17.10
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 tasking:TBB intensity:3"
tags: [docker]
only: [schedules]
nightly-ubuntu16.04-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
nightly-ubuntu16.04-x64-RelWithDebInfo-GCC-ISPC1.9.2-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 tasking:TBB intensity:3"
tags: [docker]
only: [schedules]
nightly-centos7.4-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB:
nightly-centos7.4-x64-RelWithDebInfo-GCC-ISPC1.9.2-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 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]
nightly-centos7.0-x64-RelWithDebInfo-GCC-ISPC1.9.2-AVX2-TBB:
image: embreedocker/centos:7.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 isa:AVX2 tasking:TBB intensity:3"
tags: [docker]
only: [schedules]
nightly-fedora28-x64-Debug-GCC-ISPC-AVX512SKX-TBB:
nightly-centos6.0-x64-RelWithDebInfo-GCC4.8.2-ISPC1.9.2-AVX2-TBB:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:GCC ispc:ispc1.9.2 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: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]
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-Debug-GCC-ISPC-AVX2-TBB:
nightly-fedora27-x64-RelWithDebInfo-GCC-ISPC-AVX512SKX-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]
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-Debug-GCC-ISPC-AVX2-TBB:
nightly-fedora26-x64-RelWithDebInfo-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"
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-Debug-GCC-ISPC-AVX2-TBB:
nightly-fedora25-x64-RelWithDebInfo-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"
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-Debug-CLANG4.0.0-AVX2-TBB2019.9-NO-ISPC:
nightly-linux-x64-RelWithDebInfo-CLANG4-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 ISPC_SUPPORT:OFF intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-TUTORIALS:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 TUTORIALS:OFF intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-BACKFACECULLING:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 FILTER_FUNCTION:OFF intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-RAYMASKS:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 RAY_MASK:ON intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-NO-PACKETS:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 RAY_PACKETS:OFF intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-STATCOUNTER:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-ISAS-SSE2-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isas:SSE2 tasking:TBB2017 intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-SSE42-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-ISAS-SSE42-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isas:SSE42 tasking:TBB2017 intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-AVX-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-ISAS-AVX-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isas:AVX tasking:TBB2017 intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-AVX2-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-ISAS-AVX2-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isas:AVX2 tasking:TBB2017 intensity:0"
tags: [docker]
only: [schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-ISAS-AVX512SKX-TBB2019.9:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-ISAS-AVX512SKX-TBB2017:
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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isas:AVX512SKX tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 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:
nightly-linux-x64-RelWithDebInfo-CLANG4-ISPC1.9.2-AVX2-TBB2017-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"
script: "scripts/test.py platform:x64 build:RelWithDebInfo compiler:CLANG4 ispc:ispc1.9.2 isa:AVX2 tasking:TBB2017 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:ON intensity:0"
tags: [docker]
only: [schedules]
@@ -469,61 +465,72 @@ nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-AVX2-TBB2019.9-INSTANCE:
# Release Builds
####################################################################
release-windows-x64-Release-ICC17-VC12-ISPC1.9.2-TBB2019.2-PACKAGE-ZIP:
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC17-VC12 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB2019.2 intensity:4 package:ZIP"
tags: [win10, icc17, avx512vl]
only: [web, schedules]
release-windows-x64-Release-ICC17-VC12-ISPC1.9.2-TBB2017-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:TBB2017 intensity:4 package:ZIP"
tags: [win7, 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, avx512vl]
only: [web, schedules]
release-windows-x64-Release-ICC17-VC14-ISPC1.9.2-TBB2017-PACKAGE-ZIP:
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC17-VC14 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB2017 intensity:4 package:ZIP"
tags: [win7, 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, avx512vl]
only: [web, schedules]
release-windows-x64-Release-ICC17-ISPC1.9.2-TBB2017-PACKAGE-MSI:
script: "python scripts\\test.py platform:x64 build:Release compiler:ICC17 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2-AVX512SKX tasking:TBB2017 intensity:4 package:MSI"
tags: [win7, icc17]
only: [web]
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]
release-macosx-x64-Release-ICC16-ISPC1.9.2-TBB2017-PACKAGE-ZIP:
script: "scripts/test.py platform:x64 build:Release compiler:ICC16 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2017 intensity:4 package:ZIP"
tags: [mac, icc16]
only: [web]
artifacts:
name: "$CI_JOB_NAME"
paths: [build/*.zip]
paths: [build/*.tar.gz]
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]
release-macosx-x64-Release-ICC16-ISPC1.9.2-TBB-PACKAGE-PKG:
script: "scripts/test.py platform:x64 build:Release compiler:ICC16 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB intensity:4 package:PKG"
tags: [mac, icc16]
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: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]
release-linux-x64-Release-ICC17-ISPC1.9.2-TBB2017-PACKAGE-ZIP:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:Release compiler:ICC17 ispc:ispc1.9.2 isas:SSE2-SSE42-AVX-AVX2-AVX512KNL-AVX512SKX tasking:TBB2017 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-ICC17-ISPC1.9.2-TBB-PACKAGE-RPM:
image: embreedocker/centos:6.0
script: "scripts/test.py platform:x64 build:Release compiler:ICC17 ispc:ispc1.9.2 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]
-99
View File
@@ -1,105 +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
- Removed point query alignment in ISPC header
### New Features in Embree 3.6
- Added Catmull-Rom curve types.
- Added support for multi-level instancing.
- Added support for point queries.
- Fixed a bug preventing normal oriented curves being used unless timesteps were
specified.
- Fixed bug in external BVH builder when configured for dynamic build.
- Added support for new config flag "user_threads=N" to device initialization
which sets the number of threads used by TBB but created by the user.
- Fixed automatic vertex buffer padding when using rtcSetNewGeometry API function.
### New Features in Embree 3.5.2
- Added EMBREE_API_NAMESPACE cmake option that allows to put all Embree API functions
inside a user defined namespace.
- Added EMBREE_LIBRARY_NAME cmake option that allows to rename the Embree library.
- When Embree is compiled as static library, EMBREE_STATIC_LIB has no longer to get
defined before including the Embree API headers.
- Added CPU frequency_level device configuration to allow an application to specify the
frequency level it wants to run on. This forces Embree to not use optimizations that
may reduce the CPU frequency below that level. By default Embree is configured to the
the AVX-heavy frequency level, thus if the application uses solely non-AVX code, configuring
the Embree device with "frequency_level=simd128" may give better performance.
- Fixed a bug in the spatial split builder which caused it to fail
for scenes with more than 2^24 geometries.
### New Features in Embree 3.5.1
- Fixed ray/sphere intersector to work also for non-normalized rays.
- Fixed self intersection avoidance for ray oriented discs when
non-normalized rays were used.
- Increased maximal face valence for subdiv patch to 64 and reduced stack size
requirement for subdiv patch evaluation.
### New Features in Embree 3.5.0
- Changed normal oriented curve definition to fix waving artefacts.
- Fixed bounding issue for normal oriented motion blurred curves.
- Fixed performance issue with motion blurred point geometry.
- Fixed generation of documentation with new pandoc versions.
### New Features in Embree 3.4.0
- Added point primitives (spheres, ray-oriented discs, normal-oriented discs).
- Fixed crash triggered by scenes with only invalid primitives.
- Improved robustness of quad/grid-based intersectors.
- Upgraded to TBB 2019.2 for release builds.
### New Features in Embree 3.3.0
- Added support for motion blur time range per geometry. This way geometries
can appear and disappear during the camera shutter and time steps do not have
+42 -93
View File
@@ -1,8 +1,21 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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_MINOR 3)
SET(EMBREE_VERSION_PATCH 0)
SET(EMBREE_VERSION_NOTE "")
@@ -14,26 +27,21 @@ PROJECT(embree${EMBREE_VERSION_MAJOR})
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
# We use our own strip tool on macOS to sign during install. This is required as CMake modifies RPATH of the binary during install.
IF (APPLE AND EMBREE_SIGN_FILE)
SET(EMBREE_STRIP ${CMAKE_STRIP})
SET(CMAKE_STRIP ${PROJECT_BINARY_DIR}/post_install_target.sh)
CONFIGURE_FILE(scripts/post_install_target.sh.in ${PROJECT_BINARY_DIR}/post_install_target.sh @ONLY)
ENDIF()
MACRO (SIGN_TARGET target)
IF (EMBREE_SIGN_FILE)
IF (WIN32)
# on Windows we sign and do not strip as debug symbols not included in binary
# on Windows we only strip as debug symbols not included in binary
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND ${EMBREE_SIGN_FILE} $<TARGET_FILE:${target}>)
COMMAND ${EMBREE_SIGN_FILE} -vv -c embree $<TARGET_FILE:${target}>)
ELSEIF (APPLE)
# on MacOSX we strip and sign here for testing purposes but also during install, as CMake modifies binary during install
# on MacOSX we strip and sign
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND ${EMBREE_STRIP} -x $<TARGET_FILE:${target}>
COMMAND ${EMBREE_SIGN_FILE} -o runtime -e ${CMAKE_SOURCE_DIR}/common/cmake/embree.entitlements $<TARGET_FILE:${target}>)
COMMAND ${CMAKE_STRIP} -x $<TARGET_FILE:${target}>
COMMAND ${EMBREE_SIGN_FILE} -vv -c embree $<TARGET_FILE:${target}>)
ELSE()
# on Linux signing of binaries is not supported and stripping is done during install
# on Linux just strip as signing not supported
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_STRIP} -x $<TARGET_FILE:${target}>)
ENDIF()
ENDIF()
ENDMACRO()
@@ -53,6 +61,15 @@ IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
ENDIF()
ENDIF()
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/rtcore_version.h.in"
"${PROJECT_SOURCE_DIR}/include/embree3/rtcore_version.h"
)
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/hash.h.in"
"${PROJECT_SOURCE_DIR}/kernels/hash.h"
)
IF(COMMAND cmake_policy)
if (POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)
@@ -60,9 +77,6 @@ IF(COMMAND cmake_policy)
if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
if(POLICY CMP0072)
cmake_policy(SET CMP0072 OLD)
endif()
ENDIF(COMMAND cmake_policy)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
@@ -76,9 +90,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
@@ -94,21 +106,16 @@ ELSE()
ENDIF()
IF (EMBREE_STATIC_LIB)
SET(EMBREE_LIB_TYPE STATIC)
ADD_DEFINITIONS(-DEMBREE_STATIC_LIB)
ELSE()
SET(EMBREE_LIB_TYPE SHARED)
ENDIF()
OPTION(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." ON)
OPTION(EMBREE_TUTORIALS "Enable to build Embree tutorials" ON)
SET(EMBREE_API_NAMESPACE "" CACHE STRING "C++ namespace to put API symbols into.")
SET(EMBREE_LIBRARY_NAME "embree${EMBREE_VERSION_MAJOR}" CACHE STRING "Name of the embree library file (default is embree${EMBREE_VERSION_MAJOR})")
IF (EMBREE_API_NAMESPACE AND EMBREE_ISPC_SUPPORT)
MESSAGE(FATAL_ERROR "You cannot enable ISPC when EMBREE_API_NAMESPACE is used.")
ENDIF()
##############################################################################
# Configurations (add configurations also to common/cmake/embree-config.cmake)
# Configurations (add configurations also to common/cmake/embree-config-default.cmake)
OPTION(EMBREE_INSTALL_DEPENDENCIES "Install Embree dependencies in binary packages and install" OFF)
MARK_AS_ADVANCED(EMBREE_INSTALL_DEPENDENCIES)
@@ -128,10 +135,8 @@ OPTION(EMBREE_GEOMETRY_SUBDIVISION "Enables support for subdiv geometries." ON)
OPTION(EMBREE_GEOMETRY_USER "Enables support for user geometries." ON)
OPTION(EMBREE_GEOMETRY_INSTANCE "Enables support for instances." ON)
OPTION(EMBREE_GEOMETRY_GRID "Enables support for grid geometries." ON)
OPTION(EMBREE_GEOMETRY_POINT "Enables support for point geometries." ON)
OPTION(EMBREE_RAY_PACKETS "Enabled support for ray packets." ON)
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT 1 CACHE STRING "Maximum number of instance levels.")
SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR 2.0 CACHE STRING "Self intersection avoidance factor for flat curves. Specify floating point value in range 0 to inf.")
SET(EMBREE_TASKING_SYSTEM "TBB" CACHE STRING "Selects tasking system")
@@ -161,6 +166,11 @@ ELSE()
LIST(APPEND ISPC_DEFINITIONS -DTASKING_INTERNAL)
ENDIF()
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/config.h.in"
"${PROJECT_SOURCE_DIR}/kernels/config.h"
)
##############################################################
# Compiler
##############################################################
@@ -225,7 +235,7 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
TRY_COMPILE(COMPILER_SUPPORTS_AVX2 ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX2})
TRY_COMPILE(COMPILER_SUPPORTS_AVX512KNL ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX512KNL})
TRY_COMPILE(COMPILER_SUPPORTS_AVX512SKX ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp COMPILE_DEFINITIONS ${FLAGS_AVX512SKX})
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})
@@ -310,38 +320,6 @@ IF(CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
SET(EMBREE_ISA_SSE42 OFF)
ENDIF()
IF (APPLE AND EMBREE_STATIC_LIB)
# count number of set ISAs
SET(NUMISA 0)
IF (EMBREE_ISA_SSE2)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (EMBREE_ISA_SSE42)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (EMBREE_ISA_AVX)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (EMBREE_ISA_AVX2)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (EMBREE_ISA_AVX512KNL)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (EMBREE_ISA_AVX512SKX)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (NUMISA GREATER 1)
IF (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
IF (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^9\\..*")
MESSAGE(FATAL_ERROR "Using Embree as static library is not supported with AppleClang 9.X when multiple ISAs are selected. Please either build a shared library or enable only one ISA.")
ENDIF()
ENDIF()
ENDIF()
ENDIF()
##############################################################
# ISA configuration continued
##############################################################
@@ -399,7 +377,6 @@ IF (EMBREE_ISA_AVX512KNL)
LIST(APPEND ISPC_TARGETS "avx512knl-i32x16")
IF(NOT FLAGS_LOWEST)
SET(ISA_LOWEST ${AVX512KNL})
SET(ISA_LOWEST_AVX ${AVX512KNL})
SET(FLAGS_LOWEST ${FLAGS_AVX512KNL})
ENDIF()
ENDIF ()
@@ -421,33 +398,6 @@ INCLUDE (ispc)
##############################################################
include(package)
##############################################################
# Create Config files
##############################################################
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/config.h.in"
"${PROJECT_SOURCE_DIR}/kernels/config.h"
)
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/rtcore_config.h.in"
"${PROJECT_SOURCE_DIR}/include/embree3/rtcore_config.h"
)
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/hash.h.in"
"${PROJECT_SOURCE_DIR}/kernels/hash.h"
)
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/export.linux.map.in"
"${PROJECT_SOURCE_DIR}/kernels/export.linux.map"
)
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/export.macosx.map.in"
"${PROJECT_SOURCE_DIR}/kernels/export.macosx.map"
)
##############################################################
# Search paths
##############################################################
@@ -490,5 +440,4 @@ SET_PROPERTY(TARGET uninstall PROPERTY FOLDER CMakePredefinedTargets)
##############################################################
# Has to be last
##############################################################
INCLUDE(CPack)
+31 -3
View File
@@ -1,5 +1,33 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
set(TEST_MODELS_HASH ba1bd24186ccdf939d2e749a514f81718f3a2b20)
IF (NOT CTEST_DROP_SITE)
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Embree")
set(CTEST_DROP_SITE_CDASH TRUE)
endif()
list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #1478") # deprecated function used
#list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #10237") # -lcilkrts linked in dynamically, static library not available")
list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "-Wextern-initializer")
SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 200000)
SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 800000)
+589 -6726
View File
File diff suppressed because it is too large Load Diff
+15 -2
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
+15 -2
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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
-43
View File
@@ -1,43 +0,0 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <functional>
#include "parallel_reduce.h"
namespace embree
{
template<typename Index, class UnaryPredicate>
__forceinline bool parallel_any_of (Index first, Index last, UnaryPredicate pred)
{
bool ret = false;
#if defined(TASKING_TBB)
tbb::parallel_for(tbb::blocked_range<size_t>{first, last}, [&ret,pred](const tbb::blocked_range<size_t>& r) {
if (tbb::task::self().is_cancelled()) return;
for (size_t i = r.begin(); i != r.end(); ++i) {
if (pred(i)) {
ret = true;
tbb::task::self().cancel_group_execution();
}
}
});
#else
ret = parallel_reduce (first, last, false,
[pred](const range<size_t>& r)->bool {
bool localret = false;
for (auto i=r.begin(); i<r.end(); ++i) {
localret |= pred(i);
}
return localret;
},
std::bit_or<bool>()
);
#endif
return ret;
}
} // end namespace
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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-2018 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"
@@ -37,7 +50,7 @@ namespace embree
ParallelForForPrefixSumState<size_t> state(array2,size_t(1));
/* dry run only counts */
size_t S = parallel_for_for_prefix_sum0( state, array2, size_t(0), [&](std::vector<size_t>* v, const range<size_t>& r, size_t k, size_t i) -> size_t
size_t S = parallel_for_for_prefix_sum0( state, array2, size_t(0), [&](std::vector<size_t>* v, const range<size_t>& r, size_t k) -> size_t
{
size_t s = 0;
for (size_t i=r.begin(); i<r.end(); i++) {
@@ -52,7 +65,7 @@ namespace embree
for (auto& a : flattened) a.store(0);
/* now we actually fill the flattened array */
parallel_for_for_prefix_sum1( state, array2, size_t(0), [&](std::vector<size_t>* v, const range<size_t>& r, size_t k, size_t i, const size_t base) -> size_t
parallel_for_for_prefix_sum1( state, array2, size_t(0), [&](std::vector<size_t>* v, const range<size_t>& r, size_t k, const size_t base) -> size_t
{
size_t s = 0;
for (size_t i=r.begin(); i<r.end(); i++) {
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -40,7 +53,7 @@ namespace embree
for (size_t i=i0; k<k1; i++) {
const size_t size = array2[i] ? array2[i]->size() : 0;
const size_t r0 = j0, r1 = min(size,r0+k1-k);
if (r1 > r0) N = reduction(N, func(array2[i],range<Index>((Index)r0,(Index)r1),(Index)k,(Index)i));
if (r1 > r0) N = reduction(N, func(array2[i],range<size_t>(r0,r1),k));
k+=r1-r0; j0 = 0;
}
state.prefix_state.counts[taskIndex] = N;
@@ -78,7 +91,7 @@ namespace embree
for (size_t i=i0; k<k1; i++) {
const size_t size = array2[i] ? array2[i]->size() : 0;
const size_t r0 = j0, r1 = min(size,r0+k1-k);
if (r1 > r0) N = reduction(N, func(array2[i],range<Index>((Index)r0,(Index)r1),(Index)k,(Index)i,reduction(state.prefix_state.sums[taskIndex],N)));
if (r1 > r0) N = reduction(N, func(array2[i],range<size_t>(r0,r1),k,reduction(state.prefix_state.sums[taskIndex],N)));
k+=r1-r0; j0 = 0;
}
state.prefix_state.counts[taskIndex] = N;
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -20
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -262,22 +275,4 @@ namespace embree
return begin+p->partition(leftReduction,rightReduction);
}
}
template<typename T, typename IsLeft>
inline size_t parallel_partitioning(T* array,
const size_t begin,
const size_t end,
const IsLeft& is_left,
size_t BLOCK_SIZE = 128)
{
size_t leftReduction = 0;
size_t rightReduction = 0;
return parallel_partitioning(
array,begin,end,0,leftReduction,rightReduction,is_left,
[] (size_t& t,const T& ref) { },
[] (size_t& t0,size_t& t1) { },
BLOCK_SIZE);
}
}
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -27,7 +40,7 @@ namespace embree
taskCount = min(taskCount,threadCount,maxTasks);
/* parallel invokation of all tasks */
dynamic_large_stack_array(Value,values,taskCount,8192); // consumes at most 8192 bytes on the stack
dynamic_large_stack_array(Value,values,taskCount,4096); // consumes at most 4096 bytes on the stack
parallel_for(taskCount, [&](const Index taskIndex) {
const Index k0 = first+(taskIndex+0)*(last-first)/taskCount;
const Index k1 = first+(taskIndex+1)*(last-first)/taskCount;
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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})
+15 -2
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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 )
+139 -320
View File
@@ -1,340 +1,159 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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.4 ${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 ${EMBREE_TBB_ROOT}/lib/libtbb.dylib ${EMBREE_TBB_ROOT}/lib/libtbbmalloc.dylib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
ELSE()
INSTALL(PROGRAMS ${EMBREE_TBB_ROOT}/lib/intel64/gcc4.4/libtbb.so.2 ${EMBREE_TBB_ROOT}/lib/intel64/gcc4.4/libtbbmalloc.so.2 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
ENDIF()
ENDIF()
+15 -2
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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()
+15 -2
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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()
+28 -11
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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})
@@ -21,8 +34,6 @@ IF (WIN32)
# SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP") # compile source files in parallel
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR") # enable runtime type information (on by default)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /w") # disable all warnings
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Gy") # package individual functions
IF (EMBREE_STACK_PROTECTOR)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS") # protects against return address overrides
ELSE()
@@ -37,7 +48,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 +55,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 +99,6 @@ 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()
@@ -99,19 +113,22 @@ ELSE()
ENDIF()
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
+15 -2
View File
@@ -1,4 +1,17 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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")
+16 -3
View File
@@ -1,10 +1,23 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
# and override path variables to match for build directory
SET(EMBREE_INCLUDE_DIRS @PROJECT_SOURCE_DIR@/include)
SET(EMBREE_LIBRARY @PROJECT_BINARY_DIR@/@EMBREE_LIBRARY_FULLNAME@)
SET(EMBREE_LIBRARY @PROJECT_BINARY_DIR@/@EMBREE_LIBRARY_NAME@)
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
+15 -2
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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@)
+16 -14
View File
@@ -1,11 +1,24 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@)
SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@)
SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_NAME@)
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
MARK_AS_ADVANCED(embree_DIR)
@@ -41,15 +54,4 @@ SET(EMBREE_GEOMETRY_QUAD @EMBREE_GEOMETRY_QUAD@)
SET(EMBREE_GEOMETRY_CURVE @EMBREE_GEOMETRY_CURVE@)
SET(EMBREE_GEOMETRY_SUBDIVISION @EMBREE_GEOMETRY_SUBDIVISION@)
SET(EMBREE_GEOMETRY_USER @EMBREE_GEOMETRY_USER@)
SET(EMBREE_GEOMETRY_POINT @EMBREE_GEOMETRY_POINT@)
SET(EMBREE_RAY_PACKETS @EMBREE_RAY_PACKETS@)
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT @EMBREE_MAX_INSTANCE_LEVEL_COUNT@)
IF(EMBREE_STATIC_LIB)
FILE(GLOB CONFIG_FILES "${EMBREE_ROOT_DIR}/@EMBREE_CMAKECONFIG_DIR@/*-targets.cmake")
FOREACH(f ${CONFIG_FILES})
INCLUDE(${f})
ENDFOREACH()
LINK_DIRECTORIES(${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@)
ENDIF()
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
+24 -10
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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
+41 -20
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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})
@@ -51,7 +64,7 @@ IF (WIN32)
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Qinline-factor=150") # increase default inline factors by 2x
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} /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
@@ -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
+17 -12
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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
@@ -45,14 +58,7 @@ IF (NOT EMBREE_ISPC_EXECUTABLE)
ENDIF()
# check ISPC version
EXECUTE_PROCESS(COMMAND ${EMBREE_ISPC_EXECUTABLE} --version
OUTPUT_VARIABLE ISPC_OUTPUT
RESULT_VARIABLE ISPC_RESULT)
IF (NOT ${ISPC_RESULT} STREQUAL "0")
MESSAGE(FATAL_ERROR "Error executing ISPC executable '${EMBREE_ISPC_EXECUTABLE}': ${ISPC_RESULT}")
ENDIF()
EXECUTE_PROCESS(COMMAND ${EMBREE_ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
STRING(REGEX MATCH "([0-9]+[.][0-9]+[.][0-9]+)" DUMMY "${ISPC_OUTPUT}")
SET(ISPC_VERSION ${CMAKE_MATCH_1})
@@ -62,8 +68,7 @@ ENDIF()
GET_FILENAME_COMPONENT(ISPC_DIR ${EMBREE_ISPC_EXECUTABLE} PATH)
SET(EMBREE_ISPC_ADDRESSING 32 CACHE STRING "32vs64 bit addressing in ispc")
SET_PROPERTY(CACHE EMBREE_ISPC_ADDRESSING PROPERTY STRINGS 32 64)
SET(EMBREE_ISPC_ADDRESSING 32 CACHE INT "32vs64 bit addressing in ispc")
MARK_AS_ADVANCED(EMBREE_ISPC_ADDRESSING)
MACRO (ISPC_COMPILE)
+18 -5
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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
+16 -3
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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})
+26 -25
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
@@ -26,7 +39,6 @@ ENDIF()
##############################################################
# Install Headers
##############################################################
INSTALL(DIRECTORY include/embree3 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
IF (NOT WIN32)
INSTALL(DIRECTORY man/man3 DESTINATION ${CMAKE_INSTALL_MANDIR} COMPONENT devel)
@@ -35,10 +47,7 @@ ENDIF()
##############################################################
# Install Models
##############################################################
IF (EMBREE_TUTORIALS)
INSTALL(DIRECTORY tutorials/models DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
ENDIF()
INSTALL(DIRECTORY tutorials/models DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
##############################################################
# Install Documentation
@@ -48,8 +57,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
@@ -86,16 +93,12 @@ IF (APPLE AND NOT EMBREE_ZIP_MODE)
ENDIF()
# why does this have to be so complicated...
IF (EMBREE_STATIC_LIB)
SET(EMBREE_LIBRARY_FULLNAME ${CMAKE_STATIC_LIBRARY_PREFIX}${EMBREE_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
IF (WIN32)
SET(EMBREE_LIBRARY_NAME ${CMAKE_IMPORT_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX})
ELSEIF (APPLE)
SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}.${EMBREE_CONFIG_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX})
ELSE()
IF (WIN32)
SET(EMBREE_LIBRARY_FULLNAME ${CMAKE_IMPORT_LIBRARY_PREFIX}${EMBREE_LIBRARY_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX})
ELSEIF (APPLE)
SET(EMBREE_LIBRARY_FULLNAME ${CMAKE_SHARED_LIBRARY_PREFIX}${EMBREE_LIBRARY_NAME}.${EMBREE_CONFIG_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX})
ELSE()
SET(EMBREE_LIBRARY_FULLNAME ${CMAKE_SHARED_LIBRARY_PREFIX}${EMBREE_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${EMBREE_CONFIG_VERSION})
ENDIF()
SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}.${EMBREE_CONFIG_VERSION})
ENDIF()
IF (WIN32 OR EMBREE_ZIP_MODE)
@@ -124,7 +127,7 @@ SET(CPACK_PACKAGE_NAME "Embree Ray Tracing Kernels")
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")
#SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
SET(CPACK_STRIP_FILES TRUE)
SET(CPACK_STRIP_FILES FALSE) # we strip already as a post_build step
SET(CPACK_PACKAGE_VERSION_MAJOR ${EMBREE_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${EMBREE_VERSION_MINOR})
@@ -206,11 +209,11 @@ ELSEIF(APPLE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_macosx.sh ${CMAKE_BUILD_TYPE} ${CPACK_PACKAGE_FILE_NAME}.pkg ${EMBREE_SIGN_FILE})
ENDIF()
ELSE()
SET(CPACK_GENERATOR ZIP)
SET(CPACK_GENERATOR TGZ)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_macosx.sh ${CMAKE_BUILD_TYPE} ${CPACK_PACKAGE_FILE_NAME}.zip ${EMBREE_SIGN_FILE})
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_macosx.sh ${CMAKE_BUILD_TYPE} ${CPACK_PACKAGE_FILE_NAME}.tgz ${EMBREE_SIGN_FILE})
ENDIF()
ENDIF()
@@ -242,8 +245,7 @@ ELSE()
SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
SET(CPACK_RPM_lib_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh
${EMBREE_ZIP_MODE} ${EMBREE_LIBRARY_NAME} ${EMBREE_VERSION} ${EMBREE_VERSION_MAJOR} ${EMBREE_SIGN_FILE})
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh ${EMBREE_ZIP_MODE} ${EMBREE_VERSION} ${EMBREE_VERSION_MAJOR} ${EMBREE_SIGN_FILE})
ENDIF()
ELSE()
@@ -251,8 +253,7 @@ ELSE()
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh
${EMBREE_ZIP_MODE} ${EMBREE_LIBRARY_NAME} ${EMBREE_VERSION} ${EMBREE_VERSION_MAJOR} ${EMBREE_SIGN_FILE})
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_linux.sh ${EMBREE_ZIP_MODE} ${EMBREE_VERSION} ${EMBREE_SIGN_FILE})
ENDIF()
ENDIF()
-3
View File
@@ -1,4 +1 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
/sbin/ldconfig
+104 -35
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
@@ -15,8 +28,7 @@ FIND_PATH(EMBREE_TESTING_MODEL_DIR
DOC "Path to the folder containing the Embree models for regression testing."
NO_DEFAULT_PATHS)
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing.")
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3)
SET(EMBREE_TESTING_INTENSITY 1 CACHE INT "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing.")
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
@@ -34,76 +46,133 @@ MACRO (ADD_EMBREE_NORMAL_TEST name reference executable args)
IF (BUILD_TESTING)
ADD_TEST(NAME ${name}
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
COMMAND ${executable} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
COMMAND python ${PROJECT_SOURCE_DIR}/scripts/invoke_test.py
--name ${name}
--reference ${reference}
--modeldir ${EMBREE_MODEL_DIR}
--model default
--sde ${EMBREE_TESTING_SDE}
--execute ${MY_PROJECT_BINARY_DIR}/${executable} ${args})
ENDIF()
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
IF (EMBREE_ISPC_SUPPORT AND NOT DISABLE_ISPC_TEST)
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 python ${PROJECT_SOURCE_DIR}/scripts/invoke_test.py
--name ${name}_ispc
--reference ${reference}
--modeldir ${EMBREE_MODEL_DIR}
--model default
--sde ${EMBREE_TESTING_SDE}
--execute ${MY_PROJECT_BINARY_DIR}/${executable}_ispc ${args})
ENDIF()
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_TEST_WITHOUT_ISPC name)
IF (BUILD_TESTING)
ADD_TEST(NAME ${name}
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
COMMAND ${executable} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_TEST name)
ADD_EMBREE_NORMAL_TEST(${name} ${name} ${name} "")
ENDMACRO()
MACRO (ADD_EMBREE_TEST2 name exe args)
ADD_EMBREE_NORMAL_TEST(${name} ${exe} ${exe} "${args}")
ADD_EMBREE_MODEL_TEST(${name} ${exe} ${exe} "${args}" "default")
ENDMACRO()
MACRO (ADD_EMBREE_MODEL_TEST name reference executable args model)
IF (BUILD_TESTING)
ADD_TEST(NAME ${name}
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
COMMAND ${executable} -c ${EMBREE_MODEL_DIR}/${model} --compare ${EMBREE_MODEL_DIR}/reference/${reference}.tga ${args})
COMMAND python ${PROJECT_SOURCE_DIR}/scripts/invoke_test.py
--name ${name}
--reference ${reference}
--modeldir ${EMBREE_MODEL_DIR}
--model ${model}
--sde ${EMBREE_TESTING_SDE}
--execute ${MY_PROJECT_BINARY_DIR}/${executable} ${args})
ENDIF()
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
IF (EMBREE_ISPC_SUPPORT AND NOT DISABLE_ISPC_TEST)
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 python ${PROJECT_SOURCE_DIR}/scripts/invoke_test.py
--name ${name}_ispc
--reference ${reference}
--modeldir ${EMBREE_MODEL_DIR}
--model ${model}
--sde ${EMBREE_TESTING_SDE}
--execute ${MY_PROJECT_BINARY_DIR}/${executable}_ispc ${args})
ENDIF()
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_MODELS_TEST model_list_file name reference executable)
IF (BUILD_TESTING)
IF (EMBREE_TESTING_MODEL_DIR AND EMBREE_TESTING_INTENSITY GREATER 0)
IF( NOT EXISTS "${EMBREE_TESTING_MODEL_DIR}/test-models-subdiv.txt"
OR NOT EXISTS "${EMBREE_TESTING_MODEL_DIR}/test-models-intensity2.txt"
OR NOT EXISTS "${EMBREE_TESTING_MODEL_DIR}/test-models-intensity3.txt"
OR NOT EXISTS "${EMBREE_TESTING_MODEL_DIR}/test-models-intensity4.txt")
MESSAGE(FATAL_ERROR "Invalid Embree testing model repository.")
ENDIF()
FILE(READ "${EMBREE_TESTING_MODEL_DIR}/test-models-subdiv.txt" models_subdiv)
STRING(REGEX REPLACE "\n" ";" models_subdiv "${models_subdiv}")
SET(full_model_list_file ${EMBREE_TESTING_MODEL_DIR}/${model_list_file})
IF(NOT EXISTS "${full_model_list_file}")
MESSAGE(FATAL_ERROR "File ${EMBREE_TESTING_MODEL_DIR}/${model_list_file} does not exist!")
ENDIF()
FILE(READ "${EMBREE_TESTING_MODEL_DIR}/test-models-intensity2.txt" models_intensity2)
STRING(REGEX REPLACE "\n" ";" models_intensity2 "${models_intensity2}")
FILE(READ "${EMBREE_TESTING_MODEL_DIR}/test-models-intensity3.txt" models_intensity3)
STRING(REGEX REPLACE "\n" ";" models_intensity3 "${models_intensity3}")
FILE(READ "${EMBREE_TESTING_MODEL_DIR}/test-models-intensity4.txt" models_intensity4)
STRING(REGEX REPLACE "\n" ";" models_intensity4 "${models_intensity4}")
FILE(READ "${full_model_list_file}" models)
STRING(REGEX REPLACE "\n" ";" models "${models}")
IF (EMBREE_TESTING_INTENSITY GREATER 1)
LIST(APPEND models ${models_intensity2})
ENDIF()
IF (EMBREE_TESTING_INTENSITY GREATER 2)
LIST(APPEND models ${models_intensity3})
ENDIF()
CMAKE_HOST_SYSTEM_INFORMATION(RESULT memory QUERY TOTAL_PHYSICAL_MEMORY)
IF (EMBREE_TESTING_INTENSITY GREATER 3 AND ${memory} GREATER 10000)
LIST(APPEND models ${models_intensity4})
ENDIF()
MACRO (ADD_EMBREE_MODELS_TEST name reference executable)
FOREACH (model ${models})
STRING(REGEX REPLACE "/" "_" modelname "${model}")
STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
ADD_EMBREE_MODEL_TEST(${name}_${modelname} ${reference}_${modelname} ${executable} "${ARGN}" ${model})
ENDFOREACH()
ENDIF()
ENDMACRO()
ENDMACRO()
MACRO (ADD_EMBREE_SUBDIV_MODELS_TEST name reference executable)
FOREACH (model ${models_subdiv})
STRING(REGEX REPLACE "/" "_" modelname "${model}")
STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
ADD_EMBREE_MODEL_TEST(${name}_${modelname} ${reference}_${modelname} ${executable} "${ARGN}" ${model})
ENDFOREACH()
ENDMACRO()
ELSE()
MACRO (ADD_EMBREE_MODEL_TEST name reference executable args model)
ENDMACRO()
MACRO (ADD_EMBREE_SUBDIV_MODELS_TEST name reference executable)
ENDMACRO()
MACRO (ADD_EMBREE_MODELS_TEST name)
ENDMACRO()
ENDIF()
# add klocwork test
IF (EMBREE_TESTING_KLOCWORK)
ADD_TEST(NAME Klocwork-Build WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork_build.sh)
ADD_TEST(NAME Klocwork-Check WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork_check.sh)
SET_TESTS_PROPERTIES(Klocwork-Build PROPERTIES TIMEOUT 2400)
SET_TESTS_PROPERTIES(Klocwork-Check PROPERTIES TIMEOUT 300)
ADD_TEST(NAME Klocwork WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork.sh)
SET_TESTS_PROPERTIES(Klocwork PROPERTIES TIMEOUT 2400)
ENDIF()
# add valgrind test
+17 -4
View File
@@ -1,11 +1,24 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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}")
@@ -15,7 +28,7 @@ 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)
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}")
+15 -2
View File
@@ -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")
+16 -4
View File
@@ -1,5 +1,18 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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
@@ -10,7 +23,6 @@ SET_PROPERTY(TARGET lexers PROPERTY FOLDER common)
SET_PROPERTY(TARGET lexers APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
IF (EMBREE_STATIC_LIB)
INSTALL(TARGETS lexers EXPORT lexers-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
INSTALL(EXPORT lexers-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
INSTALL(TARGETS lexers ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
SIGN_TARGET(lexers)
ENDIF()
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
+16 -4
View File
@@ -1,13 +1,25 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
SET_PROPERTY(TARGET math APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
IF (EMBREE_STATIC_LIB)
INSTALL(TARGETS math EXPORT math-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
INSTALL(EXPORT math-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
INSTALL(TARGETS math ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
SIGN_TARGET(math)
ENDIF()
+24 -211
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
{
@@ -69,10 +81,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 +140,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,210 +163,9 @@ 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);
}
////////////////////////////////////////////////////////////////////////////////
// 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)
////////////////////////////////////////////////////////////////////////////////
__forceinline bool similarityTransform(const AffineSpace3fa& M, float* D)
{
if (D) *D = 0.f;
if (abs(dot(M.l.vx, M.l.vy)) > 1e-5f) return false;
if (abs(dot(M.l.vx, M.l.vz)) > 1e-5f) return false;
if (abs(dot(M.l.vy, M.l.vz)) > 1e-5f) return false;
const float D_x = dot(M.l.vx, M.l.vx);
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 ||
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);
Vec3fa::storeu(&ptr->l.vy, source.l.vy);
Vec3fa::storeu(&ptr->l.vz, source.l.vz);
Vec3fa::storeu(&ptr->p, source.p);
}
__forceinline AffineSpace3fa AffineSpace3fa_load_unaligned(AffineSpace3fa* ptr)
{
AffineSpace3fa space;
space.l.vx = Vec3fa::loadu(&ptr->l.vx);
space.l.vy = Vec3fa::loadu(&ptr->l.vy);
space.l.vz = Vec3fa::loadu(&ptr->l.vz);
space.p = Vec3fa::loadu(&ptr->p);
return space;
}
/*! 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); }
#undef VectorT
#undef ScalarT
+20 -14
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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,13 +21,6 @@
namespace embree
{
namespace internal {
template <typename T> __forceinline T divideByTwo(const T& v) { return v / T(2); }
template <> __forceinline float divideByTwo<float>(const float& v) { return v * 0.5f; }
template <> __forceinline double divideByTwo<double>(const double& v) { return v * 0.5; }
} // namespace internal
template<typename T>
struct BBox
{
@@ -45,7 +51,7 @@ namespace embree
__forceinline T size() const { return upper - lower; }
/*! computes the center of the box */
__forceinline T center() const { return internal::divideByTwo<T>(lower+upper); }
__forceinline T center() const { return 0.5f*(lower+upper); }
/*! computes twice the center of the box */
__forceinline T center2() const { return lower+upper; }
@@ -56,7 +62,7 @@ namespace embree
}
/*! enlarge box by some scaling factor */
__forceinline BBox enlarge_by(const float a) const {
__forceinline BBox enlarge_by(const float a) {
return BBox(lower - T(a)*abs(lower), upper + T(a)*abs(upper));
}
@@ -97,7 +103,7 @@ namespace embree
/*! computes the center of the box */
template<typename T> __forceinline const T center2(const BBox<T>& box) { return box.lower + box.upper; }
template<typename T> __forceinline const T center (const BBox<T>& box) { return internal::divideByTwo<T>(center2(box)); }
template<typename T> __forceinline const T center (const BBox<T>& box) { return T(0.5f)*center2(box); }
/*! computes the volume of a bounding box */
__forceinline float volume ( const BBox<Vec3fa>& b ) { return reduce_mul(b.size()); }
@@ -110,7 +116,7 @@ namespace embree
template<typename T> __forceinline const T area( const BBox<Vec2<T> >& b ) { const Vec2<T> d = b.size(); return d.x*d.y; }
template<typename T> __forceinline const T halfArea( const BBox<Vec3<T> >& b ) { return halfArea(b.size()); }
template<typename T> __forceinline const T area( const BBox<Vec3<T> >& b ) { return T(2)*halfArea(b); }
template<typename T> __forceinline const T area( const BBox<Vec3<T> >& b ) { return 2.0f*halfArea(b); }
__forceinline float halfArea( const BBox<Vec3fa>& b ) { return halfArea(b.size()); }
__forceinline float area( const BBox<Vec3fa>& b ) { return 2.0f*halfArea(b); }
@@ -194,7 +200,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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 << ")";
}
}
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 << " }";
}
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 << "}";
}
+28 -23
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -171,32 +184,24 @@ namespace embree
return LinearSpace3<T>(select(s,t.vx,f.vx),select(s,t.vy,f.vy),select(s,t.vz,f.vz));
}
////////////////////////////////////////////////////////////////////////////////
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
template<typename T> static embree_ostream operator<<(embree_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)
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 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;
}
+15 -6
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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,9 +50,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 +269,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);
+17 -4
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,12 +1,22 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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() << ")]";
}
-525
View File
@@ -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 &not)
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
+20 -19
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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,15 +28,10 @@ namespace embree
template<typename T> struct Vec2
{
enum { N = 2 };
union {
struct { T x, y; };
#if !(defined(__WIN32__) && _MSC_VER == 1800) // workaround for older VS 2013 compiler
T components[N];
#endif
};
T x, y;
typedef T Scalar;
enum { N = 2 };
////////////////////////////////////////////////////////////////////////////////
/// Construction
@@ -39,8 +47,6 @@ namespace embree
template<typename T1> __forceinline Vec2( const Vec2<T1>& a ) : x(T(a.x)), y(T(a.y)) {}
template<typename T1> __forceinline Vec2& operator =( const Vec2<T1>& other ) { x = other.x; y = other.y; return *this; }
__forceinline Vec2& operator =( const Vec2& other ) { x = other.x; y = other.y; return *this; }
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
@@ -50,13 +56,8 @@ namespace embree
__forceinline Vec2( PosInfTy ) : x(pos_inf), y(pos_inf) {}
__forceinline Vec2( NegInfTy ) : x(neg_inf), y(neg_inf) {}
#if defined(__WIN32__) && _MSC_VER == 1800 // workaround for older VS 2013 compiler
__forceinline const T& operator [](const size_t axis) const { assert(axis < 2); return (&x)[axis]; }
__forceinline T& operator [](const size_t axis) { assert(axis < 2); return (&x)[axis]; }
#else
__forceinline const T& operator [](const size_t axis) const { assert(axis < 2); return components[axis]; }
__forceinline T& operator [](const size_t axis ) { assert(axis < 2); return components[axis]; }
#endif
__forceinline const T& operator []( const size_t axis ) const { assert(axis < 2); return (&x)[axis]; }
__forceinline T& operator []( const size_t axis ) { assert(axis < 2); return (&x)[axis]; }
};
////////////////////////////////////////////////////////////////////////////////
@@ -190,7 +191,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
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 << ")";
}
+21 -24
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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,18 +28,10 @@ namespace embree
template<typename T> struct Vec3
{
enum { N = 3 };
union {
struct {
T x, y, z;
};
#if !(defined(__WIN32__) && _MSC_VER == 1800) // workaround for older VS 2013 compiler
T components[N];
#endif
};
T x, y, z;
typedef T Scalar;
enum { N = 3 };
////////////////////////////////////////////////////////////////////////////////
/// Construction
@@ -42,8 +47,6 @@ namespace embree
template<typename T1> __forceinline Vec3( const Vec3<T1>& a ) : x(T(a.x)), y(T(a.y)), z(T(a.z)) {}
template<typename T1> __forceinline Vec3& operator =(const Vec3<T1>& other) { x = other.x; y = other.y; z = other.z; return *this; }
__forceinline Vec3& operator =(const Vec3& other) { x = other.x; y = other.y; z = other.z; return *this; }
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
@@ -53,13 +56,8 @@ namespace embree
__forceinline Vec3( PosInfTy ) : x(pos_inf), y(pos_inf), z(pos_inf) {}
__forceinline Vec3( NegInfTy ) : x(neg_inf), y(neg_inf), z(neg_inf) {}
#if defined(__WIN32__) && (_MSC_VER == 1800) // workaround for older VS 2013 compiler
__forceinline const T& operator []( const size_t axis ) const { assert(axis < 3); return (&x)[axis]; }
__forceinline T& operator []( const size_t axis ) { assert(axis < 3); return (&x)[axis]; }
#else
__forceinline const T& operator [](const size_t axis) const { assert(axis < 3); return components[axis]; }
__forceinline T& operator [](const size_t axis) { assert(axis < 3); return components[axis]; }
#endif
};
////////////////////////////////////////////////////////////////////////////////
@@ -200,11 +198,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 +246,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 << ")";
}
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -112,7 +125,7 @@ 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") << ")";
}
}
+17 -4
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -39,7 +52,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,7 +370,7 @@ 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 << ")";
}
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -180,7 +193,7 @@ 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 << ")";
}
}
+20 -19
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -14,15 +27,10 @@ namespace embree
template<typename T> struct Vec4
{
enum { N = 4 };
union {
struct { T x, y, z, w; };
#if !(defined(__WIN32__) && _MSC_VER == 1800) // workaround for older VS 2013 compiler
T components[N];
#endif
};
T x, y, z, w;
typedef T Scalar;
enum { N = 4 };
////////////////////////////////////////////////////////////////////////////////
/// Construction
@@ -39,8 +47,6 @@ namespace embree
template<typename T1> __forceinline Vec4( const Vec4<T1>& a ) : x(T(a.x)), y(T(a.y)), z(T(a.z)), w(T(a.w)) {}
template<typename T1> __forceinline Vec4& operator =(const Vec4<T1>& other) { x = other.x; y = other.y; z = other.z; w = other.w; return *this; }
__forceinline Vec4& operator =(const Vec4& other) { x = other.x; y = other.y; z = other.z; w = other.w; return *this; }
__forceinline operator Vec3<T> () const { return Vec3<T>(x,y,z); }
////////////////////////////////////////////////////////////////////////////////
@@ -52,13 +58,8 @@ namespace embree
__forceinline Vec4( PosInfTy ) : x(pos_inf), y(pos_inf), z(pos_inf), w(pos_inf) {}
__forceinline Vec4( NegInfTy ) : x(neg_inf), y(neg_inf), z(neg_inf), w(neg_inf) {}
#if defined(__WIN32__) && (_MSC_VER == 1800) // workaround for older VS 2013 compiler
__forceinline const T& operator [](const size_t axis) const { assert(axis < 4); return (&x)[axis]; }
__forceinline T& operator [](const size_t axis) { assert(axis < 4); return (&x)[axis]; }
#else
__forceinline const T& operator [](const size_t axis ) const { assert(axis < 4); return components[axis]; }
__forceinline T& operator [](const size_t axis) { assert(axis < 4); return components[axis]; }
#endif
__forceinline const T& operator []( const size_t axis ) const { assert(axis < 4); return (&x)[axis]; }
__forceinline T& operator []( const size_t axis ) { assert(axis < 4); return (&x)[axis]; }
////////////////////////////////////////////////////////////////////////////////
/// Swizzles
@@ -183,7 +184,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 << ")";
}
+16 -4
View File
@@ -1,12 +1,24 @@
## Copyright 2009-2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
## ======================================================================== ##
## Copyright 2009-2018 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)
SET_PROPERTY(TARGET simd APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
IF (EMBREE_STATIC_LIB)
INSTALL(TARGETS simd EXPORT simd-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
INSTALL(EXPORT simd-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
INSTALL(TARGETS simd ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
SIGN_TARGET(simd)
ENDIF()
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 -3
View File
@@ -1,12 +1,24 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 "../math/constants.h"
#include "../sys/alloc.h"
#include "varying.h"
#include "vboolf16_avx512.h"
+15 -9
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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,13 +35,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)
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 -3
View File
@@ -1,11 +1,23 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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"
+15 -2
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
+16 -5
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -9,8 +22,6 @@ namespace embree
template<>
struct vboold<4>
{
ALIGNED_STRUCT_(32);
typedef vboold4 Bool;
enum { size = 4 }; // number of SIMD elements
@@ -148,7 +159,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] << ">";
}
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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++) {
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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++) {
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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++) {
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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++) {
+16 -5
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -9,8 +22,6 @@ namespace embree
template<>
struct vboolf<4>
{
ALIGNED_STRUCT_(16);
typedef vboolf4 Bool;
typedef vint4 Int;
typedef vfloat4 Float;
@@ -167,7 +178,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) {
return cout << "<" << a[0] << ", " << a[1] << ", " << a[2] << ", " << a[3] << ">";
}
}
+16 -5
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -9,8 +22,6 @@ namespace embree
template<>
struct vboolf<8>
{
ALIGNED_STRUCT_(32);
typedef vboolf8 Bool;
typedef vint8 Int;
typedef vfloat8 Float;
@@ -179,7 +190,7 @@ namespace embree
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline embree_ostream operator <<(embree_ostream cout, const vboolf8& a) {
inline std::ostream& operator <<(std::ostream& cout, const vboolf8& a) {
return cout << "<" << a[0] << ", " << a[1] << ", " << a[2] << ", " << a[3] << ", "
<< a[4] << ", " << a[5] << ", " << a[6] << ", " << a[7] << ">";
}
+16 -3
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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 vboolf8& a)
inline std::ostream& operator <<(std::ostream& cout, const vboolf8& a)
{
cout << "<";
for (size_t i=0; i<8; i++) {
+16 -5
View File
@@ -1,5 +1,18 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
// ======================================================================== //
// Copyright 2009-2018 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
@@ -9,8 +22,6 @@ namespace embree
template<>
struct vdouble<4>
{
ALIGNED_STRUCT_(32);
typedef vboold4 Bool;
enum { size = 4 }; // number of SIMD elements
@@ -307,7 +318,7 @@ namespace embree
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline embree_ostream operator <<(embree_ostream cout, const vdouble4& v)
__forceinline std::ostream& operator <<(std::ostream& cout, const vdouble4& v)
{
cout << "<" << v[0];
for (size_t i=1; i<4; i++) cout << ", " << v[i];

Some files were not shown because too many files have changed in this diff Show More