Thrill  0.1
btree_default_traits< Key, Value > Struct Template Reference

Detailed Description

template<typename Key, typename Value>
struct tlx::btree_default_traits< Key, Value >

Generates default traits for a B+ tree used as a set or map.

It estimates leaf and inner node sizes by assuming a cache line multiple of 256 bytes.

Definition at line 74 of file btree.hpp.

#include <btree.hpp>

Static Public Attributes

static const size_t binsearch_threshold = 256
 
static const bool debug = false
 
static const int inner_slots
 
static const int leaf_slots
 
static const bool self_verify = false
 

Member Data Documentation

◆ binsearch_threshold

const size_t binsearch_threshold = 256
static

As of stx-btree-0.9, the code does linear search in find_lower() and find_upper() instead of binary_search, unless the node size is larger than this threshold. See notes at http://panthema.net/2013/0504-STX-B+Tree-Binary-vs-Linear-Search

Definition at line 100 of file btree.hpp.

◆ debug

const bool debug = false
static

If true, the tree will print out debug information and a tree dump during insert() or erase() operation. The header must have been compiled with TLX_BTREE_DEBUG defined and key_type must be std::ostream printable.

Definition at line 84 of file btree.hpp.

◆ inner_slots

const int inner_slots
static
Initial value:
=
(( 8 ) < ( 256 / (sizeof(Key) + sizeof(void*)) ) ? ( 256 / (sizeof(Key) + sizeof(void*)) ) : ( 8 ))

Number of slots in each inner node of the tree. Estimated so that each node has a size of about 256 bytes.

Definition at line 93 of file btree.hpp.

◆ leaf_slots

const int leaf_slots
static
Initial value:
=
(( 8 ) < ( 256 / (sizeof(Value)) ) ? ( 256 / (sizeof(Value)) ) : ( 8 ))

Number of slots in each leaf of the tree. Estimated so that each node has a size of about 256 bytes.

Definition at line 88 of file btree.hpp.

◆ self_verify

const bool self_verify = false
static

If true, the tree will self verify its invariants after each insert() or erase(). The header must have been compiled with TLX_BTREE_DEBUG defined.

Definition at line 78 of file btree.hpp.


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