| 182 | } |
| 183 | |
| 184 | void assert_commBoundsAreValid(Qureg qureg, qindex sendInd, qindex recvInd, qindex numAmps) { |
| 185 | |
| 186 | bool valid = ( |
| 187 | sendInd >= 0 && |
| 188 | recvInd >= 0 && |
| 189 | numAmps > 0 && |
| 190 | sendInd + numAmps <= qureg.numAmpsPerNode && |
| 191 | recvInd + numAmps <= qureg.numAmpsPerNode |
| 192 | ); |
| 193 | |
| 194 | if (!valid) |
| 195 | error_commOutOfBounds(); |
| 196 | } |
| 197 | |
| 198 | void assert_commPayloadIsPowerOf2(qindex numAmps) { |
| 199 |
no test coverage detected