| 357 | // type T can be CompMatr, DiagMatr or FullStateDiagMatr |
| 358 | template <class T> |
| 359 | void validateAndSyncMatrix(T matr, const char* caller) { |
| 360 | validate_matrixFields(matr, caller); |
| 361 | |
| 362 | // optionally overwrite GPU elements with user-modified CPU elements |
| 363 | if (mem_isAllocated(util_getGpuMemPtr(matr))) |
| 364 | gpu_copyCpuToGpu(matr); |
| 365 | |
| 366 | markMatrixAsSynced(matr); |
| 367 | } |
| 368 | |
| 369 | |
| 370 | // de-mangled for both C++ and C compatibility |
no test coverage detected