ROSS
Functions | Variables
hash-quadratic.c File Reference
#include <ross.h>
#include "avl_tree.h"

Go to the source code of this file.

Functions

static int is_prime (int ptst)
 
tw_eventhash_search (tw_event **hash_t, tw_event *evt, int size)
 
void hash_print (tw_hash *h)
 
void * tw_hash_create ()
 
void tw_hash_insert (void *h, tw_event *event, long pe)
 
tw_eventtw_hash_remove (void *h, tw_event *event, long pe)
 
int next_prime (int ptst)
 

Variables

static unsigned int ncpu = 1
 
unsigned int g_tw_hash_size = 31
 

Function Documentation

void hash_print ( tw_hash h)

Definition at line 306 of file hash-quadratic.c.

References tw_hash::hash_sizes, tw_hash::incoming, ncpu, and tw_hash::num_stored.

tw_event * hash_search ( tw_event **  hash_t,
tw_event evt,
int  size 
)

Definition at line 283 of file hash-quadratic.c.

References tw_event::event_id, and g_tw_mynode.

int is_prime ( int  ptst)
static

Definition at line 259 of file hash-quadratic.c.

Referenced by next_prime(), and tw_hash_create().

Here is the caller graph for this function:

int next_prime ( int  ptst)

Definition at line 239 of file hash-quadratic.c.

References is_prime().

Referenced by tw_hash_create().

Here is the call graph for this function:

Here is the caller graph for this function:

void* tw_hash_create ( )

Definition at line 32 of file hash-quadratic.c.

References tw_pe::avl_list_head, tw_pe::avl_tree_size, g_tw_avl_node_count, g_tw_hash_size, g_tw_pe, tw_hash::hash_sizes, tw_hash::incoming, is_prime(), ncpu, avlNode::next, next_prime(), tw_hash::num_stored, tw_calloc(), tw_error(), TW_LOC, and tw_nnodes().

Referenced by tw_pe_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void tw_hash_insert ( void *  h,
tw_event event,
long  pe 
)

Definition at line 80 of file hash-quadratic.c.

References tw_kp::avl_tree, tw_pe::avl_tree_size, avlInsert(), tw_event::dest_lp, g_tw_pe, tw_hash::hash_sizes, tw_hash::incoming, tw_lp::kp, MAX_FRACTION, tw_hash::num_stored, pe, tw_statistics::s_avl, tw_pe::stats, and tw_clock_read().

Referenced by recv_finish().

Here is the call graph for this function:

Here is the caller graph for this function:

tw_event* tw_hash_remove ( void *  h,
tw_event event,
long  pe 
)

Definition at line 206 of file hash-quadratic.c.

References tw_kp::avl_tree, tw_pe::avl_tree_size, avlDelete(), tw_event::dest_lp, g_tw_pe, tw_hash::hash_sizes, tw_hash::incoming, tw_lp::kp, tw_hash::num_stored, pe, tw_statistics::s_avl, tw_pe::stats, tw_clock_read(), tw_error(), TW_LOC, and tw_nnodes().

Referenced by recv_finish(), and tw_eventq_push_list().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

unsigned int g_tw_hash_size = 31

Definition at line 21 of file hash-quadratic.c.

Referenced by tw_hash_create().

unsigned int ncpu = 1
static

Definition at line 20 of file hash-quadratic.c.

Referenced by hash_print(), and tw_hash_create().