Implementation of the Morton SFC.
More...
#include <EBGeometry_SFC.hpp>
|
| static uint64_t | encode (const Index &a_point) noexcept |
| | Encode an input point into a Morton index with a 64-bit representation.
|
| |
| 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.
|
| |
Implementation of the Morton SFC.
◆ decode()
| static Index EBGeometry::SFC::Morton::decode |
( |
const uint64_t & |
a_code | ) |
|
|
inlinestaticnoexcept |
Decode the 64-bit Morton code into an Index.
- Parameters
-
| [in] | a_code | Morton code to decode. Must be a code actually produced by encode(), i.e. no bits above position 3*ValidBits-1 may be set. |
- Returns
- 3D grid index corresponding to a_code.
◆ encode()
| static uint64_t EBGeometry::SFC::Morton::encode |
( |
const Index & |
a_point | ) |
|
|
inlinestaticnoexcept |
Encode an input point into a Morton index with a 64-bit representation.
- Parameters
-
| [in] | a_point | 3D grid index to encode. Each component must be <= ValidSpan. |
- Returns
- 64-bit Morton code for a_point.
◆ Mask_64
| constexpr uint_fast64_t EBGeometry::SFC::Morton::Mask_64[6] |
|
staticconstexprprotected |
Initial value:{
0x1fffff, 0x1f00000000ffff, 0x1f0000ff0000ff, 0x100f00f00f00f00f, 0x10c30c30c30c30c3, 0x1249249249249249}
Mask for magic-bits encoding of 3D Morton code.
The documentation for this struct was generated from the following file: