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

Distribution class for the stapl::graph container. More...

Public Member Functions

 graph_distribution_static (directory_type const &directory, container_manager_type const &bcmangr)
 Creates a distribution with the specified directory and base container manager. More...
 
 graph_distribution_static (partition_type const &partition, mapper_type const &mapper)
 Copy construction of this distribution. More...
 
 graph_distribution_static (partition_type const &partition, mapper_type const &mapper, value_type const &default_value)
 Create a distribution with an initial value for elements. More...
 
 graph_distribution_static (partition_type const &partition)
 Create a distribution with default constructed elements and a default mapper. More...
 
bool is_directed (void) const
 
template<typename Frontier >
void set_frontier (Frontier *frontier)
 Set the frontier for the current traversal on this graph.
 
template<typename Frontier >
Frontier * get_frontier ()
 Get the frontier for the current traversal on this graph.
 
void sort_edges_ascending (void)
 Sorts edges of each vertex in ascending order of target-vertex-id. More...
 
void sort_edges_locality (void)
 Sorts edges of each vertex by home-location of target-vertex. More...
 
template<typename Comp >
void sort_edges (Comp const &comp)
 Sorts edges of each vertex by user-defined comparison function. More...
 
template<typename Pred >
void erase_edges_if (Pred &&pred)
 Erases all edges that match a user-defined predicate. More...
 
void remove_duplicate_edges ()
 Removes all duplicate edges with the same (source, target) pair.
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 
void reserve_adjacency (vertex_descriptor const &gid, size_t num_adjacents)
 
vertex_descriptor add_vertex (vertex_property const &vp)
 Adds a vertex to the pGraph with the given property. More...
 
vertex_descriptor add_vertex (vertex_descriptor const &gid, vertex_property const &vp)
 Adds a vertex to the pGraph with the given property and descriptor. More...
 
bool delete_vertex (vertex_descriptor const &gid)
 Deletes a vertex from the pGraph with the given descriptor. This method is asynchronous. More...
 
iterator find_vertex (vertex_descriptor const &gid)
 
iterator find (vertex_descriptor const &gid)
 
edge_descriptor add_edge (edge_descriptor const &ed)
 
edge_descriptor add_edge (edge_descriptor const &ed, edge_property const &ep)
 
void add_edge_async (edge_descriptor const &ed)
 
void add_edge_async (edge_descriptor const &ed, edge_property const &ep, bool sister=false)
 
template<typename Comp >
edge_descriptor insert_edge (edge_descriptor const &ed, edge_property const &ep, Comp const &comp)
 
template<typename Comp >
void insert_edge_async (edge_descriptor const &ed, edge_property const &ep, Comp const &comp, bool sister=false)
 
void delete_edge (edge_descriptor const &ed)
 
void clear (void)
 
void clear_edges (void)
 
size_t num_local_edges (void) const
 
size_t num_local_self_edges (void) const
 Returns the number of local self edges in the base container. More...
 
size_t num_edges (void) const
 Returns the number of edges in the specified STAPL sequential graph. More...
 
size_t num_self_edges (void) const
 Returns the total number of self edges in the pGraph. More...
 
size_t num_edges_collective (void) const
 
size_t num_self_edges_collective (void) const
 Returns the number of self edges in the pGraph. More...
 
template<typename FCont >
void aggregate_vp_apply_async (FCont const &fcont)
 Applies functors to respective vertex-properties on this location. All elements must be local. For internal use by Aggregators. More...
 
template<typename FCont >
void aggregate_vp_apply_async (size_t loc, FCont const &fcont)
 
template<typename Cont , typename F >
void aggregate_async (Cont const &cont, F const &f)
 Applies a functor on this location. All elements must be local. For internal use by Aggregators. More...
 
template<typename Cont , typename F >
void aggregate_async (size_t loc, Cont const &cont, F const &f)
 
template<typename F >
void vp_apply_async (vertex_descriptor const &gid, F const &f)
 
template<typename F >
F::result_type vp_apply (gid_type const &gid, F const &f)
 
template<typename F >
F::result_type vp_apply (gid_type const &gid, F const &f) const
 
template<typename Functor >
void ep_apply_async (edge_descriptor const &ed, Functor const &f)
 
template<typename Functor >
Functor::result_type ep_apply (edge_descriptor const &ed, Functor const &f)
 
template<typename Functor >
void ep_apply_promise (edge_descriptor const &ed, Functor const &f, promise< typename Functor::result_type > p)
 Applies a function to the specified edge and populates a promise with the result. Used by ep_apply. More...
 
template<typename Functor >
bool ep_find_apply (edge_descriptor const &ed, Functor const &f)
 Applies a functor f on the property of the specified edge, if it exists. More...
 
template<typename Functor >
void ep_find_apply_promise (edge_descriptor const &ed, Functor const &f, promise< bool > p)
 Applies the given functor on the property of the specified edge, if it exists. Populates a promise variable with true if the edge was found, or false otherwise. More...
 
iterator make_iterator (gid_type const &gid)
 
const_iterator make_iterator (gid_type const &gid) const
 
iterator make_iterator (domain_type const &domain, gid_type const &gid)
 Creates an iterator to the specified gid, which is restricted to the provided domain. More...
 
reference make_reference (index_type const &gid)
 
const_reference make_reference (index_type const &gid) const
 
local_return_type metadata (void)
 Returns the metadata information for the base-containers on this location. More...
 
size_t num_base_containers (void)
 Returns the global number of base-containers in this distribution.
 
future< bool > has_edge (vertex_descriptor const &source, vertex_descriptor const &target)
 Determines whether there exists an edge between two vertices. More...
 
void aggregate_apply_async (Cont &&cont, F &&f)
 Applies a functor on this location. More...
 
void aggregate_apply_async (size_t loc, Cont const &cont, F const &f)
 
void guarded_aggregate_apply_async (size_t loc, Cont const &cont, F const &f)
 
void guarded_apply_set (vertex_descriptor const &gid, F &&f)
 Apply a functor to the element at a given GID in a non-concurrent manner. That is, if the graph is already in an apply_set, then this apply_set will be deferred until the one in progress has ended. More...
 
void guarded_unordered_apply (vertex_descriptor const &gid, F &&f)
 Apply a functor to the element at a given GID in a non-concurrent manner. That is, if the graph is already in an unordered_apply, then this unordered_apply will be deferred until the one in progress has ended. More...
 
size_t size (void) const
 
domain_type const & domain (void) const
 
partition_type & partition ()
 
partition_type const & partition () const
 
mapper_type & mapper ()
 
directory_type & directory (void)
 
directory_type const & directory (void) const
 
container_manager_type & container_manager (void)
 
container_manager_type const & container_manager (void) const
 
container_type * container (void)
 
container_type const * container (void) const
 
bool is_local (Indices const &... i) const
 
void defer_metadata_at (gid_type const &gid, promise< dom_info_type > p)
 Returns the metadata associated with the given gid by setting the value of the promise. More...
 
future< dom_info_typemetadata_at (gid_type const &gid)
 Returns the metadata associated with the given index.
 
dom_info_type metadata_of (cid_type const &cid)
 Return the metadata associated with the specified component. More...
 
void redistribute (std::shared_ptr< DistSpecView > dist_view, typename std::enable_if< is_distribution_view< DistSpecView >::value >::type *=0)
 Redistribute data to match the distribution specification provided. More...
 
void update (std::vector< std::tuple< std::pair< gid_type, gid_type >, cid_type, location_type >> const &updates)
 Add information on the distribution of elements not yet in the container. Use in dynamic containers with view-based distributions to allow element distribution to be based on computation. More...
 
void set_element (gid_type const &gid, value_type const &val)
 Update the element at a GID by replacing it with a given value. More...
 
void set_elements (gid_type gid, SourceView &&source_view)
 Update a range of contiguous elements in the container, starting at gid. A total of view.size() elements will be updated with the values in view. More...
 
void set_elements (gid_type gid, View &&view)
 Signature of set_elements used when underlying base container is not supported. Fall back to iterative use of set_element.
 
value_type get_element (gid_type const &gid) const
 Return a copy of the element at a specific GID. Note that this is a blocking operation. More...
 
