| 97 | |
| 98 | |
| 99 | void demo_createInlineCompMatr() { |
| 100 | |
| 101 | // inline literal |
| 102 | CompMatr a = createInlineCompMatr(2, { |
| 103 | {1,2,3_i,4}, |
| 104 | {4,5,6,7}, |
| 105 | {9,8,7,6}, |
| 106 | {1_i,2_i,0,0} |
| 107 | }); |
| 108 | reportCompMatr(a); |
| 109 | destroyCompMatr(a); |
| 110 | |
| 111 | // existing vector (C++ only) |
| 112 | vector<vector<qcomp>> elems = { |
| 113 | {1,2}, |
| 114 | {3,4} |
| 115 | }; |
| 116 | CompMatr b = createInlineCompMatr(1, elems); |
| 117 | reportCompMatr(b); |
| 118 | destroyCompMatr(b); |
| 119 | |
| 120 | // must specify every element (unlike in C) otherwise runtime validation is triggered |
| 121 | } |
| 122 | |
| 123 | |
| 124 | void demo_setInlineCompMatr() { |
no test coverage detected