20 #ifndef GALOIS_GRAPHS_READGRAPH_H
21 #define GALOIS_GRAPHS_READGRAPH_H
23 #include "galois/config.h"
37 template <
typename GraphTy,
typename... Args>
39 typename GraphTy::read_tag tag;
43 template <
typename GraphTy>
45 const std::string& filename,
46 const bool readUnweighted =
false) {
52 f.fromFileInterleaved<
void>(filename);
54 f.fromFileInterleaved<
typename GraphTy::file_edge_data_type>(filename);
59 template <
typename GraphTy>
72 template <
typename GraphTy>
74 const bool readUnweighted =
false) {
75 graph.allocateFrom(f);
81 template <
typename GraphTy,
typename Aux>
89 graph.constructNodesFrom(
f, tid, total,
aux);
93 template <
typename GraphTy,
typename Aux>
101 graph.constructEdgesFrom(
f, tid, total,
aux);
105 template <
typename GraphTy>
107 const std::string& filename) {
109 f.fromFileInterleaved<
typename GraphTy::file_edge_data_type>(filename);
113 template <
typename GraphTy>
115 typedef typename GraphTy::ReadGraphAuxData Aux;
118 graph.allocateFrom(f, aux);
127 template <
typename GraphTy,
typename Aux>
135 graph.constructOutEdgesFrom(
f, tid, total,
aux);
139 template <
typename GraphTy,
typename Aux>
147 graph.constructInEdgesFrom(
f, tid, total,
aux);
151 template <
typename GraphTy>
154 typedef typename GraphTy::ReadGraphAuxData Aux;
155 constexpr
static const bool profile =
false;
159 Aux* auxPtr =
new Aux;
160 graph.allocateFrom(f, *auxPtr);
187 template <
typename GraphTy>
189 const std::string& filename) {
191 f.fromFileInterleaved<
typename GraphTy::file_edge_data_type>(filename);
195 template <
typename GraphTy>
197 const std::string& f1,
const std::string& f2) {
198 graph.createAsymmetric();
200 typename GraphTy::out_graph_type::read_tag tag1;
203 typename GraphTy::in_graph_type::read_tag tag2;
207 template <
typename GraphTy>
210 graph.createAsymmetric();
212 typename GraphTy::out_graph_type::read_tag tag1;
215 typename GraphTy::in_graph_type::read_tag tag2;
219 template <
typename GraphTy>
221 typename GraphTy::out_graph_type::read_tag tag1;
225 template <
typename GraphTy>
227 const std::string& f1) {
228 typename GraphTy::out_graph_type::read_tag tag1;
Aux & aux
Definition: ReadGraph.h:97
FileGraph & f
Definition: ReadGraph.h:62
GraphTy & graph
Definition: ReadGraph.h:129
GraphTy & graph
Definition: ReadGraph.h:95
GraphTy & graph
Definition: ReadGraph.h:61
Contains FileGraph and FileGraphWriter class declarations.
GraphTy & graph
Definition: ReadGraph.h:83
Definition: ReadGraph.h:60
ReadGraphConstructOutEdgesFrom(GraphTy &g, FileGraph &_f, Aux &a)
Definition: ReadGraph.h:132
void operator()(unsigned tid, unsigned total)
Definition: ReadGraph.h:134
ReadGraphConstructFrom(GraphTy &g, FileGraph &_f)
Definition: ReadGraph.h:64
void readGraph(GraphTy &graph, Args &&...args)
Allocates and constructs a graph from a file.
Definition: ReadGraph.h:38
void readGraphDispatch(GraphTy &graph, read_oc_immutable_edge_graph_tag, Args &&...args)
Definition: OCGraph.h:587
FileGraph & f
Definition: ReadGraph.h:130
FileGraph & f
Definition: ReadGraph.h:96
void operator()(unsigned tid, unsigned total)
Definition: ReadGraph.h:100
void operator()(unsigned tid, unsigned total)
Definition: ReadGraph.h:67
ReadGraphConstructFrom(GraphTy &g, FileGraph &_f, bool _readUnweighted)
Definition: ReadGraph.h:65
ReadGraphConstructEdgesFrom(GraphTy &g, FileGraph &_f, Aux &a)
Definition: ReadGraph.h:98
bool readUnweighted
Definition: ReadGraph.h:63
Aux & aux
Definition: ReadGraph.h:131
void operator()(unsigned tid, unsigned total)
Definition: ReadGraph.h:88
FileGraph & f
Definition: ReadGraph.h:84
Aux & aux
Definition: ReadGraph.h:143
Definition: ReadGraph.h:94
Aux & aux
Definition: ReadGraph.h:85
FileGraph & f
Definition: ReadGraph.h:142
void start()
Definition: Timer.cpp:82
void on_each(FunctionTy &&fn, const Args &...args)
Low-level parallel loop.
Definition: Loops.h:86
ReadGraphConstructInEdgesFrom(GraphTy &g, FileGraph &_f, Aux &a)
Definition: ReadGraph.h:144
void operator()(unsigned tid, unsigned total)
Definition: ReadGraph.h:146
Definition: ReadGraph.h:82
Graph that mmaps Galois gr files for access.
Definition: FileGraph.h:57
GraphTy & graph
Definition: ReadGraph.h:141
Definition: ReadGraph.h:140
void stop()
Definition: Timer.cpp:87
ReadGraphConstructNodesFrom(GraphTy &g, FileGraph &_f, Aux &a)
Definition: ReadGraph.h:86
Definition: ReadGraph.h:128