future< value_type > get_element_split (gid_type const &gid)
 Return a future of the element at a specific GID. This is a non-blocking operation. More...
 
void apply_set (gid_type const &gid, Functor const &f)
 Apply a function object to the element with the given GID. More...
 
void unordered_apply_set (gid_type const &gid, Functor &&f)
 Apply a function object to the element with the given GID, disregarding RMI causal ordering. More...
 
void unordered_apply (gid_type const &gid, Functor &&f)
 Apply a function object to the element with the given GID, passing along the distribution pointer and disregarding RMI causal ordering. More...
 
boost::result_of< Functor(value_type &)>::type apply_get (gid_type const &gid, Functor const &f)
 Apply a function object to the element with the given GID and return the result. More...
 
boost::result_of< Functor(value_type &)>::type apply_get (gid_type const &gid, Functor const &f) const
 Apply a function object to the element with the given GID and return the result. More...
 

Public Types

using base_type = detail::graph_distribution_base< Container, graph_distribution_static< Container > >
 
typedef Container container_type
 
typedef base_type::directory_type directory_type
 
typedef base_type::container_manager_type container_manager_type
 
typedef directory_type::partition_type partition_type
 
typedef directory_type::mapper_type mapper_type
 
typedef container_manager_type::base_container_type base_container_type
 
typedef directory_type::key_type gid_type
 
typedef gid_type index_type
 
typedef partition_type::value_type domain_type
 
typedef base_container_type::value_type value_type
 
typedef base_container_type::cid_type cid_type
 
typedef base_container_type::vertex_descriptor vertex_descriptor
 
typedef base_container_type::edge_descriptor edge_descriptor
 
typedef container_traits< container_type >::vertex_property vertex_property
 
typedef container_traits< container_type >::edge_property edge_property
 
typedef base_container_type::edgelist_type edgelist_type
 
typedef base_container_type::edge_iterator edge_iterator
 
typedef mapper_type::value_type location_type
 
typedef graph_accessor< graph_distribution_staticaccessor_type
 
typedef proxy< value_type, accessor_typereference
 
typedef const_graph_accessor< graph_distribution_staticconst_accessor_type
 
typedef const proxy< value_type, const_accessor_typeconst_reference
 
typedef metadata::static_container_extractor< graph_distribution_staticloc_dist_metadata
 
typedef container_iterator< graph_distribution_static, accessor_typeiterator
 
typedef const_container_iterator< graph_distribution_static, const_accessor_typeconst_iterator
 
typedef iterator vertex_iterator
 
typedef const_iterator const_vertex_iterator
 
typedef reference::adj_edge_iterator adj_edge_iterator
 
typedef const_reference::const_adj_edge_iterator const_adj_edge_iterator
 
typedef metadata_entry< domain_type, base_container_type * > dom_info_type
 
typedef std::vector< dom_info_typelocal_return_type
 
typedef mapper_type::domain_type map_dom_t
 

Protected Member Functions

void add_edge_promise (edge_descriptor const &ed, edge_property const &ep, promise< edge_descriptor > p, bool sister=false)
 used by add_edge method to populate a promise so that the edge descriptor may be returned for the synchronous method. More...
 
template<typename Comp >
void insert_edge_promise (edge_descriptor const &ed, edge_property const &ep, Comp const &comp, promise< edge_descriptor > p, bool sister=false)
 used by insert_edge method to populate a promise so that the edge descriptor may be returned for the synchronous method. More...
 
void update_impl (std::vector< std::tuple< std::pair< gid_type, gid_type >, cid_type, location_type >> const &updates)
 

Protected Types

enum  edge_sortedness { not_sorted, ascending, locality, custom }
 

Protected Attributes

edge_sortedness m_edge_sortedness
 
void * m_current_frontier
 
container_manager_type m_container_manager
 Manages and owns the base-containers on this location. Base-containers store the actual data. Container manager also handles the mapping from gid to base-container.
 

Detailed Description

template<typename Container>
struct stapl::graph_distribution_static< Container >

Distribution class for the stapl::graph container.

