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

Function getNumMatrixElemsStr

quest/src/core/printer.cpp:520–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518
519
520string getNumMatrixElemsStr(qindex dim, bool isDiag, int numNodes) {
521
522 // we do not bother handling the dim=1 non-plural case, because it
523 // never occurs! We always receive power-of-2 dimension matrices
524
525 // e.g. "2 qcomps" or "2x2 qcomps"
526 string out = (isDiag? toStr(dim) : getProductStr(dim, dim)) + " qcomps"; // never non-plural
527
528 // FullStateDiagMatr may be distributed over >1 numNodes (for other matrix types, numNodes=1 always)
529 if (numNodes > 1)
530 out += " over " + toStr(numNodes) + " nodes";
531
532 return out;
533}
534
535
536string getMemoryCostsStr(size_t numBytesPerNode, bool isDistrib, bool isGpu) {

Callers 2

printMatrixHeaderFunction · 0.85
print_headerFunction · 0.85

Calls 2

toStrFunction · 0.85
getProductStrFunction · 0.85

Tested by

no test coverage detected