Radix Tree
include/structures/radix.h View source View on GitHubStructs
Section titled “Structs”radix_node
Section titled “radix_node”struct radix_node {
struct radix_node *parent;
void *slots[RADIX_SIZE];
uint64_t present_mask;
}; radix_tree
Section titled “radix_tree”struct radix_tree {
struct radix_node *root;
uint32_t height;
radix_key_fn key_fn;
}; Type Aliases
Section titled “Type Aliases”radix_key_fn
Section titled “radix_key_fn”typedef uint64_t (*radix_key_fn)(const void * item); Functions
Section titled “Functions”radix_insert
Section titled “radix_insert”int32_t radix_insert(struct radix_tree *tree, void *item); radix_lookup
Section titled “radix_lookup”void * radix_lookup(struct radix_tree *tree, uint64_t key); radix_delete
Section titled “radix_delete”void * radix_delete(struct radix_tree *tree, uint64_t key); radix_tree_init
Section titled “radix_tree_init”struct radix_tree * radix_tree_init(struct radix_tree *r, radix_key_fn kfn, int height); Macros
Section titled “Macros”RADIX_BITS
Section titled “RADIX_BITS”#define RADIX_BITS 6 RADIX_SIZE
Section titled “RADIX_SIZE”#define RADIX_SIZE (1 << RADIX_BITS) RADIX_MASK
Section titled “RADIX_MASK”#define RADIX_MASK (RADIX_SIZE - 1) NUM_INSERTS
Section titled “NUM_INSERTS”#define NUM_INSERTS 128 NUM_LOOKUPS
Section titled “NUM_LOOKUPS”#define NUM_LOOKUPS 32