30 template<
class Tmorton,
class Tvec, u32 dim>
31 struct CLBVHTraverserAccessed;
43 template<
class Tmorton,
class Tvec, u32 dim>
44 struct CLBVHTraverser;
47 template<
class Tmorton,
class Tvec, u32 dim>
48 struct CLBVHTraverserHost;
51 template<
class Tmorton,
class Tvec, u32 dim>
52 struct CLBVHObjectIteratorAccessed;
64 template<
class Tmorton,
class Tvec, u32 dim>
65 struct CLBVHObjectIterator;
68 template<
class Tmorton,
class Tvec, u32 dim>
69 struct CLBVHObjectIteratorHost;
73template<
class Tmorton,
class Tvec, u32 dim>
99 template<
class Functor1,
class Functor2,
class Functor3>
101 Functor1 &&traverse_condition,
102 Functor2 &&on_found_leaf,
103 Functor3 &&on_excluded_node)
const {
106 std::forward<Functor1>(traverse_condition),
107 std::forward<Functor2>(on_found_leaf),
108 std::forward<Functor3>(on_excluded_node));
112 template<
class Functor1,
class Functor2,
class Functor3>
115 Functor1 &&traverse_condition,
116 Functor2 &&on_found_leaf,
117 Functor3 &&on_excluded_node)
const {
121 std::forward<Functor1>(traverse_condition),
122 std::forward<Functor2>(on_found_leaf),
123 std::forward<Functor3>(on_excluded_node));
126 template<
class Functor1,
class Functor2>
127 inline void rtree_for(Functor1 &&traverse_condition_with_aabb, Functor2 &&on_found_leaf)
const {
131 return traverse_condition_with_aabb(
135 on_found_leaf(node_id);
141template<
class Tmorton,
class Tvec, u32 dim>
159 template<
class Functor1,
class Functor2>
161 Functor1 &&traverse_condition_with_aabb, Functor2 &&on_found_object)
const {
164 std::forward<Functor1>(traverse_condition_with_aabb),
172template<
class Tmorton,
class Tvec, u32 dim>
197template<
class Tmorton,
class Tvec, u32 dim>
212template<
class Tmorton,
class Tvec, u32 dim>
232template<
class Tmorton,
class Tvec, u32 dim>
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
void complete_event_state(sycl::event e) const
Complete the event state of the buffer.
const T * get_read_access(sham::EventList &depends_list, SourceLocation src_loc=SourceLocation{}) const
Get a read-only pointer to the buffer's data.
Class to manage a list of SYCL events.
Morton curve implementation.
Axis-Aligned bounding box.
Accessed version of CLBVHObjectIterator.
static constexpr u32 tree_depth_max
maximum depth of the tree according to the morton codes
CLBVHTraverserAccessed< Tmorton, Tvec, dim > tree_traverser
Tree traverser.
LeafCellIterator::acc cell_iterator
Cell iterator.
void rtree_for(Functor1 &&traverse_condition_with_aabb, Functor2 &&on_found_object) const
Traverses the tree and executes a function for each found object.
host version of the object iterator
LeafCellIteratorHost cell_iterator
Cell iterator.
CLBVHTraverserHost< Tmorton, Tvec, dim > tree_traverser
Tree traverser.
acc get_read_access() const
get read only accessor
This class is designed to traverse a BVH tree represented as a Compressed Leaf BVH (CLBVH) and a Karr...
acc get_read_access(sham::EventList &deps) const
get read only accessor
void complete_event_state(sycl::event e) const
complete the buffer states with the resulting event
CLBVHTraverser< Tmorton, Tvec, dim > tree_traverser
Tree traverser.
LeafCellIterator cell_iterator
Cell iterator.
Accessed version of CLBVHTraverser.
static constexpr u32 tree_depth_max
maximum depth of the tree according to the morton codes
void traverse_tree_base(Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const
Traverses the tree by calling tree_traverser's stack_based_traversal.
const Tvec * aabb_min
Minimum of the AABB.
void traverse_tree_base(u32 root_node, Functor1 &&traverse_condition, Functor2 &&on_found_leaf, Functor3 &&on_excluded_node) const
version with root node
KarrasTreeTraverserAccessed tree_traverser
Tree traverser.
const Tvec * aabb_max
Maximum of the AABB.
host version of the traverser
std::vector< Tvec > aabb_min
Minimum of the AABB.
KarrasTreeTraverserHost tree_traverser
Tree traverser.
std::vector< Tvec > aabb_max
Maximum of the AABB.
acc get_read_access() const
get read only accessor
This class is designed to traverse a BVH tree represented as a Compressed Leaf BVH (CLBVH) and a Karr...
acc get_read_access(sham::EventList &deps) const
get read only accessor
const sham::DeviceBuffer< Tvec > & aabb_max
Maximum of the AABB.
void complete_event_state(sycl::event e) const
complete the buffer states with the resulting event
KarrasTreeTraverser tree_traverser
Tree traverser.
const sham::DeviceBuffer< Tvec > & aabb_min
Minimum of the AABB.
KarrasTreeTraverserAccessed get_read_access() const
get read only accessor
Utility struct to traverse a Karras Radix Tree.
KarrasTreeTraverserAccessed get_read_access(sham::EventList &deps) const
get read only accessor
void complete_event_state(sycl::event e) const
complete the buffer states with the resulting event
void for_each_in_leaf_cell(const u32 &cell_id, Functor_iter &&func_it) const
Iterate over all particles in a given cell.
host version of the cell iterator
acc get_read_access() const
get read only accessor
void complete_event_state(sycl::event e) const
Completes the event state for the associated buffers.
acc get_read_access(sham::EventList &deps) const
Get a read-only access to the buffers.