Skip to content

Commit 650d98d

Browse files
committed
[1.3.45] 2025-08-21
* Fixed errors in the `radiation_StanfordBunny` and `energybalance_StanfordBunny` samples that were using the deprecated `Context::setPrimitiveData()` signature with explicit type and size parameters. * Added automatic version change detection and CUDA object file cleanup improvements to the CMake build system * Enhanced benchmark collection and reporting in `utilities/run_benchmarks.sh` * Enhanced OpenMP configuration for macOS with automatic Apple Clang + libomp setup via Homebrew detection * Added OpenMP installation step to GitHub Actions macOS workflow for improved CI compatibility - Added comprehensive ray-tracing implementation with new `CollisionDetection_RayTracing.cpp` module - Implemented advanced ray-tracing data structures including `RayQuery`, `HitResult`, `RayTracingStats`, `RayPacket`, and `RayStream` for efficient batch ray processing - Added GPU-accelerated ray casting with warp-efficient CUDA kernels for optimal performance - Introduced Structure-of-Arrays (SoA) BVH layout (`BVHNodesSoA`) for improved memory access patterns and cache efficiency - Added SIMD-optimized ray-AABB intersection tests using AVX2/SSE instructions - Implemented streaming ray tracer interface for optimal GPU utilization with memory usage statistics - Enhanced spatial query capabilities including cone intersection queries, voxel ray path length calculations, and proximity-based collision detection - Added advanced geometry operations for gap detection, optimal path finding, and attraction point detection within perception cones - Implemented thread-safe primitive caching system for safe multi-threaded ray casting operations - Added comprehensive GPU memory management with allocation and transfer optimizations - Enhanced CMakeLists.txt with improved CUDA support and compilation handling - Extended `HitResult` structure with `path_length` field for unobstructed voxel path length calculations in LiDAR processing - Added `calculateVoxelPathLengths()` method for efficient ray path length calculations through individual voxels with OpenMP parallelization - Enhanced `performGridRayIntersection()` to return detailed `HitResult` objects for each hit instead of simple hit counts - Added ray classification methods `getRayClassificationCounts()` for Beer's law calculations with hit_before/hit_after statistics - Fixed an error with `Visualizer::setColorbarRange()` where it was setting the color of values clipped below the lower bound incorrectly by implementing proper bounds checking for normalized color positions. - Fixed `RadiationModel::updateGeometry()` to properly handle cases when called with an empty Context by adding a check for zero primitives and returning early with a warning message. - Updated integration with enhanced collision detection capabilities for improved geometric operations
1 parent 62757ea commit 650d98d

File tree

621 files changed

+54622
-23844
lines changed

Some content is hidden

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

621 files changed

+54622
-23844
lines changed

.github/workflows/mac_selftests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2525
- name: Install XQuartz
2626
run: brew install Caskroom/cask/xquartz
27+
- name: Install OpenMP support
28+
run: brew install libomp
2729

2830
- name: Bash script
2931
run: |

core/CMake_project.cmake

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
option(ENABLE_OPENMP "Enable building with OpenMP" ON)
22
option(BUILD_TESTS "Build test executables" OFF)
3+
option(BUILD_BENCHMARKS "Build performance benchmark executables" OFF)
34

45

