| 335 | // type T can be CompMatr, DiagMatr or FullStateDiagMatr |
| 336 | template <class T> |
| 337 | void markMatrixAsSynced(T matr) { |
| 338 | |
| 339 | // indicate that the matrix is now permanently GPU synchronised, even |
| 340 | // if we are not in GPU-accelerated mode (in which case it's never consulted) |
| 341 | *(matr.wasGpuSynced) = 1; |
| 342 | |
| 343 | // indicate that we do not know the revised matrix properties; |
| 344 | // we defer establishing that until validation needs to check them |
| 345 | util_setFlagToUnknown(matr.isApproxUnitary); |
| 346 | util_setFlagToUnknown(matr.isApproxHermitian); |
| 347 | |
| 348 | // only diagonal matrices (which can be exponentiated) |
| 349 | // have these additional fields |
| 350 | if constexpr (!util_isDenseMatrixType<T>()) { |
| 351 | util_setFlagToUnknown(matr.isApproxNonZero); |
| 352 | util_setFlagToUnknown(matr.isStrictlyNonNegative); |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | |
| 357 | // type T can be CompMatr, DiagMatr or FullStateDiagMatr |
no test coverage detected