From c2f77d08fb15feb5f0f5826c55fa525f3659d986 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 7 Dec 2011 20:27:10 +0100 Subject: Add the option of configuring the BPT key and bitmask sizes. --- bitmapped_patricia_tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitmapped_patricia_tree.c') diff --git a/bitmapped_patricia_tree.c b/bitmapped_patricia_tree.c index 79ac076..543ffb8 100644 --- a/bitmapped_patricia_tree.c +++ b/bitmapped_patricia_tree.c @@ -49,12 +49,13 @@ #include "bitmapped_patricia_tree.h" +#ifndef BPT_EXPLICIT_CONFIGURATION #define CHUNK_LENGTH 5 #define KEY_LENGTH 32 #define OFFSET_MASK 0x1ffff //((1 << chunk_length) - 1) #define MAX_CHUNKS 7 //key_length / chunk_length + ((key_length % chunk_length == 0) ? 0 : 1) #define LAST_CHUNK_LENGTH 2 //key_length - ((max_chunks - 1) * chunk_length) - +#endif //!BPT_EXPLICIT_CONFIGURATION typedef struct bpt_nonempty *bpt_nonempty_t; typedef struct bpt_node *bpt_node_t; -- cgit v1.2.3