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

Function assertQuregDeployFlagsRecognised

quest/src/core/validation.cpp:1544–1554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1542}
1543
1544void assertQuregDeployFlagsRecognised(int isDensMatr, int isDistrib, int isGpuAccel, int isMultithread, const char* caller) {
1545
1546 // qureg type must be boolean
1547 assertThat(isDensMatr == 0 || isDensMatr == 1, report::INVALID_OPTION_FOR_QUREG_IS_DENSMATR, caller);
1548
1549 // deployment flags must be boolean or auto
1550 tokenSubs vars = {{"${AUTO_DEPLOYMENT_FLAG}", modeflag::USE_AUTO}};
1551 assertThat(isDistrib == 0 || isDistrib == 1 || isDistrib == modeflag::USE_AUTO, report::INVALID_OPTION_FOR_QUREG_IS_DISTRIB, vars, caller);
1552 assertThat(isGpuAccel == 0 || isGpuAccel == 1 || isGpuAccel == modeflag::USE_AUTO, report::INVALID_OPTION_FOR_QUREG_IS_GPU_ACCEL, vars, caller);
1553 assertThat(isMultithread == 0 || isMultithread == 1 || isMultithread == modeflag::USE_AUTO, report::INVALID_OPTION_FOR_QUREG_IS_MULTITHREAD, vars, caller);
1554}
1555
1556void assertQuregDeploysEnabledByEnv(int isDistrib, int isGpuAccel, int isMultithread, QuESTEnv env, const char* caller) {
1557

Callers 1

validate_newQuregParamsFunction · 0.85

Calls 1

assertThatFunction · 0.85

Tested by

no test coverage detected