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

Function util_getRankContainingIndex

quest/src/core/utilities.cpp:267–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267int util_getRankContainingIndex(Qureg qureg, qindex globalInd) {
268
269 // when not distributed, root contains the index (as incidentally do all nodes)
270 if (!qureg.isDistributed)
271 return ROOT_RANK;
272
273 // accepts flat density matrix index too
274 return globalInd / qureg.numAmpsPerNode; // floors
275}
276int util_getRankContainingIndex(FullStateDiagMatr matr, qindex globalInd) {
277
278 // when not distributed, root contains the index (as incidentally do all nodes)

Callers 2

setRowLabelsToRanksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected