Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

keydef.h File Reference

#include <math.h>
#include "integer_types.h"

Go to the source code of this file.

Classes

struct  buffer_pool_struct
struct  buffer_struct
union  data_or_disk_offset_t
struct  disk_offset
struct  external_level0_pntr
struct  fcb
struct  file_information_block
struct  internal_level0_pntr
struct  ix_block
struct  key
union  level0orn_pntr
struct  leveln_pntr

Defines

#define KEYDEF_H
#define bits(i)   ( (int) (log((double)i-1)/log(2.0)) + 1 )
#define compressed_bits_per_byte   7
#define compressed_lc(bits)   ( (bits-1) / compressed_bits_per_byte + 1 )
#define eqn_pntr(p1, p2)   ((p1.block==p2.block) && (p1.segment==p2.segment))
#define lt_pntr(p1, p2)   ((p1.segment<p2.segment) || ((p1.segment==p2.segment) && (p1.block<p2.block)))
#define null_pntr(p1)   ((p1.segment==max_segment) && (p1.block==0))
#define mvc(t1, sc1, t2, sc2, lc)   memmove((unsigned char *)t2+sc2,(unsigned char *)t1+sc1,(size_t)lc)
#define keyf   32472
#define current_version   7
#define current_sub_version   0
#define maxkey_lc   512
#define max_prefix_lc   127
#define level_zero   0
#define level_one   1
#define min_data_in_index_lc   6
#define max_data_in_index_lc   128
#define seq_threshold   20
#define min_buffer_cnt   8
#define buf_hash_load_factor   3
#define max_level   32
#define file_lc_bits   31
#define max_segment   127
#define max_files   10
#define max_filename_lc   128
#define max_extension_lc   40
#define block_lc   4096
#define rec_allocation_unit   8
#define block_allocation_unit   16
#define max_allocation_depth   4
#define user_ix   0
#define free_rec_ix   1
#define free_lc_ix   2
#define max_index   3
#define cmp_less   0
#define cmp_equal   1
#define cmp_greater   2
#define UINT32_lc   (unsigned)sizeof(UINT32)
#define freespace_lc_key_lc   14
#define freespace_rec_key_lc   10
#define leveln_lc   (sizeof(UINT16)+sizeof(UINT64))
#define compressed_block_lc   ( compressed_lc( file_lc_bits - bits(block_lc) ) )
#define compressed_leveln_lc   ( compressed_lc(bits(max_segment)) + compressed_block_lc )
#define ix_block_header_lc   (2*sizeof(UINT16)+ 4 +2*leveln_lc)
#define key_ptrs_per_block   ((block_lc - ix_block_header_lc) / sizeof(UINT16))
#define keyspace_lc   (sizeof(UINT16)*key_ptrs_per_block)
#define ix_block_lc   sizeof(block_type_t)
#define buffer_lc   sizeof(buffer_t)
#define hash_entries_per_buf   (buffer_lc / sizeof(int))
#define min_buffer_pool_lc   (sizeof(buffer_pool_t) + min_buffer_cnt*sizeof(buffer_t))
#define fib_lc_on_disk   ((7+max_index)*sizeof(UINT32)+(3*max_level*max_index)*leveln_lc+(max_segment+1)*sizeof(UINT64))
#define min_fcb_lc   sizeof(struct fcb)

Typedefs

typedef data_or_disk_offset_t data_or_disk_offset
typedef internal_level0_pntr level0_pntr
typedef internal_level0_pntr keyfile_pointer
typedef ix_block block_type_t
typedef level0orn_pntr levelx_pntr
typedef buffer_struct buffer_t
typedef buffer_pool_struct buffer_pool_t

Enumerations

enum  comparison { less, equal, greater }


Define Documentation

#define bits  )     ( (int) (log((double)i-1)/log(2.0)) + 1 )
 

#define block_allocation_unit   16
 

#define block_lc   4096
 

#define buf_hash_load_factor   3
 

#define buffer_lc   sizeof(buffer_t)
 

#define cmp_equal   1
 

#define cmp_greater   2
 

#define cmp_less   0
 

#define compressed_bits_per_byte   7
 

#define compressed_block_lc   ( compressed_lc( file_lc_bits - bits(block_lc) ) )
 

#define compressed_lc bits   )     ( (bits-1) / compressed_bits_per_byte + 1 )
 

#define compressed_leveln_lc   ( compressed_lc(bits(max_segment)) + compressed_block_lc )
 

#define current_sub_version   0
 

#define current_version   7
 

#define eqn_pntr p1,
p2   )     ((p1.block==p2.block) && (p1.segment==p2.segment))
 

#define fib_lc_on_disk   ((7+max_index)*sizeof(UINT32)+(3*max_level*max_index)*leveln_lc+(max_segment+1)*sizeof(UINT64))
 

#define file_lc_bits   31
 

#define free_lc_ix   2
 

#define free_rec_ix   1
 

#define freespace_lc_key_lc   14
 

#define freespace_rec_key_lc   10
 

#define hash_entries_per_buf   (buffer_lc / sizeof(int))
 

#define ix_block_header_lc   (2*sizeof(UINT16)+ 4 +2*leveln_lc)
 

#define ix_block_lc   sizeof(block_type_t)
 

#define key_ptrs_per_block   ((block_lc - ix_block_header_lc) / sizeof(UINT16))
 

#define KEYDEF_H
 

#define keyf   32472
 

#define keyspace_lc   (sizeof(UINT16)*key_ptrs_per_block)
 

#define level_one   1
 

#define level_zero   0
 

#define leveln_lc   (sizeof(UINT16)+sizeof(UINT64))
 

#define lt_pntr p1,
p2   )     ((p1.segment<p2.segment) || ((p1.segment==p2.segment) && (p1.block<p2.block)))
 

#define max_allocation_depth   4
 

#define max_data_in_index_lc   128
 

#define max_extension_lc   40
 

#define max_filename_lc   128
 

#define max_files   10
 

#define max_index   3
 

#define max_level   32
 

#define max_prefix_lc   127
 

#define max_segment   127
 

#define maxkey_lc   512
 

#define min_buffer_cnt   8
 

#define min_buffer_pool_lc   (sizeof(buffer_pool_t) + min_buffer_cnt*sizeof(buffer_t))
 

#define min_data_in_index_lc   6
 

#define min_fcb_lc   sizeof(struct fcb)
 

#define mvc t1,
sc1,
t2,
sc2,
lc   )     memmove((unsigned char *)t2+sc2,(unsigned char *)t1+sc1,(size_t)lc)
 

#define null_pntr p1   )     ((p1.segment==max_segment) && (p1.block==0))
 

#define rec_allocation_unit   8
 

#define seq_threshold   20
 

#define UINT32_lc   (unsigned)sizeof(UINT32)
 

#define user_ix   0
 


Typedef Documentation

typedef struct ix_block block_type_t
 

typedef struct buffer_pool_struct buffer_pool_t
 

typedef struct buffer_struct buffer_t
 

typedef union data_or_disk_offset_t data_or_disk_offset
 

typedef struct internal_level0_pntr keyfile_pointer
 

typedef struct internal_level0_pntr level0_pntr
 

typedef union level0orn_pntr levelx_pntr
 


Enumeration Type Documentation

enum comparison
 

Enumeration values:
less 
equal 
greater 


Generated on Tue Jun 15 11:02:57 2010 for Lemur by doxygen 1.3.4