libgrape-lite
A C++ library for parallel graph processing
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
grape Namespace Reference

Namespaces

 batch_shuffle_message_manager_impl
 A kind of collective message manager.
 

Classes

class  AutoParallelMessageManager
 A kind of message manager supporting auto parallelism. More...
 
class  AutoAppBase
 AutoAppBase is a base class for auto-parallel apps. It contains an AutoParallelMessageManager to process messages implicitly during the computation. More...
 
class  BatchShuffleAppBase
 
class  ContextBase
 ContextBase is the base class for all user-defined contexts. A context manages data through the whole computation. The data won't be cleared during supersteps. More...
 
class  GatherScatterAppBase
 
class  MutationContext
 
class  ParallelAppBase
 ParallelAppBase is a base class for parallel apps. Users can process messages in a more flexible way in this kind of app. It contains an ParallelMessageManager to process messages, which enables send/receive messages during computation. This strategy improves performance by overlapping the communication time and the evaluation time. More...
 
class  VertexDataContext
 
class  VertexDataContext< FRAG_T, DATA_T, typename std::enable_if< is_edge_cut_fragment< FRAG_T >::value >::type >
 
class  VertexDataContext< FRAG_T, DATA_T, typename std::enable_if< is_vertex_cut_fragment< FRAG_T >::value >::type >
 
class  VoidContext
 
class  Communicator
 Communicator provides methods to implement distributed aggregation, such as Min/Max/Sum. More...
 
struct  integer_sequence
 
struct  make_integer_sequence
 
struct  make_integer_sequence< T, 0, Is... >
 
struct  ShuffleBuffer
 
struct  ShuffleBuffer< nonstd::string_view >
 
struct  ShuffleBufferTuple
 
struct  ShuffleBufferTuple< First >
 
struct  ShuffleBufferTuple_element
 
struct  ShuffleBufferTuple_element< index, ShuffleBufferTuple< First, Tail... > >
 
struct  ShuffleBufferTuple_element< 0, ShuffleBufferTuple< First, Rest... > >
 
struct  add_ref
 
struct  add_ref< T & >
 
struct  add_const_ref
 
struct  add_const_ref< T & >
 
struct  add_const_ref< const T & >
 
struct  get_buffer_helper
 
struct  get_buffer_helper< 0, First, Rest... >
 
struct  frag_shuffle_header
 
class  ShuffleOut
 
class  ShuffleIn
 
class  BasicEFileFragmentLoader
 
class  BasicFragmentLoader
 
struct  LoadGraphSpec
 LoadGraphSpec determines the specification to load a graph. More...
 
class  BasicFragmentLoaderBase
 
struct  Mutation
 
class  BasicFragmentMutator
 
class  BasicLocalFragmentLoader
 
class  BasicRbFragmentLoader
 
class  VCEdgeBucketer
 
class  BasicVCDSFragmentLoader
 
class  BasicVCFragmentLoader
 
class  CSREdgecutFragmentBase
 
class  EdgecutFragmentBase
 IEdgecutFragment defines the interfaces of fragments with edgecut. To learn more about edge-cut and vertex-cut, please refers to https://spark.apache.org/docs/1.6.2/graphx-programming-guide.html#optimized-representation. More...
 
class  EVFragmentLoader
 EVFragmentLoader is a loader to load fragments from separated efile and vfile. More...
 
class  EVFragmentMutator
 
struct  PrepareConf
 
class  FragmentBase
 FragmentBase is the base class for fragments. More...
 
class  IdParser
 
struct  ImmutableEdgecutFragmentTraits
 
class  ImmutableEdgecutFragment
 A kind of edgecut fragment. More...
 
class  ImmutableVertexcutFragment
 
class  ImmutableVertexcutFragment< uint64_t, EmptyType, EmptyType >
 
struct  MutableEdgecutFragmentTraits
 
class  MutableEdgecutFragment
 
class  Rebalancer
 
class  VCFragmentLoader
 
struct  Nbr
 A neighbor of a vertex in the graph. More...
 