56
# Set CMake policies to avoid warnings on newer CMake versions
@@ -83,6 +84,22 @@ message( STATUS "[Helios] Last configured Helios Git commit hash: ${HELIOS_PREVI
8384

8485
if(NOT HELIOS_PREVIOUS_COMMIT STREQUAL GIT_COMMIT_HASH)
8586
message(STATUS "[Helios] Git commit version change detected, automatically re-configuring...")
87+
88+
# Clean CUDA object files to prevent linking issues with stale objects
89+
find_package(CUDAToolkit QUIET)
90+
if(CUDAToolkit_FOUND)
91+
message(STATUS "[Helios] Cleaning CUDA object files due to version change...")
92+
file(GLOB_RECURSE CUDA_OBJECTS
93+
"${CMAKE_BINARY_DIR}/**/*.cu.o"
94+
"${CMAKE_BINARY_DIR}/**/*.cudafe*"
95+
"${CMAKE_BINARY_DIR}/**/cmake_device_link.o"
96+
)
97+
if(CUDA_OBJECTS)
98+
file(REMOVE ${CUDA_OBJECTS})
99+
message(STATUS "[Helios] Removed ${CMAKE_CURRENT_LIST_SIZE} CUDA object files")
100+
endif()
101+
endif()
102+
86103
# update cache for next time
87104
set(HELIOS_PREVIOUS_COMMIT "${GIT_COMMIT_HASH}" CACHE STRING "Last configured Helios Git commit" FORCE)
88105
endif()
@@ -164,7 +181,59 @@ endforeach(PLUGIN)
164181
target_compile_definitions(helios PUBLIC $<$<CONFIG:Debug>:HELIOS_DEBUG> $<$<CONFIG:RelWithDebInfo>:HELIOS_DEBUG> )
165182

166183
if( ENABLE_OPENMP )
167-
find_package(OpenMP)
184+
# First try standard OpenMP detection
185+
find_package(OpenMP QUIET)
186+
187+
# If OpenMP not found and we're on macOS with Apple Clang, try automatic libomp configuration
188+
if(NOT OpenMP_CXX_FOUND AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
189+
message(STATUS "[Helios] Configuring OpenMP for Apple Clang on macOS...")
190+
191+
# Find Homebrew
192+
find_program(BREW NAMES brew)
193+
if(BREW)
194+
# Check if libomp is installed
195+
execute_process(COMMAND ${BREW} ls libomp
196+
RESULT_VARIABLE BREW_RESULT_CODE
197+
OUTPUT_QUIET ERROR_QUIET)
198+
199+
if(NOT BREW_RESULT_CODE)
200+
# Get libomp prefix
201+
execute_process(COMMAND ${BREW} --prefix libomp
202+
OUTPUT_VARIABLE LIBOMP_PREFIX
203+
OUTPUT_STRIP_TRAILING_WHITESPACE)
204+
205+
# Configure OpenMP for Apple Clang + libomp
206+
set(OpenMP_CXX_FLAGS "-Xpreprocessor;-fopenmp")
207+
set(OpenMP_CXX_LIB_NAMES "omp")
208+
set(OpenMP_omp_LIBRARY "${LIBOMP_PREFIX}/lib/libomp.dylib")
209+
set(OpenMP_CXX_INCLUDE_DIRS "${LIBOMP_PREFIX}/include")
210+
211+
# Add include directory globally for compatibility
212+
include_directories("${LIBOMP_PREFIX}/include")
213+
214+
# Create OpenMP target if it doesn't exist
215+
if(NOT TARGET OpenMP::OpenMP_CXX)
216+
add_library(OpenMP::OpenMP_CXX SHARED IMPORTED)
217+
set_target_properties(OpenMP::OpenMP_CXX PROPERTIES
218+
IMPORTED_LOCATION "${OpenMP_omp_LIBRARY}"
219+
INTERFACE_COMPILE_OPTIONS "-Xpreprocessor;-fopenmp"
220+
INTERFACE_INCLUDE_DIRECTORIES "${OpenMP_CXX_INCLUDE_DIRS}"
221+
INTERFACE_LINK_LIBRARIES "${OpenMP_omp_LIBRARY}")
222+
endif()
223+
224+
set(OpenMP_FOUND TRUE)
225+
set(OpenMP_CXX_FOUND TRUE)
226+
227+
message(STATUS "[Helios] Automatically configured OpenMP using Homebrew libomp from ${LIBOMP_PREFIX}")
228+
else()
229+
message(WARNING "[Helios] OpenMP requires libomp on macOS. Install with: brew install libomp")
230+
endif()
231+
else()
232+
message(WARNING "[Helios] OpenMP on macOS requires Homebrew. Install from https://brew.sh then run: brew install libomp")
233+
endif()
234+
endif()
235+
236+
# Final OpenMP configuration
168237
if (OpenMP_CXX_FOUND)
169238
message( STATUS "[Helios] Enabling OpenMP support" )
170239
target_link_libraries(helios PUBLIC OpenMP::OpenMP_CXX)

doc/CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Changelog
22

3+
# [1.3.45] 2025-08-21
4+
5+
* Fixed errors in the `radiation_StanfordBunny` and `energybalance_StanfordBunny` samples that were using the deprecated `Context::setPrimitiveData()` signature with explicit type and size parameters.
6+
* Added automatic version change detection and CUDA object file cleanup improvements to the CMake build system
7+
* Enhanced benchmark collection and reporting in `utilities/run_benchmarks.sh`
8+
* Enhanced OpenMP configuration for macOS with automatic Apple Clang + libomp setup via Homebrew detection
9+
* Added OpenMP installation step to GitHub Actions macOS workflow for improved CI compatibility
10+
11+
## CollisionDetection
12+
- Added comprehensive ray-tracing implementation with new `CollisionDetection_RayTracing.cpp` module
13+
- Implemented advanced ray-tracing data structures including `RayQuery`, `HitResult`, `RayTracingStats`, `RayPacket`, and `RayStream` for efficient batch ray processing
14+
- Added GPU-accelerated ray casting with warp-efficient CUDA kernels for optimal performance
15+
- Introduced Structure-of-Arrays (SoA) BVH layout (`BVHNodesSoA`) for improved memory access patterns and cache efficiency
16+
- Added SIMD-optimized ray-AABB intersection tests using AVX2/SSE instructions
17+
- Implemented streaming ray tracer interface for optimal GPU utilization with memory usage statistics
18+
- Enhanced spatial query capabilities including cone intersection queries, voxel ray path length calculations, and proximity-based collision detection
19+
- Added advanced geometry operations for gap detection, optimal path finding, and attraction point detection within perception cones
20+
- Implemented thread-safe primitive caching system for safe multi-threaded ray casting operations
21+
- Added comprehensive GPU memory management with allocation and transfer optimizations
22+
- Enhanced CMakeLists.txt with improved CUDA support and compilation handling
23+
- Extended `HitResult` structure with `path_length` field for unobstructed voxel path length calculations in LiDAR processing
24+
- Added `calculateVoxelPathLengths()` method for efficient ray path length calculations through individual voxels with OpenMP parallelization
25+
- Enhanced `performGridRayIntersection()` to return detailed `HitResult` objects for each hit instead of simple hit counts
26+
- Added ray classification methods `getRayClassificationCounts()` for Beer's law calculations with hit_before/hit_after statistics
27+
28+
## Visualizer
29+
- Fixed an error with `Visualizer::setColorbarRange()` where it was setting the color of values clipped below the lower bound incorrectly by implementing proper bounds checking for normalized color positions.
30+
31+
## Radiation
32+
- Fixed `RadiationModel::updateGeometry()` to properly handle cases when called with an empty Context by adding a check for zero primitives and returning early with a warning message.
33+
34+
## Plant Architecture
35+
- Updated integration with enhanced collision detection capabilities for improved geometric operations
36+
337
# [1.3.44] 2025-08-10
438

539
* Added `BUILD_TESTS` CMake option to conditionally build test executables instead of building them by default

doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PROJECT_NAME = Helios
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER = v1.3.44
51+
PROJECT_NUMBER = v1.3.45
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a

doc/DoxygenLayout.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
<tab type="user" visible="yes" url="@ref IO" title="File I/O"/>
1010
</tab>
1111
<tab type="usergroup" visible="yes" url="@ref PlugIns" title="Plugins" intro="">
12-
<tab type="user" visible="yes" url="@ref VisualizerDoc" title="Visualizer"/>
13-
<tab type="user" visible="yes" url="@ref RadiationDoc" title="Radiation Model"/>
14-
<tab type="user" visible="yes" url="@ref EnergyBalanceDoc" title="Energy Balance Model"/>
15-
<tab type="user" visible="yes" url="@ref BLConductanceDoc" title="Boundary-Layer Conductance"/>
16-
<tab type="user" visible="yes" url="@ref LiDARDoc" title="Terrestrial LiDAR"/>
1712
<tab type="user" visible="yes" url="@ref AerialLiDARDoc" title="Aerial LiDAR"/>
13+
<tab type="user" visible="yes" url="@ref BLConductanceDoc" title="Boundary-Layer Conductance"/>
14+
<tab type="user" visible="yes" url="@ref CanopyGeneratorDoc" title="Canopy Generator"/>
15+
<tab type="user" visible="yes" url="@ref EnergyBalanceDoc" title="Energy Balance Model"/>
16+
<tab type="user" visible="yes" url="@ref LeafOpticsDoc" title="Leaf Optics Model"/>
17+
<tab type="user" visible="yes" url="@ref ParameterOptimizationDoc" title="Model Parameter Optimization Utility"/>
1818
<tab type="user" visible="yes" url="@ref PhotosynthesisDoc" title="Photosynthesis Models"/>
19-
<tab type="user" visible="yes" url="@ref StomatalDoc" title="Stomatal Conductance Models"/>
20-
<tab type="user" visible="yes" url="@ref SolarPositionDoc" title="Solar Position and Fluxes Model"/>
21-
<tab type="user" visible="yes" url="@ref VoxelIntersectionDoc" title="Voxel Intersection"/>
2219
<tab type="user" visible="yes" url="@ref PlantArchitectureDoc" title="Plant Architecture"/>
23-
<tab type="user" visible="yes" url="@ref CanopyGeneratorDoc" title="Canopy Generator"/>
24-
<tab type="user" visible="yes" url="@ref WeberPennDoc" title="Weber-Penn Tree"/>
2520
<tab type="user" visible="yes" url="@ref PlantHydraulicsDoc" title="Plant Hydraulics Model"/>
26-
<tab type="user" visible="yes" url="@ref ParameterOptimizationDoc" title="Model Parameter Optimization Utility"/>
27-
<tab type="user" visible="yes" url="@ref LeafOpticsDoc" title="Leaf Optics Model"/>
2821
<tab type="user" visible="yes" url="@ref ProjectBuilderDoc" title="Project Builder"/>
22+
<tab type="user" visible="yes" url="@ref RadiationDoc" title="Radiation Model"/>
23+
<tab type="user" visible="yes" url="@ref SolarPositionDoc" title="Solar Position and Fluxes Model"/>
24+
<tab type="user" visible="yes" url="@ref StomatalDoc" title="Stomatal Conductance Models"/>
25+
<tab type="user" visible="yes" url="@ref LiDARDoc" title="Terrestrial LiDAR"/>
26+
<tab type="user" visible="yes" url="@ref VisualizerDoc" title="Visualizer"/>
27+
<tab type="user" visible="yes" url="@ref VoxelIntersectionDoc" title="Voxel Intersection"/>
28+
<tab type="user" visible="yes" url="@ref WeberPennDoc" title="Weber-Penn Tree"/>
2929
</tab>
3030
<tab type="usergroup" visible="yes" url="@ref Tutorials" title="Tutorials" intro="">
3131
<tab type="user" visible="yes" url="@ref context_selftest_tutorial" title="Tutorial 0: Context Self-Test"/>

doc/UserGuide.dox

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,23 +141,23 @@
141141
4. Class: C++ class associated with the plug-in and the class constructor(s).
142142
5. Usage: Explanation of plug-in member functions for performing various tasks related to the plug-in. In general, these explanations will comprise the majority of the plug-in documentation.
143143

144-
- \subpage VisualizerDoc "Visualizer: visualization of model geometry and data"
145-
- \subpage WeberPennDoc "Weber-Penn Tree: Procedural tree architecture generation"
146-
- \subpage RadiationDoc "Radiation Model: GPU-accelerated ray-tracing radiation transport model"
147-
- \subpage EnergyBalanceDoc "Energy Balance Model: Surface energy balance solution"
144+
- \subpage AerialLiDARDoc "Aerial LiDAR: Processing and visualizing aerial LiDAR data"
148145
- \subpage BLConductanceDoc "Boundary-Layer Conductance: Perform boundary-layer conductance model calculations based on several possible models."
146+
- \subpage CanopyGeneratorDoc "Canopy Generator: Simple generation of different type of plant and canopy geometries."
147+
- \subpage EnergyBalanceDoc "Energy Balance Model: Surface energy balance solution"
148+
- \subpage LeafOpticsDoc "Leaf Optics: Implementation of the PROSPECT-PRO leaf optical model of leaf reflectance and transmittance spectra."
149149
- \subpage LiDARDoc "LiDAR: Processing and visualizing terrestrial LiDAR data"
150-
- \subpage AerialLiDARDoc "Aerial LiDAR: Processing and visualizing aerial LiDAR data"
150+
- \subpage ParameterOptimizationDoc "Parameter Optimization: Utility for optimization of model parameters."
151151
- \subpage PhotosynthesisDoc "Photosynthesis Model: Photosynthetic assimilation model"
152-
- \subpage StomatalDoc "Stomatal Conductance Model: Model for the conductance of water vapor through stomatal pores"
153-
- \subpage SolarPositionDoc "Solar Position Model: Model for the position of the sun in the sky, as well as models of solar radiation flux and longwave flux from the sky."
154-
- \subpage VoxelIntersectionDoc "Voxel Intersection: Determine planar primitive elements that lie within voxel primitives."
155-
- \subpage CanopyGeneratorDoc "Canopy Generator: Simple generation of different type of plant and canopy geometries."
156152
- \subpage PlantArchitectureDoc "Plant Architecture: Flexible procedural plant generation with dynamic growth and phenology."
157153
- \subpage PlantHydraulicsDoc "Plant Hydraulics: Models the water potentials, water contents, hydraulic conductances, and hydraulic capacitances."
158-
- \subpage ParameterOptimizationDoc "Parameter Optimization: Utility for optimization of model parameters."
159-
- \subpage LeafOpticsDoc "Leaf Optics: Implementation of the PROSPECT-PRO leaf optical model of leaf reflectance and transmittance spectra."
160154
- \subpage ProjectBuilderDoc "GUI and XML interface for creating and running Helios projects."
155+
- \subpage RadiationDoc "Radiation Model: GPU-accelerated ray-tracing radiation transport model"
156+
- \subpage SolarPositionDoc "Solar Position Model: Model for the position of the sun in the sky, as well as models of solar radiation flux and longwave flux from the sky."
157+
- \subpage StomatalDoc "Stomatal Conductance Model: Model for the conductance of water vapor through stomatal pores"
158+
- \subpage VisualizerDoc "Visualizer: visualization of model geometry and data"
159+
- \subpage VoxelIntersectionDoc "Voxel Intersection: Determine planar primitive elements that lie within voxel primitives."
160+
- \subpage WeberPennDoc "Weber-Penn Tree: Procedural tree architecture generation"
161161

162162
*/
163163

doc/html/_a_p_i.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<td id="projectlogo"><img alt="Logo" src="Helios_logo_small.png"></td>
8585
<td id="projectalign">
8686
<div id="projectname">
87-
<span id="projectnumber">&#160;v1.3.44</span>
87+
<span id="projectnumber">&#160;v1.3.45</span>
8888
</div>
8989
</td>
9090
<td id="searchbox-container"> <div id="MSearchBox" class="MSearchBoxInactive">

doc/html/_aerial_li_d_a_r_8cpp.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<td id="projectlogo"><img alt="Logo" src="Helios_logo_small.png"></td>
8585
<td id="projectalign">
8686
<div id="projectname">
87-
<span id="projectnumber">&#160;v1.3.44</span>
87+
<span id="projectnumber">&#160;v1.3.45</span>
8888
</div>
8989
</td>
9090
<td id="searchbox-container"> <div id="MSearchBox" class="MSearchBoxInactive">

doc/html/_aerial_li_d_a_r_8cpp_source.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<td id="projectlogo"><img alt="Logo" src="Helios_logo_small.png"></td>
8585
<td id="projectalign">
8686
<div id="projectname">
87-
<span id="projectnumber">&#160;v1.3.44</span>
87+
<span id="projectnumber">&#160;v1.3.45</span>
8888
</div>
8989
</td>
9090
<td id="searchbox-container"> <div id="MSearchBox" class="MSearchBoxInactive">

doc/html/_aerial_li_d_a_r_8cu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<td id="projectlogo"><img alt="Logo" src="Helios_logo_small.png"></td>
8585
<td id="projectalign">
8686
<div id="projectname">
87-
<span id="projectnumber">&#160;v1.3.44</span>
87+
<span id="projectnumber">&#160;v1.3.45</span>
8888
</div>
8989
</td>
9090
<td id="searchbox-container"> <div id="MSearchBox" class="MSearchBoxInactive">

0 commit comments

Comments
 (0)