MCPcopy Create free account
hub / github.com/ParAlg/gbbs / writeArrayToStream

Function writeArrayToStream

utils/generators/torus.cc:105–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104template <class T>
105void writeArrayToStream(ofstream& os, T* A, long n) {
106 long BSIZE = 1000000;
107 long offset = 0;
108 while (offset < n) {
109 // Generates a string for a sequence of size at most BSIZE
110 // and then wrties it to the output stream
111 std::cout << "Writing offset = " << offset << std::endl;
112 _seq<char> S = benchIO::arrayToString(A + offset, min(BSIZE, n - offset));
113 os.write(S.A, S.n);
114 S.del();
115 offset += BSIZE;
116 }
117}
118
119void graph2DTorus(uintE n, char* fname) {
120 uintE dn = round(pow((float)n, 1.0 / 2.0));

Callers 4

graph2DTorusFunction · 0.70
graph3DTorusFunction · 0.70
graph3DTorusWghFunction · 0.70
graph3DTorus27Function · 0.70

Calls 2

arrayToStringFunction · 0.85
delMethod · 0.45

Tested by

no test coverage detected