Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::ThreadSafeOrderedSet< T, Cmp, Alloc > Class Template Reference

Thread-safe ordered set. More...

#include <PriorityQueue.h>

Public Types

typedef Set container_type
 
typedef container_type::value_type value_type
 
typedef container_type::reference reference
 
typedef
container_type::const_reference 
const_reference
 
typedef container_type::pointer pointer
 
typedef container_type::size_type size_type
 
typedef
container_type::const_iterator 
iterator
 
typedef
container_type::const_iterator 
const_iterator
 
typedef
container_type::const_reverse_iterator 
reverse_iterator
 
typedef
container_type::const_reverse_iterator 
const_reverse_iterator
 
typedef
galois::substrate::SimpleLock 
Lock_ty
 
template<typename _T , typename _Cmp = std::less<_T>, typename _Alloc = galois::FixedSizeAllocator<_T>>
using retype = ThreadSafeOrderedSet< _T, _Cmp, _Alloc >
 

Public Member Functions

 ThreadSafeOrderedSet (const Cmp &cmp=Cmp(), const Alloc &alloc=Alloc())
 
template<typename Iter >
 ThreadSafeOrderedSet (Iter b, Iter e, const Cmp &cmp=Cmp(), const Alloc &alloc=Alloc())
 
bool empty () const
 
size_type size () const
 
value_type top () const
 
bool find (const value_type &x) const
 
void push_back (const value_type &x)
 
void insert (const value_type &x)
 
bool push (const value_type &x)
 
value_type pop ()
 
bool remove (const value_type &x)
 
void clear ()
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

template<typename T, typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
class galois::ThreadSafeOrderedSet< T, Cmp, Alloc >

Thread-safe ordered set.

Faster than STL heap operations (about 10%-15% faster on serially) and can use scalable allocation, e.g., FixedSizeAllocator.

Member Typedef Documentation

template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::const_iterator galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::const_iterator
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::const_reference galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::const_reference
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::const_reverse_iterator galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::const_reverse_iterator
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef Set galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::container_type
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::const_iterator galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::iterator
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef galois::substrate::SimpleLock galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::Lock_ty
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::pointer galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::pointer
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::reference galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::reference
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
template<typename _T , typename _Cmp = std::less<_T>, typename _Alloc = galois::FixedSizeAllocator<_T>>
using galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::retype = ThreadSafeOrderedSet<_T, _Cmp, _Alloc>
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::const_reverse_iterator galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::reverse_iterator
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::size_type galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::size_type
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
typedef container_type::value_type galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::value_type

Constructor & Destructor Documentation

template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::ThreadSafeOrderedSet ( const Cmp &  cmp = Cmp(),
const Alloc &  alloc = Alloc() 
)
inlineexplicit
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
template<typename Iter >
galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::ThreadSafeOrderedSet ( Iter  b,
Iter  e,
const Cmp &  cmp = Cmp(),
const Alloc &  alloc = Alloc() 
)
inline

Member Function Documentation

template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
const_iterator galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::begin ( void  ) const
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
void galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::clear ( void  )
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
bool galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::empty ( void  ) const
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
const_iterator galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::end ( void  ) const
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
bool galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::find ( const value_type x) const
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
void galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::insert ( const value_type x)
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
value_type galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::pop ( void  )
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
bool galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::push ( const value_type x)
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
void galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::push_back ( const value_type x)
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
bool galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::remove ( const value_type x)
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
size_type galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::size ( ) const
inline
template<typename T , typename Cmp = std::less<T>, typename Alloc = galois::FixedSizeAllocator<T>>
value_type galois::ThreadSafeOrderedSet< T, Cmp, Alloc >::top ( ) const
inline

The documentation for this class was generated from the following file: