| 534 | |
| 535 | |
| 536 | string 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 |
no test coverage detected