usermode/library/common/cuckoo_hash/PointerSetHash.h

00001 /*
00002  *  PointerSetHash.h
00003  *  CuckooHashTable
00004  *
00005  *  Created by Steve Dekorte on 2009 04 28.
00006  *  Copyright 2009 __MyCompanyName__. All rights reserved.
00007  *
00008  */
00009 
00010 #ifndef POINTERHASH_DEFINED
00011 #define POINTERHASH_DEFINED 1
00012 
00013 #include "Common.h"
00014 #include <stddef.h>
00015 #include "PortableStdint.h"
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 #define POINTERHASH_MAXLOOP 10
00022 
00023 #include "PointerSetHash_struct.h"
00024 
00025 BASEKIT_API PointerSetHash *PointerSetHash_new(void);
00026 BASEKIT_API void PointerSetHash_copy_(PointerSetHash *self, const PointerSetHash *other);
00027 BASEKIT_API PointerSetHash *PointerSetHash_clone(PointerSetHash *self);
00028 BASEKIT_API void PointerSetHash_free(PointerSetHash *self);
00029 
00030 BASEKIT_API void PointerSetHash_at_put_(PointerSetHash *self, void *k);
00031 BASEKIT_API void PointerSetHash_removeKey_(PointerSetHash *self, void *k);
00032 BASEKIT_API size_t PointerSetHash_size(PointerSetHash *self); // actually the keyCount
00033 
00034 BASEKIT_API size_t PointerSetHash_memorySize(PointerSetHash *self);
00035 BASEKIT_API void PointerSetHash_compact(PointerSetHash *self);
00036 
00037 // --- private methods ----------------------------------------
00038 
00039 BASEKIT_API void PointerSetHash_setSize_(PointerSetHash *self, size_t size); 
00040 BASEKIT_API void PointerSetHash_insert_(PointerSetHash *self, PointerSetHashRecord *x); 
00041 BASEKIT_API void PointerSetHash_grow(PointerSetHash *self); 
00042 BASEKIT_API void PointerSetHash_shrinkIfNeeded(PointerSetHash *self); 
00043 BASEKIT_API void PointerSetHash_shrink(PointerSetHash *self); 
00044 BASEKIT_API void PointerSetHash_show(PointerSetHash *self);
00045 BASEKIT_API void PointerSetHash_updateMask(PointerSetHash *self); 
00046 
00047 #include "PointerSetHash_inline.h"
00048 
00049 #define PointerSetHash_cleanSlots(self)
00050 #define PointerSetHash_hasDirtyKey_(self, k) 0
00051 
00052 #ifdef __cplusplus
00053 }
00054 #endif
00055 #endif

Generated on Sat Apr 23 11:43:35 2011 for Mnemosyne by  doxygen 1.4.7