struct  Nbr< VID_T, EmptyType >
 A neighbor of a vertex in the graph. (partial specialization with Empty edge data.) More...
 
class  AdjList
 A iteratable adjencent list of a vertex. The list contains all neighbors in format of Nbr, which contains the other Node and the data on the Edge. More...
 
class  FilterAdjList
 
class  FilterConstAdjList
 
class  ConstAdjList
 A immutable iteratable adjencent list of a vertex. The list contains all neighbors in format of Nbr, which contains the other Node and the data on the Edge. More...
 
struct  DestList
 Destination list for message exchange. A message may need to be sent to all the fragments in the DestList. More...
 
class  DeMutableCSR
 
class  DeMutableCSRBuilder
 
class  DeMutableCSRBuilder< VID_T, Nbr< VID_T, EDATA_T > >
 
class  DeMutableCSR< VID_T, Nbr< VID_T, EDATA_T > >
 
struct  Edge
 Edge representation. More...
 
struct  Edge< VID_T, EmptyType >
 Partial specialization for Edge with EmptyType on edge_data. More...
 
class  IdIndexer
 
class  IdIndexerView
 
class  ImmutableCSR
 
class  ImmutableCSRParallelBuilder
 
class  ImmutableCSRBuilder
 
class  ImmutableCSRStreamBuilder
 
class  MutableCSR
 
class  MutableCSRBuilder
 
class  MutableCSRBuilder< VID_T, Nbr< VID_T, EDATA_T > >
 
class  MutableCSR< VID_T, Nbr< VID_T, EDATA_T > >
 
class  IOAdaptorBase
 IOAdaptorBase is the base class of I/O adaptors. More...
 
class  LineParserBase
 LineParserBase is the base class for line parsers. More...
 
class  LocalIOAdaptor
 A default adaptor to read/write files from local locations. More...
 
class  TSVLineParser
 a default parser for tsv files. More...
 
class  BatchShuffleMessageManager
 
class  DefaultMessageManager
 Default message manager. More...
 
class  GatherScatterMessageManager
 
class  MessageInBuffer
 MessageInBuffer holds a grape::OutArchive, which contains a bunch of messages. Used By JavaParallelMessageManager to process messages in a parallel manner. More...
 
struct  TerminateInfo
 
class  MessageManagerBase
 MessageManagerBase is the base class for message managers. More...
 
class  ParallelEngine
 
struct  ParallelEngineSpec
 
class  ParallelMessageManager
 A kind of parallel message manager. More...
 
class  ParallelMessageManagerOpt
 A optimized version of parallel message manager. More...
 
class  ISyncBuffer
 ISyncBuffer is a base class of SyncBuffer, which is used for auto parallelization. More...
 
class  SyncBuffer
 SyncBuffer manages status on each vertex during the evaluation in auto parallization. More...
 
class  ThreadLocalMessageBuffer
 
class  ThreadLocalMessageBufferOpt
 
struct  SerializedSize
 
struct  SerializedSize< EmptyType >
 
struct  SerializedSize< std::string >
 
struct  SerializedSize< nonstd::string_view >
 
class  FixedInArchive
 
class  InArchive
 InArchive is an archived object for serializing objects. More...
 
class  OutArchive
 OutArchive is an archived object for deserializing objects. More...
 
struct  EmptyType
 EmptyType is the placeholder of VDATA_T and EDATA_T for graphs without data on vertices and edges. More...
 
struct  is_vertex_cut_fragment
 
struct  is_edge_cut_fragment
 
struct  InternalOID
 
struct  InternalOID< std::string >
 
struct  murmurhasher
 
struct  IdHasher
 
struct  IdHasher< uint32_t >
 
struct  IdHasher< uint64_t >
 
struct  IdenticalHasher
 
struct  IdenticalHasher< uint32_t >
 
struct  IdenticalHasher< uint64_t >
 
class  Bitset
 Bitset is a highly-optimized bitset implementation. More...
 
class  RefBitset
 
class  BlockingQueue
 A concurrent queue based on condition_variables and can be accessed by multi-producers and multi-consumers simultaneously. More...
 
