31 using Index = std::array<unsigned int, 3>;
36 static constexpr unsigned int ValidBits = 21;
41 static constexpr Code ValidSpan = (
static_cast<uint64_t>(1) << ValidBits) - 1;
43#if __cplusplus >= 202002L
49 { S::encode(
point) } -> std::same_as<SFC::Code>;
50 { S::decode(
code) } -> std::same_as<Index>;
78 0x1fffff, 0x1f00000000ffff, 0x1f0000ff0000ff, 0x100f00f00f00f00f, 0x10c30c30c30c30c3, 0x1249249249249249};
105#if __cplusplus >= 202002L
106static_assert(EBGeometry::SFC::Encodable<EBGeometry::SFC::Morton>);
107static_assert(EBGeometry::SFC::Encodable<EBGeometry::SFC::Nested>);
110#include "EBGeometry_SFCImplem.hpp"
std::array< unsigned int, 3 > Index
Alias for 3D cell index.
Definition EBGeometry_SFC.hpp:31
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218
Implementation of the Morton SFC.
Definition EBGeometry_SFC.hpp:58
static Index decode(const uint64_t &a_code) noexcept
Decode the 64-bit Morton code into an Index.
static constexpr uint_fast64_t Mask_64[6]
Mask for magic-bits encoding of 3D Morton code.
Definition EBGeometry_SFC.hpp:77
static uint64_t encode(const Index &a_point) noexcept
Encode an input point into a Morton index with a 64-bit representation.
Implementation of a nested index SFC.
Definition EBGeometry_SFC.hpp:86
static Index decode(const uint64_t &a_code) noexcept
Decode the 64-bit SFC code into an Index.
static uint64_t encode(const Index &a_point) noexcept
Encode the input point into the SFC code.