OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > Class Template Reference

Structure that store a graph in CSR format or basically in compressed adjacency matrix format. More...

Detailed Description

template<typename V, typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
class DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >

Structure that store a graph in CSR format or basically in compressed adjacency matrix format.

Parameters
Veach vertex will encapsulate have this type
Eeach edge will encapsulate this type
deviceType of device / basicaly it select the layout for device_cpu is (x_1, p1_1, p2_1, p3_1 ....), ... ( x_n, p1_1, p2_1, p3_1, ...) for device_gpu is (x_1, ... , x_n) ... (p1_n, ... pn_n) where x_1 is the index where it end the list of the neighborhood list and pj_k is the property j for the vertex j. Basically in the first case one array will store index and property of each vertex, in the second case several array will store index and property
VertexListstructure that store the list of Vertex
EdgeListstructure that store the list of edge
Warning
This graph is suitable only when we know the graph structure and we build the graph adding vertexes and edges, removing vertex and edge is EXTREMLY expensive

Example on creating graph, moving vertices and redistribution

Definition at line 209 of file dist_map_graph.hpp.

#include <dist_map_graph.hpp>

Data Structures

struct  EdgeReq
 Structure to store a add request of an edge. More...
 
struct  GlobalVInfo
 Structure needed to get vertex position by global id. More...
 
struct  SendGraphPack
 Struct containing the (sub)graph to send. More...
 

Public Types

typedef V V_type
 Vertex typedef.
 
typedef E E_type
 Edge typedef.
 
typedef openfpm::vector< V, Memory, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::container V_container
 Object container for the vertex, for example can be encap<...> (map_grid or openfpm::vector)
 
typedef openfpm::vector< E, Memory, layout_e_base, grow_p, openfpm::vect_isel< E >::value >::container E_container
 Object container for the edge, for example can be encap<...> (map_grid or openfpm::vector)
 

Public Member Functions

DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > duplicate () const
 It duplicate the graph.
 
 DistGraph_CSR (const DistGraph_CSR &dg)
 Constructor.
 
 DistGraph_CSR (DistGraph_CSR &&dg)
 Constructor.
 
 DistGraph_CSR ()
 Constructor.
 
 DistGraph_CSR (size_t n_vertex)
 Constructor.
 
 DistGraph_CSR (size_t n_vertex, size_t n_slot)
 Constructor.
 
void getDecompositionVector (openfpm::vector< idx_t > &v)
 Operator to access the decomposition vector.
 
openfpm::vector< idx_t > * getVtxdist ()
 Operator to access the decomposition vector.
 
void initDistributionVector (openfpm::vector< idx_t > &v)
 Operator to access the decomposition vector.
 
void initDistributionVector ()
 Initialize the vtxdist and the fvtxdist.
 
 DistGraph_CSR (Vcluster<> &vcl, DistGraph_CSR< V, E, Memory > &&g)
 Copy constructor.
 
DistGraph_CSR< V, E, Memory > & operator= (DistGraph_CSR< V, E, Memory > &&g)
 Copy the graph.
 
DistGraph_CSR< V, E, Memory > & operator= (const DistGraph_CSR< V, E, Memory > &g)
 Copy the graph.
 
template<unsigned int i>
auto vertex_p (size_t id) -> decltype(v.template get< i >(id))
 operator to access the vertex
 
template<unsigned int i>
auto vertex_p (grid_key_dx< 1 > id) -> decltype(v.template get< i >(id))
 Access the vertex.
 
auto vertex (size_t id) -> decltype(v.get(id))
 Function to access the vertexes.
 
auto vertex (grid_key_dx< 1 > id) -> decltype(v.get(id.get(0)))
 operator to access the vertex
 
auto vertex (openfpm::vector_key_iterator id) -> decltype(v.get(0))
 operator to access the vertex
 
auto vertex (size_t id) const -> const decltype(v.get(id))
 Function to access the vertexes.
 
auto vertex (grid_key_dx< 1 > id) const -> const decltype(v.get(id.get(0)))
 operator to access the vertex
 
auto vertex (openfpm::vector_key_iterator id) const -> const decltype(v.get(0))
 operator to access the vertex
 
auto vertex_info (openfpm::vector_key_iterator id) const -> const decltype(v_m.get(0))
 operator to access the vertex info
 
auto getVertex (size_t id) -> decltype(v.get(id))
 Function to access the vertexes.
 
auto getVertex (size_t id) const -> const decltype(v.get(0))
 Function to access the vertexes.
 
size_t nodeById (size_t id) const
 operator to access the vertex position index by id property
 
size_t firstId () const
 
size_t lastId () const
 
size_t getVertexId (size_t i) const
 Get the id of a vertex given its index position.
 
size_t getVertexGlobalId (size_t i) const
 Get the id of a vertex given its index position.
 
bool vertexIsInThisGraph (size_t id)
 Check if the vertex with GLOBAL id is in this graph.
 
void map_v (size_t n, size_t g, size_t l)
 operator to update all the hashmap
 
void clear ()
 operator to clear the whole graph
 
template<unsigned int i>
auto edge_p (grid_key_dx< 1 > id) -> decltype(e.template get< i >(id))
 Access the edge.
 
