Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent > Struct Template Reference

Approximate priority scheduling. More...

#include <Obim.h>

List of all members.

Classes

struct  perItem
struct  rethread
struct  retype
struct  with_back_scan_prevention
struct  with_block_period
struct  with_container
struct  with_indexer

Public Types

typedef T value_type

Public Member Functions

 OrderedByIntegerMetric (const Indexer &x=Indexer())
 ~OrderedByIntegerMetric ()
void push (const value_type &val)
template<typename Iter >
void push (Iter b, Iter e)
template<typename RangeTy >
void push_initial (const RangeTy &range)
Galois::optional< value_typepop ()

Private Types

typedef Container::template
rethread< Concurrent >::type 
CTy
typedef Galois::flat_map
< Index, CTy * > 
LMapTy
typedef std::deque< std::pair
< Index, CTy * > > 
MasterLog

Private Member Functions

bool updateLocal (perItem &p)
GALOIS_ATTRIBUTE_NOINLINE
Galois::optional< T > 
slowPop (perItem &p)
GALOIS_ATTRIBUTE_NOINLINE CTyslowUpdateLocalOrCreate (perItem &p, Index i)
CTyupdateLocalOrCreate (perItem &p, Index i)

Private Attributes

Runtime::PerThreadStorage
< perItem
current
Runtime::LL::PaddedLock
< Concurrent > 
masterLock
MasterLog masterLog
std::atomic< unsigned int > masterVersion
Indexer indexer

Detailed Description

template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
struct Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >

Approximate priority scheduling.

Indexer is a default-constructable class whose instances conform to R r = indexer(item) where R is some type with a total order defined by operator< and operator== and item is an element from the Galois set iterator.

An example:

 struct Item { int index; };

 struct Indexer {
   int operator()(Item i) const { return i.index; }
 };

 typedef Galois::WorkList::OrderedByIntegerMetric<Indexer> WL;
 Galois::for_each<WL>(items.begin(), items.end(), Fn);
Template Parameters:
Indexer Indexer class
Container Scheduler for each bucket
BlockPeriod Check for higher priority work every 2^BlockPeriod iterations
BSP Use back-scan prevention

Member Typedef Documentation

template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
typedef Container::template rethread<Concurrent>::type Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::CTy [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
typedef Galois::flat_map<Index, CTy*> Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::LMapTy [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
typedef std::deque<std::pair<Index, CTy*> > Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::MasterLog [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
typedef T Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::value_type

Constructor & Destructor Documentation

template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::OrderedByIntegerMetric ( const Indexer &  x = Indexer()  )  [inline]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::~OrderedByIntegerMetric (  )  [inline]

Member Function Documentation

template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
Galois::optional<value_type> Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::pop (  )  [inline]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
template<typename Iter >
void Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::push ( Iter  b,
Iter  e 
) [inline]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
void Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::push ( const value_type val  )  [inline]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
template<typename RangeTy >
void Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::push_initial ( const RangeTy &  range  )  [inline]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
GALOIS_ATTRIBUTE_NOINLINE Galois::optional<T> Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::slowPop ( perItem p  )  [inline, private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
GALOIS_ATTRIBUTE_NOINLINE CTy* Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::slowUpdateLocalOrCreate ( perItem p,
Index  i 
) [inline, private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
bool Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::updateLocal ( perItem p  )  [inline, private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
CTy* Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::updateLocalOrCreate ( perItem p,
Index  i 
) [inline, private]

Member Data Documentation

template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
Runtime::PerThreadStorage<perItem> Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::current [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
Indexer Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::indexer [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
Runtime::LL::PaddedLock<Concurrent> Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::masterLock [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
MasterLog Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::masterLog [private]
template<class Indexer = DummyIndexer<int>, typename Container = FIFO<>, unsigned BlockPeriod = 0, bool BSP = true, typename T = int, typename Index = int, bool Concurrent = true>
std::atomic<unsigned int> Galois::WorkList::OrderedByIntegerMetric< Indexer, Container, BlockPeriod, BSP, T, Index, Concurrent >::masterVersion [private]

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

Generated on 2 Nov 2013 for Galois by  doxygen 1.6.1