class  SpinLock
 A simple implementation of spinlock based on std::atomic. More...
 
class  NonblockingQueue
 A concurrent queue guarded by a spinlock and can be accessed by multi-producers and multi-consumers simultaneously. More...
 
class  DefaultAllocator
 Allocator used for grape containers, i.e., <Array>. More...
 
class  Array
 Array a std::vector-like container type without reserving memory. More...
 
class  Array< EmptyType, _Alloc >
 Template specialization of Array for EmptyType, without consuming extra memory for EmptyType but provides same interfaces with Array of usual data types. More...
 
class  IteratorPair
 IteratorPair is a wrapper for begin and end iterators. More...
 
struct  MicroBuffer
 
struct  MessageBuffer
 
class  MessageBufferPool
 
struct  bit_vector_view
 
struct  darray1_view
 
struct  compact_vector_view
 
struct  ef_sequence_view
 
struct  dictionary_view
 
struct  dual_dictionary_view
 
class  PHIndexerView
 
struct  mem_dumper
 
struct  external_mem_dumper
 
struct  mem_loader
 
struct  SinglePHFView
 
struct  ref_vector
 
class  StringViewVector
 
struct  ref_vector< nonstd::string_view >
 
class  VarintEncoder
 
class  VarintDecoder
 
struct  VarintUtil
 
struct  VarintUtil< uint32_t >
 
struct  VarintUtil< uint64_t >
 
class  DeltaVarintEncoder
 
class  DeltaVarintDecoder
 
struct  SerializedSize< VarintEncoder >
 
struct  SerializedSize< DeltaVarintEncoder< T > >
 
class  Vertex
 A Vertex object only contains id of a vertex. It will be used when iterating vertices of a fragment and accessing data and neighbor of a vertex. More...
 
class  DualVertexRange
 
class  VertexRange
 
class  VertexArray
 
class  VertexArray< VertexRange< VID_T >, T >
 
class  VertexArray< DualVertexRange< VID_T >, T >
 
class  DenseVertexSet
 A vertex set with dense vertices. More...
 
class  DenseVertexSet< VertexRange< VID_T > >
 
class  DenseVertexSet< DualVertexRange< VID_T > >
 
class  DenseVertexSet< VertexVector< VID_T > >
 
class  HashMapIdxer
 
class  HashMapIdxerDummyBuilder
 
class  HashMapIdxerBuilder
 
class  HashMapIdxerView
 
class  HashMapIdxerViewDummyBuilder
 
class  HashMapIdxerViewBuilder
 
class  IdxerBase
 
class  IdxerBuilderBase
 
class  LocalIdxer
 
class  LocalIdxerBuilder
 
class  PTHashIdxer
 
class  PTHashIdxerDummyBuilder
 
class  PTHashIdxerBuilder
 
class  SortedArrayIdxer
 
class  SortedArrayIdxer< std::string, VID_T >
 
class  SortedArrayIdxerDummyBuilder
 
class  SortedArrayIdxerDummyBuilder< std::string, VID_T >
 
class  SortedArrayIdxerBuilder
 
class  SortedArrayIdxerBuilder< std::string, VID_T >
 
class  IPartitioner
 
class  HashPartitioner
 
class  MapPartitioner
 
class  SegmentedPartitioner
 
struct  VCPartitioner
 
struct  VCPartitioner< uint64_t >
 
class  VertexMapBuilder
 
class  VertexMap
 
class  CommSpec
 CommSpec records the mappings of fragments, workers, and the threads(tasks) in each worker. More...
 
class  Worker
 A Worker manages the computation cycle. More...
 

Typedefs

template<std::size_t... Ints>
using index_sequence = integer_sequence< std::size_t, Ints... >
 
template<std::size_t N>
using make_index_sequence = make_integer_sequence< std::size_t, N >
 
template<typename... T>
using index_sequence_for = make_index_sequence< sizeof...(T)>
 
using fid_t = unsigned
 
template<typename T >
using Allocator = DefaultAllocator< T >
 
