Calico
frozen_btree.h File Reference

Frozen B-tree. More...

Functions

static void cal_fbt_build (void *dest, const void *src, size_t count, size_t size, size_t children_per_node)
 Create a frozen B-tree from a sorted array. More...
 
static int cal_fbt_search_b (const void *key, const void *ptr, size_t count, size_t size, int(*cmp)(void *, const void *, const void *), void *cmp_ctx, size_t children_per_node, size_t *pos_out)
 Search a frozen B-tree, with the inner search performed using binary search. More...
 
static int cal_fbt_search_generic (const void *key, const void *ptr, size_t count, size_t size, int(*cmp)(void *, const void *, const void *), void *cmp_ctx, int(*search)(void *, const void *, const void *, size_t, size_t, int(*)(void *, const void *, const void *), void *, size_t *), void *search_ctx, size_t children_per_node, size_t *pos_out)
 Search a frozen B-tree, with the inner search performed using the given function. More...
 
static int cal_fbt_search_l (const void *key, const void *ptr, size_t count, size_t size, int(*cmp)(void *, const void *, const void *), void *cmp_ctx, size_t children_per_node, size_t *pos_out)
 Search a frozen B-tree, with the inner search performed using linear search. More...
 

Detailed Description

Frozen B-tree.

Function Documentation

static void cal_fbt_build ( void *  dest,
const void *  src,
size_t  count,
size_t  size,
size_t  children_per_node 
)
inlinestatic

Create a frozen B-tree from a sorted array.

static int cal_fbt_search_b ( const void *  key,
const void *  ptr,
size_t  count,
size_t  size,
int(*)(void *, const void *, const void *)  cmp,
void *  cmp_ctx,
size_t  children_per_node,
size_t *  pos_out 
)
inlinestatic

Search a frozen B-tree, with the inner search performed using binary search.

static int cal_fbt_search_generic ( const void *  key,
const void *  ptr,
size_t  count,
size_t  size,
int(*)(void *, const void *, const void *)  cmp,
void *  cmp_ctx,
int(*)(void *, const void *, const void *, size_t, size_t, int(*)(void *, const void *, const void *), void *, size_t *)  search,
void *  search_ctx,
size_t  children_per_node,
size_t *  pos_out 
)
inlinestatic

Search a frozen B-tree, with the inner search performed using the given function.

static int cal_fbt_search_l ( const void *  key,
const void *  ptr,
size_t  count,
size_t  size,
int(*)(void *, const void *, const void *)  cmp,
void *  cmp_ctx,
size_t  children_per_node,
size_t *  pos_out 
)
inlinestatic

Search a frozen B-tree, with the inner search performed using linear search.