1 /**CFile****************************************************************
2 
3   FileName    [hash.h]
4 
5   SystemName  [ABC: Logic synthesis and verification system.]
6 
7   PackageName [Hash map.]
8 
9   Synopsis    [External declarations.]
10 
11   Author      [Aaron P. Hurst]
12 
13   Affiliation [UC Berkeley]
14 
15   Date        [Ver. 1.0. Started - May 16, 2005.]
16 
17   Revision    [$Id: vec.h,v 1.00 2005/06/20 00:00:00 ahurst Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__misc__hash__hash_h
22 #define ABC__misc__hash__hash_h
23 
24 
25 #ifdef _WIN32
26 #define inline __inline // compatible with MS VS 6.0
27 #endif
28 ////////////////////////////////////////////////////////////////////////
29 ///                          INCLUDES                                ///
30 ////////////////////////////////////////////////////////////////////////
31 
32 #include "misc/util/abc_global.h"
33 
34 #include "hashInt.h"
35 #include "hashFlt.h"
36 #include "hashPtr.h"
37 
38 ABC_NAMESPACE_HEADER_START
39 
40 
41 ////////////////////////////////////////////////////////////////////////
42 ///                         PARAMETERS                               ///
43 ////////////////////////////////////////////////////////////////////////
44 
45 ////////////////////////////////////////////////////////////////////////
46 ///                         BASIC TYPES                              ///
47 ////////////////////////////////////////////////////////////////////////
48 
49 ////////////////////////////////////////////////////////////////////////
50 ///                      MACRO DEFINITIONS                           ///
51 ////////////////////////////////////////////////////////////////////////
52 
53 ////////////////////////////////////////////////////////////////////////
54 ///                    FUNCTION DECLARATIONS                         ///
55 ////////////////////////////////////////////////////////////////////////
56 
Hash_DefaultHashFunc(int key,int nBins)57 int Hash_DefaultHashFunc(int key, int nBins) {
58   return Abc_AbsInt( ( (key+11)*(key)*7+3 ) % nBins );
59 }
60 
61 ////////////////////////////////////////////////////////////////////////
62 ///                       END OF FILE                                ///
63 ////////////////////////////////////////////////////////////////////////
64 
65 
66 
67 ABC_NAMESPACE_HEADER_END
68 
69 #endif
70 
71