GraphChi 0.1

- Main Page
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros
Classes | Typedefs | Enumerations | Functions
graphchi Namespace Reference

## Classes
struct | functional_kernel
class | functional_vertex_unweighted_bulksync
class | FunctionalProgramProxyBulkSync
struct | vertex_info
class | functional_vertex_unweighted_semisync
class | FunctionalProgramProxySemisync
class | graphchi_edge
class | internal_graphchi_vertex
class | graphchi_vertex
struct | graphchi_context
class | GraphChiProgram
class | ischeduler
class | VCallback
class | SumCallback
struct | degree
class | degree_data
class | vertex_data_store
class | bitset_scheduler
struct | created_edge
class | edge_buffer_flat
class | graphchi_dynamicgraph_engine
class | functional_engine
class | graphchi_engine
struct | PairContainer
struct | io_descriptor
struct | refcountptr
struct | iotask
struct | thrinfo
struct | stripe_chunk
struct | streaming_task
struct | pinned_file
class | stripedio
class | imetrics_reporter
struct | metrics_entry
class | metrics
class | basic_reporter
class | file_reporter
class | html_reporter
class | null_reporter
class | SharderPreprocessor
struct | vertex_degree
class | OrderByDegree
struct | edge_with_value
class | sharder
class | memory_shard
struct | sblock
struct | indexentry
class | sliding_shard
class | atomic
| atomic object toolkit More...
class | dense_bitset
class | mutex
class | conditional
class | semaphore
class | spinrwlock
class | rwlock
class | barrier
class | synchronized_queue
struct | vertex_value

## Typedefs
typedef uint32_t | vid_t
typedef mutex | spinlock
| if spinlock not supported, it is typedef it to a mutex.

## Enumerations
enum | BLOCK_ACTION { READ, WRITE }
enum | metrictype { REAL, INTEGER, TIME, STRING, VECTOR }
enum | ProcPhase { COMPUTE_INTERVALS = 1, SHOVEL = 2 }

## Functions
bool | shard_file_exists (std::string sname)
template<class KERNEL >
void | run_functional_unweighted_semisynchronous (std::string filename, int niters, metrics &_m)
template<class KERNEL >
void | run_functional_unweighted_synchronous (std::string filename, int niters, metrics &_m)
template<typename ET >
bool | eptr_less (const graphchi_edge< ET > &a, const graphchi_edge< ET > &b)
vid_t | translate_edge (vid_t rawid, bool &is_special)
vid_t | make_special (vid_t rawid)
bool | is_special (vid_t rawid)
template<typename VertexDataType >
void | foreach_vertices (std::string basefilename, vid_t fromv, vid_t tov, VCallback< VertexDataType > &callback)
template<typename VertexDataType , typename SumType >
SumType | sum_vertices (std::string base_filename, vid_t fromv, vid_t tov)
void | metrics_report (metrics &m)
template<typename ENGINE >
void | start_httpadmin (ENGINE *engine)
template<typename ENGINE >
void | addval (ENGINE *engine, std::string plotname, double val)
template<typename ENGINE >
void | update_plotdata (ENGINE *engine)
template<typename T >
void | parse (PairContainer< T > &x, const char *s)
template<typename T >
void | parse (T &x, const char *s)
template<typename EdgeDataType >
void | convert_edgelist (std::string inputfile, sharder< EdgeDataType > &sharderobj)
template<typename EdgeDataType >
void | convert_adjlist (std::string inputfile, sharder< EdgeDataType > &sharderobj)
template<typename EdgeDataType >
int | convert (std::string basefilename, std::string nshards_string, SharderPreprocessor< EdgeDataType > *preprocessor=NULL)
template<typename EdgeDataType >
int | convert_if_notexists (std::string basefilename, std::string nshards_string, SharderPreprocessor< EdgeDataType > *preprocessor=NULL)
bool | vertex_degree_less (const vertex_degree &a, const vertex_degree &b)
template<typename EdgeDataType >
bool | edge_t_src_less (const edge_with_value< EdgeDataType > &a, const edge_with_value< EdgeDataType > &b)
template<typename T >
bool | atomic_compare_and_swap (T &a, const T &oldval, const T &newval)
template<>
bool | atomic_compare_and_swap (double &a, const double &oldval, const double &newval)
template<>
bool | atomic_compare_and_swap (float &a, const float &oldval, const float &newval)
template<typename T >
void | atomic_exchange (T &a, T &b)
const std::string | whiteSpaces (" \f\n\r\t\v")
void | prefetch_range (void *addr, size_t len)
void | prefetch_range_write (void *addr, size_t len)
template<typename VertexDataType >
bool | vertex_value_greater (const vertex_value< VertexDataType > &a, const vertex_value< VertexDataType > &b)
template<typename VertexDataType >
std::vector< vertex_value < VertexDataType > > | get_top_vertices (std::string basefilename, int ntop)

## Detailed Description

Simple metrics reporter that dumps metrics to standard output.

Simple metrics reporter that dumps metrics to HTML

# TODO

Change all C-style IO to Unix-style IO.

## Function Documentation

template<typename T >

bool graphchi::atomic_compare_and_swap | ( | T & | a,
|  | const T & | oldval,
|  | const T & | newval
| ) |  |

atomic instruction that is equivalent to the following::

if a==oldval, then { \ a = newval; \ return true; \ } return false;

template<typename EdgeDataType >

int graphchi::convert | ( | std::string | basefilename,
|  | std::string | nshards_string,
|  | SharderPreprocessor< EdgeDataType > * | preprocessor = `NULL`
| ) |  |

Converts a graph input to shards. Preprocessing has several steps, see sharder.hpp for more information.

template<typename EdgeDataType >

void graphchi::convert_adjlist | ( | std::string | inputfile,
|  | sharder< EdgeDataType > & | sharderobj
| ) |  |

Converts a graph from adjacency list format. Edge values are not supported, and each edge gets the default value for the type. Self-edges are ignored.

template<typename EdgeDataType >

void graphchi::convert_edgelist | ( | std::string | inputfile,
|  | sharder< EdgeDataType > & | sharderobj
| ) |  |

Converts graph from an edge list format. Input may contain value for the edges. Self-edges are ignored.

template<typename VertexDataType >

std::vector<vertex_value<VertexDataType> > graphchi::get_top_vertices | ( | std::string | basefilename,
|  | int | ntop
| ) |  |

Reads the vertex data file and returns top N values. Vertex value type must be given as a template parameter. This method has been implemented in a manner to consume very little memory, i.e the whole file is not loaded into memory (unless ntop = nvertices).

Parameters:

  basefilename | name of the graph
  ntop | number of top values to return (if ntop is smaller than the total number of vertices, returns all in sorted order)

Returns:
  a vector of top ntop values

void graphchi::metrics_report | ( | metrics & | m | ) |

Helper for metrics.

template<typename T >

void graphchi::parse | ( | PairContainer< T > & | x,
|  | const char * | s
| ) |  |

Special templated parser for PairContainers.

template<class KERNEL >

void graphchi::run_functional_unweighted_semisynchronous | ( | std::string | filename,
|  | int | niters,
|  | metrics & | _m
| ) |  |

Run a functional kernel with unweighted edges. The semantics of this API are less well-defined than the standard one, because this API is "semi-synchronous". That is, inside a sub-interval, new values of neighbors are not observed, but next sub-interval will observe the new values.

See application "pagerank_functional" for an example.

Parameters:

  KERNEL | needs to be a class/struct that subclasses the functional_kernel
  filename | base filename
  nshards | number of shards
  niters | number of iterations to run
  _m | metrics object

template<class KERNEL >

void graphchi::run_functional_unweighted_synchronous | ( | std::string | filename,
|  | int | niters,
|  | metrics & | _m
| ) |  |

Run a functional kernel with unweighted edges in the bulk-synchronous model. Note: shards need to have space to store two values for each edge.

See application "pagerank_functional" for an example.

Parameters:

  filename | base filename
  nshards | number of shards
  niters | number of iterations to run
  _m | metrics object