Unordered AVI algorithm uses two key data structures. More...
#include <AVIunordered.h>
Classes | |
struct | process |
Functor for loop body. More... | |
Public Member Functions | |
virtual void | runLoop (MeshInit &meshInit, GlobalVec &g, bool createSyncFiles) |
Protected Types | |
typedef Galois::GAccumulator< int > | IterCounter |
typedef Galois::Graph::FirstGraph< AVI *, void, false > | Graph |
typedef Graph::GraphNode | GNode |
typedef GaloisRuntime::WorkList::ChunkedFIFO < CHUNK_SIZE, GNode > | AVIWorkList |
Protected Member Functions | |
virtual const std::string | getVersion () const |
version name | |
void | genElemAdjGraph (const MeshInit &meshInit, const GlobalVec &g) |
Generate element adjacency graph, where nodes are elements in the mesh, and there is an edge between the nodes if their corresponding elements share a vertex in the mesh. | |
virtual void | initRemaining (const MeshInit &meshInit, const GlobalVec &g) |
To be implemented by derived classes for some type specific initialization e.g. | |
Protected Attributes | |
Graph | graph |
Static Protected Attributes | |
static const bool | DEBUG = false |
static const int | CHUNK_SIZE = 32 |
Unordered AVI algorithm uses two key data structures.
1) Element Adjacency Graph 2) in degree vector
This graph has a node for each mesh element and keeps track of node-adjacency between AVI elements. Two elements are adjacent if they share a node in the mesh between them. We create a graph by connecting adjacent elements with an edge. Conceptually the edge is directed from the avi element with smaller time stamp to the greater one. But in implementation this direction information is not kept in the graph but in an array 'inDegVec', which has an entry corresponding to each AVI element. An avi element with 0 in edges has the minimum time stamp among its neighbors and is therefore eligible for an update It is assumed that AVI elements have unique integer id's 0..numElements-1, and the id is used to index into inDegVec
typedef GaloisRuntime::WorkList::ChunkedFIFO<CHUNK_SIZE, GNode> AVIunordered::AVIWorkList [protected] |
typedef Graph::GraphNode AVIunordered::GNode [protected] |
typedef Galois::Graph::FirstGraph<AVI*, void, false> AVIunordered::Graph [protected] |
typedef Galois::GAccumulator<int> AVIunordered::IterCounter [protected] |
void AVIunordered::genElemAdjGraph | ( | const MeshInit & | meshInit, | |
const GlobalVec & | g | |||
) | [inline, protected] |
Generate element adjacency graph, where nodes are elements in the mesh, and there is an edge between the nodes if their corresponding elements share a vertex in the mesh.
meshInit | ||
g |
virtual const std::string AVIunordered::getVersion | ( | ) | const [inline, protected, virtual] |
virtual void AVIunordered::initRemaining | ( | const MeshInit & | meshInit, | |
const GlobalVec & | g | |||
) | [inline, protected, virtual] |
To be implemented by derived classes for some type specific initialization e.g.
unordered needs element adjacency graph while ordered needs a lock per node of the original mesh.
meshInit | ||
g |
Implements AVIabstractMain.
virtual void AVIunordered::runLoop | ( | MeshInit & | meshInit, | |
GlobalVec & | g, | |||
bool | createSyncFiles | |||
) | [inline, virtual] |
meshInit | ||
g | ||
createSyncFiles |
Implements AVIabstractMain.
Reimplemented in AVIunorderedNoLock.
const int AVIunordered::CHUNK_SIZE = 32 [static, protected] |
const bool AVIunordered::DEBUG = false [static, protected] |
Graph AVIunordered::graph [protected] |