Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
RadixTree< Umorton, Tvec > Class Template Reference

The radix tree. More...

#include <shamtree/include/shamtree/RadixTree.hpp>

+ Collaboration diagram for RadixTree< Umorton, Tvec >:

Classes

struct  CuttedTree
 
class  LeafIterator
 

Public Types

using ipos_t = typename shamrock::sfc::MortonCodes< Umorton, dim >::int_vec_repr
 
using coord_t = typename shambase::VectorProperties< Tvec >::component_type
 
template<class T >
using RadixTreeField = RadixTreeField< T >
 

Public Member Functions

bool is_tree_built ()
 
bool are_range_int_built ()
 
bool are_range_float_built ()
 
void serialize (shamalgs::SerializeHelper &serializer)
 
shamalgs::SerializeSize serialize_byte_size ()
 
RadixTreeField< coord_t > compute_int_boxes (sycl::queue &queue, sham::DeviceBuffer< coord_t > &int_rad_buf, coord_t tolerance)
 
void compute_cell_ibounding_box (sycl::queue &queue)
 
void convert_bounding_box (sycl::queue &queue)
 
std::unique_ptr< sycl::buffer< Umorton > > build_new_morton_buf (sycl::buffer< Tvec > &pos_buf, u32 obj_cnt)
 
 RadixTree (sycl::queue &queue, std::tuple< Tvec, Tvec > treebox, const std::unique_ptr< sycl::buffer< Tvec > > &pos_buf, u32 cnt_obj, u32 reduc_level)
 
 RadixTree (sycl::queue &queue, std::tuple< Tvec, Tvec > treebox, sycl::buffer< Tvec > &pos_buf, u32 cnt_obj, u32 reduc_level)
 
 RadixTree (sham::DeviceScheduler_ptr dev_sched, std::tuple< Tvec, Tvec > treebox, sham::DeviceBuffer< Tvec > &pos_buf, u32 cnt_obj, u32 reduc_level)
 
 RadixTree (const RadixTree &other)
 
u64 memsize () const
 
RadixTree duplicate ()
 
std::unique_ptr< RadixTreeduplicate_to_ptr ()
 
bool is_same (RadixTree &other)
 
template<class T , class LambdaComputeLeaf , class LambdaCombinator >
RadixTreeField< T > compute_field (sycl::queue &queue, u32 nvar, LambdaComputeLeaf &&compute_leaf, LambdaCombinator &&combine) const
 
template<class LambdaForEachCell >
std::pair< std::set< u32 >, std::set< u32 > > get_walk_res_set (LambdaForEachCell &&interact_cd) const
 
template<class LambdaForEachCell >
void for_each_leaf (sycl::queue &queue, LambdaForEachCell &&par_for_each_cell) const
 
std::tuple< coord_t, coord_t > get_min_max_cell_side_length ()
 
CuttedTree cut_tree (sycl::queue &queue, sycl::buffer< u8 > &valid_node)
 
template<class T >
void print_tree_field (sycl::buffer< T > &buf_field)
 
LeafIterator get_leaf_access (sycl::handler &device_handler)
 
template<class T , class LambdaComputeLeaf , class LambdaCombinator >
RadixTree< u_morton, vec3 >::template RadixTreeField< T > compute_field (sycl::queue &queue, u32 nvar, LambdaComputeLeaf &&compute_leaf, LambdaCombinator &&combine) const
 

Static Public Member Functions

static RadixTree deserialize (shamalgs::SerializeHelper &serializer)
 
static RadixTree make_empty ()
 

Public Attributes

std::tuple< Tvec, Tvec > bounding_box
 
shamrock::tree::TreeMortonCodes< Umorton > tree_morton_codes
 
shamrock::tree::TreeReducedMortonCodes< Umorton > tree_reduced_morton_codes
 
shamrock::tree::TreeStructure< Umorton > tree_struct
 
shamrock::tree::TreeCellRanges< Umorton, Tvec > tree_cell_ranges
 

Static Public Attributes

static constexpr u32 tree_depth = Morton::significant_bits + 1
 

Friends

bool operator== (const RadixTree &t1, const RadixTree &t2)
 

Detailed Description

template<class Umorton, class Tvec>
class RadixTree< Umorton, Tvec >

The radix tree.

Template Parameters
Umortonthe morton representation
TvecThe position representation

Definition at line 50 of file RadixTree.hpp.

Member Typedef Documentation

◆ coord_t

