CUDPP  2.3
CUDA Data-Parallel Primitives Library
Namespaces
hash_table.cpp File Reference

Implements a basic hash table that stores one value per key. More...

#include "hash_table.h"
#include "debugging.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <limits>
#include <mt19937ar.h>
#include <cuda_runtime_api.h>
#include "cuda_util.h"

Namespaces

 CudaHT
 Encapsulates the hash table library.
 

Functions

Internal
dim3 CudaHT::CuckooHashing::ComputeGridDim (unsigned threads)
 Compute how many thread blocks are required for the given number of threads.
 
unsigned CudaHT::CuckooHashing::ComputeMaxIterations (const unsigned num_keys, const unsigned table_size, const unsigned num_functions)
 Compute how long an eviction chain is allowed to become for a given input size. More...
 

Detailed Description

Implements a basic hash table that stores one value per key.

Function Documentation

unsigned CudaHT::CuckooHashing::ComputeMaxIterations ( const unsigned  num_keys,
const unsigned  table_size,
const unsigned  num_functions 
)

Compute how long an eviction chain is allowed to become for a given input size.

Parameters
[in]num_keysNumber of keys in the input.
[in]table_sizeNumber of slots in the hash table.
[in]num_functionsNumber of hash functions being used.
Returns
The number of iterations that should be allowed.

The latter two parameters are only needed when using an empirical formula for computing the chain length.