Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
RadixTreeMortonBuilder< morton_t, pos_t, dim > Class Template Reference

Helper class to build morton codes. More...

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

Static Public Member Functions

static void build (sycl::queue &queue, std::tuple< pos_t, pos_t > bounding_box, sycl::buffer< pos_t > &pos_buf, u32 cnt_obj, std::unique_ptr< sycl::buffer< morton_t > > &out_buf_morton, std::unique_ptr< sycl::buffer< u32 > > &out_buf_particle_index_map)
 build morton code table for the tree
 
static void build (sham::DeviceScheduler_ptr dev_sched, std::tuple< pos_t, pos_t > bounding_box, sham::DeviceBuffer< pos_t > &pos_buf, u32 cnt_obj, std::unique_ptr< sycl::buffer< morton_t > > &out_buf_morton, std::unique_ptr< sycl::buffer< u32 > > &out_buf_particle_index_map)
 
static void build_raw (sycl::queue &queue, std::tuple< pos_t, pos_t > bounding_box, sycl::buffer< pos_t > &pos_buf, u32 cnt_obj, std::unique_ptr< sycl::buffer< morton_t > > &out_buf_morton)
 build a raw mrton table from a position buffer (no sorting & index map)
 

Detailed Description

template<class morton_t, class pos_t, u32 dim>
class RadixTreeMortonBuilder< morton_t, pos_t, dim >

Helper class to build morton codes.

Todo:
use Tvec Tmorton and infer dimension from it
Template Parameters
morton_tthe morton type used
pos_tthe position type (vector)
dimdimensionality

Definition at line 32 of file RadixTreeMortonBuilder.hpp.

Member Function Documentation

◆ build() [1/2]

template<class morton_t , class pos_t , u32 dim>
void RadixTreeMortonBuilder< morton_t, pos_t, dim >::build ( sham::DeviceScheduler_ptr  dev_sched,
std::tuple< pos_t, pos_t >  bounding_box,
sham::DeviceBuffer< pos_t > &  pos_buf,
u32  cnt_obj,
std::unique_ptr< sycl::buffer< morton_t > > &  out_buf_morton,
std::unique_ptr< sycl::buffer< u32 > > &  out_buf_particle_index_map 
)
static

Definition at line 68 of file RadixTreeMortonBuilder.cpp.

◆ build() [2/2]

template<class morton_t , class pos_t , u32 dim>
void RadixTreeMortonBuilder< morton_t, pos_t, dim >::build ( sycl::queue &  queue,
std::tuple< pos_t, pos_t >  bounding_box,
sycl::buffer< pos_t > &  pos_buf,
u32  cnt_obj,
std::unique_ptr< sycl::buffer< morton_t > > &  out_buf_morton,
std::unique_ptr< sycl::buffer< u32 > > &  out_buf_particle_index_map 
)
static

build morton code table for the tree

index map detail : (the given index correspong to the one of an original position)

Parameters
queuethe SYCL queue to run on
bounding_boxbounding box of the corresponding input coordinates
pos_bufbuffer of position to build morton codes from
cnt_objnumber of position given in the buffer
out_buf_mortonresulting morton buffer (sorted in morton ordering)
out_buf_particle_index_mapresulting index map

Definition at line 27 of file RadixTreeMortonBuilder.cpp.

+ Here is the call graph for this function:

◆ build_raw()

template<class morton_t , class pos_t , u32 dim>
void RadixTreeMortonBuilder< morton_t, pos_t, dim >::build_raw ( sycl::queue &  queue,
std::tuple< pos_t, pos_t >  bounding_box,
sycl::buffer< pos_t > &  pos_buf,
u32  cnt_obj,
std::unique_ptr< sycl::buffer< morton_t > > &  out_buf_morton 
)
static

build a raw mrton table from a position buffer (no sorting & index map)

Parameters
queuethe SYCL queue to run on
bounding_boxbounding box of the corresponding input coordinates
pos_bufbuffer of position to build morton codes from
cnt_objnumber of position given in the buffer
out_buf_mortonresulting morton buffer (unsorted)

Definition at line 110 of file RadixTreeMortonBuilder.cpp.

+ Here is the call graph for this function:

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