Determine rtree levels at compile time.
Rather than dynamically building a table to aid per level computations, define a constant table at compile time. Omit both high and low insignificant bits. Use one to three tree levels, depending on the number of significant bits.
This commit is contained in:
@@ -41,12 +41,10 @@ struct rtree_ctx_s {
|
||||
};
|
||||
|
||||
struct rtree_s {
|
||||
unsigned height;
|
||||
union {
|
||||
void *root_pun;
|
||||
rtree_elm_t *root;
|
||||
};
|
||||
rtree_level_t levels[RTREE_HEIGHT_MAX];
|
||||
malloc_mutex_t init_lock;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user