Pixie
Loading...
Searching...
No Matches
pixie::experimental::SplitSlotOrder< N > Class Template Reference

Experimental 32/64-slot order with separate low nibbles and high bits. More...

#include <slot_order.h>

Public Member Functions

 SplitSlotOrder (std::size_t count=0) noexcept
 Identity order for physical [0,count); requires count <= N.
 
std::size_t size () const noexcept
 Occupied count, in [0,N].
 
unsigned operator[] (std::size_t i) const noexcept
 Physical slot for a logical index strictly below size().
 
bool occupied (std::size_t i) const noexcept
 Whether physical slot i is occupied; requires i < N.
 
bool valid () const noexcept
 Check mapping uniqueness and occupancy.
 
void rotate_left (std::size_t left, std::size_t right, std::size_t distance) noexcept
 Rotate [left,right) by distance modulo its length; empty is a no-op.
 
std::size_t rotate_children (std::array< void *, N > &, std::size_t left, std::size_t right, std::size_t distance) noexcept
 Apply rotate_left's contract without touching caller-owned pointers.
 

Static Public Attributes

static constexpr std::size_t capacity = N
 Maximum number of occupied slots.
 
static constexpr std::size_t order_bytes = N * (4 + high_bits) / 8
 Packed order bytes, excluding count and C++ alignment padding.
 

Detailed Description

template<std::size_t N>
class pixie::experimental::SplitSlotOrder< N >

Experimental 32/64-slot order with separate low nibbles and high bits.

Owns only ordering metadata. Physical slots [0,count) stay occupied; rotations never move payload. No holes are introduced. Invalid indices or ranges violate assertion-checked preconditions. Every operation is noexcept and allocation-free. This initial split-bit implementation is scalar.

Template Parameters
NCapacity, either 32 (5 bits/slot) or 64 (6 bits/slot).

Member Function Documentation

◆ rotate_children()

template<std::size_t N>
std::size_t pixie::experimental::SplitSlotOrder< N >::rotate_children ( std::array< void *, N > & ,
std::size_t left,
std::size_t right,
std::size_t distance )
inlinenoexcept

Apply rotate_left's contract without touching caller-owned pointers.

Returns
Zero physical pointer writes.

◆ rotate_left()

template<std::size_t N>
void pixie::experimental::SplitSlotOrder< N >::rotate_left ( std::size_t left,
std::size_t right,
std::size_t distance )
inlinenoexcept

Rotate [left,right) by distance modulo its length; empty is a no-op.

Precondition
left <= right <= size(). Physical slots remain unchanged.

The documentation for this class was generated from the following file: