HPCToolkit
HashTable.cpp File Reference
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <include/gcc-attr.h>
#include "HashTable.hpp"
#include <lib/support/diagnostics.h>
Include dependency graph for HashTable.cpp:

Go to the source code of this file.

Functions

static uint DefaultHashFunct (const void *entry, const uint size)
 
static uint DefaultRehashFunct (const uint oldHashValue, const uint size)
 
static int DefaultEntryCompare (const void *entry1, const void *entry2)
 
static void DefaultEntryCleanup (void *entry)
 
uint IntegerHashFunct (const int value, const uint size)
 
uint IntegerRehashHashFunct (const uint oldHashValue, const uint size)
 
int IntegerEntryCompare (const int value1, const int value2)
 
uint StringHashFunct (const void *entry, const uint size)
 
uint StringRehashFunct (const uint oldHashValue, const uint size)
 
int StringEntryCompare (const void *entry1, const void *entry2)
 
static uint DefaultHashFunct (const void *GCC_ATTR_UNUSED entry, const uint GCC_ATTR_UNUSED size)
 
static int DefaultEntryCompare (const void *GCC_ATTR_UNUSED entry1, const void *GCC_ATTR_UNUSED entry2)
 
static void DefaultEntryCleanup (void *GCC_ATTR_UNUSED entry)
 

Variables

static const int FIRST_SLOT = 0
 
static const int EMPTY = -1
 
static const int DELETED = -2
 
static const int INVALID_INDEX = -99
 
static const int ENTRY_DEPTH_FOR_HASHING = 32
 
static const int LOOKING_FOR_AN_INDEX = 1
 
static ulong NEXT_ID = 0
 

Function Documentation

◆ DefaultEntryCleanup() [1/2]

static void DefaultEntryCleanup ( void *  entry)
static
Here is the caller graph for this function:

◆ DefaultEntryCleanup() [2/2]

static void DefaultEntryCleanup ( void *GCC_ATTR_UNUSED  entry)
static

Definition at line 891 of file HashTable.cpp.

◆ DefaultEntryCompare() [1/2]

static int DefaultEntryCompare ( const void *  entry1,
const void *  entry2 
)
static
Here is the caller graph for this function:

◆ DefaultEntryCompare() [2/2]

static int DefaultEntryCompare ( const void *GCC_ATTR_UNUSED  entry1,
const void *GCC_ATTR_UNUSED  entry2 
)
static

Definition at line 882 of file HashTable.cpp.

◆ DefaultHashFunct() [1/2]

static uint DefaultHashFunct ( const void *  entry,
const uint  size 
)
static
Here is the caller graph for this function:

◆ DefaultHashFunct() [2/2]

static uint DefaultHashFunct ( const void *GCC_ATTR_UNUSED  entry,
const uint GCC_ATTR_UNUSED  size 
)
static

Definition at line 855 of file HashTable.cpp.

◆ DefaultRehashFunct()

static uint DefaultRehashFunct ( const uint  oldHashValue,
const uint  size 
)
static

Definition at line 864 of file HashTable.cpp.

Here is the caller graph for this function:

◆ IntegerEntryCompare()

int IntegerEntryCompare ( const int  value1,
const int  value2 
)

Definition at line 810 of file HashTable.cpp.

◆ IntegerHashFunct()

uint IntegerHashFunct ( const int  value,
const uint  size 
)

Definition at line 795 of file HashTable.cpp.

◆ IntegerRehashHashFunct()

uint IntegerRehashHashFunct ( const uint  oldHashValue,
const uint  size 
)

Definition at line 802 of file HashTable.cpp.

◆ StringEntryCompare()

int StringEntryCompare ( const void *  entry1,
const void *  entry2 
)

Definition at line 843 of file HashTable.cpp.

◆ StringHashFunct()

uint StringHashFunct ( const void *  entry,
const uint  size 
)

Definition at line 817 of file HashTable.cpp.

◆ StringRehashFunct()

uint StringRehashFunct ( const uint  oldHashValue,
const uint  size 
)

Definition at line 835 of file HashTable.cpp.

Variable Documentation

◆ DELETED

const int DELETED = -2
static

Definition at line 88 of file HashTable.cpp.

◆ EMPTY

const int EMPTY = -1
static

Definition at line 87 of file HashTable.cpp.

◆ ENTRY_DEPTH_FOR_HASHING

const int ENTRY_DEPTH_FOR_HASHING = 32
static

Definition at line 91 of file HashTable.cpp.

◆ FIRST_SLOT

const int FIRST_SLOT = 0
static

Definition at line 86 of file HashTable.cpp.

◆ INVALID_INDEX

const int INVALID_INDEX = -99
static

Definition at line 89 of file HashTable.cpp.

◆ LOOKING_FOR_AN_INDEX

const int LOOKING_FOR_AN_INDEX = 1
static

Definition at line 92 of file HashTable.cpp.

◆ NEXT_ID

ulong NEXT_ID = 0
static

Definition at line 94 of file HashTable.cpp.