Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
morton.hpp File Reference

Morton curve implementation. More...

#include "bmi.hpp"
#include "shambackends/math.hpp"
#include "shambackends/sycl.hpp"
#include "shambackends/vec.hpp"
#include "shammath/CoordRangeTransform.hpp"
#include <type_traits>
+ Include dependency graph for morton.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shamrock::sfc::MortonInfo< morton_t >
 
struct  shamrock::sfc::MortonInfo< u32 >
 
struct  shamrock::sfc::MortonInfo< u64 >
 
class  shamrock::sfc::MortonCodes< Umorton, dim >
 
class  shamrock::sfc::MortonCodes< u32, 3 >
 
class  shamrock::sfc::MortonCodes< u64, 3 >
 
class  shamrock::sfc::MortonConverter< morton_t, _pos_t, dim >
 
struct  morton_3d::morton_types< morton_repr >
 Helper struct to get types corresponding to a morton code representation. More...
 
struct  morton_3d::morton_types< u32 >
 
struct  morton_3d::morton_types< u64 >
 

Namespaces

namespace  shamrock
 namespace for the main framework
 

Functions

template<class morton_prec , class fp_prec >
morton_prec morton_3d::coord_to_morton (fp_prec x, fp_prec y, fp_prec z)
 
template<class morton_prec >
morton_types< morton_prec >::int_vec_repr morton_3d::morton_to_ipos (morton_prec morton)
 
template<class morton_prec >
morton_types< morton_prec >::int_vec_repr morton_3d::get_offset (u32 clz_)
 
template<>
u64 morton_3d::coord_to_morton< u64, f64 > (f64 x, f64 y, f64 z)
 
template<>
u64 morton_3d::coord_to_morton< u64, f32 > (f32 x, f32 y, f32 z)
 
template<>
u32 morton_3d::coord_to_morton< u32, f64 > (f64 x, f64 y, f64 z)
 
template<>
u32 morton_3d::coord_to_morton< u32, f32 > (f32 x, f32 y, f32 z)
 
template<>
u32_3 morton_3d::morton_to_ipos< u64 > (u64 morton)
 
template<>
u16_3 morton_3d::morton_to_ipos< u32 > (u32 morton)
 
template<>
u32_3 morton_3d::get_offset< u64 > (uint clz_)
 
template<>
u16_3 morton_3d::get_offset< u32 > (uint clz_)
 

Detailed Description

Morton curve implementation.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file morton.hpp.

Function Documentation

◆ coord_to_morton< u32, f32 >()

template<>
u32 morton_3d::coord_to_morton< u32, f32 > ( f32  x,
f32  y,
f32  z 
)
inline

Definition at line 315 of file morton.hpp.

◆ coord_to_morton< u32, f64 >()

template<>
u32 morton_3d::coord_to_morton< u32, f64 > ( f64  x,
f64  y,
f64  z 
)
inline

Definition at line 303 of file morton.hpp.

◆ coord_to_morton< u64, f32 >()

template<>
u64 morton_3d::coord_to_morton< u64, f32 > ( f32  x,
f32  y,
f32  z 
)
inline

Definition at line 291 of file morton.hpp.

◆ coord_to_morton< u64, f64 >()

template<>
u64 morton_3d::coord_to_morton< u64, f64 > ( f64  x,
f64  y,
f64  z 
)
inline

Definition at line 279 of file morton.hpp.

◆ get_offset< u32 >()

template<>
u16_3 morton_3d::get_offset< u32 > ( uint  clz_)
inline

Definition at line 358 of file morton.hpp.

◆ get_offset< u64 >()

template<>
u32_3 morton_3d::get_offset< u64 > ( uint  clz_)
inline

Definition at line 349 of file morton.hpp.

◆ morton_to_ipos< u32 >()

template<>
u16_3 morton_3d::morton_to_ipos< u32 > ( u32  morton)
inline

Definition at line 338 of file morton.hpp.

◆ morton_to_ipos< u64 >()

template<>
u32_3 morton_3d::morton_to_ipos< u64 > ( u64  morton)
inline

Definition at line 327 of file morton.hpp.