Template Parameters
ContainerType of the container that is managing this distribution.
See also
graph.
Note
This distribution provides methods for adding and deleting vertices that are not used by the static stapl::graph, but are provided to allow user-defined containers the full dynamic_graph API.

Constructor & Destructor Documentation

◆ graph_distribution_static() [1/4]

template<typename Container >
stapl::graph_distribution_static< Container >::graph_distribution_static ( directory_type const &  directory,
container_manager_type const &  bcmangr 
)

Creates a distribution with the specified directory and base container manager.

Parameters
directoryThe specified directory for this distribution.
bcmngrThe base container manager for this distribution.

◆ graph_distribution_static() [2/4]

template<typename Container >
stapl::graph_distribution_static< Container >::graph_distribution_static ( partition_type const &  partition,
mapper_type const &  mapper 
)

Copy construction of this distribution.

Parameters
otherAnother distribution to copy from

◆ graph_distribution_static() [3/4]

template<typename Container >
stapl::graph_distribution_static< Container >::graph_distribution_static ( partition_type const &  partition,
mapper_type const &  mapper,
value_type const &  default_value 
)

Create a distribution with an initial value for elements.

Parameters
partitionPartition used by the container
mapperMapper used by the container
default_valueThe value that the elements in this distribution will be initialized with

◆ graph_distribution_static() [4/4]

template<typename Container >
stapl::graph_distribution_static< Container >::graph_distribution_static ( partition_type const &  partition)

Create a distribution with default constructed elements and a default mapper.

Parameters
partitionPartition used by the container

Member Function Documentation

◆ sort_edges_ascending()

template<typename Container >
void stapl::graph_distribution_static< Container >::sort_edges_ascending ( void  )

Sorts edges of each vertex in ascending order of target-vertex-id.

◆ sort_edges_locality()

template<typename Container >
void stapl::graph_distribution_static< Container >::sort_edges_locality ( void  )

Sorts edges of each vertex by home-location of target-vertex.

◆ sort_edges()

template<typename Container >
template<typename Comp >
void stapl::graph_distribution_static< Container >::sort_edges ( Comp const &  comp)

Sorts edges of each vertex by user-defined comparison function.

◆ erase_edges_if()

template<typename Container >
template<typename Pred >
void stapl::graph_distribution_static< Container >::erase_edges_if ( Pred &&  pred)

Erases all edges that match a user-defined predicate.

Parameters
predA unary predicate that receives a single edge

◆ reserve_adjacency()

template<typename Container >
void stapl::graph_distribution_static< Container >::reserve_adjacency ( vertex_descriptor const &  gid,
size_t  num_adjacents 
)

◆ add_vertex() [1/2]

template<typename Container >
vertex_descriptor stapl::graph_distribution_static< Container >::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.

◆ add_vertex() [2/2]

