Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::ca_tiling_detail Namespace Reference

Functions

constexpr std::uint64_t spread_bits_2 (const std::uint32_t v) noexcept
 Spread the low bits bits of v so that they occupy even positions.
 
constexpr std::uint64_t spread_bits_3 (const std::uint32_t v) noexcept
 Spread the low bits bits of v so that they occupy every third position (used for 3D Morton codes).
 

Function Documentation

◆ spread_bits_2()

constexpr std::uint64_t Aleph::CA::ca_tiling_detail::spread_bits_2 ( const std::uint32_t  v)
inlineconstexprnoexcept

Spread the low bits bits of v so that they occupy even positions.

Iterative implementation; works for any reasonable bit count.

Definition at line 343 of file ca-tiling.H.

References r.

Referenced by Aleph::CA::morton_encode_2d().

◆ spread_bits_3()

constexpr std::uint64_t Aleph::CA::ca_tiling_detail::spread_bits_3 ( const std::uint32_t  v)
inlineconstexprnoexcept

Spread the low bits bits of v so that they occupy every third position (used for 3D Morton codes).

Definition at line 353 of file ca-tiling.H.

References r.

Referenced by Aleph::CA::morton_encode_3d().