Skip to content

Commit

Permalink
height optimized trie
Browse files Browse the repository at this point in the history
  • Loading branch information
UncP committed Nov 2, 2019
1 parent 4ff0132 commit ba4c2ef
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A library that provides various concurrent algorithms for in-memory index, aims
* B<sup>link</sup> Tree (`blink/`)
* Mass Tree (`mass/`)
* Adaptive Radix Tree (`art/`)
* Height Optimized Trie (`hot/`) (developing)

#### Version

Expand Down
5 changes: 5 additions & 0 deletions hot/hot.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* author: UncP
* date: 2019-11-02
* license: BSD-3
**/
5 changes: 5 additions & 0 deletions hot/hot.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* author: UncP
* date: 2019-11-02
* license: BSD-3
**/
23 changes: 23 additions & 0 deletions hot/hot_node.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* author: UncP
* date: 2019-11-02
* license: BSD-3
**/

#include <stdint.h>

#include "hot_node.h"

#define node_header \
uint64_t type:3; \
uint64_t height:3; \
uint64_t n_keys:6; \
uint64_t locked:1; \
uint64_t unused:51;

typedef struct hot_node_s_8
{
node_header;
uint8_t keys[32];
void *childs[32];
}hot_node_s_8;
13 changes: 13 additions & 0 deletions hot/hot_node.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* author: UncP
* date: 2019-11-02
* license: BSD-3
**/

#ifndef _hot_node_h_
#define _hot_node_h_

typedef struct hot_node hot_node;


#endif /* _hot_node_h_ */

0 comments on commit ba4c2ef

Please sign in to comment.