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

pGraph View for deferring pGraph operations which can be flushed later. More...

Public Member Functions

 lazy_graph_view (view_container_type *vcont)
 Constructs a view that can reference all the elements of the passed container. The view takes ownership of the container. More...
 
 lazy_graph_view (view_container_type const &vcont)
 Constructs a view that can reference all the elements of the passed container. The view does not take ownership of the container. More...
 
 lazy_graph_view (view_container_type const &vcont, indexed_domain< size_t > const &dom, f_ident< size_t > const &mf)
 Constructs a view that can reference all the elements of the passed container. The view takes ownership of the container. More...
 
 lazy_graph_view (view_container_type *vcont, indexed_domain< size_t > const &dom, f_ident< size_t > const &mf)
 Constructs a view that can reference all the elements of the passed container. The view does not take ownership of the container. More...
 
 lazy_graph_view (lazy_graph_view const &other)
 Constructs a copy of the passed lazy_graph_view.
 
void add_vertex (void)
 Adds a vertex to the pGraph with the given property. More...
 
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. More...
 
size_t size (void) const
 
bool is_valid (void) const
 
view_container_type * get_container (void) const
 
view_container_type & container (void)
 
view_container_type & container (void) const
 
domain_type const & domain (void) const
 
domain_typedomain (void)
 
void set_domain (domain_type const &dom)
 
map_func_type const & mapfunc (void) const
 
bool empty (void) const
 Returns true if the view does not reference any element.
 

Public Types

typedef PG::vertex_property vertex_property
 
typedef PG::vertex_descriptor vertex_descriptor
 
typedef PG view_container_type
 
typedef indexed_domain< size_t > domain_type
 
typedef f_ident< size_t > map_func_type
 
typedef mf_type_helper::index_type index_type
 
typedef mf_type_helper::gid_type gid_type
 
typedef std::size_t size_type
 

Public Attributes

PG * m_ptr
 
sptr_type m_sptr
 

Protected Member Functions

PG * container_ptr (void) const
 Returns the container's pointer.
 

Detailed Description

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

pGraph View for deferring pGraph operations which can be flushed later.

Used when modifications to the graph need to be made while an algorithm is actively executing on said graph. Deferring the modifications keeps the graph in a consistent state for all operations being applied. Provides a subset of the interface of a graph_view.

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

Constructor & Destructor Documentation

◆ lazy_graph_view() [1/4]

template<typename PG >
stapl::lazy_graph_view< PG >::lazy_graph_view ( view_container_type *  vcont)

Constructs a view that can reference all the elements of the passed container. The view takes ownership of the container.

Parameters
vcontpointer to the container used to forward the operations.

◆ lazy_graph_view() [2/4]

template<typename PG >
stapl::lazy_graph_view< PG >::lazy_graph_view ( view_container_type const &  vcont)

Constructs a view that can reference all the elements of the passed container. The view does not take ownership of the container.

Parameters
vcontreference to the container used to forward the operations.

◆ lazy_graph_view() [3/4]

template<typename PG >
stapl::lazy_graph_view< PG >::lazy_graph_view ( view_container_type const &  vcont,
indexed_domain< size_t > const &  dom,
f_ident< size_t > const &  mf 
)

Constructs a view that can reference all the elements of the passed container. The view takes ownership of the container.

This constructor is required by the view_packing implementation of repeat_view over the lazy_graph_view.

Parameters
vcontreference to the container used to forward the operations.
domdomain of the view, should be equal to the domain of the container.
mfmapping function of the view.

◆ lazy_graph_view() [4/4]

template<typename PG >
stapl::lazy_graph_view< PG >::lazy_graph_view ( view_container_type *  vcont,
indexed_domain< size_t > const &  dom,
f_ident< size_t > const &  mf 
)

Constructs a view that can reference all the elements of the passed container. The view does not take ownership of the container.

This constructor is required by the view_packing implementation of repeat_view over the lazy_graph_view.

Parameters
vcontpointer to the container used to forward the operations.
domdomain of the view, should be equal to the domain of the container.
mfmapping function of the view.

Member Function Documentation

◆ add_vertex() [1/3]

template<typename PG >
void stapl::lazy_graph_view< PG >::add_vertex ( void  )

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/3]

template<typename PG >
void stapl::lazy_graph_view< 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() [3/3]

template<typename PG >
void stapl::lazy_graph_view< 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::lazy_graph_view< 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::lazy_graph_view< 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.

◆ flush()

template<typename PG >
void stapl::lazy_graph_view< PG >::flush ( void  )

Flushes out all pending requests to the pGraph.

◆ get_container()

view_container_type* stapl::core_view< PG , indexed_domain< size_t > , f_ident< size_t > >::get_container ( void  ) const
inherited

◆ container()

view_container_type& stapl::core_view< PG , indexed_domain< size_t > , f_ident< size_t > >::container ( void  ) const
inherited

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