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

Function mem_getEffectiveNumStateVecQubitsPerNode

quest/src/core/memory.cpp:239–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237
238
239int mem_getEffectiveNumStateVecQubitsPerNode(int numQubits, bool isDensMatr, int numNodes) {
240
241 // compute logs directly to avoid overflows (even though validation should preclude them)
242 qindex logNumAmpsTotal = ((isDensMatr)? 2 : 1) * numQubits;
243 qindex logNumAmpsPerNode = logNumAmpsTotal - logBase2(numNodes);
244 return logNumAmpsPerNode;
245}
246
247
248qindex mem_getTotalGlobalMemoryUsed(Qureg qureg) {

Calls 1

logBase2Function · 0.85

Tested by

no test coverage detected