libgrape-lite
A C++ library for parallel graph processing
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy > Class Template Reference

Public Types

using vertex_t = Vertex< VID_T >
 
using nbr_t = Nbr< VID_T, EDATA_T >
 
using vertex_range_t = VertexRange< VID_T >
 
using adj_list_t = AdjList< VID_T, EDATA_T >
 
using const_adj_list_t = ConstAdjList< VID_T, EDATA_T >
 
using vid_t = VID_T
 
using oid_t = OID_T
 
using vdata_t = VDATA_T
 
using edata_t = EDATA_T
 

Public Member Functions

DEV_HOST_INLINE vertex_range_t Vertices () const
 
DEV_HOST_INLINE vertex_range_t InnerVertices () const
 
DEV_HOST_INLINE vertex_range_t OuterVertices () const
 
DEV_INLINE vertex_range_t OuterVertices (fid_t fid) const
 
DEV_INLINE ArrayView< vertex_t > MirrorVertices (fid_t fid) const
 
DEV_INLINE bool GetVertex (const OID_T &oid, vertex_t &v) const
 
DEV_INLINE OID_T GetId (const vertex_t &v) const
 
DEV_HOST_INLINE fid_t GetFragId (const vertex_t &u) const
 
DEV_INLINE const VDATA_T & GetData (const vertex_t &v) const
 
DEV_INLINE void SetData (const vertex_t &v, const VDATA_T &val)
 
DEV_INLINE VID_T GetLocalOutDegree (const vertex_t &v) const
 
DEV_INLINE VID_T GetLocalInDegree (const vertex_t &v) const
 
DEV_INLINE bool Gid2Vertex (const VID_T &gid, vertex_t &v) const
 
DEV_INLINE VID_T Vertex2Gid (const vertex_t &v) const
 
DEV_HOST_INLINE VID_T GetInnerVerticesNum () const
 
DEV_HOST_INLINE VID_T GetOuterVerticesNum () const
 
DEV_HOST_INLINE bool IsInnerVertex (const vertex_t &v) const
 
DEV_HOST_INLINE bool IsOuterVertex (const vertex_t &v) const
 
DEV_INLINE bool GetInnerVertex (const OID_T &oid, vertex_t &v) const
 
DEV_INLINE bool GetOuterVertex (const OID_T &oid, vertex_t &v) const
 
DEV_INLINE OID_T GetInnerVertexId (const vertex_t &v) const
 
DEV_INLINE OID_T GetOuterVertexId (const vertex_t &v) const
 
DEV_INLINE OID_T Gid2Oid (const VID_T &gid) const
 
DEV_INLINE bool Oid2Gid (const OID_T &oid, VID_T &gid) const
 
DEV_HOST_INLINE bool InnerVertexGid2Vertex (const VID_T &gid, vertex_t &v) const
 
DEV_INLINE bool OuterVertexGid2Vertex (const VID_T &gid, vertex_t &v) const
 
DEV_INLINE VID_T GetOuterVertexGid (const vertex_t &v) const
 
DEV_HOST_INLINE VID_T GetInnerVertexGid (const vertex_t &v) const
 
DEV_INLINE DestList IEDests (const vertex_t &v) const
 Return the incoming edge destination fragment ID list of a inner vertex.
 
DEV_INLINE DestList OEDests (const vertex_t &v) const
 Return the outgoing edge destination fragment ID list of a Vertex.
 
DEV_INLINE DestList IOEDests (const vertex_t &v) const
 Return the edge destination fragment ID list of a inner vertex.
 
DEV_INLINE adj_list_t GetIncomingAdjList (const vertex_t &v)
 
DEV_INLINE const_adj_list_t GetIncomingAdjList (const vertex_t &v) const
 
DEV_INLINE adj_list_t GetIncomingInnerVertexAdjList (const vertex_t &v)
 Returns the incoming adjacent inner vertices of v.
 
DEV_INLINE const_adj_list_t GetIncomingInnerVertexAdjList (const vertex_t &v) const
 Returns the incoming adjacent inner vertices of v.
 
DEV_INLINE adj_list_t GetIncomingOuterVertexAdjList (const vertex_t &v)
 Returns the incoming adjacent outer vertices of v.
 
DEV_INLINE const_adj_list_t GetIncomingOuterVertexAdjList (const vertex_t &v) const
 Returns the incoming adjacent outer vertices of v.
 
DEV_INLINE adj_list_t GetOutgoingInnerVertexAdjList (const vertex_t &v)
 Returns the outgoing adjacent inner vertices of v.
 
DEV_INLINE const_adj_list_t GetOutgoingInnerVertexAdjList (const vertex_t &v) const
 Returns the outgoing adjacent inner vertices of v.
 
DEV_INLINE adj_list_t GetOutgoingOuterVertexAdjList (const vertex_t &v)
 Returns the outgoing adjacent outer vertices of v.
 
DEV_INLINE const_adj_list_t GetOutgoingOuterVertexAdjList (const vertex_t &v) const
 Returns the outgoing adjacent outer vertices of v.
 
DEV_INLINE adj_list_t GetOutgoingAdjList (const vertex_t &v)
 
DEV_INLINE const_adj_list_t GetOutgoingAdjList (const vertex_t &v) const
 
DEV_INLINE size_t GetIncomingEdgeIndex (const nbr_t &nbr) const
 
DEV_INLINE size_t GetIncomingEdgeIndex (const vertex_t &u, const nbr_t &nbr) const
 
DEV_INLINE size_t GetOutgoingEdgeIndex (const nbr_t &nbr) const
 
DEV_INLINE size_t GetOutgoingEdgeIndex (const vertex_t &u, const nbr_t &nbr) const
 

Private Attributes

DeviceVertexMap< OID_T, VID_T > vm_
 
size_t ivnum_ {}
 
size_t ovnum_ {}
 
size_t tvnum_ {}
 
size_t ienum_ {}
 
size_t oenum_ {}
 
fid_t fid_ {}
 
IdParser< VID_T > id_parser_
 
CUDASTL::HashMap< VID_T, VID_T > * ovg2l_ {}
 
ArrayView< VID_T > ovgid_ {}
 
ArrayView< nbr_t * > ieoffset_
 
ArrayView< nbr_t * > oeoffset_
 
ArrayView< nbr_t > ie_
 
ArrayView< nbr_t > oe_
 
ArrayView< VDATA_T > vdata_ {}
 
ArrayView< fid_t > idst_
 
ArrayView< fid_t > odst_
 
ArrayView< fid_t > iodst_
 
ArrayView< fid_t * > idoffset_
 
ArrayView< fid_t * > odoffset_
 
ArrayView< fid_t * > iodoffset_
 
ArrayView< ArrayView< nbr_t * > > iespliters_
 
ArrayView< ArrayView< nbr_t * > > oespliters_
 
ArrayView< vertex_range_t > outer_vertices_of_frag_
 
ArrayView< ArrayView< vertex_t > > mirrors_of_frag_
 

Friends

template<typename _OID_T , typename _VID_T , typename _VDATA_T , typename _EDATA_T , grape::LoadStrategy __load_strategy>
class grape::cuda::HostFragment
 

Member Function Documentation

◆ GetIncomingInnerVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingInnerVertexAdjList ( const vertex_t &  v)
inline

Returns the incoming adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent inner vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetIncomingInnerVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE const_adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingInnerVertexAdjList ( const vertex_t &  v) const
inline

Returns the incoming adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent inner vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetIncomingOuterVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingOuterVertexAdjList ( const vertex_t &  v)
inline

Returns the incoming adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent outer vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetIncomingOuterVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE const_adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetIncomingOuterVertexAdjList ( const vertex_t &  v) const
inline

Returns the incoming adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The incoming adjacent outer vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetOutgoingInnerVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingInnerVertexAdjList ( const vertex_t &  v)
inline

Returns the outgoing adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent inner vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetOutgoingInnerVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE const_adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingInnerVertexAdjList ( const vertex_t &  v) const
inline

Returns the outgoing adjacent inner vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent inner vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetOutgoingOuterVertexAdjList() [1/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingOuterVertexAdjList ( const vertex_t &  v)
inline

Returns the outgoing adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent outer vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ GetOutgoingOuterVertexAdjList() [2/2]

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE const_adj_list_t grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::GetOutgoingOuterVertexAdjList ( const vertex_t &  v) const
inline

Returns the outgoing adjacent outer vertices of v.

Parameters
vInput vertex.
Returns
The outgoing adjacent outer vertices of v.
Attention
This method is available only when need_split_edges set in application's specification.

◆ IEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE DestList grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::IEDests ( const vertex_t &  v) const
inline

Return the incoming edge destination fragment ID list of a inner vertex.

Parameters
vInput vertex.
Returns
The incoming edge destination fragment ID list.
Attention
This method is only available when application set message strategy as kAlongIncomingEdgeToOuterVertex.

◆ IOEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE DestList grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::IOEDests ( const vertex_t &  v) const
inline

Return the edge destination fragment ID list of a inner vertex.

Parameters
vInput vertex.
Returns
The edge destination fragment ID list.
Attention
This method is only available when application set message strategy as kAlongedge_toOuterVertex.

◆ OEDests()

template<typename OID_T , typename VID_T , typename VDATA_T , typename EDATA_T , grape::LoadStrategy _load_strategy = grape::LoadStrategy::kOnlyOut>
DEV_INLINE DestList grape::cuda::dev::DeviceFragment< OID_T, VID_T, VDATA_T, EDATA_T, _load_strategy >::OEDests ( const vertex_t &  v) const
inline

Return the outgoing edge destination fragment ID list of a Vertex.

Parameters
vInput vertex.
Returns
The outgoing edge destination fragment ID list.
Attention
This method is only available when application set message strategy as kAlongOutgoingedge_toOuterVertex.