Skip to content

Commit 935e8af

Browse files
authored
Parallel CPU LBVH Implementation (#188)
* Add Linear Bounding Volume Hierarchy (LBVH) implementation and profiling support
1 parent f6ee986 commit 935e8af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2648
-345
lines changed

.clang-format

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
Language: Cpp
32
BasedOnStyle: WebKit
43
AlignAfterOpenBracket: AlwaysBreak
54
AlignTrailingComments:
@@ -38,6 +37,5 @@ IncludeCategories:
3837
SortPriority: 1
3938
CaseSensitive: true
4039
PackConstructorInitializers: CurrentLine
41-
RemoveEmptyLinesInUnwrappedLines: true
4240
SortIncludes: CaseInsensitive
4341
...

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
os: [ubuntu-latest, macos-latest, windows-latest]
30-
python-version: ${{ github.event_name == 'pull_request' && fromJSON('["3.13"]') || fromJSON('["3.9", "3.10", "3.11", "3.12", "3.13"]') }}
30+
python-version: ${{ github.event_name == 'pull_request' && fromJSON('["3.14"]') || fromJSON('["3.10", "3.11", "3.12", "3.13", "3.14"]') }}
3131
include:
3232
- os: ubuntu-latest
3333
name: Linux

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ option(IPC_TOOLKIT_WITH_ROBIN_MAP "Use Tessil's robin-map rather tha
8080
option(IPC_TOOLKIT_WITH_ABSEIL "Use Abseil's hash functions" ON)
8181
option(IPC_TOOLKIT_WITH_FILIB "Use filib for interval arithmetic" ON)
8282
option(IPC_TOOLKIT_WITH_INEXACT_CCD "Use the original inexact CCD method of IPC" OFF)
83+
option(IPC_TOOLKIT_WITH_PROFILER "Enable performance profiler" OFF)
8384

8485
# Advanced options
8586
option(IPC_TOOLKIT_WITH_SIMD "Enable SIMD" OFF)
@@ -230,6 +231,12 @@ if(IPC_TOOLKIT_WITH_FILIB)
230231
target_link_libraries(ipc_toolkit PUBLIC filib::filib)
231232
endif()
232233

234+
if(IPC_TOOLKIT_WITH_PROFILER)
235+
# Add nlohmann/json for the profiler
236+
include(json)
237+
target_link_libraries(ipc_toolkit PUBLIC nlohmann_json::nlohmann_json)
238+
endif()
239+
233240
# Extra warnings (link last for highest priority)
234241
include(ipc_toolkit_warnings)
235242
target_link_libraries(ipc_toolkit PRIVATE ipc::toolkit::warnings)

cmake/ipc_toolkit/ipc_toolkit_tests_data.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ else()
3030
SOURCE_DIR ${IPC_TOOLKIT_TESTS_DATA_DIR}
3131

3232
GIT_REPOSITORY https://github.com/ipc-sim/ipc-toolkit-tests-data.git
33-
GIT_TAG 7ca6db695adcc00d3d6d978767dfc0d81722a515
33+
GIT_TAG c7eba549d9a80d15569a013c473f0aff104ac44a
3434

3535
CONFIGURE_COMMAND ""
3636
BUILD_COMMAND ""

cmake/ipc_toolkit/ipc_toolkit_warnings.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ else()
100100

101101
-Wno-sign-compare
102102

103+
-Wno-gnu-anonymous-struct
104+
-Wno-nested-anon-types
105+
103106
###########
104107
# GCC 6.1 #
105108
###########

cmake/recipes/evouga_ccd.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Etienne Vouga's CCD Library (https://github.com/evouga/collisiondetection.git)
1+
# Etienne Vouga's CCD Library (https://github.com/evouga/collisiondetection)
22
# License: ???
33
if(TARGET evouga::ccd)
44
return()

cmake/recipes/filib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# filib (https://github.com/zfergus/filib.git)
1+
# filib (https://github.com/zfergus/filib)
22
# License: LGPL-2.1
33
if(TARGET filib::filib)
44
return()

cmake/recipes/pybind11_json.cmake

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# pybind11_json (https://github.com/pybind/pybind11_json)
2+
# License: MIT
3+
if(TARGET pybind11::json)
4+
return()
5+
endif()
6+
7+
message(STATUS "Third-party: creating target 'pybind11::json'")
8+
9+
include(CPM)
10+
CPMAddPackage(
11+
URI "gh:pybind/pybind11_json#0.2.15"
12+
DOWNLOAD_ONLY YES
13+
)
14+
15+
add_library(pybind11_json INTERFACE)
16+
add_library(pybind11::json ALIAS pybind11_json)
17+
18+
target_include_directories(pybind11_json INTERFACE
19+
"$<BUILD_INTERFACE:${pybind11_json_SOURCE_DIR}/include>"
20+
)
21+
22+
include(pybind11)
23+
target_link_libraries(pybind11_json INTERFACE pybind11::pybind11)
24+
25+
include(json)
26+
target_link_libraries(pybind11_json INTERFACE nlohmann_json::nlohmann_json)

docs/source/_static/graphviz/dependencies.dot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,7 @@ digraph "IPC Toolkit Dependencies" {
8383
"node5" -> "node13" [color = "#8FB976";];
8484
"node13" -> "node0" [color = "#BE6562";];
8585
"node13" -> "node9" [color = "#BE6562";];
86+
// ipc_toolkit -> nlohmann_json
87+
"node14" [label = "nlohmann_json\n(nlohmann_json::nlohmann_json)";shape = box;style = "rounded,filled";fillcolor = "#FFE6CC";color = "#DAA52D";];
88+
"node5" -> "node14" [color = "#8FB976";];
8689
}

docs/source/_static/graphviz/dependencies.svg

Lines changed: 52 additions & 39 deletions
Loading

0 commit comments

Comments
 (0)