hash.h 2.16 KB
Newer Older
Alan Mishchenko committed
1 2
/**CFile****************************************************************

Alan Mishchenko committed
3
  FileName    [hash.h]
Alan Mishchenko committed
4 5 6

  SystemName  [ABC: Logic synthesis and verification system.]

Alan Mishchenko committed
7
  PackageName [Hash map.]
Alan Mishchenko committed
8 9 10

  Synopsis    [External declarations.]

Alan Mishchenko committed
11
  Author      [Aaron P. Hurst]
Alan Mishchenko committed
12 13 14
  
  Affiliation [UC Berkeley]

Alan Mishchenko committed
15
  Date        [Ver. 1.0. Started - May 16, 2005.]
Alan Mishchenko committed
16

Alan Mishchenko committed
17
  Revision    [$Id: vec.h,v 1.00 2005/06/20 00:00:00 ahurst Exp $]
Alan Mishchenko committed
18 19

***********************************************************************/
Alan Mishchenko committed
20
 
21 22
#ifndef ABC__misc__hash__hash_h
#define ABC__misc__hash__hash_h
Alan Mishchenko committed
23

24

Alan Mishchenko committed
25 26 27
#ifdef _WIN32
#define inline __inline // compatible with MS VS 6.0
#endif
Alan Mishchenko committed
28 29 30 31
////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

32
#include "misc/util/abc_global.h"
Alan Mishchenko committed
33

Alan Mishchenko committed
34 35 36
#include "hashInt.h"
#include "hashFlt.h"
#include "hashPtr.h"
Alan Mishchenko committed
37

38 39 40
ABC_NAMESPACE_HEADER_START


Alan Mishchenko committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                         BASIC TYPES                              ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                      MACRO DEFINITIONS                           ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                    FUNCTION DECLARATIONS                         ///
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
57
int Hash_DefaultHashFunc(int key, int nBins) {
58
  return Abc_AbsInt( ( (key+11)*(key)*7+3 ) % nBins );
Alan Mishchenko committed
59 60 61 62 63 64
}

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////

65 66 67 68


ABC_NAMESPACE_HEADER_END

Alan Mishchenko committed
69 70
#endif