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

Function getMemoryCostsStr

quest/src/core/printer.cpp:536–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534
535
536string getMemoryCostsStr(size_t numBytesPerNode, bool isDistrib, bool isGpu) {
537
538 using namespace printer_substrings;
539
540 // when data is GPU-accelerated, we report all memory as being
541 // in the GPU; this isn't exactly true, since the GPU VRAM will
542 // not contain struct fields nor KrausMap matrices. However,
543 // the difference is tiny and unimportant, and shrinks exponentially
544 // (or quadratically, for KrausMap) with increasing number of qubits
545
546 string mem = printer_getMemoryWithUnitStr(numBytesPerNode);
547
548 if (isDistrib && isGpu)
549 return mem + pg;
550 if (isDistrib)
551 return mem + pn;
552 if (isGpu)
553 return mem + ig;
554
555 return mem;
556}
557
558
559

Callers 2

printMatrixHeaderFunction · 0.85
print_headerFunction · 0.85

Calls 1

Tested by

no test coverage detected