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

Function assertQuregDeploysEnabledByEnv

quest/src/core/validation.cpp:1556–1565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1554}
1555
1556void assertQuregDeploysEnabledByEnv(int isDistrib, int isGpuAccel, int isMultithread, QuESTEnv env, const char* caller) {
1557
1558 // qureg cannot deploy to backend not already enabled by the environment
1559 if (!env.isDistributed)
1560 assertThat(isDistrib == 0 || isDistrib == modeflag::USE_AUTO, report::NEW_DISTRIB_QUREG_IN_NON_DISTRIB_ENV, caller);
1561 if (!env.isGpuAccelerated)
1562 assertThat(isGpuAccel == 0 || isGpuAccel == modeflag::USE_AUTO, report::NEW_GPU_QUREG_IN_NON_GPU_ACCEL_ENV, caller);
1563 if (!env.isMultithreaded)
1564 assertThat(isMultithread == 0 || isMultithread == modeflag::USE_AUTO, report::NEW_MULTITHREAD_QUREG_IN_NON_MULTITHREAD_ENV, caller);
1565}
1566
1567void assertQuregTotalNumAmpsDontExceedMaxIndex(int numQubits, int isDensMatr, const char* caller) {
1568

Callers 1

validate_newQuregParamsFunction · 0.85

Calls 1

assertThatFunction · 0.85

Tested by

no test coverage detected