template<typename E >
using enable_enum_t = typename std::enable_if< std::is_enum< E >::value, typename std::underlying_type< E >::type >::type
 
template<class T , typename... Args>
using result_of_t = typename std::result_of< T(Args...)>::type
 
template<typename T >
using VertexVector = std::vector< Vertex< T > >
 A discontinuous vertices collection representation. An increasing labeled(but no need to be continuous) vertices must be provided to construct the VertexVector. More...
 
template<typename APP_T >
using ParallelWorker = Worker< APP_T, ParallelMessageManager >
 
template<typename APP_T >
using ParallelWorkerOpt = Worker< APP_T, ParallelMessageManagerOpt >
 
template<typename APP_T >
using AutoWorker = Worker< APP_T, AutoParallelMessageManager< typename APP_T::fragment_t > >
 
template<typename APP_T >
using BatchShuffleWorker = Worker< APP_T, BatchShuffleMessageManager >
 
template<typename APP_T >
using GatherScatterWorker = Worker< APP_T, GatherScatterMessageManager >
 

Enumerations

enum class  FragmentType { kEdgeCut = 0 , kVertexCut = 1 }
 
enum class  LoadStrategy { kOnlyOut = 0 , kOnlyIn = 1 , kBothOutIn = 2 , kNullLoadStrategy = 0xf0 }
 LoadStrategy specifies the which edges should be loadded when building the graph from a location.
 
enum class  MessageStrategy {
  kAlongOutgoingEdgeToOuterVertex = 0 , kAlongIncomingEdgeToOuterVertex = 1 , kAlongEdgeToOuterVertex = 2 , kSyncOnOuterVertex = 3 ,
  kGatherScatter = 4
}
 MessageStrategy specifies the method of message passing between fragments. More...
 
enum class  IdxerType {
  kHashMapIdxer , kLocalIdxer , kPTHashIdxer , kHashMapIdxerView ,
  kSortedArrayIdxer
}
 
enum class  PartitionerType { kHashPartitioner , kMapPartitioner , kSegmentedPartitioner }
 

Functions

template<typename APP_T >
std::enable_if< std::is_base_of< Communicator, APP_T >::value >::type InitCommunicator (std::shared_ptr< APP_T > app, MPI_Comm comm)
 
template<typename APP_T >
std::enable_if<!std::is_base_of< Communicator, APP_T >::value >::type InitCommunicator (std::shared_ptr< APP_T > app, MPI_Comm comm)
 
template<std::size_t index, typename First , typename... Rest>
add_ref< typename ShuffleBufferTuple_element< index, ShuffleBufferTuple< First, Rest... > >::buffer_type >::type get_buffer (ShuffleBufferTuple< First, Rest... > &bt)
 
template<std::size_t index, typename First , typename... Rest>
add_const_ref< typename ShuffleBufferTuple_element< index, ShuffleBufferTuple< First, Rest... > >::buffer_type >::type get_const_buffer (const ShuffleBufferTuple< First, Rest... > &bt)
 
template<typename Tuple , typename Func , std::size_t... index>
void foreach_helper (const Tuple &t, const Func &func, index_sequence< index... >)
 
template<typename Tuple , typename Func , std::size_t... index>
void range_foreach_helper (const Tuple &t, size_t begin, size_t end, const Func &func, index_sequence< index... >)
 
template<typename Tuple , typename Func , std::size_t... index>
void foreach_rval_helper (Tuple &t, const Func &func, index_sequence< index... >)
 
template<typename Tuple , typename Func , std::size_t... index>
void range_foreach_rval_helper (Tuple &t, size_t begin, size_t end, const Func &func, index_sequence< index... >)
 
template<typename Tuple , typename Func >
void foreach (Tuple &t, const Func &func)
 
template<typename Tuple , typename Func >
void range_foreach_rval (Tuple &t, size_t begin, size_t end, const Func &func)
 
template<typename Tuple , typename Func >
void foreach_rval (Tuple &t, const Func &func)
 
void InitMPIComm ()
 
void FinalizeMPIComm ()
 
size_t rehash_oid (size_t val)
 
