lib/runtime/crt_itable.c File Reference

#include "comma/runtime/crt_itable.h"
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define FNV_PRIME   16777619
#define FNV_OFFSET   2166136261U
#define LOAD_FACTOR   0.75
#define DEFAULT_BUCKET_SIZE   5
#define MAX_BUCKET_SIZE   16

Functions

uint32_t hash_parameters_fnv (domain_instance_t *params, unsigned len)
uint32_t hash_params (domain_instance_t *params, unsigned len, unsigned modulus)
static bool hash_resize_p (struct itable *htab)
void hash_resize (struct itable *htab, unsigned key_len)
bool itable_lookup (struct itable *htab, domain_info_t info, domain_instance_t *key, domain_instance_t *instance)
struct itablealloc_itable ()

Define Documentation

#define DEFAULT_BUCKET_SIZE   5

Definition at line 18 of file crt_itable.c.

#define FNV_OFFSET   2166136261U

Definition at line 16 of file crt_itable.c.

#define FNV_PRIME   16777619

Definition at line 15 of file crt_itable.c.

#define LOAD_FACTOR   0.75

Definition at line 17 of file crt_itable.c.

#define MAX_BUCKET_SIZE   16

Definition at line 19 of file crt_itable.c.


Function Documentation

struct itable* alloc_itable (  )  [read]

Definition at line 119 of file crt_itable.c.

uint32_t hash_parameters_fnv ( domain_instance_t params,
unsigned  len 
)

Definition at line 22 of file crt_itable.c.

uint32_t hash_params ( domain_instance_t params,
unsigned  len,
unsigned  modulus 
)

Definition at line 36 of file crt_itable.c.

void hash_resize ( struct itable htab,
unsigned  key_len 
)

Definition at line 52 of file crt_itable.c.

static bool hash_resize_p ( struct itable htab  )  [inline, static]

Definition at line 44 of file crt_itable.c.

bool itable_lookup ( struct itable htab,
domain_info_t  info,
domain_instance_t key,
domain_instance_t instance 
)

Definition at line 79 of file crt_itable.c.


Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1