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

Function createInlineCompMatr

quest/src/api/matrices.cpp:536–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534
535
536CompMatr createInlineCompMatr(int numQb, vector<vector<qcomp>> elems) {
537 validate_envIsInit(__func__);
538 validate_newCompMatrParams(numQb, __func__);
539 validate_matrixNumNewElems(numQb, elems, __func__);
540
541 // pre-validation gauranteed to pass, but malloc failures will trigger an error
542 // message specific to 'createCompMatr', rather than this 'inline' version. Alas!
543 CompMatr matr = createCompMatr(numQb);
544 setAndSyncDenseMatrElems(matr, elems);
545 return matr;
546}
547
548
549DiagMatr createInlineDiagMatr(int numQb, vector<qcomp> elems) {

Callers 2

SECTIONFunction · 0.85

Calls 5

validate_envIsInitFunction · 0.85
createCompMatrFunction · 0.85
setAndSyncDenseMatrElemsFunction · 0.85

Tested by

no test coverage detected