aether::morton::morton_code< Dimension, BitsPerDimension > Struct Template Reference

#include <encoding.hh>

Public Types

using value_type = uint64_t
 

Public Member Functions

 operator value_type () const
 
value_type value () const
 
 morton_code ()=default
 
 morton_code (value_type data_)
 
size_t get_index_msb () const
 
void clear_lsb (const size_t num_bits)
 
void set_component (const size_t idx, const int32_t value_)
 
int32_t extract_component (const size_t idx) const
 
void set_component_raw (const size_t idx, const uint32_t value_)
 
uint32_t extract_component_raw (const size_t idx) const
 
bool operator== (const morton_code &other) const
 
bool operator< (const morton_code &other) const
 
size_t get_index_at_level (const size_t level, const size_t level_width=dimension) const
 
void set_index_at_level (const size_t level, const size_t idx, const size_t level_width=dimension)
 
template<typename SD >
void serde_visit (SD &sd)
 

Static Public Member Functions

static morton_code invalid ()
 
static morton_code encode (const std::array< int32_t, dimension > &p)
 

Public Attributes

value_type data = 0
 

Static Public Attributes

static constexpr uint32_t dimension = Dimension
 
static constexpr uint32_t max_level = bits_per_dimension - 1
 

Friends

std::array< int32_t, dimensiondecode (const morton_code &code)
 
morton_code operator^ (const morton_code &lhs, const morton_code &rhs)
 
morton_codeoperator^= (morton_code &lhs, const morton_code &rhs)
 

Member Typedef Documentation

template<uint32_t Dimension, uint32_t BitsPerDimension>
using aether::morton::morton_code< Dimension, BitsPerDimension >::value_type = uint64_t

Constructor & Destructor Documentation

template<uint32_t Dimension, uint32_t BitsPerDimension>
aether::morton::morton_code< Dimension, BitsPerDimension >::morton_code ( )
default
template<uint32_t Dimension, uint32_t BitsPerDimension>
aether::morton::morton_code< Dimension, BitsPerDimension >::morton_code ( value_type  data_)
inlineexplicit

Member Function Documentation

template<uint32_t Dimension, uint32_t BitsPerDimension>
void aether::morton::morton_code< Dimension, BitsPerDimension >::clear_lsb ( const size_t  num_bits)
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
static morton_code aether::morton::morton_code< Dimension, BitsPerDimension >::encode ( const std::array< int32_t, dimension > &  p)
inlinestatic
template<uint32_t Dimension, uint32_t BitsPerDimension>
int32_t aether::morton::morton_code< Dimension, BitsPerDimension >::extract_component ( const size_t  idx) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
uint32_t aether::morton::morton_code< Dimension, BitsPerDimension >::extract_component_raw ( const size_t  idx) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
size_t aether::morton::morton_code< Dimension, BitsPerDimension >::get_index_at_level ( const size_t  level,
const size_t  level_width = dimension 
) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
size_t aether::morton::morton_code< Dimension, BitsPerDimension >::get_index_msb ( ) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
static morton_code aether::morton::morton_code< Dimension, BitsPerDimension >::invalid ( )
inlinestatic
template<uint32_t Dimension, uint32_t BitsPerDimension>
aether::morton::morton_code< Dimension, BitsPerDimension >::operator value_type ( ) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
bool aether::morton::morton_code< Dimension, BitsPerDimension >::operator< ( const morton_code< Dimension, BitsPerDimension > &  other) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
bool aether::morton::morton_code< Dimension, BitsPerDimension >::operator== ( const morton_code< Dimension, BitsPerDimension > &  other) const
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
template<typename SD >
void aether::morton::morton_code< Dimension, BitsPerDimension >::serde_visit ( SD &  sd)
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
void aether::morton::morton_code< Dimension, BitsPerDimension >::set_component ( const size_t  idx,
const int32_t  value_ 
)
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
void aether::morton::morton_code< Dimension, BitsPerDimension >::set_component_raw ( const size_t  idx,
const uint32_t  value_ 
)
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
void aether::morton::morton_code< Dimension, BitsPerDimension >::set_index_at_level ( const size_t  level,
const size_t  idx,
const size_t  level_width = dimension 
)
inline
template<uint32_t Dimension, uint32_t BitsPerDimension>
value_type aether::morton::morton_code< Dimension, BitsPerDimension >::value ( ) const
inline

Friends And Related Function Documentation

template<uint32_t Dimension, uint32_t BitsPerDimension>
std::array<int32_t, dimension> decode ( const morton_code< Dimension, BitsPerDimension > &  code)
friend
template<uint32_t Dimension, uint32_t BitsPerDimension>
morton_code operator^ ( const morton_code< Dimension, BitsPerDimension > &  lhs,
const morton_code< Dimension, BitsPerDimension > &  rhs 
)
friend
template<uint32_t Dimension, uint32_t BitsPerDimension>
morton_code& operator^= ( morton_code< Dimension, BitsPerDimension > &  lhs,
const morton_code< Dimension, BitsPerDimension > &  rhs 
)
friend

Member Data Documentation

template<uint32_t Dimension, uint32_t BitsPerDimension>
value_type aether::morton::morton_code< Dimension, BitsPerDimension >::data = 0
template<uint32_t Dimension, uint32_t BitsPerDimension>
constexpr uint32_t aether::morton::morton_code< Dimension, BitsPerDimension >::dimension = Dimension
static
template<uint32_t Dimension, uint32_t BitsPerDimension>
constexpr uint32_t aether::morton::morton_code< Dimension, BitsPerDimension >::max_level = bits_per_dimension - 1
static