STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Attributes
stapl::kla_detail::vertex_operator_apply< ReinvokeBehavior, Graph, VertexOp, Frontier, Predicate > Class Template Reference

Work function to wrap the user provided vertex-operator. More...

Public Member Functions

template<typename... Args>
 vertex_operator_apply (Args &&... args)
 
result_type operator() (Vertex &&v) const
 Function operator that invokes the vertex operator. More...
 
void increment_level ()
 
size_t const & level () const
 
size_t const & max_level () const
 
void increment_iteration (size_t k)
 
graph_type *const graph () const
 

Public Types

using graph_type = Graph
 
using derived_type = vertex_operator_apply< ReinvokeBehavior, Graph, VertexOp, Frontier, Predicate >
 
using vertex_operator_type = VertexOp
 
using frontier_type = Frontier
 
using result_type = std::pair< bool, bool >
 

Protected Attributes

Graph * m_graph
 
VertexOp m_wf
 
size_t m_curr_level
 
size_t m_max_level
 
Predicate m_pred
 

Detailed Description

template<reinvoke_behavior ReinvokeBehavior, class Graph, class VertexOp, class Frontier, class Predicate = kla_detail::false_predicate>
class stapl::kla_detail::vertex_operator_apply< ReinvokeBehavior, Graph, VertexOp, Frontier, Predicate >

Work function to wrap the user provided vertex-operator.

The work function is applied on a vertex if the vertex is active. Active vertices may perform some computation and update their values, and may visit their neighboring vertices with the user provided neighbor-operator. Returns true if vertex was active (i.e. the user's work function returned true), false otherwise.

This is a facade for

See also
vertex_operator_apply_base that does not provide the hub avoidance optimization.
Template Parameters
ReinvokeBehaviorFlag used to determine under which conditions a vertex operator would be reinvoked from the neighbor operator
GraphType of the input graph view.
VertexOpType of the user provided work function.
FrontierThe type of the frontier
PredicatePredicate function which recieves a vertex and is used to check whether to terminate.

Member Function Documentation

◆ operator()()

result_type stapl::kla_detail::vertex_operator_apply_base< ReinvokeBehavior, Graph, VertexOp, Frontier, vertex_operator_apply< ReinvokeBehavior, Graph, VertexOp, Frontier, Predicate > , Predicate >::operator() ( Vertex &&  v) const
inherited

Function operator that invokes the vertex operator.

Returns
A pair of bools, the first representing this vertex's vote to continue and the second representing this vertex's vote to halt.

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