Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim > Struct Template Reference

Accessed version of CLBVHObjectIterator. More...

Collaboration diagram for shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >:

Public Member Functions

template<class Functor1, class Functor2>
void rtree_for (Functor1 &&traverse_condition_with_aabb, Functor2 &&on_found_object) const
 Traverses the tree and executes a function for each found object.
template<class StackAccessor, class Functor1, class Functor2>
void rtree_for (StackAccessor &&stack, u32 stack_size, Functor1 &&traverse_condition_with_aabb, Functor2 &&on_found_object) const

Public Attributes

LeafCellIterator::acc cell_iterator
 Cell iterator.
CLBVHTraverserAccessed< Tmorton, Tvec, dim > tree_traverser
 Tree traverser.

Static Public Attributes

static constexpr u32 tree_depth_max = shamrock::sfc::MortonCodes<Tmorton, 3>::significant_bits + 1
 maximum depth of the tree according to the morton codes

Detailed Description

template<class Tmorton, class Tvec, u32 dim>
struct shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >

Accessed version of CLBVHObjectIterator.

Definition at line 166 of file CLBVHObjectIterator.hpp.

Member Function Documentation

◆ rtree_for() [1/2]

template<class Tmorton, class Tvec, u32 dim>
template<class Functor1, class Functor2>
void shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >::rtree_for ( Functor1 && traverse_condition_with_aabb,
Functor2 && on_found_object ) const
inline

Traverses the tree and executes a function for each found object.

Parameters
[in]traverse_condition_with_aabbA function taking a node_id and its AABB, and returning a boolean indicating whether to traverse the node further.
[in]on_found_objectA function to be called for each object found in a leaf node that meets the traversal condition.

Definition at line 184 of file CLBVHObjectIterator.hpp.

◆ rtree_for() [2/2]

template<class Tmorton, class Tvec, u32 dim>
template<class StackAccessor, class Functor1, class Functor2>
void shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >::rtree_for ( StackAccessor && stack,
u32 stack_size,
Functor1 && traverse_condition_with_aabb,
Functor2 && on_found_object ) const
inline

version using a stack supplied by the caller instead of an internal std::array (e.g. a slice of a local_accessor for shared memory offload). stack is a functor (u32 id) -> u32 & giving access to the entry id of the stack and stack_size is its capacity, which must be at least the tree depth + 1.

Definition at line 200 of file CLBVHObjectIterator.hpp.

Member Data Documentation

◆ cell_iterator

template<class Tmorton, class Tvec, u32 dim>
LeafCellIterator::acc shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >::cell_iterator

Cell iterator.

Definition at line 172 of file CLBVHObjectIterator.hpp.

◆ tree_depth_max

template<class Tmorton, class Tvec, u32 dim>
u32 shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >::tree_depth_max = shamrock::sfc::MortonCodes<Tmorton, 3>::significant_bits + 1
staticconstexpr

maximum depth of the tree according to the morton codes

Definition at line 169 of file CLBVHObjectIterator.hpp.

◆ tree_traverser

template<class Tmorton, class Tvec, u32 dim>
CLBVHTraverserAccessed<Tmorton, Tvec, dim> shamtree::CLBVHObjectIteratorAccessed< Tmorton, Tvec, dim >::tree_traverser

Tree traverser.

Definition at line 173 of file CLBVHObjectIterator.hpp.


The documentation for this struct was generated from the following file: