MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / printDistributionInfo

Function printDistributionInfo

quest/src/api/qureg.cpp:219–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217
218
219void printDistributionInfo(Qureg qureg) {
220
221 using namespace printer_substrings;
222
223 // not applicable when not distributed
224 string nodesStr = na;
225 string ampsStr = na;
226 string colsStr = na;
227
228 // 2^N = M per node
229 if (qureg.isDistributed) {
230 nodesStr = bt + printer_toStr(qureg.logNumNodes) + eq + printer_toStr(qureg.numNodes);
231 ampsStr = bt + printer_toStr(qureg.logNumAmpsPerNode) + eq + printer_toStr(qureg.numAmpsPerNode) + pn;
232 if (qureg.isDensityMatrix)
233 colsStr = bt + printer_toStr(qureg.logNumColsPerNode) + eq + printer_toStr(powerOf2(qureg.logNumColsPerNode)) + pn;
234 }
235
236 print_table(
237 "distribution", {
238 {"numNodes", nodesStr},
239 {"numCols", colsStr},
240 {"numAmps", ampsStr},
241 });
242}
243
244
245void printMemoryInfo(Qureg qureg) {

Callers 1

reportQuregParamsFunction · 0.70

Calls 3

powerOf2Function · 0.85
print_tableFunction · 0.85
printer_toStrFunction · 0.50

Tested by

no test coverage detected