| 283 | } |
| 284 | |
| 285 | int 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 | |
| 296 | qindex util_getNextPowerOf2(qindex number) { |
| 297 |
no test coverage detected