LoadGraphSpec DefaultLoadGraphSpec ()
 
size_t hash_strings (const std::vector< std::string > &strs)
 
std::string to_hex_string (size_t hash)
 
template<typename FRAG_T >
std::string sigfile_content (const std::string &efile, const std::string &vfile, const LoadGraphSpec &spec)
 
template<typename FRAG_T >
bool find_serialization (const std::string &efile, const std::string &vfile, const std::string &serialization_prefix, const LoadGraphSpec &spec, fid_t fnum, std::string &prefix_out)
 
template<typename FRAG_T , typename IOADAPTOR_T >
bool SerializeFragment (std::shared_ptr< FRAG_T > &fragment, const CommSpec &comm_spec, const std::string &efile, const std::string &vfile, const LoadGraphSpec &spec)
 
template<typename FRAG_T , typename IOADAPTOR_T >
bool DeserializeFragment (std::shared_ptr< FRAG_T > &fragment, const CommSpec &comm_spec, const std::string &efile, const std::string &vfile, const LoadGraphSpec &spec)
 
template<typename VID_T , typename EDATA_T >
bool operator< (const Nbr< VID_T, EDATA_T > &lhs, const Nbr< VID_T, EDATA_T > &rhs)
 
template<typename VID_T , typename EDATA_T >
InArchiveoperator<< (InArchive &archive, const Nbr< VID_T, EDATA_T > &nbr)
 
template<typename VID_T >
InArchiveoperator<< (InArchive &archive, const Nbr< VID_T, EmptyType > &nbr)
 
template<typename VID_T , typename EDATA_T >
OutArchiveoperator>> (OutArchive &archive, Nbr< VID_T, EDATA_T > &nbr)
 
template<typename VID_T >
OutArchiveoperator>> (OutArchive &archive, Nbr< VID_T, EmptyType > &nbr)
 
template<typename VID_T , typename EDATA_T >
InArchiveoperator<< (InArchive &archive, const Edge< VID_T, EDATA_T > &e)
 
template<typename VID_T , typename EDATA_T >
OutArchiveoperator>> (OutArchive &archive, Edge< VID_T, EDATA_T > &e)
 
template<typename VID_T >
InArchiveoperator<< (InArchive &archive, const Edge< VID_T, EmptyType > &e)
 
template<typename VID_T >
OutArchiveoperator>> (OutArchive &archive, Edge< VID_T, EmptyType > &e)
 
template<typename VID_T , typename VDATA_T >
InArchiveoperator<< (InArchive &archive, const internal::Vertex< VID_T, VDATA_T > &v)
 
template<typename VID_T , typename VDATA_T >
OutArchiveoperator>> (OutArchive &archive, internal::Vertex< VID_T, VDATA_T > &v)
 
template<typename VID_T >
InArchiveoperator<< (InArchive &archive, const internal::Vertex< VID_T, EmptyType > &v)
 
template<typename VID_T >
OutArchiveoperator>> (OutArchive &archive, internal::Vertex< VID_T, EmptyType > &v)
 
template<typename APP_T >
std::enable_if< std::is_base_of< ParallelEngine, APP_T >::value >::type InitParallelEngine (std::shared_ptr< APP_T > app, const ParallelEngineSpec &spec)
 
template<typename APP_T >
std::enable_if<!std::is_base_of< ParallelEngine, APP_T >::value >::type InitParallelEngine (std::shared_ptr< APP_T > app, const ParallelEngineSpec &spec)
 
ParallelEngineSpec DefaultParallelEngineSpec ()
 
ParallelEngineSpec MultiProcessSpec (const CommSpec &comm_spec, bool affinity=false)
 
template<typename T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
FixedInArchiveoperator<< (FixedInArchive &arc, T u)
 
FixedInArchiveoperator<< (FixedInArchive &arc, const EmptyType &v)
 
template<typename T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
InArchiveoperator<< (InArchive &in_archive, T u)
 
InArchiveoperator<< (InArchive &in_archive, EmptyType)
 
InArchiveoperator<< (InArchive &in_archive, const std::string &str)
 
