~ubuntu-branches/ubuntu/vivid/adios/vivid-proposed

« back to all changes in this revision

Viewing changes to src/core/qhashtbl.h

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (15.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20140616230638-cxryhot6b8ge32l6
Tags: 1.7.0-1
* New upstream release.
* Add adios.pc pkgconfig file. adios_config now uses this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
 
43
43
typedef struct qhnobj_s qhnobj_t;  
 
44
typedef struct qhslot_s qhslot_t;  
44
45
typedef struct qhashtbl_s qhashtbl_t;
45
46
 
46
47
struct qhnobj_s {
50
51
    qhnobj_t *next;    /*!< for chaining next collision object */
51
52
};
52
53
 
 
54
// Head node in hash table 
 
55
struct qhslot_s {
 
56
    qhnobj_t *head;    /*!< The first collision object for gets */
 
57
    qhnobj_t *tail;    /*!< The last collision object for puts */
 
58
};
 
59
 
53
60
struct qhashtbl_s {
54
61
    /* capsulated member functions */
55
62
    bool  (*put)    (qhashtbl_t *tbl, const char *fullpath, const void *data);
67
74
    /* private variables - do not access directly */
68
75
    int num;         /*!< number of objects in this table */
69
76
    int range;       /*!< hash range, vertical number of slots */
70
 
    qhnobj_t **slots;   /*!< slot pointer container */
 
77
    qhslot_t *slots; /*!< slot head node */
 
78
 
 
79
    /* private debug variables */
 
80
    int ncalls_get; // number of calls to get()
 
81
    int nwalks_get; // number of walking steps in hash list in get()
 
82
    int ncalls_put; // number of calls to put()
 
83
    int nwalks_put; // number of walking steps in hash list in put()
71
84
};
72
85
 
73
86
qhashtbl_t* qhashtbl(int range);