peclet-morton 1.0.2
Fast Morton (Z-order) codes with O(1) arithmetic
Loading...
Searching...
No Matches
wide_uint.hpp File Reference

Minimal fixed-width unsigned integer backing Morton codes wider than 128 bits. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include "morton/hd.hpp"
Include dependency graph for wide_uint.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  morton::detail::wide_uint< W >
 Fixed-width unsigned integer of. More...
 

Namespaces

namespace  morton
 
namespace  morton::detail
 

Macros

#define MORTON_HAS_INT128   1
 

Typedefs

using morton::detail::uint128_t = unsigned __int128
 The built-in 128-bit unsigned, used for 65..128-bit codes.
 

Detailed Description

Minimal fixed-width unsigned integer backing Morton codes wider than 128 bits.

detail::wide_uint<W> is W 64-bit words (little-endian) providing exactly the operators Morton<Dim,Bits> uses: + - & | ^ ~ << >> and comparisons. This lets the same Morton implementation work for codes wider than 128 bits, where no built-in integer exists. It is intentionally small and constexpr; it is not a general bignum and should not be tuned for speed unless it becomes a hot path.

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ MORTON_HAS_INT128

#define MORTON_HAS_INT128   1