InArchiveoperator<< (InArchive &archive, const nonstd::string_view &str)
 
template<typename T1 , typename T2 >
InArchiveoperator<< (InArchive &in_archive, const std::pair< T1, T2 > &p)
 
template<typename T1 , typename T2 , typename T3 >
InArchiveoperator<< (InArchive &in_archive, const std::tuple< T1, T2, T3 > &t)
 
template<typename T , typename ALLOC_T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
InArchiveoperator<< (InArchive &in_archive, const std::vector< T, ALLOC_T > &vec)
 
template<typename ALLOC_T >
InArchiveoperator<< (InArchive &in_archive, const std::vector< EmptyType, ALLOC_T > &vec)
 
template<typename T , typename ALLOC_T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
InArchiveoperator<< (InArchive &in_archive, const Array< T, ALLOC_T > &vec)
 
template<typename ALLOC_T >
InArchiveoperator<< (InArchive &in_archive, const Array< EmptyType, ALLOC_T > &vec)
 
template<typename T >
InArchiveoperator<< (InArchive &in_archive, const std::set< T > &s)
 
template<typename T >
InArchiveoperator<< (InArchive &in_archive, const std::unordered_set< T > &s)
 
template<typename T1 , typename T2 >
InArchiveoperator<< (InArchive &in_archive, const std::map< T1, T2 > &m)
 
template<typename T1 , typename T2 >
InArchiveoperator<< (InArchive &in_archive, const std::unordered_map< T1, T2 > &m)
 
template<typename T1 , typename T2 >
InArchiveoperator<< (InArchive &in_archive, const ska::flat_hash_map< T1, T2 > &m)
 
template<typename T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
OutArchiveoperator>> (OutArchive &out_archive, T &u)
 
OutArchiveoperator>> (OutArchive &out_archive, EmptyType &)
 
OutArchiveoperator>> (OutArchive &out_archive, std::string &str)
 
OutArchiveoperator>> (OutArchive &archive, nonstd::string_view &str)
 
template<typename T1 , typename T2 >
OutArchiveoperator>> (OutArchive &out_archive, std::pair< T1, T2 > &p)
 
template<typename T1 , typename T2 , typename T3 >
OutArchiveoperator>> (OutArchive &out_archive, std::tuple< T1, T2, T3 > &t)
 
template<typename T , typename ALLOC_T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
OutArchiveoperator>> (OutArchive &out_archive, std::vector< T, ALLOC_T > &vec)
 
template<typename ALLOC_T >
OutArchiveoperator>> (OutArchive &out_archive, std::vector< EmptyType, ALLOC_T > &vec)
 
template<typename T , typename ALLOC_T , typename std::enable_if< std::is_pod< T >::value, T >::type * = nullptr>
OutArchiveoperator>> (OutArchive &out_archive, Array< T, ALLOC_T > &vec)
 
template<typename ALLOC_T >
OutArchiveoperator>> (OutArchive &out_archive, Array< EmptyType, ALLOC_T > &vec)
 
template<typename T >
OutArchiveoperator>> (OutArchive &out_archive, std::set< T > &s)
 
template<typename T >
OutArchiveoperator>> (OutArchive &out_archive, std::unordered_set< T > &s)
 
template<typename T1 , typename T2 >
OutArchiveoperator>> (OutArchive &out_archive, std::map< T1, T2 > &m)
 
template<typename T1 , typename T2 >
OutArchiveoperator>> (OutArchive &out_archive, std::unordered_map< T1, T2 > &m)
 
template<typename T1 , typename T2 >
OutArchiveoperator>> (OutArchive &out_archive, ska::flat_hash_map< T1, T2 > &m)
 
std::ostream & operator<< (std::ostream &out, const EmptyType)
 
std::istream & operator>> (std::istream &in, EmptyType)
 
template<typename E >
constexpr enable_enum_t< E > underlying_value (E e) noexcept
 
template<typename E , typename T >
constexpr std::enable_if< std::is_enum< E >::value &&std::is_integral< T >::value, E >::type to_enum (T value) noexcept
 
