| 534 | |
| 535 | |
| 536 | CompMatr 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 | |
| 549 | DiagMatr createInlineDiagMatr(int numQb, vector<qcomp> elems) { |
no test coverage detected