template<class Umorton , class Tvec >
using RadixTree< Umorton, Tvec >::coord_t = typename shambase::VectorProperties<Tvec>::component_type

Definition at line 68 of file RadixTree.hpp.

◆ ipos_t

template<class Umorton , class Tvec >
using RadixTree< Umorton, Tvec >::ipos_t = typename shamrock::sfc::MortonCodes<Umorton, dim>::int_vec_repr

Definition at line 67 of file RadixTree.hpp.

◆ RadixTreeField

template<class Umorton , class Tvec >
template<class T >
using RadixTree< Umorton, Tvec >::RadixTreeField = RadixTreeField<T>

Definition at line 192 of file RadixTree.hpp.

Constructor & Destructor Documentation

◆ RadixTree() [1/2]

template<class u_morton , class Tvec >
RadixTree< u_morton, Tvec >::RadixTree ( sham::DeviceScheduler_ptr  dev_sched,
std::tuple< Tvec, Tvec >  treebox,
sham::DeviceBuffer< Tvec > &  pos_buf,
u32  cnt_obj,
u32  reduc_level 
)

Definition at line 70 of file RadixTree.cpp.

◆ RadixTree() [2/2]

template<class Umorton , class Tvec >
RadixTree< Umorton, Tvec >::RadixTree ( const RadixTree< Umorton, Tvec > &  other)
inline

Definition at line 143 of file RadixTree.hpp.

Member Function Documentation

◆ are_range_float_built()

template<class Umorton , class Tvec >
bool RadixTree< Umorton, Tvec >::are_range_float_built ( )
inline

Definition at line 87 of file RadixTree.hpp.

◆ are_range_int_built()

template<class Umorton , class Tvec >
bool RadixTree< Umorton, Tvec >::are_range_int_built ( )
inline

Definition at line 85 of file RadixTree.hpp.

◆ build_new_morton_buf()

template<class Umorton , class Tvec >
std::unique_ptr< sycl::buffer< Umorton > > RadixTree< Umorton, Tvec >::build_new_morton_buf ( sycl::buffer< Tvec > &  pos_buf,
u32  obj_cnt 
)
inline

Definition at line 112 of file RadixTree.hpp.

◆ compute_cell_ibounding_box()

template<class u_morton , class vec3 >
void RadixTree< u_morton, vec3 >::compute_cell_ibounding_box ( sycl::queue &  queue)

Definition at line 146 of file RadixTree.cpp.

◆ compute_field()

template<class Umorton , class Tvec >
template<class T , class LambdaComputeLeaf , class LambdaCombinator >
RadixTree< u_morton, vec3 >::template RadixTreeField< T > RadixTree< Umorton, Tvec >::compute_field ( sycl::queue &  queue,
u32  nvar,
LambdaComputeLeaf &&  compute_leaf,
LambdaCombinator &&  combine 
) const
inline

Definition at line 259 of file RadixTree.hpp.

◆ compute_int_boxes()

template<class u_morton , class vec >
auto RadixTree< u_morton, vec >::compute_int_boxes ( sycl::queue &  queue,
sham::DeviceBuffer< coord_t > &  int_rad_buf,
coord_t  tolerance 
)

Definition at line 159 of file RadixTree.cpp.

◆ convert_bounding_box()

template<class morton_t , class pos_t >
void RadixTree< morton_t, pos_t >::convert_bounding_box ( sycl::queue &  queue)

Definition at line 152 of file RadixTree.cpp.

◆ cut_tree()

template<class u_morton , class vec3 >
RadixTree< u_morton, vec3 >::CuttedTree RadixTree< u_morton, vec3 >::cut_tree ( sycl::queue &  queue,
sycl::buffer< u8 > &  valid_node 
)

Definition at line 386 of file RadixTree.cpp.

◆ deserialize()

template<class u_morton , class pos_t >
RadixTree< u_morton, pos_t > RadixTree< u_morton, pos_t >::deserialize ( shamalgs::SerializeHelper serializer)
static

Definition at line 126 of file RadixTree.cpp.

◆ duplicate()

template<class Umorton , class Tvec >
RadixTree RadixTree< Umorton, Tvec >::duplicate ( )
inline

Definition at line 167 of file RadixTree.hpp.

◆ duplicate_to_ptr()

template<class Umorton , class Tvec >
std::unique_ptr< RadixTree > RadixTree< Umorton, Tvec >::duplicate_to_ptr ( )
inline

Definition at line 172 of file RadixTree.hpp.

