Turi Create
4.0
|
#include <core/storage/sgraph_data/sgraph_synchronize_interface.hpp>
Public Member Functions | |
virtual void | load_vertex_partition (size_t partition_id, std::vector< sgraph_vertex_data > &all_vertices)=0 |
Given a vector of all vertices of partition, initialize the local vertex storage. | |
virtual void | update_vertex_partition (vertex_partition_exchange &vpartition_exchange)=0 |
Given a vertex exchange object, update the local vertex storage. | |
virtual vertex_partition_exchange | get_vertex_partition_exchange (size_t partition_id, const std::unordered_set< size_t > &vertex_ids, const std::vector< size_t > &field_ids)=0 |
Obtain a vertex exchange object containing a subset of vertices and fields. | |
Defines the interface for serializing vertex data and edge data of an sgraph.
The main application of this is for communication of graph information.
vertex_partition_exchange is the struct that can hold a subset data of a subset of vertices from a sgraph partition.
The choice for sparse vertices packing is motivated by the "triple_apply" computation pattern: as we process each edge partition, the associated vertex partition are sparsely visited and updated.
sgraph_synchronize_interface is used for both ends of the communication to deal with initialization, sending and receiving the vertex and edge exchange data.
Example:
Definition at line 114 of file sgraph_synchronize_interface.hpp.