template<unsigned int i>
auto edge_p (size_t id) -> decltype(e.template get< i >(id))
 Access the edge.
 
auto edge (grid_key_dx< 1 > id) const -> const decltype(e.get(id.get(0)))
 Access the edge.
 
auto edge (edge_key ek) const -> const decltype(e.get(0))
 operator to access the edge
 
auto getEdge (edge_key ek) const -> const decltype(e.get(0))
 operator to access the edge
 
auto edge (size_t id) const -> const decltype(e.get(id))
 operator to access the edge
 
size_t getNChilds (size_t c) const
 Return the number of children of a vertex.
 
size_t getNChilds (typename openfpm::vector< V, Memory, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::iterator_key &c)
 Return the number of childs of a vertex.
 
size_t getNEdge (size_t v) const
 Return the number of children of a vertex given its global id.
 
auto getChildEdge (size_t v, size_t v_e) -> decltype(e.get(0))
 Get the vertex edge.
 
auto getChildInfo (size_t v, size_t v_e) -> decltype(e_m.get(0))
 Get the vertex edge info.
 
auto getEdge (size_t v, size_t v_e) -> decltype(e.get(0))
 Get the vertex edge given the vertex global id as source.
 
size_t getChild (size_t v, size_t i) const
 Get the child edge.
 
size_t getChild (size_t i) const
 Get the child edge.
 
size_t getChild (typename openfpm::vector< V, Memory, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::iterator_key &v, size_t i)
 Get the child edge.
 
void add_vertex (const V &vrt, size_t id, size_t gid)
 Add vertex vrt with global id and id properties.
 
template<unsigned int dim, typename Mem >
void add_vertex (const encapc< dim, V, Mem > &vrt, size_t id, size_t gid)
 Add vertex vrt with global id and id properties.
 
void add_vertex (const V &vrt, size_t gid)
 Add vertex vrt with global id and id properties.
 
void setGlobalMap (size_t g, size_t l, size_t i)
 map global id to local id
 
auto addEdge (size_t v1, size_t v2, size_t srcgid, size_t dstgid) -> decltype(e.get(0))
 
auto addEdge (size_t v1, size_t v2, size_t srcgid, size_t dstgid, const E &ed) -> decltype(e.get(0))
 
template<unsigned int dim, typename Mem , typename Mem1 >
auto addEdge (size_t v1, size_t v2, const encapc< dim, E, Mem > &ed, const encapc< dim, e_info, Mem1 > &ei) -> decltype(e.get(0))
 
auto addEdge (size_t v1, size_t v2, const E &ed, const e_info &ei) -> decltype(e.get(0))
 
size_t getChildSrcGid (size_t v1, size_t s)
 Get the global id of edge's source vertex.
 
size_t getChildDstGid (size_t v1, size_t s)
 Get the global id of edge's destination vertex.
 
template<typename CheckPolicy = NoCheck>
void add_edge (size_t v1, size_t v2)
 Add an edge between vertices v1 end v2, needs syncEdge() to complete the action.
 
void syncEdge ()
 Execute a synchronization through processor to finalize the add of the edges requested in the e_queue.
 
void swap (DistGraph_CSR< V, E > &g)
 Swap the memory of g with this graph.
 
void swap (DistGraph_CSR< V, E > &&g)
 Swap the memory of g with this graph.
 
auto getVertexIterator () const -> decltype(v.getIterator())
 Get the vertex iterator.
 
edge_iterator< DistGraph_CSR< V, E, Memory > > getEdgeIterator () const
 Get the vertex iterator.
 
size_t getNVertex () const
 Return the number of the vertices in this subgraph.
 
size_t getTotNVertex () const
 Return the total number of the vertices.
 
size_t getNEdge () const
 Return the number of edges.
 
void init ()
 Once added all the vertices this function must be called to initialize all the properties, useless if a graph factory is used.
 
bool isGhost (size_t id)
 Check if a vertex is a ghost vertex (not belonging to this processor)
 
void deleteGhosts ()
 Remove all the ghosts from this graph.
 
template<bool toRemove = true>
void q_move (size_t i, size_t t)
 Prepare to send vertex i from the local processor to the target processor.
 
bool moveQueueIsEmpty ()
 Check if the move queue is empty.
 
void redistribute ()
 Redistribute function that wraps different stages of the redistribution.
 
void reqVertex (size_t gid)
 Put a vertex request in queue.
 
void sync ()
 Execute all vertex requests and add them as ghosts inside this graph, they will be available until a redistribution is executed.
 

Private Member Functions

template<typename CheckPolicy = NoCheck>
size_t addEdge_ (size_t v1, size_t v2)
 add edge on the graph
 
void resetExchange ()
 Init communication structures.
 
void deleteMovedVertices ()
 Remove from this graph the vertices that have been sent.
 
bool isToDelete (size_t i)
 Check it the vertex i must be deleted or not.
 
size_t getVProcessor (size_t v)
 Get the processor of the the given vertex id, CAN be used BEFORE re-mapping starts.
 
template<bool addAsGhosts>
void exchangeVertices ()
 Send and receive vertices and update current graph.
 
void updateVtxdist ()
 Update the distribution vector vtxdist.
 
