| 187 | // type T can be CompMatr, DiagMatr or FullStateDiagMatr |
| 188 | template <class T> |
| 189 | void setInitialHeapFlags(T matr) { |
| 190 | |
| 191 | // set initial propreties of the newly created matrix to unknown |
| 192 | util_setFlagToUnknown(matr.isApproxUnitary); |
| 193 | util_setFlagToUnknown(matr.isApproxHermitian); |
| 194 | |
| 195 | // only diagonal matrices (which can be exponentiated) |
| 196 | // have these additional fields |
| 197 | if constexpr (!util_isDenseMatrixType<T>()) { |
| 198 | util_setFlagToUnknown(matr.isApproxNonZero); |
| 199 | util_setFlagToUnknown(matr.isStrictlyNonNegative); |
| 200 | } |
| 201 | |
| 202 | // indicate that GPU memory has not yet been synchronised |
| 203 | *(matr.wasGpuSynced) = 0; |
| 204 | } |
| 205 | |
| 206 | |
| 207 |
no test coverage detected