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

Function util_getRankContainingColumn

quest/src/core/utilities.cpp:285–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285int util_getRankContainingColumn(Qureg qureg, qindex globalCol) {
286 assert_utilsGivenDensMatr(qureg);
287
288 /// when not distributed, root contains the column (as incidentally do all nodes)
289 if (!qureg.isDistributed)
290 return ROOT_RANK;
291
292 qindex numColsPerNode = powerOf2(qureg.logNumColsPerNode);
293 return globalCol / numColsPerNode; // floors
294}
295
296qindex util_getNextPowerOf2(qindex number) {
297

Callers 1

setColumnLabelsToRanksFunction · 0.85

Calls 2

powerOf2Function · 0.85

Tested by

no test coverage detected