template<typename APP_T , typename GRAPH_T >
constexpr bool check_load_strategy_compatible ()
 
template<typename APP_T , typename GRAPH_T >
constexpr bool check_message_strategy_valid ()
 
template<typename APP_T , typename GRAPH_T >
constexpr bool check_app_fragment_consistency ()
 
double GetCurrentTime ()
 
void GetMemoryUsage (const int proc_id, const std::string &info)
 
template<typename... Args>
std::string StringFormat (const std::string &format, Args... args)
 
std::string GetResultFilename (const std::string &prefix, const fid_t fid)
 Get the formatted result filename.
 
template<typename T >
void DistinctSort (std::vector< T > &vec)
 sort the target vector and eliminate the duplicated elements. More...
 
bool exists_file (const std::string &name)
 
std::string get_absolute_path (const std::string &path)
 
bool create_directories (const std::string &path)
 
std::vector< std::string > split_string (const std::string &str, char delimiter)
 
size_t parse_size (const std::string &str)
 
std::map< std::string, size_t > parse_meminfo ()
 
size_t get_available_memory ()
 
template<typename T >
bool atomic_compare_and_swap (T &val, T old_val, T new_val)
 Atomic compare and swap operation. Equavalent to: More...
 
template<>
bool atomic_compare_and_swap (float &val, float old_val, float new_val)
 
template<>
bool atomic_compare_and_swap (double &val, double old_val, double new_val)
 
template<typename T >
bool atomic_min (T &a, T b)
 Atomic compare and store the minimum value. Equavalent to: More...
 
template<typename T >
void atomic_add (T &a, T b)
 Atomic add a value. Equavalent to: More...
 
template<>
void atomic_add (float &a, float b)
 
template<>
void atomic_add (double &a, double b)
 
template<typename T >
void atomic_sub (T &a, T b)
 Atomic sub a value. Equavalent to: More...
 
template<>
void atomic_sub (float &a, float b)
 
template<>
void atomic_sub (double &a, double b)
 
template<typename _Tp1 , typename _Tp2 >
bool operator!= (const DefaultAllocator< _Tp1 > &, const DefaultAllocator< _Tp2 > &)
 
template<typename _Tp1 , typename _Tp2 >
bool operator== (const DefaultAllocator< _Tp1 > &, const DefaultAllocator< _Tp2 > &)
 
size_t estimate_pool_size (size_t send_message_size, size_t recv_message_size, size_t batch_size, size_t fnum, size_t thread_num)
 
template<typename T , typename ALLOC_T >
void encode_vec (const std::vector< T, ALLOC_T > &vec, std::vector< char > &buf)
 
template<typename T >
void encode_val (const T &val, std::vector< char > &buf)
 
template<typename T >
const char * decode_val (T &val, const char *buf)
 
int varint_length (uint64_t value)
 
InArchiveoperator<< (InArchive &arc, const VarintEncoder &encoder)
 
FixedInArchiveoperator<< (FixedInArchive &arc, const VarintEncoder &encoder)
 
OutArchiveoperator>> (OutArchive &arc, VarintDecoder &decoder)
 
template<typename T >
InArchiveoperator<< (InArchive &arc, const DeltaVarintEncoder< T > &encoder)
 
template<typename T >
FixedInArchiveoperator<< (FixedInArchive &arc, const DeltaVarintEncoder< T > &encoder)
 
template<typename T >
OutArchiveoperator>> (OutArchive &arc, DeltaVarintDecoder< T > &decoder)
 
template<typename T >
bool operator< (Vertex< T > const &lhs, Vertex< T > const &rhs)
 
template<typename T >
bool operator== (Vertex< T > const &lhs, Vertex< T > const &rhs)
 
template<typename VID_T >
InArchiveoperator<< (InArchive &in_archive, const DualVertexRange< VID_T > &range)
 
template<typename OID_T , typename VID_T >
void serialize_idxer (std::unique_ptr< IOAdaptorBase > &writer, std::unique_ptr< IdxerBase< OID_T, VID_T >> &idxer)
 
template<typename OID_T , typename VID_T >
std::unique_ptr< IdxerBase< OID_T, VID_T > > deserialize_idxer (std::unique_ptr< IOAdaptorBase > &reader)
 
template<typename OID_T , typename VID_T >
std::unique_ptr< IdxerBase< OID_T, VID_T > > extend_indexer (std::unique_ptr< IdxerBase< OID_T, VID_T >> &&input, const std::vector< OID_T > &id_list, VID_T base)
 
IdxerType parse_idxer_type_name (const std::string &name)
 
PartitionerType parse_partitioner_type_name (const std::string &name)
 
template<typename OID_T >
void serialize_partitioner (std::unique_ptr< IOAdaptorBase > &writer, std::unique_ptr< IPartitioner< OID_T >> &partitioner)
 
template<typename OID_T >
std::unique_ptr< IPartitioner< OID_T > > deserialize_partitioner (std::unique_ptr< IOAdaptorBase > &reader)
 

Variables

const int kCoordinatorRank = 0
 
const char kSerializationVertexMapFilename [] = "vertex_map.s"
 
const char kSerializationFilenameFormat [] = "%s/frag_%d.s"
 

Detailed Description

Copyright 2020 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2022 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

NOLINT(legal/copyright)

The file utils/gcontainer.h is based on code from libcxx,

https://github.com/llvm-mirror/libcxx/blob/master/include/vector

which has the following license:

-*- C++ -*- ===---------------------------— vector -----------------------------—===//

Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. See https://llvm.org/LICENSE.txt for license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

===-------------------------------------------------------------------—===//

Typedef Documentation

◆ VertexVector

template<typename T >
using grape::VertexVector = typedef std::vector<Vertex<T> >

A discontinuous vertices collection representation. An increasing labeled(but no need to be continuous) vertices must be provided to construct the VertexVector.

Template Parameters
TVertex ID type.

Enumeration Type Documentation

◆ MessageStrategy

MessageStrategy specifies the method of message passing between fragments.

Assume in an edgecut distributed graph, we have an edge a->b, with vertex a on fragment_1 and b on fragment_2, and an edge a<-c with c on f_2.

for fragment_1, a is an inner_vertex and b', c' is outer_vertexs.

Enumerator
kAlongIncomingEdgeToOuterVertex 

from a to b;

kAlongEdgeToOuterVertex 

from c to a;

kSyncOnOuterVertex 

from a to b, a to c;

kGatherScatter 

from b' to b and c' to c;

Function Documentation

◆ atomic_add()

template<typename T >
void grape::atomic_add ( T &  a,
b 
)
inline

Atomic add a value. Equavalent to:

a += b;
Template Parameters
TType of the operands.
Parameters
aObject to process.
bValue to add.

◆ atomic_compare_and_swap()

template<typename T >
bool grape::atomic_compare_and_swap ( T &  val,
old_val,
new_val 
)
inline

Atomic compare and swap operation. Equavalent to:

if (val == old_val) {
val = new_val;
return true;
} else {
return false;
}
Template Parameters
TType of the operands.
Parameters
valObject to process.
old_valOld value to check.
new_valNew value to assign.
Returns
Whether the value has been changed.

◆ atomic_min()

template<typename T >
bool grape::atomic_min ( T &  a,
b 
)
inline

Atomic compare and store the minimum value. Equavalent to:

if (a > b) {
a = b;
return true;
} else {
return false;
}
Template Parameters
TType of the operands.
Parameters
aObject to process.
bValue to compare.
Returns
Whether the value has been changed.

◆ atomic_sub()

template<typename T >
void grape::atomic_sub ( T &  a,
b 
)
inline

Atomic sub a value. Equavalent to:

a -= b;
Template Parameters
TType of the operands.
Parameters
aObject to process.
bValue to sub.

◆ DistinctSort()

template<typename T >
void grape::DistinctSort ( std::vector< T > &  vec)

sort the target vector and eliminate the duplicated elements.

Template Parameters
T
Parameters
vecto be sorted.