File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
include/geode/geometry/detail Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,15 @@ namespace geode
9595 bboxes, ROOT_INDEX, 0 , bboxes.size () );
9696 }
9797 const auto grain = async::detail::auto_grain_size ( bboxes.size () );
98- const auto nb_async_depth = std::log2 ( grain );
99- async_depth_ =
100- depth_ > nb_async_depth ? depth_ - nb_async_depth : depth_;
98+ if ( grain < 8 )
99+ {
100+ async_depth_ = 0 ;
101+ }
102+ else
103+ {
104+ const auto nb_async_depth = std::log2 ( grain );
105+ async_depth_ = depth_ - nb_async_depth;
106+ }
101107 }
102108
103109 [[nodiscard]] index_t nb_bboxes () const
@@ -458,7 +464,7 @@ namespace geode
458464
459465 // The acceleration is here:
460466 if ( !node ( node_index1 )
461- .intersects ( other_tree.impl_ ->node ( node_index2 ) ) )
467+ .intersects ( other_tree.impl_ ->node ( node_index2 ) ) )
462468 {
463469 return false ;
464470 }
You can’t perform that action at this time.
0 commit comments