template<typename Container >
vertex_descriptor stapl::graph_distribution_static< Container >::add_vertex ( vertex_descriptor const &  gid,
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.

◆ delete_vertex()

template<typename Container >
bool stapl::graph_distribution_static< Container >::delete_vertex ( vertex_descriptor const &  gid)

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

Parameters
giddescriptor of the vertex.

◆ find_vertex()

template<typename Container >
iterator stapl::graph_distribution_static< Container >::find_vertex ( vertex_descriptor const &  gid)

◆ find()

template<typename Container >
iterator stapl::graph_distribution_static< Container >::find ( vertex_descriptor const &  gid)

◆ add_edge() [1/2]

template<typename Container >
edge_descriptor stapl::graph_distribution_static< Container >::add_edge ( edge_descriptor const &  ed)

◆ add_edge() [2/2]

template<typename Container >
edge_descriptor stapl::graph_distribution_static< Container >::add_edge ( edge_descriptor const &  ed,
edge_property const &  ep 
)

◆ add_edge_async() [1/2]

template<typename Container >
void stapl::graph_distribution_static< Container >::add_edge_async ( edge_descriptor const &  ed)

◆ add_edge_async() [2/2]

template<typename Container >
void stapl::graph_distribution_static< Container >::add_edge_async ( edge_descriptor const &  ed,
edge_property const &  ep,
bool  sister = false 
)

Parameters
siblingUsed to indicate if the edge is the second sibling in an undirected edge-pair.

◆ insert_edge()

template<typename Container >
template<typename Comp >
edge_descriptor stapl::graph_distribution_static< Container >::insert_edge ( edge_descriptor const &  ed,
edge_property const &  ep,
Comp const &  comp 
)

◆ insert_edge_async()

template<typename Container >
template<typename Comp >
void stapl::graph_distribution_static< Container >::insert_edge_async ( edge_descriptor const &  ed,
edge_property const &  ep,
Comp const &  comp,
bool  sister = false 
)

Parameters
siblingUsed to indicate if the edge is the second sibling in an undirected edge-pair.

◆ add_edge_promise()

template<typename Container >
void stapl::graph_distribution_static< Container >::add_edge_promise ( edge_descriptor const &  ed,
edge_property const &  ep,
promise< edge_descriptor >  p,
bool  sister = false 
)
protected

used by add_edge method to populate a promise so that the edge descriptor may be returned for the synchronous method.

Parameters
edThe edge descriptor of the edge being added.
epThe property of the edge being added.
pThe promise object used to return the edge descriptor.
siblingUsed to indicate if the edge is the second sibling in an undirected edge-pair.

◆ insert_edge_promise()

template<typename Container >
template<typename Comp >
void stapl::graph_distribution_static< Container >::insert_edge_promise ( edge_descriptor const &  ed,
edge_property const &  ep,
Comp const &  comp,
promise< edge_descriptor >  p,
bool  sister = false 
)
protected

used by insert_edge method to populate a promise so that the edge descriptor may be returned for the synchronous method.

Parameters
edThe edge descriptor of the edge being added.
epThe property of the edge being added.
compPassed internal to std::lower_bound to find the spot to insert the new edge.
pThe promise object used to return the edge descriptor.
siblingUsed to indicate if the edge is the second sibling in an undirected edge-pair.

◆ delete_edge()

template<typename Container >
void stapl::graph_distribution_static< Container >::delete_edge ( edge_descriptor const &  ed)

◆ clear()

template<typename Container >
void stapl::graph_distribution_static< Container >::clear ( void  )

Note
This method assumes being called in SPMD (by all locations).

◆ clear_edges()

template<typename Container >
void stapl::graph_distribution_static< Container >::clear_edges ( void  )

Note
This method assumes being called in SPMD (by all locations).

◆ num_local_edges()

template<typename Container >
size_t stapl::graph_distribution_static< Container >::num_local_edges ( void  ) const

◆ num_local_self_edges()

template<typename Container >
size_t stapl::graph_distribution_static< Container >::num_local_self_edges ( void  ) const

Returns the number of local self edges in the base container.

Returns
size_t total number of self edges for all local vertices.

◆ num_edges()

template<typename Container >
size_t stapl::graph_distribution_static< Container >::num_edges ( void  ) const

Returns the number of edges in the specified STAPL sequential graph.

Parameters
gA STAPL sequential graph.

◆ num_self_edges()

template<typename Container >
size_t stapl::graph_distribution_static< Container >::num_self_edges ( void  ) const

Returns the total number of self edges in the pGraph.

Returns
size_t total number of self edges for all local vertices.

◆ num_edges_collective()

template<typename Container >
size_t stapl::graph_distribution_static< Container >::num_edges_collective ( void  ) const

◆ num_self_edges_collective()

template<typename Container >
size_t stapl::graph_distribution_static< Container >::num_self_edges_collective ( void  ) const

Returns the number of self edges in the pGraph.

Warning
This method is a blocking, collective version of num_self_edges. Use when calling num_self_edges from all locations, which is faster than calling num_self_edges() above.
Returns
size_t number of self edges in the pGraph.

◆ aggregate_vp_apply_async() [1/2]

template<typename Container >
template<typename FCont >
void stapl::graph_distribution_static< Container >::aggregate_vp_apply_async ( FCont const &  fcont)

Applies functors to respective vertex-properties on this location. All elements must be local. For internal use by Aggregators.

Parameters
fContainer of functors to be applied. Each element of f should provide a target() method that returns the descriptor of the target vertex. Each element of f is given the property of its corresponding vertex.

◆ aggregate_vp_apply_async() [2/2]

template<typename Container >
template<typename FCont >
void stapl::graph_distribution_static< Container >::aggregate_vp_apply_async ( size_t  loc,
FCont const &  fcont 
)

◆ aggregate_async() [1/2]

template<typename Container >
template<typename Cont , typename F >
void stapl::graph_distribution_static< Container >::aggregate_async ( Cont const &  cont,
F const &  f 
)

Applies a functor on this location. All elements must be local. For internal use by Aggregators.

Parameters
vContainer of elements to be passed-in to f.
fFunctor to be applied to each element of v on the desired location. f is passed an element of v as well as a pointer to the pGraph.

◆ aggregate_async() [2/2]

template<typename Container >
template<typename Cont , typename F >
void stapl::graph_distribution_static< Container >::aggregate_async ( size_t  loc,
Cont const &  cont,
F const &  f 
)

◆ vp_apply_async()

template<typename Container >
template<typename F >
void stapl::graph_distribution_static< Container >::vp_apply_async ( vertex_descriptor const &  gid,
F const &  f 
)

◆ vp_apply() [1/2]

template<typename Container >
template<typename F >
F::result_type stapl::graph_distribution_static< Container >::vp_apply ( gid_type const &  gid,
F const &  f 
)

◆ vp_apply() [2/2]

template<typename Container >
template<typename F >
F::result_type stapl::graph_distribution_static< Container >::vp_apply ( gid_type const &  gid,
F const &  f 
) const

◆ ep_apply_async()

template<typename Container >
template<typename Functor >
void stapl::graph_distribution_static< Container >::ep_apply_async ( edge_descriptor const &  ed,
Functor const &  f 
)

◆ ep_apply()

template<typename Container >
template<typename Functor >
Functor::result_type stapl::graph_distribution_static< Container >::ep_apply ( edge_descriptor const &  ed,
Functor const &  f 
)

◆ ep_apply_promise()

template<typename Container >
template<typename Functor >
void stapl::graph_distribution_static< Container >::ep_apply_promise ( edge_descriptor const &  ed,
Functor const &  f,
promise< typename Functor::result_type >  p 
)

Applies a function to the specified edge and populates a promise with the result. Used by ep_apply.

Parameters
edDescriptor of the edge.
fFunctor to be applied to the target edge's property.
Returns
p Promise storing the result of applying f to the edge's property.

◆ ep_find_apply()

template<typename Container >
template<typename Functor >
bool stapl::graph_distribution_static< Container >::ep_find_apply ( edge_descriptor const &  ed,
Functor const &  f 
)

Applies a functor f on the property of the specified edge, if it exists.

Parameters
edThe descriptor of the edge on which the functor will be applied.
fThe functor to be applied.
Returns
True if the edge exists, False otherwise.

◆ ep_find_apply_promise()

template<typename Container >
template<typename Functor >
void stapl::graph_distribution_static< Container >::ep_find_apply_promise ( edge_descriptor const &  ed,
Functor const &  f,
promise< bool >  p 
)

Applies the given functor on the property of the specified edge, if it exists. Populates a promise variable with true if the edge was found, or false otherwise.

Parameters
edDescriptor of the edge.
fFunctor to be applied to the target edge's property.
Returns
p Promise storing the result of applying f to the edge's property.

◆ make_iterator() [1/3]

template<typename Container >
iterator stapl::graph_distribution_static< Container >::make_iterator ( gid_type const &  gid)

◆ make_iterator() [2/3]

template<typename Container >
const_iterator stapl::graph_distribution_static< Container >::make_iterator ( gid_type const &  gid) const

◆ make_iterator() [3/3]

template<typename Container >
iterator stapl::graph_distribution_static< Container >::make_iterator ( domain_type const &  domain,
gid_type const &  gid 
)

Creates an iterator to the specified gid, which is restricted to the provided domain.

Parameters
domainThe domain to which the iterator will be restricted.
gidThe gid of the vertex to which the iterator will point.
Returns
The iterator pointing to the specified gid, restricted to the given domain.

◆ make_reference() [1/2]

template<typename Container >
reference stapl::graph_distribution_static< Container >::make_reference ( index_type const &  gid)

◆ make_reference() [2/2]

template<typename Container >
const_reference stapl::graph_distribution_static< Container >::make_reference ( index_type const &  gid) const

◆ metadata()

template<typename Container >
local_return_type stapl::graph_distribution_static< Container >::metadata ( void  )

Returns the metadata information for the base-containers on this location.

See also
metadata_entry.

◆ has_edge()

future<bool> stapl::detail::graph_distribution_base< Container, graph_distribution_static< Container > >::has_edge ( vertex_descriptor const &  source,
vertex_descriptor const &  target 
)
inherited

Determines whether there exists an edge between two vertices.

Returns
A future representing the answer to this query

◆ aggregate_apply_async() [1/2]

void stapl::detail::graph_distribution_base< Container, graph_distribution_static< Container > >::aggregate_apply_async ( Cont &&  cont,
F &&  f 
)
inherited

Applies a functor on this location.

All elements must be local. For internal use by Aggregators.

Parameters
vContainer of elements to be passed-in to f.
fFunctor to be applied to each element of v on the desired location. f is passed an element of v.

◆ aggregate_apply_async() [2/2]

void stapl::detail::graph_distribution_base< Container, graph_distribution_static< Container > >::aggregate_apply_async ( size_t  loc,
Cont const &  cont,
F const &  f 
)
inherited

◆ guarded_aggregate_apply_async()

void stapl::detail::graph_distribution_base< Container, graph_distribution_static< Container > >::guarded_aggregate_apply_async ( size_t  loc,
Cont const &  cont,
F const &  f 
)
inherited

◆ guarded_apply_set()

void stapl::detail::graph_distribution_base< Container, graph_distribution_static< Container > >::guarded_apply_set ( vertex_descriptor const &  gid,
F &&  f 
)
inherited

Apply a functor to the element at a given GID in a non-concurrent manner. That is, if the graph is already in an apply_set, then this apply_set will be deferred until the one in progress has ended.

Parameters
gidThe GID of the vertex
fThe functor to apply

◆ guarded_unordered_apply()

void stapl::detail::graph_distribution_base< Container, graph_distribution_static< Container > >::guarded_unordered_apply ( vertex_descriptor const &  gid,
F &&  f 
)
inherited

Apply a functor to the element at a given GID in a non-concurrent manner. That is, if the graph is already in an unordered_apply, then this unordered_apply will be deferred until the one in progress has ended.

Parameters
gidThe GID of the vertex
fThe functor to apply

◆ is_local()

bool stapl::distribution< Container, detail::nat1 , detail::nat2 , detail::nat3 , detail::nat4 >::is_local ( Indices const &...  i) const
inherited

Returns if the element with the specified gid is stored on this location.

Parameters
icomponents of a gid if it is multidimensional, otherwise i is the gid.

◆ defer_metadata_at()

void stapl::distribution< Container, detail::nat1 , detail::nat2 , detail::nat3 , detail::nat4 >::defer_metadata_at ( gid_type const &  gid,
promise< dom_info_type p 
)
inherited

Returns the metadata associated with the given gid by setting the value of the promise.

Parameters
gidId of the element of interest
pPromise that will return the locality information to the location that invoked the method.

◆ metadata_of()

dom_info_type stapl::distribution< Container, detail::nat1 , detail::nat2 , detail::nat3 , detail::nat4 >::metadata_of ( cid_type const &  cid)
inherited

Return the metadata associated with the specified component.

Parameters
cidid of the base container for which metadata is requested.
Returns
Metadata of the base container if it is stored on this location.

◆ redistribute()

void stapl::distribution< Container, detail::nat1 , detail::nat2 , detail::nat3 , detail::nat4 >::redistribute ( std::shared_ptr< DistSpecView >  dist_view,
typename std::enable_if< is_distribution_view< DistSpecView >::value >::type *  = 0 
)
inherited

Redistribute data to match the distribution specification provided.

Parameters
dist_viewView-based specification of the distribution that the container elements will match after method completion.

◆ update()

void stapl::distribution< Container, detail::nat1 , detail::nat2 , detail::nat3 , detail::nat4 >::update ( std::vector< std::tuple< std::pair< gid_type, gid_type >, cid_type, location_type >> const &  updates)
inherited

Add information on the distribution of elements not yet in the container. Use in dynamic containers with view-based distributions to allow element distribution to be based on computation.

Parameters
updatesExplicit mapping information of sets of contiguous GIDs to partition ids and location ids.

◆ set_element()

void stapl::operations::settable< graph_distribution_static< Container > >::set_element ( gid_type const &  gid,
value_type const &  val 
)
inherited

Update the element at a GID by replacing it with a given value.

Parameters
gidGID of the element to replace
valThe new value for the element

◆ set_elements()

void stapl::operations::settable< graph_distribution_static< Container > >::set_elements ( gid_type  gid,
SourceView &&  source_view 
)
inherited

Update a range of contiguous elements in the container, starting at gid. A total of view.size() elements will be updated with the values in view.

Note
Implementation assumes partition::try_get_domain will not fail if partition::contained_in succeeds.

◆ get_element()

value_type stapl::operations::gettable< graph_distribution_static< Container > >::get_element ( gid_type const &  gid) const
inherited

Return a copy of the element at a specific GID. Note that this is a blocking operation.

Parameters
gidGID of the element to retrieve
Returns
Copy of the element at gid

◆ get_element_split()

future<value_type> stapl::operations::gettable< graph_distribution_static< Container > >::get_element_split ( gid_type const &  gid)
inherited

Return a future of the element at a specific GID. This is a non-blocking operation.

Parameters
gidGID of the element to retrieve
Returns
Future of the element at gid

◆ apply_set()

void stapl::operations::applyable< graph_distribution_static< Container > >::apply_set ( gid_type const &  gid,
Functor const &  f 
)
inherited

Apply a function object to the element with the given GID.

Parameters
gidGID of the element for which we want to apply the function object.
fFunction object to apply to the element.
Warning
The function operator of f has to be const qualified.

◆ unordered_apply_set()

void stapl::operations::applyable< graph_distribution_static< Container > >::unordered_apply_set ( gid_type const &  gid,
Functor &&  f 
)
inherited

Apply a function object to the element with the given GID, disregarding RMI causal ordering.

Parameters
gidGID of the element for which we want to apply the function object.
fFunction object to apply to the element.
Warning
The function operator of f has to be const qualified.

◆ unordered_apply()

void stapl::operations::applyable< graph_distribution_static< Container > >::unordered_apply ( gid_type const &  gid,
Functor &&  f 
)
inherited

Apply a function object to the element with the given GID, passing along the distribution pointer and disregarding RMI causal ordering.

Parameters
gidGID of the element for which we want to apply the function object.
fFunction object to apply to the element.
Warning
The function operator of f has to be const qualified.

◆ apply_get() [1/2]

boost::result_of<Functor(value_type&)>::type stapl::operations::applyable< graph_distribution_static< Container > >::apply_get ( gid_type const &  gid,
Functor const &  f 
)
inherited

Apply a function object to the element with the given GID and return the result.

Parameters
gidGID of the element for which we want to apply the function object and return the result.
fFunction object to apply to the element.
Returns
The result of applying f to the element.
Warning
This function assumes that the Functor reflects a public type result_type and that the invocation of its function operator returns a value that is convertible to result_type. The function operator of f has to be const qualified.

◆ apply_get() [2/2]

boost::result_of<Functor(value_type&)>::type stapl::operations::applyable< graph_distribution_static< Container > >::apply_get ( gid_type const &  gid,
Functor const &  f 
) const
inherited

Apply a function object to the element with the given GID and return the result.

Parameters
gidGID of the element for which we want to apply the function object and return the result.
fFunction object to apply to the element.
Returns
The result of applying f to the element.
Warning
This function assumes that the Functor reflects a public type result_type and that the invocation of its function operator returns a value that is convertible to result_type. The function operator of f has to be const qualified.

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