![]() |
Shamrock 2025.10.0
Astrophysical Code
|
#include "shambackends/DeviceBuffer.hpp"#include "shambackends/DeviceScheduler.hpp"#include "shambackends/EventList.hpp"#include "shambackends/kernel_call.hpp"#include "shambackends/math.hpp"#include "shamsys/NodeInstance.hpp"#include "shamtree/CellIterator.hpp"#include "shamtree/KarrasRadixTree.hpp"#include "shamtree/LeafCellIterator.hpp"#include <functional>#include <utility>
Include dependency graph for KarrasRadixTreeAABB.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | shamtree::KarrasRadixTreeAABB< Tvec > |
Functions | |
| template<class Tvec > | |
| KarrasRadixTreeAABB< Tvec > | shamtree::new_empty_karras_radix_tree_aabb () |
| template<class Tvec > | |
| KarrasRadixTreeAABB< Tvec > | shamtree::prepare_karras_radix_tree_aabb (const KarrasRadixTree &tree, KarrasRadixTreeAABB< Tvec > &&recycled_tree_aabb) |
| Prepare a KarrasRadixTreeAABB from a KarrasRadixTree. | |
| template<class Tvec > | |
| void | shamtree::propagate_aabb_up (KarrasRadixTreeAABB< Tvec > &tree_aabb, const KarrasRadixTree &tree) |
| Propagates the axis-aligned bounding boxes (AABBs) upwards in the tree. | |
| template<class Tvec > | |
| KarrasRadixTreeAABB< Tvec > | shamtree::compute_tree_aabb (const KarrasRadixTree &tree, KarrasRadixTreeAABB< Tvec > &&recycled_tree_aabb, const std::function< void(KarrasRadixTreeAABB< Tvec > &, u32)> &fct_fill_leaf) |
| Compute the AABB of all cells in the tree. | |
| template<class Tvec > | |
| KarrasRadixTreeAABB< Tvec > | shamtree::compute_tree_aabb_from_positions (const KarrasRadixTree &tree, const LeafCellIterator &cell_it, KarrasRadixTreeAABB< Tvec > &&recycled_tree_aabb, sham::DeviceBuffer< Tvec > &positions) |
| Compute the AABB of all cells in the tree from positions. | |
| template<class Tvec > | |
| KarrasRadixTreeAABB< Tvec > | shamtree::compute_tree_aabb_from_position_ranges (const KarrasRadixTree &tree, const LeafCellIterator &cell_it, KarrasRadixTreeAABB< Tvec > &&recycled_tree_aabb, sham::DeviceBuffer< Tvec > &min, sham::DeviceBuffer< Tvec > &max) |
| same but for position ranges | |
Definition in file KarrasRadixTreeAABB.hpp.
| KarrasRadixTreeAABB< Tvec > shamtree::compute_tree_aabb | ( | const KarrasRadixTree & | tree, |
| KarrasRadixTreeAABB< Tvec > && | recycled_tree_aabb, | ||
| const std::function< void(KarrasRadixTreeAABB< Tvec > &, u32)> & | fct_fill_leaf | ||
| ) |
Compute the AABB of all cells in the tree.
| tree | The tree to compute the AABBs for. |
| iter | The cell iterator to use to compute the AABBs. |
| recycled_tree_aabb | The tree AABBs to recycle. |
| fct_fill_leaf | The function to use to compute the AABBs of the leaf cells. |
Definition at line 77 of file KarrasRadixTreeAABB.cpp.
Here is the call graph for this function:| KarrasRadixTreeAABB< Tvec > shamtree::compute_tree_aabb_from_position_ranges | ( | const KarrasRadixTree & | tree, |
| const LeafCellIterator & | cell_it, | ||
| KarrasRadixTreeAABB< Tvec > && | recycled_tree_aabb, | ||
| sham::DeviceBuffer< Tvec > & | min, | ||
| sham::DeviceBuffer< Tvec > & | max | ||
| ) |
same but for position ranges
Definition at line 143 of file KarrasRadixTreeAABB.cpp.
Here is the call graph for this function:| KarrasRadixTreeAABB< Tvec > shamtree::compute_tree_aabb_from_positions | ( | const KarrasRadixTree & | tree, |
| const LeafCellIterator & | cell_it, | ||
| KarrasRadixTreeAABB< Tvec > && | recycled_tree_aabb, | ||
| sham::DeviceBuffer< Tvec > & | positions | ||
| ) |
Compute the AABB of all cells in the tree from positions.
This function computes the AABBs of all cells in the tree by iterating over the objects in each cell and computing the minimum and maximum bounds.
| tree | The tree to compute the AABBs for. |
| cell_it | The cell iterator to use to access the cells. |
| recycled_tree_aabb | The tree AABBs to recycle. |
| positions | The buffer of positions to use for computing the AABBs. |
Definition at line 93 of file KarrasRadixTreeAABB.cpp.
Here is the call graph for this function:| KarrasRadixTreeAABB< Tvec > shamtree::new_empty_karras_radix_tree_aabb | ( | ) |
Definition at line 67 of file KarrasRadixTreeAABB.hpp.
| KarrasRadixTreeAABB< Tvec > shamtree::prepare_karras_radix_tree_aabb | ( | const KarrasRadixTree & | tree, |
| KarrasRadixTreeAABB< Tvec > && | recycled_tree_aabb | ||
| ) |
Prepare a KarrasRadixTreeAABB from a KarrasRadixTree.
This function prepares a KarrasRadixTreeAABB from a KarrasRadixTree. It allocates the necessary buffers to store the AABBs of all cells in the tree and recycles the buffers from the recycled_tree_aabb argument if possible.
| tree | The KarrasRadixTree to prepare the AABBs for. |
| recycled_tree_aabb | The KarrasRadixTreeAABB to recycle the buffers from. |
Definition at line 21 of file KarrasRadixTreeAABB.cpp.
Here is the call graph for this function:| void shamtree::propagate_aabb_up | ( | KarrasRadixTreeAABB< Tvec > & | tree_aabb, |
| const KarrasRadixTree & | tree | ||
| ) |
Propagates the axis-aligned bounding boxes (AABBs) upwards in the tree.
This function updates the AABBs for internal nodes in a KarrasRadixTree by combining the AABBs of their child nodes. It iteratively traverses the nodes of the tree, computing the minimum and maximum bounds for each internal node by taking the minimum and maximum of the bounds of its left and right children.
| Tvec | The vector type used for the AABB bounds. |
| tree_aabb | A reference to the KarrasRadixTreeAABB containing the AABBs of the tree nodes. |
| tree | The KarrasRadixTree whose structure is used to determine the parent-child relationships. |
Definition at line 33 of file KarrasRadixTreeAABB.cpp.
Here is the call graph for this function: