Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
shamrock::sfc::MortonKernels< morton_t, _pos_t, dim > Class Template Reference

Public Types

using Morton = MortonCodes< morton_t, dim >
 
using pos_t = _pos_t
 
using coord_t = typename shambase::VectorProperties< pos_t >::component_type
 
using ipos_t = typename Morton::int_vec_repr
 
using int_t = typename Morton::int_vec_repr_base
 
using CoordTransform = shammath::CoordRangeTransform< typename Morton::int_vec_repr, _pos_t >
 

Static Public Member Functions

static CoordTransform get_transform (pos_t bounding_box_min, pos_t bounding_box_max)
 
static ipos_t to_morton_grid (pos_t pos, CoordTransform transform)
 
static pos_t to_real_space (ipos_t pos, CoordTransform transform)
 
static void sycl_xyz_to_morton (sycl::queue &queue, u32 pos_count, sycl::buffer< pos_t > &in_positions, pos_t bounding_box_min, pos_t bounding_box_max, std::unique_ptr< sycl::buffer< morton_t > > &out_morton)
 convert a buffer of 3d positions to morton codes
 
static void sycl_xyz_to_morton (const sham::DeviceScheduler_ptr &dev_sched, u32 pos_count, sham::DeviceBuffer< pos_t > &in_positions, pos_t bounding_box_min, pos_t bounding_box_max, std::unique_ptr< sycl::buffer< morton_t > > &out_morton)
 
static void sycl_fill_trailling_buffer (sycl::queue &queue, u32 morton_count, u32 fill_count, std::unique_ptr< sycl::buffer< morton_t > > &buf_morton)
 fill the end of a buffer (indices from morton_count up to fill_count-1) with error values (maximum int value)
 
static void sycl_irange_to_range (sycl::queue &queue, u32 buf_len, pos_t bounding_box_min, pos_t bounding_box_max, std::unique_ptr< sycl::buffer< ipos_t > > &buf_pos_min_cell, std::unique_ptr< sycl::buffer< ipos_t > > &buf_pos_max_cell, std::unique_ptr< sycl::buffer< pos_t > > &out_buf_pos_min_cell_flt, std::unique_ptr< sycl::buffer< pos_t > > &out_buf_pos_max_cell_flt)
 

Detailed Description

template<class morton_t, class _pos_t, u32 dim>
class shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >

Definition at line 44 of file MortonKernels.hpp.

Member Typedef Documentation

◆ coord_t

template<class morton_t , class _pos_t , u32 dim>
using shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::coord_t = typename shambase::VectorProperties<pos_t>::component_type

Definition at line 50 of file MortonKernels.hpp.

◆ CoordTransform

template<class morton_t , class _pos_t , u32 dim>
using shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::CoordTransform = shammath::CoordRangeTransform<typename Morton::int_vec_repr, _pos_t>

Definition at line 54 of file MortonKernels.hpp.

◆ int_t

template<class morton_t , class _pos_t , u32 dim>
using shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::int_t = typename Morton::int_vec_repr_base

Definition at line 52 of file MortonKernels.hpp.

◆ ipos_t

template<class morton_t , class _pos_t , u32 dim>
using shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::ipos_t = typename Morton::int_vec_repr

Definition at line 51 of file MortonKernels.hpp.

◆ Morton

template<class morton_t , class _pos_t , u32 dim>
using shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::Morton = MortonCodes<morton_t, dim>

Definition at line 47 of file MortonKernels.hpp.

◆ pos_t

template<class morton_t , class _pos_t , u32 dim>
using shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::pos_t = _pos_t

Definition at line 49 of file MortonKernels.hpp.

Member Function Documentation

◆ get_transform()

template<class morton_t , class _pos_t , u32 dim>
static CoordTransform shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::get_transform ( pos_t  bounding_box_min,
pos_t  bounding_box_max 
)
inlinestatic

Definition at line 56 of file MortonKernels.hpp.

◆ sycl_fill_trailling_buffer()

template<class morton_t , class _pos_t , u32 dim>
static void shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::sycl_fill_trailling_buffer ( sycl::queue &  queue,
u32  morton_count,
u32  fill_count,
std::unique_ptr< sycl::buffer< morton_t > > &  buf_morton 
)
inlinestatic

fill the end of a buffer (indices from morton_count up to fill_count-1) with error values (maximum int value)

Parameters
queuesycl queue
morton_countlength of the morton buffer
fill_countfinal length to be filled with error value
buf_mortonmorton buffer that will be updated

Definition at line 102 of file MortonKernels.hpp.

◆ sycl_irange_to_range()

template<class morton_t , class _pos_t , u32 dim>
void shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::sycl_irange_to_range ( sycl::queue &  queue,
u32  buf_len,
pos_t  bounding_box_min,
pos_t  bounding_box_max,
std::unique_ptr< sycl::buffer< ipos_t > > &  buf_pos_min_cell,
std::unique_ptr< sycl::buffer< ipos_t > > &  buf_pos_max_cell,
std::unique_ptr< sycl::buffer< pos_t > > &  out_buf_pos_min_cell_flt,
std::unique_ptr< sycl::buffer< pos_t > > &  out_buf_pos_max_cell_flt 
)
static

Definition at line 142 of file MortonKernels.cpp.

◆ sycl_xyz_to_morton() [1/2]

template<class morton_t , class _pos_t , u32 dim>
void shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::sycl_xyz_to_morton ( const sham::DeviceScheduler_ptr &  dev_sched,
u32  pos_count,
sham::DeviceBuffer< pos_t > &  in_positions,
pos_t  bounding_box_min,
pos_t  bounding_box_max,
std::unique_ptr< sycl::buffer< morton_t > > &  out_morton 
)
static

Definition at line 107 of file MortonKernels.cpp.

◆ sycl_xyz_to_morton() [2/2]

template<class morton_t , class _pos_t , u32 dim>
void shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::sycl_xyz_to_morton ( sycl::queue &  queue,
u32  pos_count,
sycl::buffer< pos_t > &  in_positions,
pos_t  bounding_box_min,
pos_t  bounding_box_max,
std::unique_ptr< sycl::buffer< morton_t > > &  out_morton 
)
static

convert a buffer of 3d positions to morton codes

Parameters
queuesycl queue
pos_countlength of the position buffer
in_positions
bounding_box_min
bounding_box_max
out_morton

Definition at line 76 of file MortonKernels.cpp.

◆ to_morton_grid()

template<class morton_t , class _pos_t , u32 dim>
static ipos_t shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::to_morton_grid ( pos_t  pos,
CoordTransform  transform 
)
inlinestatic

Definition at line 60 of file MortonKernels.hpp.

◆ to_real_space()

template<class morton_t , class _pos_t , u32 dim>
static pos_t shamrock::sfc::MortonKernels< morton_t, _pos_t, dim >::to_real_space ( ipos_t  pos,
CoordTransform  transform 
)
inlinestatic

Definition at line 64 of file MortonKernels.hpp.


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