void remap ()
 Re-map received vertices in order to have ordered vertex ids.
 
void initGlbimap ()
 Initialize the fixed structure for global mapping. See glbiv for details.
 
size_t getInfoProc (size_t vid)
 Get the processor id of the processor containing the vertex with global id vid.
 
template<typename T >
void fillSendRecvStructs (openfpm::vector< openfpm::vector< T > > &vec, openfpm::vector< size_t > &prc, openfpm::vector< size_t > &size, openfpm::vector< void * > &ptr)
 Fill the prc, size and ptr structures with the data of vec.
 

Static Private Member Functions

static void * gr_receive (size_t msg_i, size_t total_msg, size_t total_p, size_t i, size_t ri, size_t tag, void *ptr)
 Callback to set the size of the receiving vector.
 
static void * on_receive (size_t msg_i, size_t total_msg, size_t total_p, size_t i, size_t ri, size_t tag, void *ptr)
 Callback of the sendrecv to set the size of the array received.
 

Private Attributes

Vclustervcl
 Vcluster communication object.
 
openfpm::vector< idx_t > vtxdist
 Distribution vector.
 
openfpm::vector< idx_t > fvtxdist
 Fixed distribution vector, it never changes, it maintains always the first decomposition and topology.
 
size_t v_slot
 number of slot per vertex
 
openfpm::vector< V, Memory, layout_v_base, grow_p, openfpm::vect_isel< V >::value > v
 Structure that store the vertex properties.
 
openfpm::vector< v_info, Memory, memory_traits_lin, grow_p, openfpm::vect_isel< v_info >::value > v_m
 Structure that store the vertex id and global id.
 
openfpm::vector< size_t, Memory, layout_v_base, grow_p, openfpm::vect_isel< size_t >::value > v_l
 Structure that store the number of adjacent vertex in e_l for each vertex.
 
openfpm::vector< E, Memory, layout_e_base, grow_p, openfpm::vect_isel< E >::value > e
 Structure that store the edge properties.
 
openfpm::vector< e_info, Memory, layout_e_base, grow_p, openfpm::vect_isel< e_info >::value > e_m
 Structure that store the edge properties.
 
openfpm::vector< e_map, Memory, layout_e_base, grow_p, openfpm::vect_isel< e_map >::value > e_l
 Structure that store for each vertex the adjacent the vertex id and edge id (for property into e)
 
openfpm::vector< E, Memory, layout_e_base, grow_p, openfpm::vect_isel< E >::value > e_invalid
 invalid edge element, when a function try to create an in valid edge this object is returned
 
std::unordered_map< size_t, size_t > id2glb
 Map to access to the global vertex id given the vertex id.
 
std::unordered_map< size_t, size_t > glb2id
 Map to access the vertex id given the global vertex id.
 
std::unordered_map< size_t, size_t > glb2loc
 Map to access the local vertex id given the global one.
 
openfpm::vector< SendGraphPacksgp
 Pack storing that data to send to other processors.
 
openfpm::vector< size_t > v_td
 Array containing the sent vertices and that will be deleted from the graph.
 
std::unordered_map< size_t, GlobalVInfoglbi_map
 TODO update description from pdf.
 
openfpm::vector< openfpm::vector< size_t > > vr_queue
 Queue of vertex requests.
 
std::unordered_map< size_t, bool > ghs_map
 Map containing the ghost vertices of this graph, if bool is false the ghost will be deleted in the next vertices exchange.
 
openfpm::vector< EdgeReqe_queue
 Queue of requests to add edges.
 

Member Typedef Documentation

◆ E_container

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
typedef openfpm::vector<E,Memory,layout_e_base,grow_p,openfpm::vect_isel<E>::value>::container DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::E_container

Object container for the edge, for example can be encap<...> (map_grid or openfpm::vector)

Definition at line 1007 of file dist_map_graph.hpp.

◆ E_type

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
typedef E DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::E_type

Edge typedef.

Definition at line 1001 of file dist_map_graph.hpp.

◆ V_container

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
typedef openfpm::vector<V,Memory,layout_v_base,grow_p,openfpm::vect_isel<V>::value>::container DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::V_container

Object container for the vertex, for example can be encap<...> (map_grid or openfpm::vector)

Definition at line 1004 of file dist_map_graph.hpp.

◆ V_type

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
typedef V DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::V_type

Vertex typedef.

Definition at line 998 of file dist_map_graph.hpp.

Constructor & Destructor Documentation

