#include "bpp_tree.h"
Description
- Copyright
- Copyright 2017 The University of British Columbia, IonDB Project Contributors (see AUTHORS.md)
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1.Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2.Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- 3.Neither the name of the copyright holder nor the names of its contributors
- may be used to endorse or promote products derived from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file bpp_tree.c.
Classes | |
struct | ion_bpp_node_t |
struct | ion_bpp_buffer_tag |
struct | ion_bpp_h_node_tag |
Macros | |
#define | bAdr(p) *(ion_bpp_address_t *) (p) |
#define | eAdr(p) *(ion_bpp_external_address_t *) (p) |
#define | childLT(k) bAdr((char *) k - sizeof(ion_bpp_address_t)) |
#define | key(k) (k) |
#define | rec(k) eAdr((char *) (k) + h->keySize) |
#define | childGE(k) bAdr((char *) (k) + h->keySize + sizeof(ion_bpp_external_address_t)) |
#define | leaf(b) b->p->leaf |
#define | ct(b) b->p->ct |
#define | next(b) b->p->next |
#define | prev(b) b->p->prev |
#define | fkey(b) & b->p->fkey |
#define | lkey(b) (fkey(b) + ks((ct(b) - 1))) |
#define | p(b) (char *) (b->p) |
#define | ks(ct) ((ct) * h->ks) |
#define | error(rc) lineError(__LINE__, rc) |
Typedefs | |
typedef char | ion_bpp_key_t |
typedef struct ion_bpp_buffer_tag | ion_bpp_buffer_t |
typedef struct ion_bpp_h_node_tag | ion_bpp_h_node_t |
typedef enum ION_BPP_MODE | ion_bpp_mode_e |
Enumerations | |
enum | ION_BPP_MODE { MODE_FIRST, MODE_MATCH, MODE_FGEQ, MODE_LLEQ } |
Variables | |
int | maxHeight |
int | nNodesIns |
int | nNodesDel |
int | nKeysIns |
int | nKeysDel |
int | nDiskReads |
int | nDiskWrites |
int | bErrLineNo |
Macro Definition Documentation
#define bAdr | ( | p | ) | *(ion_bpp_address_t *) (p) |
Definition at line 70 of file bpp_tree.c.
#define childGE | ( | k | ) | bAdr((char *) (k) + h->keySize + sizeof(ion_bpp_external_address_t)) |
Definition at line 77 of file bpp_tree.c.
#define childLT | ( | k | ) | bAdr((char *) k - sizeof(ion_bpp_address_t)) |
Definition at line 74 of file bpp_tree.c.
#define ct | ( | b | ) | b->p->ct |
Definition at line 81 of file bpp_tree.c.
#define eAdr | ( | p | ) | *(ion_bpp_external_address_t *) (p) |
Definition at line 71 of file bpp_tree.c.
#define error | ( | rc | ) | lineError(__LINE__, rc) |
Definition at line 151 of file bpp_tree.c.
#define fkey | ( | b | ) | & b->p->fkey |
Definition at line 84 of file bpp_tree.c.
#define key | ( | k | ) | (k) |
Definition at line 75 of file bpp_tree.c.
Definition at line 89 of file bpp_tree.c.
#define leaf | ( | b | ) | b->p->leaf |
Definition at line 80 of file bpp_tree.c.
Definition at line 85 of file bpp_tree.c.
#define next | ( | b | ) | b->p->next |
Definition at line 82 of file bpp_tree.c.
#define p | ( | b | ) | (char *) (b->p) |
Definition at line 86 of file bpp_tree.c.
#define prev | ( | b | ) | b->p->prev |
Definition at line 83 of file bpp_tree.c.
#define rec | ( | k | ) | eAdr((char *) (k) + h->keySize) |
Definition at line 76 of file bpp_tree.c.
Typedef Documentation
typedef struct ion_bpp_buffer_tag ion_bpp_buffer_t |
typedef struct ion_bpp_h_node_tag ion_bpp_h_node_t |
typedef char ion_bpp_key_t |
Definition at line 103 of file bpp_tree.c.
typedef enum ION_BPP_MODE ion_bpp_mode_e |
Enumeration Type Documentation
enum ION_BPP_MODE |
Enumerator | |
---|---|
MODE_FIRST | |
MODE_MATCH | |
MODE_FGEQ | |
MODE_LLEQ |
Definition at line 421 of file bpp_tree.c.
Function Documentation
|
static |
Definition at line 168 of file bpp_tree.c.
|
static |
Definition at line 276 of file bpp_tree.c.
ion_bpp_err_t b_close | ( | ion_bpp_handle_t | handle | ) |
Definition at line 1040 of file bpp_tree.c.
ion_bpp_err_t b_delete | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1453 of file bpp_tree.c.
ion_bpp_err_t b_find_first_greater_or_equal | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
void * | mkey, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1116 of file bpp_tree.c.
ion_bpp_err_t b_find_first_key | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1598 of file bpp_tree.c.
ion_bpp_err_t b_find_last_key | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1639 of file bpp_tree.c.
ion_bpp_err_t b_find_next_key | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1669 of file bpp_tree.c.
ion_bpp_err_t b_find_prev_key | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1722 of file bpp_tree.c.
ion_bpp_err_t b_get | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t * | rec | ||
) |
Definition at line 1074 of file bpp_tree.c.
ion_bpp_err_t b_insert | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t | rec | ||
) |
Definition at line 1167 of file bpp_tree.c.
ion_bpp_err_t b_open | ( | ion_bpp_open_t | info, |
ion_bpp_handle_t * | handle | ||
) |
Definition at line 899 of file bpp_tree.c.
ion_bpp_err_t b_update | ( | ion_bpp_handle_t | handle, |
void * | key, | ||
ion_bpp_external_address_t | rec | ||
) |
Definition at line 1345 of file bpp_tree.c.
|
static |
Definition at line 180 of file bpp_tree.c.
|
static |
Definition at line 247 of file bpp_tree.c.
|
static |
Definition at line 816 of file bpp_tree.c.
|
static |
Definition at line 799 of file bpp_tree.c.
|
static |
Definition at line 154 of file bpp_tree.c.
|
static |
Definition at line 341 of file bpp_tree.c.
|
static |
Definition at line 572 of file bpp_tree.c.
|
static |
Definition at line 553 of file bpp_tree.c.
|
static |
Definition at line 424 of file bpp_tree.c.
|
static |
Definition at line 331 of file bpp_tree.c.
Variable Documentation
int bErrLineNo |
Definition at line 101 of file bpp_tree.c.
int maxHeight |
Definition at line 92 of file bpp_tree.c.
int nDiskReads |
Definition at line 97 of file bpp_tree.c.
int nDiskWrites |
Definition at line 98 of file bpp_tree.c.
int nKeysDel |
Definition at line 96 of file bpp_tree.c.
int nKeysIns |
Definition at line 95 of file bpp_tree.c.
int nNodesDel |
Definition at line 94 of file bpp_tree.c.
int nNodesIns |
Definition at line 93 of file bpp_tree.c.