morton-arithmetic 0.1.0
Fast Morton (Z-order) codes with O(1) arithmetic
Loading...
Searching...
No Matches
morton::detail::wide_uint< W > Struct Template Reference

Fixed-width unsigned integer of. More...

#include <wide_uint.hpp>

Public Member Functions

MORTON_HD constexpr wide_uint ()=default
 
template<typename T , typename = std::enable_if_t<std::is_integral_v<T> && (sizeof(T) <= 8)>>
MORTON_HD constexpr wide_uint (T v)
 
MORTON_HD constexpr wide_uint (unsigned __int128 v)
 
template<std::size_t W2, typename = std::enable_if_t<W2 != W>>
MORTON_HD constexpr wide_uint (const wide_uint< W2 > &o)
 
MORTON_HD constexpr operator std::uint64_t () const
 
MORTON_HD constexpr operator unsigned __int128 () const
 
MORTON_HD constexpr operator bool () const
 
MORTON_HD constexpr wide_uint operator~ () const
 
MORTON_HD constexpr wide_uintoperator&= (const wide_uint &o)
 
MORTON_HD constexpr wide_uintoperator|= (const wide_uint &o)
 
MORTON_HD constexpr wide_uintoperator^= (const wide_uint &o)
 
MORTON_HD constexpr wide_uint operator<< (unsigned s) const
 
MORTON_HD constexpr wide_uint operator>> (unsigned s) const
 
MORTON_HD constexpr wide_uintoperator<<= (unsigned s)
 
MORTON_HD constexpr wide_uintoperator>>= (unsigned s)
 
MORTON_HD constexpr wide_uintoperator++ ()
 
MORTON_HD constexpr wide_uintoperator-- ()
 

Public Attributes

std::array< std::uint64_t, W > w {}
 Words, little-endian: w[0] is least significant.
 

Friends

MORTON_HD constexpr wide_uint operator& (wide_uint a, const wide_uint &b)
 
MORTON_HD constexpr wide_uint operator| (wide_uint a, const wide_uint &b)
 
MORTON_HD constexpr wide_uint operator^ (wide_uint a, const wide_uint &b)
 
MORTON_HD constexpr wide_uint operator+ (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr wide_uint operator- (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr bool operator== (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr bool operator!= (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr bool operator< (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr bool operator> (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr bool operator<= (const wide_uint &a, const wide_uint &b)
 
MORTON_HD constexpr bool operator>= (const wide_uint &a, const wide_uint &b)
 

Detailed Description

template<std::size_t W>
struct morton::detail::wide_uint< W >

Fixed-width unsigned integer of.

Template Parameters
W64-bit words, little-endian (w[0] least significant). Selected automatically by uint_for when Dim*Bits exceeds the largest built-in integer.

Constructor & Destructor Documentation

◆ wide_uint() [1/4]

template<std::size_t W>
MORTON_HD constexpr morton::detail::wide_uint< W >::wide_uint ( )
constexprdefault

◆ wide_uint() [2/4]

template<std::size_t W>
template<typename T , typename = std::enable_if_t<std::is_integral_v<T> && (sizeof(T) <= 8)>>
MORTON_HD constexpr morton::detail::wide_uint< W >::wide_uint ( v)
inlineconstexpr

◆ wide_uint() [3/4]

template<std::size_t W>
MORTON_HD constexpr morton::detail::wide_uint< W >::wide_uint ( unsigned __int128  v)
inlineconstexpr

◆ wide_uint() [4/4]

template<std::size_t W>
template<std::size_t W2, typename = std::enable_if_t<W2 != W>>
MORTON_HD constexpr morton::detail::wide_uint< W >::wide_uint ( const wide_uint< W2 > &  o)
inlineexplicitconstexpr

Member Function Documentation

◆ operator std::uint64_t()

template<std::size_t W>
MORTON_HD constexpr morton::detail::wide_uint< W >::operator std::uint64_t ( ) const
inlineexplicitconstexpr

◆ operator unsigned __int128()

template<std::size_t W>
MORTON_HD constexpr morton::detail::wide_uint< W >::operator unsigned __int128 ( ) const
inlineexplicitconstexpr

◆ operator bool()

template<std::size_t W>
MORTON_HD constexpr morton::detail::wide_uint< W >::operator bool ( ) const
inlineexplicitconstexpr

◆ operator~()

template<std::size_t W>
MORTON_HD constexpr wide_uint morton::detail::wide_uint< W >::operator~ ( ) const
inlineconstexpr

◆ operator&=()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator&= ( const wide_uint< W > &  o)
inlineconstexpr

◆ operator|=()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator|= ( const wide_uint< W > &  o)
inlineconstexpr

◆ operator^=()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator^= ( const wide_uint< W > &  o)
inlineconstexpr

◆ operator<<()

template<std::size_t W>
MORTON_HD constexpr wide_uint morton::detail::wide_uint< W >::operator<< ( unsigned  s) const
inlineconstexpr

◆ operator>>()

template<std::size_t W>
MORTON_HD constexpr wide_uint morton::detail::wide_uint< W >::operator>> ( unsigned  s) const
inlineconstexpr

◆ operator<<=()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator<<= ( unsigned  s)
inlineconstexpr

◆ operator>>=()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator>>= ( unsigned  s)
inlineconstexpr

◆ operator++()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator++ ( )
inlineconstexpr

◆ operator--()

template<std::size_t W>
MORTON_HD constexpr wide_uint & morton::detail::wide_uint< W >::operator-- ( )
inlineconstexpr

Friends And Related Symbol Documentation

◆ operator&

template<std::size_t W>
MORTON_HD constexpr wide_uint operator& ( wide_uint< W >  a,
const wide_uint< W > &  b 
)
friend

◆ operator|

template<std::size_t W>
MORTON_HD constexpr wide_uint operator| ( wide_uint< W >  a,
const wide_uint< W > &  b 
)
friend

◆ operator^

template<std::size_t W>
MORTON_HD constexpr wide_uint operator^ ( wide_uint< W >  a,
const wide_uint< W > &  b 
)
friend

◆ operator+

template<std::size_t W>
MORTON_HD constexpr wide_uint operator+ ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator-

template<std::size_t W>
MORTON_HD constexpr wide_uint operator- ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator==

template<std::size_t W>
MORTON_HD constexpr bool operator== ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator!=

template<std::size_t W>
MORTON_HD constexpr bool operator!= ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator<

template<std::size_t W>
MORTON_HD constexpr bool operator< ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator>

template<std::size_t W>
MORTON_HD constexpr bool operator> ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator<=

template<std::size_t W>
MORTON_HD constexpr bool operator<= ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

◆ operator>=

template<std::size_t W>
MORTON_HD constexpr bool operator>= ( const wide_uint< W > &  a,
const wide_uint< W > &  b 
)
friend

Member Data Documentation

◆ w

template<std::size_t W>
std::array<std::uint64_t, W> morton::detail::wide_uint< W >::w {}

Words, little-endian: w[0] is least significant.


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