STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::graph_commit_log< PG > Class Template Reference

Container for an ordered log of commits, which can be flushed later. Used by the lazy_graph_view_container to store log of deferred commits, as well as apply them to the appropriate pGraph at a suitable time. More...

Public Member Functions

 graph_commit_log (graph_commit_log const &other)
 
 graph_commit_log (PG *cont)
 
 ~graph_commit_log (void)
 Destructor also flushes the pending commits to the pGraph.
 
void add_vertex (vertex_property const &vp)
 Adds a vertex to the pGraph with the given property. More...
 
void add_vertex (vertex_descriptor const &vd, vertex_property const &vp)
 Adds a vertex to the pGraph with the given property and descriptor. More...
 
void delete_vertex (vertex_descriptor const &vd)
 Deletes a vertex from the pGraph with the given descriptor. This method is asynchronous. More...
 
void migrate (vertex_descriptor const &vd, size_t location)
 Stores a request for migration of given vertex for future commit. More...
 
void flush (void)
 Flushes out all pending requests to the pGraph.
 

Public Types

typedef PG::vertex_property vertex_property
 
typedef PG::vertex_descriptor vertex_descriptor
 

Detailed Description

template<typename PG>
class stapl::graph_commit_log< PG >

Container for an ordered log of commits, which can be flushed later. Used by the lazy_graph_view_container to store log of deferred commits, as well as apply them to the appropriate pGraph at a suitable time.

Template Parameters
PGThe type of pGraph to which the deferred commits will be applied.

Stores pending add/delete/migrate requests to the pGraph in separate buffers, as well as a buffer that stores ordering information for each pending request. On each location, the pending requests are flushed in the order in which they were added.

Member Function Documentation

◆ add_vertex() [1/2]

template<typename PG >
void stapl::graph_commit_log< PG >::add_vertex ( vertex_property const &  vp)

Adds a vertex to the pGraph with the given property.

Parameters
vpProperty of the vertex.
Returns
vertex_descriptor of the added vertex.

Vertex-descriptor is assigned automatically by the pGraph. This method is asynchronous. The vertex is added at the calling location, which is also the home location for the vertex. Stores the request for future commit.

◆ add_vertex() [2/2]

template<typename PG >
void stapl::graph_commit_log< PG >::add_vertex ( vertex_descriptor const &  vd,
vertex_property const &  vp 
)

Adds a vertex to the pGraph with the given property and descriptor.

Parameters
giddescriptor of the vertex.
vpProperty of the vertex.
Returns
vertex_descriptor of the added vertex.

This method is asynchronous. The vertex is added at the calling location. An async is sent to the home-location of the vertex. Stores the request for future commit.

◆ delete_vertex()

template<typename PG >
void stapl::graph_commit_log< PG >::delete_vertex ( vertex_descriptor const &  vd)

Deletes a vertex from the pGraph with the given descriptor. This method is asynchronous.

Parameters
giddescriptor of the vertex. Stores the request for future commit.

◆ migrate()

template<typename PG >
void stapl::graph_commit_log< PG >::migrate ( vertex_descriptor const &  vd,
size_t  location 
)

Stores a request for migration of given vertex for future commit.

Parameters
vdThe descriptor of the vertex to be migrated.
locationThe location where the vertex needs to be migrated.

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