|
|
| PowerOfTwoPermutableSequence () noexcept=default |
| | Construct canonical empty without allocating.
|
| |
|
| PowerOfTwoPermutableSequence (const PowerOfTwoPermutableSequence &)=delete |
| | Exclusive owners cannot be copied.
|
| |
|
PowerOfTwoPermutableSequence & | operator= (const PowerOfTwoPermutableSequence &)=delete |
| | Exclusive owners cannot be copy-assigned.
|
| |
|
| PowerOfTwoPermutableSequence (PowerOfTwoPermutableSequence &&) noexcept=default |
| | Transfer ownership, leaving the source canonical empty.
|
| |
|
PowerOfTwoPermutableSequence & | operator= (PowerOfTwoPermutableSequence &&) noexcept=default |
| | Replace ownership; self-move is a no-op, source becomes empty.
|
| |
| auto | memory_usage () const noexcept |
| | Account for this object and all live requested tree storage.
|
| |
| size_type | size () const noexcept |
| | Return the logical element count.
|
| |
| bool | empty () const noexcept |
| | Test emptiness.
|
| |
| const_reference | operator[] (size_type position) const |
| | Read a checked zero-based element without exposing mutation.
|
| |
| void | insert_at (size_type position, std::uint64_t value) |
| | Insert one value at a zero-based position.
|
| |
| void | rotate_left (size_type left, size_type right, size_type distance) |
| | Rotate [left,right) left while preserving outside values.
|
| |
| void | merge (PowerOfTwoPermutableSequence< std::uint64_t, 256, 32, 0, false, false > &donor) |
| | Append unchanged donor values and consume donor ownership.
|
| |
| size_type | memory_usage_bytes () const noexcept |
| | Explicitly account for requested live storage.
|
| |
template<class T = std::uint64_t, std::size_t Values = 256, std::size_t Fanout = 32, std::size_t ReservedNodes = 0, bool CacheRegularPrefix = false, bool PermutedLeaves = false>
class pixie::experimental::PowerOfTwoPermutableSequence< T, Values, Fanout, ReservedNodes, CacheRegularPrefix, PermutedLeaves >
Experimental owning packed sequence with power-of-two leaf capacity.
Implements PermutableSequenceBase with immutable by-value reads, exclusive ownership, unchanged-value consuming merge, and checked half-open rotations. Uses the same split/join engine as PermutableSequence, with experimental leaf capacity, reserve, and navigation policies. Metadata and alignment padding are additional to the Values*sizeof(T) leaf payload. No contiguous storage or stable reference is promised. Construction consumes input through iter_move; source references are not retained. Mutation allocation failure leaves owners unchanged.
- Template Parameters
-
| T | Unsigned integral type with at most 64 value bits. |
| Values | Power-of-two leaf capacity; payload must be word-sized. |
| Fanout | Even branching factor, at least four. |
| ReservedNodes | Maximum idle internal nodes retained after rotations. Zero disables retention. At >=1 MiB of logical value storage, successful rotations retain up to this many unused nodes for subsequent rotations. Retained bytes are owned, bounded, and included in memory_usage(). |
| CacheRegularPrefix | Cache the leading regular-region size in one owner word, refreshed after each successful mutation. Requires power-of-two fanout. Pure radix reads in that region avoid loading root size metadata. |
| PermutedLeaves | Map children through a slot permutation immediately above leaves; requires Fanout == 16, 32, 64, or 256. Fanout 16 uses packed nibbles, 32/64 use byte indices with primitive-local SIMD dispatch, and 256 uses one node containing sixteen groups of sixteen child slots. Higher levels retain direct addressing. Fresh/repacked nodes also address children directly until their first mapped rotation constructs the policy state without allocation. All internal allocations reserve space for ordering state so the existing allocation pool can recycle nodes between levels. |