| 103 | |
| 104 | template <class T> |
| 105 | void 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 | |
| 119 | void graph2DTorus(uintE n, char* fname) { |
| 120 | uintE dn = round(pow((float)n, 1.0 / 2.0)); |
no test coverage detected