include/amino/lockfree_set.h File Reference

#include "ordered_list.h"

Go to the source code of this file.

Namespaces

namespace  amino

Classes

class  amino::SetNode< KeyType >
 The node type of the lock-free set, which stores the element and its hash key in it. More...
class  amino::Set< KeyType >
 This is an implementation of lock-free hash set data structure, based on algorithm described in two paper "Split-Ordered Lists - Lock-free Resizable Hash Tables" by Ori Shalev Tel Aviv University and Nir Shavit Tel-Aviv University and Sun Microsystems Laboratories "High Performance Dynamic Lock-Free Hash Tables and List-Based Set" by Maged M. Michael. More...

Functions

template<typename KeyType>
int hash_function (KeyType element)
 Hash function.
template<>
int hash_function< int > (int element)
 full specialization for several built-in type
template<>
int hash_function< unsigned int > (unsigned int element)
template<>
int hash_function< long > (long element)
template<>
int hash_function< unsigned long > (unsigned long element)
template<>
int hash_function< char > (char element)
template<>
int hash_function< unsigned char > (unsigned char element)
template<>
int hash_function< signed char > (signed char element)
template<>
int hash_function< short > (short element)
template<>
int hash_function< std::string > (std::string element)


Function Documentation

template<typename KeyType>
int hash_function ( KeyType  element  )  [inline]

Hash function.

Warning:
If the keyType is not in the types which is full specialized, user should offer a hash function themselves. else a exception would be thrown.
Template Parameters:
KeyType The type of element
Parameters:
element The specified object who wants to generate a hash key
Returns:
The hash key with int type.

template<>
int hash_function< char > ( char  element  )  [inline]

template<>
int hash_function< int > ( int  element  )  [inline]

full specialization for several built-in type

template<>
int hash_function< long > ( long  element  )  [inline]

template<>
int hash_function< short > ( short  element  )  [inline]

template<>
int hash_function< signed char > ( signed char  element  )  [inline]

template<>
int hash_function< std::string > ( std::string  element  )  [inline]

template<>
int hash_function< unsigned char > ( unsigned char  element  )  [inline]

template<>
int hash_function< unsigned int > ( unsigned int  element  )  [inline]

template<>
int hash_function< unsigned long > ( unsigned long  element  )  [inline]


Generated on Tue Dec 9 13:39:39 2008 for Amino by  doxygen 1.5.6