PandA-2024.02
Macros | Typedefs | Functions | Variables
perfecthash.c File Reference
#include <stdio.h>
#include "perfecthash.h"
Include dependency graph for perfecthash.c:

Go to the source code of this file.

Macros

#define ARRAY_SIZE   24000
 
#define NUM_ACCELS   6
 
#define OPS_PER_ACCEL   ARRAY_SIZE/NUM_ACCELS
 

Typedefs

typedef unsigned long int ub4
 
typedef unsigned short int ub2
 
typedef unsigned char ub1
 

Functions

ub4 phash (ub4 val, ub2 *scramble, ub1 *tab)
 
int perfect_hash (int *key_input, int *table, ub2 *scramble, ub1 *tab, int max_idx)
 
int main ()
 

Variables

int result [NUM_ACCELS]
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE   24000

Definition at line 1 of file perfecthash.c.

◆ NUM_ACCELS

#define NUM_ACCELS   6

Definition at line 2 of file perfecthash.c.

Referenced by main().

◆ OPS_PER_ACCEL

#define OPS_PER_ACCEL   ARRAY_SIZE/NUM_ACCELS

Definition at line 3 of file perfecthash.c.

Referenced by main().

Typedef Documentation

◆ ub1

typedef unsigned char ub1

Definition at line 7 of file perfecthash.c.

◆ ub2

typedef unsigned short int ub2

Definition at line 6 of file perfecthash.c.

◆ ub4

typedef unsigned long int ub4

Definition at line 5 of file perfecthash.c.

Function Documentation

◆ main()

int main ( void  )

Definition at line 37 of file perfecthash.c.

References hash_table, key, main_result, NUM_ACCELS, OPS_PER_ACCEL, perfect_hash(), result, scramble, and tab.

Here is the call graph for this function:

◆ perfect_hash()

int perfect_hash ( int *  key_input,
int *  table,
ub2 scramble,
ub1 tab,
int  max_idx 
)

Definition at line 23 of file perfecthash.c.

References phash(), and result.

Here is the call graph for this function:

◆ phash()

ub4 phash ( ub4  val,
ub2 scramble,
ub1 tab 
)

Definition at line 13 of file perfecthash.c.

Variable Documentation

◆ result

int result[NUM_ACCELS]

Definition at line 35 of file perfecthash.c.


Generated on Mon Feb 12 2024 13:03:11 for PandA-2024.02 by doxygen 1.8.13