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

Function assert_commBoundsAreValid

quest/src/core/errors.cpp:184–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void 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
198void assert_commPayloadIsPowerOf2(qindex numAmps) {
199

Callers 4

comm_exchangeSubBuffersFunction · 0.85
comm_asynchSendSubBufferFunction · 0.85

Calls 1

error_commOutOfBoundsFunction · 0.85

Tested by

no test coverage detected