libfoedus-core
FOEDUS Core Library
|
Packages logic and required properties to calculate LookupRoute in array storage from offset. More...
Packages logic and required properties to calculate LookupRoute in array storage from offset.
This class is completely header-only, immutable, and also a POD.
Definition at line 86 of file array_route.hpp.
#include <array_route.hpp>
Public Member Functions | |
LookupRouteFinder () | |
LookupRouteFinder (uint8_t levels, uint16_t payload_size) | |
LookupRoute | find_route (ArrayOffset offset) const __attribute__((always_inline)) |
LookupRoute | find_route_and_switch (ArrayOffset offset, ArrayOffset *page_starts, ArrayOffset *page_ends) const __attribute__((always_inline)) |
find_route() plus calculates where page switches. More... | |
uint8_t | get_levels () const __attribute__((always_inline)) |
uint16_t | get_records_in_leaf () const __attribute__((always_inline)) |
|
inline |
Definition at line 88 of file array_route.hpp.
|
inline |
Definition at line 94 of file array_route.hpp.
|
inline |
Definition at line 134 of file array_route.hpp.
References ASSERT_ND, foedus::assorted::ConstDiv::div64(), foedus::storage::array::kInteriorFanout, foedus::storage::array::LookupRoute::route, and foedus::storage::array::LookupRoute::word.
Referenced by foedus::storage::array::ArrayStoragePimpl::lookup_for_read(), foedus::storage::array::ArrayStoragePimpl::lookup_for_read_batch(), foedus::storage::array::ArrayStoragePimpl::lookup_for_write(), and foedus::storage::array::ArrayStoragePimpl::lookup_for_write_batch().
|
inline |
find_route() plus calculates where page switches.
[in] | offset | array offset |
[out] | page_starts | minimal offset that belongs to the same page as the given offset |
[out] | page_ends | minimal offset that belongs to a page different from the given offset |
Using the additional outputs, the caller can avoid re-calculating route if the offset is within page_starts and page_ends. This is currently used in ArrayComposer.
Definition at line 154 of file array_route.hpp.
References ASSERT_ND, foedus::assorted::ConstDiv::div64(), foedus::storage::array::kInteriorFanout, foedus::storage::array::LookupRoute::route, and foedus::storage::array::LookupRoute::word.
|
inline |
Definition at line 121 of file array_route.hpp.
|
inline |
Definition at line 122 of file array_route.hpp.
Referenced by foedus::storage::array::ArrayComposeContext::ArrayComposeContext(), foedus::storage::array::ArrayComposer::construct_root(), foedus::storage::array::ArrayStoragePimpl::load_empty(), and foedus::storage::array::ArrayStoragePimpl::prefetch_pages_recurse().