◆ DistGraph_CSR() [1/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::DistGraph_CSR ( const DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > &  dg)
inline

Constructor.

Constructor

Definition at line 1043 of file dist_map_graph.hpp.

◆ DistGraph_CSR() [2/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::DistGraph_CSR ( DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > &&  dg)
inline

Constructor.

Constructor

Definition at line 1054 of file dist_map_graph.hpp.

◆ DistGraph_CSR() [3/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::DistGraph_CSR ( )
inline

Constructor.

Constructor

Definition at line 1065 of file dist_map_graph.hpp.

◆ DistGraph_CSR() [4/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::DistGraph_CSR ( size_t  n_vertex)
inline

Constructor.

Constructor

Definition at line 1075 of file dist_map_graph.hpp.

◆ DistGraph_CSR() [5/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::DistGraph_CSR ( size_t  n_vertex,
size_t  n_slot 
)
inline

Constructor.

Constructor

Definition at line 1085 of file dist_map_graph.hpp.

◆ DistGraph_CSR() [6/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::DistGraph_CSR ( Vcluster<> &  vcl,
DistGraph_CSR< V, E, Memory > &&  g 
)
inline

Copy constructor.

Parameters
v_clvcluster
ggdistributed graph to copy

Definition at line 1162 of file dist_map_graph.hpp.

Member Function Documentation

◆ add_edge()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<typename CheckPolicy = NoCheck>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::add_edge ( size_t  v1,
size_t  v2 
)
inline

Add an edge between vertices v1 end v2, needs syncEdge() to complete the action.

Parameters
v1source vertex of the edge
v2destination vertex of the edge

Definition at line 1914 of file dist_map_graph.hpp.

◆ add_vertex() [1/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<unsigned int dim, typename Mem >
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::add_vertex ( const encapc< dim, V, Mem > &  vrt,
size_t  id,
size_t  gid 
)
inline

Add vertex vrt with global id and id properties.

Parameters
vrtvertex object to add
idof the vertex
gidglobal id, unique in global graph

Definition at line 1757 of file dist_map_graph.hpp.

◆ add_vertex() [2/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::add_vertex ( const V &  vrt,
size_t  gid 
)
inline

Add vertex vrt with global id and id properties.

Parameters
vrtvertex object to add
gidglobal id, unique in global graph

Definition at line 1791 of file dist_map_graph.hpp.

◆ add_vertex() [3/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::add_vertex ( const V &  vrt,
size_t  id,
size_t  gid 
)
inline

Add vertex vrt with global id and id properties.

Parameters
vrtvertex object to add
gidglobal id, unique in global graph
idid, unique n global graph

Definition at line 1722 of file dist_map_graph.hpp.

◆ addEdge() [1/4]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2,
const E &  ed,
const e_info ei 
) -> decltype(e.get(0))
inline

Definition at line 1869 of file dist_map_graph.hpp.

◆ addEdge() [2/4]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<unsigned int dim, typename Mem , typename Mem1 >
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2,
const encapc< dim, E, Mem > &  ed,
const encapc< dim, e_info, Mem1 > &  ei 
) -> decltype(e.get(0))
inline

Definition at line 1853 of file dist_map_graph.hpp.

◆ addEdge() [3/4]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2,
size_t  srcgid,
size_t  dstgid 
) -> decltype(e.get(0))
inline

Definition at line 1818 of file dist_map_graph.hpp.

◆ addEdge() [4/4]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2,
size_t  srcgid,
size_t  dstgid,
const E &  ed 
) -> decltype(e.get(0))
inline

Definition at line 1834 of file dist_map_graph.hpp.

◆ addEdge_()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<typename CheckPolicy = NoCheck>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge_ ( size_t  v1,
size_t  v2 
)
inlineprivate

add edge on the graph

add edge on the graph

Parameters
v1start vertex
v2end vertex
Returns
the index of the edge created

Definition at line 325 of file dist_map_graph.hpp.

◆ clear()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::clear ( )
inline

operator to clear the whole graph

operator to clear all

Definition at line 1462 of file dist_map_graph.hpp.

◆ deleteGhosts()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::deleteGhosts ( )
inline

Remove all the ghosts from this graph.

Definition at line 2123 of file dist_map_graph.hpp.

◆ deleteMovedVertices()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::deleteMovedVertices ( )
inlineprivate

Remove from this graph the vertices that have been sent.

Definition at line 477 of file dist_map_graph.hpp.

◆ duplicate()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::duplicate ( ) const
inline

It duplicate the graph.

Returns
a graph duplicate of the first

Definition at line 1015 of file dist_map_graph.hpp.

◆ edge() [1/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge ( edge_key  ek) const -> const decltype ( e.get(0) )
inline

operator to access the edge

Parameters
ekkey of the edge
Returns
a reference to the edge

Definition at line 1520 of file dist_map_graph.hpp.

◆ edge() [2/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge ( grid_key_dx< 1 >  id) const -> const decltype ( e.get(id.get(0)) )
inline

Access the edge.

Parameters
idof the edge to access
Returns
a reference to the edge

Definition at line 1508 of file dist_map_graph.hpp.

◆ edge() [3/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge ( size_t  id) const -> const decltype ( e.get(id) )
inline

operator to access the edge

operator to access the edge

Parameters
idof the edge to access
Returns
a reference to the edge

Definition at line 1556 of file dist_map_graph.hpp.

◆ edge_p() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<unsigned int i>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge_p ( grid_key_dx< 1 >  id) -> decltype ( e.template get<i>(id) )
inline

Access the edge.

Template Parameters
iproperty to access
Parameters
idof the edge to access
Returns
a reference to the edge property

Definition at line 1483 of file dist_map_graph.hpp.

◆ edge_p() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<unsigned int i>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge_p ( size_t  id) -> decltype ( e.template get<i>(id) )
inline

Access the edge.

Template Parameters
iproperty to access
Parameters
idof the edge to access
Returns
a reference to the edge property

Definition at line 1496 of file dist_map_graph.hpp.

◆ exchangeVertices()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<bool addAsGhosts>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::exchangeVertices ( )
inlineprivate

Send and receive vertices and update current graph.

Template Parameters
Removethe sent sub-graph

Definition at line 552 of file dist_map_graph.hpp.

◆ fillSendRecvStructs()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<typename T >
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::fillSendRecvStructs ( openfpm::vector< openfpm::vector< T > > &  vec,
openfpm::vector< size_t > &  prc,
openfpm::vector< size_t > &  size,
openfpm::vector< void * > &  ptr 
)
inlineprivate

Fill the prc, size and ptr structures with the data of vec.

Template Parameters
typeof the data inside vec
Parameters
vecvector of the data
prcprocessor array of sendrecv function
sizesize array of sendrecv function
ptrpointers array of sendrecv function

Definition at line 977 of file dist_map_graph.hpp.

◆ firstId()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::firstId ( ) const
inline

/brief Get the first id of the graph

Returns
the first id of the graph

Definition at line 1387 of file dist_map_graph.hpp.

◆ getChild() [1/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChild ( size_t  i) const
inline

Get the child edge.

Parameters
iid of the child
Returns
the edge id that connect v with the target at position i

Definition at line 1684 of file dist_map_graph.hpp.

◆ getChild() [2/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChild ( size_t  v,
size_t  i 
) const
inline

Get the child edge.

Parameters
vnode
ichild at position i
Returns
the edge id that connect v with the target at position i

Definition at line 1660 of file dist_map_graph.hpp.

◆ getChild() [3/3]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChild ( typename openfpm::vector< V, Memory, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::iterator_key &  v,
size_t  i 
)
inline

Get the child edge.

Parameters
vnode
ichild at position i
Returns
the target i connected by an edge node, for the node v

Definition at line 1698 of file dist_map_graph.hpp.

◆ getChildDstGid()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChildDstGid ( size_t  v1,
size_t  s 
)
inline

Get the global id of edge's destination vertex.

Parameters
v1source vertex of the edge
sn child of vertex v1
Returns
global id of the destination vertex

Definition at line 1903 of file dist_map_graph.hpp.

◆ getChildEdge()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChildEdge ( size_t  v,
size_t  v_e 
) -> decltype(e.get(0))
inline

Get the vertex edge.

Parameters
vvertex
v_eedge id
Returns
the edge

Definition at line 1613 of file dist_map_graph.hpp.

◆ getChildInfo()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChildInfo ( size_t  v,
size_t  v_e 
) -> decltype(e_m.get(0))
inline

Get the vertex edge info.

Parameters
vvertex
v_eedge id
Returns
the id of the edge

Definition at line 1626 of file dist_map_graph.hpp.

◆ getChildSrcGid()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChildSrcGid ( size_t  v1,
size_t  s 
)
inline

Get the global id of edge's source vertex.

Parameters
v1source vertex of the edge
sn child of vertex v1
Returns
global id of the source vertex

Definition at line 1891 of file dist_map_graph.hpp.

◆ getDecompositionVector()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getDecompositionVector ( openfpm::vector< idx_t > &  v)
inline

Operator to access the decomposition vector.

Parameters
vvector that will contain the decomposition

Definition at line 1106 of file dist_map_graph.hpp.

◆ getEdge() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getEdge ( edge_key  ek) const -> const decltype ( e.get(0) )
inline

operator to access the edge

Parameters
ekkey of the edge
returna reference to the edge

Definition at line 1532 of file dist_map_graph.hpp.

◆ getEdge() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getEdge ( size_t  v,
size_t  v_e 
) -> decltype(e.get(0))
inline

Get the vertex edge given the vertex global id as source.

Parameters
vvertex global id
v_eedge id
Returns
the edge

Definition at line 1639 of file dist_map_graph.hpp.

◆ getEdgeIterator()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
edge_iterator< DistGraph_CSR< V, E, Memory > > DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getEdgeIterator ( ) const
inline

Get the vertex iterator.

Get the vertex iterator

Returns
an iterator to iterate through all the edges

Definition at line 2054 of file dist_map_graph.hpp.

◆ getInfoProc()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getInfoProc ( size_t  vid)
inlineprivate

Get the processor id of the processor containing the vertex with global id vid.

Parameters
vidvertex to know info about
Returns
the processor id

Definition at line 955 of file dist_map_graph.hpp.

◆ getNChilds() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNChilds ( size_t  c) const
inline

Return the number of children of a vertex.

Parameters
cChild id
Returns
the number of children

Definition at line 1568 of file dist_map_graph.hpp.

◆ getNChilds() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNChilds ( typename openfpm::vector< V, Memory, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::iterator_key &  c)
inline

Return the number of childs of a vertex.

Parameters
cchild id
Returns
the number of childs

Definition at line 1580 of file dist_map_graph.hpp.

◆ getNEdge() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNEdge ( ) const
inline

Return the number of edges.

Returns
the number of edges

Definition at line 2084 of file dist_map_graph.hpp.

◆ getNEdge() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNEdge ( size_t  v) const
inline

Return the number of children of a vertex given its global id.

Parameters
vvertex global id
Returns
the number of children

Definition at line 1592 of file dist_map_graph.hpp.

◆ getNVertex()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNVertex ( ) const
inline

Return the number of the vertices in this subgraph.

Returns
the number of vertex

Definition at line 2064 of file dist_map_graph.hpp.

◆ getTotNVertex()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getTotNVertex ( ) const
inline

Return the total number of the vertices.

Returns
the number of vertex

Definition at line 2074 of file dist_map_graph.hpp.

◆ getVertex() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVertex ( size_t  id) -> decltype( v.get(id) )
inline

Function to access the vertexes.

Parameters
idGLOBAL id of the vertex to access
Returns
the vertex

Definition at line 1325 of file dist_map_graph.hpp.

◆ getVertex() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVertex ( size_t  id) const -> const decltype( v.get(0) )
inline

Function to access the vertexes.

Parameters
idGLOBAL id of the vertex to access
Returns
the vertex

Definition at line 1348 of file dist_map_graph.hpp.

◆ getVertexGlobalId()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVertexGlobalId ( size_t  i) const
inline

Get the id of a vertex given its index position.

Parameters
iposition of the vertex
Returns
the id of the vertex

Definition at line 1416 of file dist_map_graph.hpp.

◆ getVertexId()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVertexId ( size_t  i) const
inline

Get the id of a vertex given its index position.

Parameters
iposition of the vertex
Returns
the id of the vertex

Definition at line 1406 of file dist_map_graph.hpp.

◆ getVertexIterator()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVertexIterator ( ) const -> decltype(v.getIterator())
inline

Get the vertex iterator.

Get the vertex iterator

Returns
an iterator to iterate through all the vertex

Definition at line 2042 of file dist_map_graph.hpp.

◆ getVProcessor()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVProcessor ( size_t  v)
inlineprivate

Get the processor of the the given vertex id, CAN be used BEFORE re-mapping starts.

Parameters
vid of the vertex
Returns
process id

Definition at line 534 of file dist_map_graph.hpp.

◆ getVtxdist()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector< idx_t > * DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVtxdist ( )
inline

Operator to access the decomposition vector.

Returns
a pointer to the distribution vector

Definition at line 1120 of file dist_map_graph.hpp.

◆ gr_receive()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
static void * DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::gr_receive ( size_t  msg_i,
size_t  total_msg,
size_t  total_p,
size_t  i,
size_t  ri,
size_t  tag,
void *  ptr 
)
inlinestaticprivate

Callback to set the size of the receiving vector.

Parameters
msg_iIndex of the message
total_msgTotal number of messages
total_pTotal number of processors to communicate with
iProcessor id
riRequest id
ptrVoid pointer parameter for additional data to pass to the call-back

Definition at line 404 of file dist_map_graph.hpp.

◆ init()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::init ( )
inline

Once added all the vertices this function must be called to initialize all the properties, useless if a graph factory is used.

Definition at line 2092 of file dist_map_graph.hpp.

◆ initDistributionVector() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::initDistributionVector ( )
inline

Initialize the vtxdist and the fvtxdist.

Definition at line 1144 of file dist_map_graph.hpp.

◆ initDistributionVector() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::initDistributionVector ( openfpm::vector< idx_t > &  v)
inline

Operator to access the decomposition vector.

Parameters
vvector that contains the decomposition

Definition at line 1129 of file dist_map_graph.hpp.

◆ initGlbimap()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::initGlbimap ( )
inlineprivate

Initialize the fixed structure for global mapping. See glbiv for details.

Definition at line 937 of file dist_map_graph.hpp.

◆ isGhost()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
bool DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::isGhost ( size_t  id)
inline

Check if a vertex is a ghost vertex (not belonging to this processor)

Parameters
idid of the vertex to check
Returns
true if it is a ghost vertex

Definition at line 2106 of file dist_map_graph.hpp.

◆ isToDelete()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
bool DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::isToDelete ( size_t  i)
inlineprivate

Check it the vertex i must be deleted or not.

Parameters
ivertex
Returns
true if to delete, false otherwise

Definition at line 518 of file dist_map_graph.hpp.

◆ lastId()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::lastId ( ) const
inline

/brief Get the last id of the graph

Returns
the last id of the graph

Definition at line 1396 of file dist_map_graph.hpp.

◆ map_v()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::map_v ( size_t  n,
size_t  g,
size_t  l 
)
inline

operator to update all the hashmap

Parameters
nnew vertex id
gglobal vertex id
llocal vertex id
Template Parameters
iid of the property storing the id

Definition at line 1449 of file dist_map_graph.hpp.

◆ moveQueueIsEmpty()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
bool DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::moveQueueIsEmpty ( )
inline

Check if the move queue is empty.

Returns
true if the move queue is empty

Definition at line 2203 of file dist_map_graph.hpp.

◆ nodeById()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::nodeById ( size_t  id) const
inline

operator to access the vertex position index by id property

operator to access the vertex

Parameters
idid of the vertex to access
Returns
id of the vertex

Definition at line 1370 of file dist_map_graph.hpp.

◆ on_receive()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
static void * DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::on_receive ( size_t  msg_i,
size_t  total_msg,
size_t  total_p,
size_t  i,
size_t  ri,
size_t  tag,
void *  ptr 
)
inlinestaticprivate

Callback of the sendrecv to set the size of the array received.

Parameters
msg_iIndex of the message
total_msgTotal number of messages
total_pTotal number of processors to communicate with
iProcessor id
riRequest id
ptrVoid pointer parameter for additional data to pass to the call-back

Definition at line 423 of file dist_map_graph.hpp.

◆ operator=() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory > & DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::operator= ( const DistGraph_CSR< V, E, Memory > &  g)
inline

Copy the graph.

Parameters
ggraph to copy
Returns
itself

Definition at line 1189 of file dist_map_graph.hpp.

◆ operator=() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
DistGraph_CSR< V, E, Memory > & DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::operator= ( DistGraph_CSR< V, E, Memory > &&  g)
inline

Copy the graph.

Parameters
gdistributed graph to copy
Returns
itself

Definition at line 1175 of file dist_map_graph.hpp.

◆ q_move()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<bool toRemove = true>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::q_move ( size_t  i,
size_t  t 
)
inline

Prepare to send vertex i from the local processor to the target processor.

Template Parameters
toRemoveif true the vertex will be deleted from this graph once it has been sent
Parameters
ivertex to send
ttarget processor

Definition at line 2164 of file dist_map_graph.hpp.

◆ redistribute()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::redistribute ( )
inline

Redistribute function that wraps different stages of the redistribution.

Definition at line 2219 of file dist_map_graph.hpp.

◆ remap()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::remap ( )
inlineprivate

Re-map received vertices in order to have ordered vertex ids.

Definition at line 766 of file dist_map_graph.hpp.

◆ reqVertex()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::reqVertex ( size_t  gid)
inline

Put a vertex request in queue.

Parameters
gidglobal id of the vertex to request

Definition at line 2237 of file dist_map_graph.hpp.

◆ resetExchange()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::resetExchange ( )
inlineprivate

Init communication structures.

Definition at line 435 of file dist_map_graph.hpp.

◆ setGlobalMap()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::setGlobalMap ( size_t  g,
size_t  l,
size_t  i 
)
inline

map global id to local id

Parameters
gglobal id
llocal index
iid

Definition at line 1802 of file dist_map_graph.hpp.

◆ swap() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::swap ( DistGraph_CSR< V, E > &&  g)
inline

Swap the memory of g with this graph.

Swap the memory of g with this graph, it is basically used for move semantic

Parameters
gThe source graph

Definition at line 2014 of file dist_map_graph.hpp.

◆ swap() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::swap ( DistGraph_CSR< V, E > &  g)
inline

Swap the memory of g with this graph.

Swap the memory of g with this graph, it is basically used for move semantic

Parameters
gThe source graph

Definition at line 1986 of file dist_map_graph.hpp.

◆ sync()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::sync ( )
inline

Execute all vertex requests and add them as ghosts inside this graph, they will be available until a redistribution is executed.

Definition at line 2253 of file dist_map_graph.hpp.

◆ syncEdge()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::syncEdge ( )
inline

Execute a synchronization through processor to finalize the add of the edges requested in the e_queue.

Definition at line 1947 of file dist_map_graph.hpp.

◆ updateVtxdist()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
void DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::updateVtxdist ( )
inlineprivate

Update the distribution vector vtxdist.

Definition at line 735 of file dist_map_graph.hpp.

◆ vertex() [1/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( grid_key_dx< 1 >  id) -> decltype( v.get(id.get(0)) )
inline

operator to access the vertex

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex

Definition at line 1245 of file dist_map_graph.hpp.

◆ vertex() [2/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( grid_key_dx< 1 >  id) const -> const decltype( v.get(id.get(0)) )
inline

operator to access the vertex

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex

Definition at line 1285 of file dist_map_graph.hpp.

◆ vertex() [3/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( openfpm::vector_key_iterator  id) -> decltype( v.get(0) )
inline

operator to access the vertex

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex

Definition at line 1259 of file dist_map_graph.hpp.

◆ vertex() [4/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( openfpm::vector_key_iterator  id) const -> const decltype( v.get(0) )
inline

operator to access the vertex

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex

Definition at line 1299 of file dist_map_graph.hpp.

◆ vertex() [5/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( size_t  id) -> decltype( v.get(id) )
inline

Function to access the vertexes.

Parameters
idof the vertex to access
Returns
the vertex

Definition at line 1231 of file dist_map_graph.hpp.

◆ vertex() [6/6]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( size_t  id) const -> const decltype( v.get(id) )
inline

Function to access the vertexes.

Parameters
idof the vertex to access
Returns
the vertex

Definition at line 1271 of file dist_map_graph.hpp.

◆ vertex_info()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex_info ( openfpm::vector_key_iterator  id) const -> const decltype( v_m.get(0) )
inline

operator to access the vertex info

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex global id

Definition at line 1313 of file dist_map_graph.hpp.

◆ vertex_p() [1/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<unsigned int i>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex_p ( grid_key_dx< 1 >  id) -> decltype( v.template get<i>(id) )
inline

Access the vertex.

Template Parameters
iproperty to access
Parameters
idof the vertex to access
Returns
a reference to the vertex property

Definition at line 1219 of file dist_map_graph.hpp.

◆ vertex_p() [2/2]

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
template<unsigned int i>
auto DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex_p ( size_t  id) -> decltype( v.template get<i>(id) )
inline

operator to access the vertex

operator to access the vertex

Template Parameters
iproperty to access
Parameters
idof the vertex to access
Returns
a reference to the vertex property

Definition at line 1206 of file dist_map_graph.hpp.

◆ vertexIsInThisGraph()

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
bool DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertexIsInThisGraph ( size_t  id)
inline

Check if the vertex with GLOBAL id is in this graph.

Parameters
idglobal id of the vertex
Returns
true if vertex with gid is in this graph, false otherwise

Definition at line 1426 of file dist_map_graph.hpp.

Field Documentation

◆ e

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<E, Memory, layout_e_base, grow_p, openfpm::vect_isel<E>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::e
private

Structure that store the edge properties.

Definition at line 233 of file dist_map_graph.hpp.

◆ e_invalid

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<E, Memory, layout_e_base, grow_p, openfpm::vect_isel<E>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::e_invalid
private

invalid edge element, when a function try to create an in valid edge this object is returned

Definition at line 242 of file dist_map_graph.hpp.

◆ e_l

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<e_map, Memory, layout_e_base, grow_p, openfpm::vect_isel<e_map>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::e_l
private

Structure that store for each vertex the adjacent the vertex id and edge id (for property into e)

Definition at line 239 of file dist_map_graph.hpp.

◆ e_m

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<e_info, Memory, layout_e_base, grow_p, openfpm::vect_isel<e_info>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::e_m
private

Structure that store the edge properties.

Definition at line 236 of file dist_map_graph.hpp.

◆ e_queue

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<EdgeReq> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::e_queue
private

Queue of requests to add edges.

Definition at line 313 of file dist_map_graph.hpp.

◆ fvtxdist

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<idx_t> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::fvtxdist
private

Fixed distribution vector, it never changes, it maintains always the first decomposition and topology.

Definition at line 218 of file dist_map_graph.hpp.

◆ ghs_map

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
std::unordered_map<size_t, bool> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::ghs_map
private

Map containing the ghost vertices of this graph, if bool is false the ghost will be deleted in the next vertices exchange.

Definition at line 297 of file dist_map_graph.hpp.

◆ glb2id

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
std::unordered_map<size_t, size_t> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::glb2id
private

Map to access the vertex id given the global vertex id.

Definition at line 248 of file dist_map_graph.hpp.

◆ glb2loc

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
std::unordered_map<size_t, size_t> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::glb2loc
private

Map to access the local vertex id given the global one.

Definition at line 251 of file dist_map_graph.hpp.

◆ glbi_map

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
std::unordered_map<size_t, GlobalVInfo> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::glbi_map
private

TODO update description from pdf.

Definition at line 291 of file dist_map_graph.hpp.

◆ id2glb

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
std::unordered_map<size_t, size_t> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::id2glb
private

Map to access to the global vertex id given the vertex id.

Definition at line 245 of file dist_map_graph.hpp.

◆ sgp

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<SendGraphPack> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::sgp
private

Pack storing that data to send to other processors.

Definition at line 273 of file dist_map_graph.hpp.

◆ v

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<V, Memory,layout_v_base,grow_p, openfpm::vect_isel<V>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::v
private

Structure that store the vertex properties.

Definition at line 224 of file dist_map_graph.hpp.

◆ v_l

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<size_t, Memory, layout_v_base, grow_p, openfpm::vect_isel<size_t>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::v_l
private

Structure that store the number of adjacent vertex in e_l for each vertex.

Definition at line 230 of file dist_map_graph.hpp.

◆ v_m

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<v_info, Memory, memory_traits_lin, grow_p, openfpm::vect_isel<v_info>::value> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::v_m
private

Structure that store the vertex id and global id.

Definition at line 227 of file dist_map_graph.hpp.

◆ v_slot

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
size_t DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::v_slot
private

number of slot per vertex

Definition at line 221 of file dist_map_graph.hpp.

◆ v_td

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<size_t> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::v_td
private

Array containing the sent vertices and that will be deleted from the graph.

Definition at line 276 of file dist_map_graph.hpp.

◆ vcl

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
Vcluster& DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vcl
private

Vcluster communication object.

Definition at line 212 of file dist_map_graph.hpp.

◆ vr_queue

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<openfpm::vector<size_t> > DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vr_queue
private

Queue of vertex requests.

Definition at line 294 of file dist_map_graph.hpp.

◆ vtxdist

template<typename V , typename E = no_edge, typename Memory = HeapMemory, typename layout_v = typename memory_traits_lin<V>::type, typename layout_e = typename memory_traits_lin<E>::type, template< typename > class layout_v_base = memory_traits_lin, template< typename > class layout_e_base = memory_traits_lin, typename grow_p = openfpm::grow_policy_double>
openfpm::vector<idx_t> DistGraph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vtxdist
private

Distribution vector.

Definition at line 215 of file dist_map_graph.hpp.


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