Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
SerialPatchTree< fp_prec_vec > Class Template Reference
Collaboration diagram for SerialPatchTree< fp_prec_vec >:

Public Types

using PtNode = shamrock::scheduler::SerialPatchNode<fp_prec_vec>
using PatchTree = shamrock::scheduler::PatchTree

Public Member Functions

void attach_buf ()
void detach_buf ()
void print_status ()
 SerialPatchTree (PatchTree &ptree, const shamrock::patch::PatchCoordTransform< fp_prec_vec > box_transform)
template<class Acc1, class Acc2>
void host_for_each_leafs_internal (std::function< bool(u64, PtNode pnode)> interact_cd, std::function< void(u64, PtNode)> found_case, Acc1 &&tree, Acc2 &&lpid)
void host_for_each_leafs (std::function< bool(u64, PtNode pnode)> interact_cd, std::function< void(u64, PtNode)> found_case)
const u32get_level_count ()
 accesor to the number of level in the tree
u32 get_element_count ()
 accesor to the number of element in the tree
template<class T, class Func>
shamrock::patch::PatchtreeField< T > make_patch_tree_field (PatchScheduler &sched, sycl::queue &queue, shamrock::patch::PatchField< T > pfield, Func &&reducer)
void dump_dat ()
sycl::buffer< u64compute_patch_owner (sham::DeviceScheduler_ptr dev_sched, sham::DeviceBuffer< fp_prec_vec > &position_buffer, u32 len)

Static Public Member Functions

static SerialPatchTree< fp_prec_vec > build (PatchScheduler &sched)

Public Attributes

u32 root_count = 0
std::unique_ptr< sycl::buffer< PtNode > > serial_tree_buf
std::unique_ptr< sycl::buffer< u64 > > linked_patch_ids_buf

Detailed Description

template<class fp_prec_vec>
class SerialPatchTree< fp_prec_vec >

Definition at line 35 of file SerialPatchTree.hpp.

Member Typedef Documentation

◆ PatchTree

template<class fp_prec_vec>
using SerialPatchTree< fp_prec_vec >::PatchTree = shamrock::scheduler::PatchTree

Definition at line 39 of file SerialPatchTree.hpp.

◆ PtNode

template<class fp_prec_vec>
using SerialPatchTree< fp_prec_vec >::PtNode = shamrock::scheduler::SerialPatchNode<fp_prec_vec>

Definition at line 37 of file SerialPatchTree.hpp.

Constructor & Destructor Documentation

◆ SerialPatchTree()

template<class fp_prec_vec>
SerialPatchTree< fp_prec_vec >::SerialPatchTree ( PatchTree & ptree,
const shamrock::patch::PatchCoordTransform< fp_prec_vec > box_transform )
inline

Definition at line 103 of file SerialPatchTree.hpp.

Member Function Documentation

◆ attach_buf()

template<class fp_prec_vec>
void SerialPatchTree< fp_prec_vec >::attach_buf ( )
inline

Definition at line 46 of file SerialPatchTree.hpp.

◆ build()

template<class fp_prec_vec>
SerialPatchTree< fp_prec_vec > SerialPatchTree< fp_prec_vec >::build ( PatchScheduler & sched)
inlinestatic

Definition at line 172 of file SerialPatchTree.hpp.

◆ compute_patch_owner()

template<class fp_prec_vec>
sycl::buffer< u64 > SerialPatchTree< vec >::compute_patch_owner ( sham::DeviceScheduler_ptr dev_sched,
sham::DeviceBuffer< fp_prec_vec > & position_buffer,
u32 len )

Definition at line 253 of file SerialPatchTree.hpp.

◆ detach_buf()

template<class fp_prec_vec>
void SerialPatchTree< fp_prec_vec >::detach_buf ( )
inline

Definition at line 60 of file SerialPatchTree.hpp.

◆ dump_dat()

template<class fp_prec_vec>
void SerialPatchTree< fp_prec_vec >::dump_dat ( )
inline

Definition at line 223 of file SerialPatchTree.hpp.

◆ get_element_count()

template<class fp_prec_vec>
u32 SerialPatchTree< fp_prec_vec >::get_element_count ( )
inline

accesor to the number of element in the tree

Returns
const u32& number of element

Definition at line 170 of file SerialPatchTree.hpp.

◆ get_level_count()

template<class fp_prec_vec>
const u32 & SerialPatchTree< fp_prec_vec >::get_level_count ( )
inline

accesor to the number of level in the tree

Returns
const u32& number of level

Definition at line 163 of file SerialPatchTree.hpp.

◆ host_for_each_leafs()

template<class fp_prec_vec>
void SerialPatchTree< fp_prec_vec >::host_for_each_leafs ( std::function< bool(u64, PtNode pnode)> interact_cd,
std::function< void(u64, PtNode)> found_case )
inline

Definition at line 147 of file SerialPatchTree.hpp.

◆ host_for_each_leafs_internal()

template<class fp_prec_vec>
template<class Acc1, class Acc2>
void SerialPatchTree< fp_prec_vec >::host_for_each_leafs_internal ( std::function< bool(u64, PtNode pnode)> interact_cd,
std::function< void(u64, PtNode)> found_case,
Acc1 && tree,
Acc2 && lpid )
inline

Definition at line 110 of file SerialPatchTree.hpp.

◆ make_patch_tree_field()

template<class fp_prec_vec>
template<class T, class Func>
shamrock::patch::PatchtreeField< T > SerialPatchTree< fp_prec_vec >::make_patch_tree_field ( PatchScheduler & sched,
sycl::queue & queue,
shamrock::patch::PatchField< T > pfield,
Func && reducer )
inline

Definition at line 178 of file SerialPatchTree.hpp.

◆ print_status()

template<class fp_prec_vec>
void SerialPatchTree< fp_prec_vec >::print_status ( )
inline

Definition at line 83 of file SerialPatchTree.hpp.

Member Data Documentation

◆ linked_patch_ids_buf

template<class fp_prec_vec>
std::unique_ptr<sycl::buffer<u64> > SerialPatchTree< fp_prec_vec >::linked_patch_ids_buf

Definition at line 44 of file SerialPatchTree.hpp.

◆ root_count

template<class fp_prec_vec>
u32 SerialPatchTree< fp_prec_vec >::root_count = 0

Definition at line 42 of file SerialPatchTree.hpp.

◆ serial_tree_buf

template<class fp_prec_vec>
std::unique_ptr<sycl::buffer<PtNode> > SerialPatchTree< fp_prec_vec >::serial_tree_buf

Definition at line 43 of file SerialPatchTree.hpp.


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