◆ for_each_leaf()

template<class u_morton , class vec3 >
template<class LambdaForEachCell >
void RadixTree< u_morton, vec3 >::for_each_leaf ( sycl::queue &  queue,
LambdaForEachCell &&  par_for_each_cell 
) const
inline

Definition at line 407 of file RadixTree.hpp.

◆ get_leaf_access()

template<class Umorton , class Tvec >
LeafIterator RadixTree< Umorton, Tvec >::get_leaf_access ( sycl::handler &  device_handler)
inline

Definition at line 252 of file RadixTree.hpp.

◆ get_min_max_cell_side_length()

template<class u_morton , class vec3 >
auto RadixTree< u_morton, vec3 >::get_min_max_cell_side_length ( )
inline

Definition at line 501 of file RadixTree.hpp.

◆ get_walk_res_set()

template<class u_morton , class vec3 >
template<class LambdaForEachCell >
std::pair< std::set< u32 >, std::set< u32 > > RadixTree< u_morton, vec3 >::get_walk_res_set ( LambdaForEachCell &&  interact_cd) const
inline

Definition at line 349 of file RadixTree.hpp.

◆ is_same()

template<class Umorton , class Tvec >
bool RadixTree< Umorton, Tvec >::is_same ( RadixTree< Umorton, Tvec > &  other)
inline

Definition at line 177 of file RadixTree.hpp.

◆ is_tree_built()

template<class Umorton , class Tvec >
bool RadixTree< Umorton, Tvec >::is_tree_built ( )
inline

Definition at line 83 of file RadixTree.hpp.

◆ make_empty()

template<class Umorton , class Tvec >
static RadixTree RadixTree< Umorton, Tvec >::make_empty ( )
inlinestatic

Definition at line 221 of file RadixTree.hpp.

◆ memsize()

template<class Umorton , class Tvec >
u64 RadixTree< Umorton, Tvec >::memsize ( ) const
inline

Definition at line 148 of file RadixTree.hpp.

◆ print_tree_field()

template<class u_morton , class vec3 >
template<class T >
template void RadixTree< Umorton, Tvec >::print_tree_field ( sycl::buffer< T > &  buf_field)

Definition at line 323 of file RadixTree.cpp.

◆ serialize()

template<class u_morton , class vec3 >
void RadixTree< u_morton, vec3 >::serialize ( shamalgs::SerializeHelper serializer)

Definition at line 106 of file RadixTree.cpp.

◆ serialize_byte_size()

template<class u_morton , class pos_t >
shamalgs::SerializeSize RadixTree< u_morton, pos_t >::serialize_byte_size ( )

Definition at line 118 of file RadixTree.cpp.

Friends And Related Symbol Documentation

◆ operator==

template<class Umorton , class Tvec >
bool operator== ( const RadixTree< Umorton, Tvec > &  t1,
const RadixTree< Umorton, Tvec > &  t2 
)
friend

Definition at line 95 of file RadixTree.hpp.

Member Data Documentation

◆ bounding_box

template<class Umorton , class Tvec >
std::tuple<Tvec, Tvec> RadixTree< Umorton, Tvec >::bounding_box

Definition at line 72 of file RadixTree.hpp.

◆ tree_cell_ranges

template<class Umorton , class Tvec >
shamrock::tree::TreeCellRanges<Umorton, Tvec> RadixTree< Umorton, Tvec >::tree_cell_ranges

Definition at line 81 of file RadixTree.hpp.

◆ tree_depth

template<class Umorton , class Tvec >
constexpr u32 RadixTree< Umorton, Tvec >::tree_depth = Morton::significant_bits + 1
staticconstexpr

Definition at line 70 of file RadixTree.hpp.

◆ tree_morton_codes

template<class Umorton , class Tvec >
shamrock::tree::TreeMortonCodes<Umorton> RadixTree< Umorton, Tvec >::tree_morton_codes

Definition at line 75 of file RadixTree.hpp.

◆ tree_reduced_morton_codes

template<class Umorton , class Tvec >
shamrock::tree::TreeReducedMortonCodes<Umorton> RadixTree< Umorton, Tvec >::tree_reduced_morton_codes

Definition at line 76 of file RadixTree.hpp.

◆ tree_struct

template<class Umorton , class Tvec >
shamrock::tree::TreeStructure<Umorton> RadixTree< Umorton, Tvec >::tree_struct

Definition at line 79 of file RadixTree.hpp.


The documentation for this class was generated from the following files: