Reachability Graph with additional storage in GPU memory.
Methods are provided to copy data from main memory to GPU memory and back.
MERGE and COMBINE methods are scheduled for GPU execution (as OpenCL kernels).
- Author
- Peter Schäfer
Definition at line 23 of file graph_cl.h.
|
| GraphCL (const GraphCL &that) |
| copy constructor More...
|
|
| GraphCL (GraphCL &&that) |
| move constructor More...
|
|
virtual | ~GraphCL () |
| destructor; release all memory, including GPU memory More...
|
|
GraphCL & | operator= (const GraphCL &that) |
| assginment operator More...
|
|
GraphCL & | operator= (GraphCL &&that) |
| move assignment operator More...
|
|
virtual void | synchToGpu () override |
| copy adjacancy matrix data to GPU memory More...
|
|
virtual void | synchFromGpu () override |
| copy adjacancy matrix data back from GPU memory to CPU memory More...
|
|
|
All methods return immediately. Kernels are scheduled for asynchronous execution. Use OpenCL to wait for execution, then retrieve results with synchFromGpu, or foundDiagonalElement.
|
virtual void | finalize () override |
|
virtual void | combine (const Graph *P) override |
| apply the COMBINE operation, filtering edges with valid placements. Effectively performs a Boolean AND oepration: (*this)_VV &= that_VV More...
|
|
virtual void | merge2 (const Graph *A, const Graph *B, MatrixPool *pool) override |
| apply the MERGE operation, computing the transitive closure of two graphs. Effectively performs a matrix multiplication: (*this)_VV = *A_VV * *B_VV More...
|
|
virtual void | merge3 (const Graph *A, const Graph *B, MatrixPool *pool) override |
| apply the final MERGE operation, computing the transitive closure of two graphs. Effectively performs a matrix multiplication: this_HH = A_HV * B_VV * A_VH More...
|
|
virtual void | queryDiagonalElement () const override |
| find an edge on the diagonal of the adjacancy matrix. Does not return a result. To query the result of this method, call foundDiagonalElement. (reason: we also want to perform this query asynchronously on a GPU). More...
|
|
virtual int | foundDiagonalElement () const override |
|
virtual void | release (Orientation o1, Orientation o2) override |
| release memory for one part of the adjacancy matrix More...
|
|
virtual void | release (Orientation o1, Orientation o2, MatrixPool *pool) override |
| release memory for one part of the adjacancy matrix More...
|
|
virtual void | resetConditions () override |
|
| Graph (const GraphModel &model) |
|
| Graph (const GraphModel &model, Structure &str, int i0) |
|
| Graph (const Graph &) |
|
| Graph (Graph &&) |
|
| ~Graph () |
|
int | vertices () const |
|
int | edges () const |
|
Graph & | operator= (const Graph &) |
|
Graph & | operator= (Graph &&) |
|
Graph & | operator+= (const Graph &) |
|
Graph::ptr | transitiveClosure () const |
|
void | transitiveClosureInPlace () |
|
void | add_edge (int i, int j) |
|
void | clear () |
|
| Graph (const Graph &that) |
| copy constructor More...
|
|
| Graph (Graph &&that) |
| move constructor More...
|
|
virtual | ~Graph () |
| destructor, releases memory More...
|
|
void | allocateAll () |
| allocate data for adjacenty matrixes (all four parts) More...
|
|
mzd_t * | allocate (Orientation o1, Orientation o2) |
| allocate an adjacancy sub-matrix (one of four parts) More...
|
|
const IndexRange & | hmask () const |
| horizontal range covered by this graph More...
|
|
Rect | rect (Orientation o1, Orientation o2) const |
| range covered by this graph More...
|
|
const GraphModel::ptr | graphModel () const |
|
void | setOriginPlacement (int di, int dj) |
| this graph represents a set of valid placements More...
|
|
void | setOriginRG (int i) |
| this graph represents a reachability graph, it was created from a reachability structure More...
|
|
void | setOriginMerge2 (Graph::ptr A, Graph::ptr B) |
| this graph is the transitive closure of two other graphs. It is the result of a MERGE operation. More...
|
|
void | setOriginMerge3 (Graph::ptr A, Graph::ptr B) |
| this graph is the transitive closure of two other graphs. It is the result of a final MERGE operation. More...
|
|
void | setOriginCombine (Graph::ptr P) |
| a sub-set of valid placements is applied to the graph More...
|
|
void | printOrigin (std::ostream &out) const |
| debug output More...
|
|
Graph & | operator= (const Graph &that) |
| assigment operator More...
|
|
Graph & | operator= (Graph &&that) |
| move assigment operator More...
|
|
bool | operator== (const Graph &that) const |
| comparison operator More...
|
|
void | add_edge (Orientation ori_from, int i_from, Orientation ori_to, int i_to) |
| add an edge to the graph More...
|
|
void | add_range (IndexRange r_from, IndexRange r_to) |
| add a set of edges to the graph, covering a range of nodes More...
|
|
bool | contains_edge (Orientation ori_from, int i_from, Orientation ori_to, int i_to) const |
| check if an edge is present More...
|
|
bool | contains_edge (IndexRange r_from, IndexRange r_to) const |
| check a range of edges More...
|
|
bool | empty (Orientation o1, Orientation o2) const |
| empty test for one of the four sub-graphs More...
|
|
bool | zero (Orientation o1, Orientation o2) const |
| empty test for one of the four sub-graphs More...
|
|
void | releaseIfZero () |
| release memory that is not neeeded (empty sub-graphs) More...
|
|
virtual void | release () |
| release memory for all parts of the adjacancy matrix More...
|
|
int | find_next1 (Orientation o1, int i, Orientation o2, int j) const |
| find the next edge in a sub-graph More...
|
|
int | find_next0 (Orientation o1, int i, Orientation o2, int j) const |
| find the next missing edge in a sub-graph More...
|
|
IndexRange | find_next_range (Orientation o1, int i, Orientation o2, int j) const |
| find a range of consecutive edges in a sub-graph More...
|
|
Graph::ptr | merge2 (const Graph *B, MatrixPool *pool=nullptr) const |
| apply the MERGE operation, computing the transitive closure of two graphs. Effectively performs a matrix multiplication: (*result)_VV = (*this)_VV * that_VV More...
|
|
Graph::ptr | merge3 (const Graph *B, MatrixPool *pool=nullptr) const |
| apply the final MERGE operation, computing the transitive closure of two graphs. Effectively performs a matrix multiplication: (*result)_HH = (*this)_HV * that_VV * (*this)_VH More...
|
|
double | memory (Orientation ori1, Orientation ori2) const |
| compute the memory footprint of an adjacancy matrix More...
|
|
double | density (Orientation ori1, Orientation ori2) const |
| compute the density (amount of set edges) of an adjacancy matrix More...
|
|
double | memory () const |
|
double | density () const |
|
void | clear () |
| remove all edges More...
|
|
void | clear (Orientation ori1, Orientation ori2) |
| remove all edges of a sub-graph More...
|
|
bool | is_upper_triangular (Orientation ori1, Orientation ori2) const |
|
void | print (std::ostream &out, Orientation o1, Orientation o2) const |
| print a sub-adjacancy matrix More...
|
|
|
typedef boost::shared_ptr< Graph > | ptr |
|
typedef boost::shared_ptr< Graph > | ptr |
|
static bool | is_adjacent_to (const Graph &A, const Graph &B) |
|
static void | set_bits (mzd_t *M, int row, int i, int j) |
| set some bits in a Boolean matrix More...
|
|
static bool | has_bits (mzd_t *M, int row, int i, int j) |
| query bits in a Boolean matrix More...
|
|
static void | clear_row (mzd_t *M, int row) |
| clear a row in a Boolean matrix More...
|
|
static void | and_row (mzd_t *M, int r, mzd_t *M2, int r2) |
| apply bitwise and of two matrix rows More...
|
|
static int | find_next1 (mzd_t *M, int row, int i) |
| find next set bit in a Boolean matrix More...
|
|
static int | find_next0 (mzd_t *M, int row, int i) |
| find next cleared bit in a Boolean matrix More...
|
|
static bool | is_upper_triangular (const mzd_t *mzd) |
|
struct frechet::reach::Graph::Origin | origin |
|
static void | print (std::ostream &out, const mzd_t *M) |
| print a Boolean matrix More...
|
|
mzd_t * | mtx [2][2] |
| adjacency matrix (M4RI structure) split into four parts to allow for memory savings. More...
|
|
IndexRange | mask [2] |
|
const GraphModel::ptr | model |
|
int | diagonalElement |
| result of call to searchDiagonalElement More...
|
|