| 177 | // type T can be CompMatr, DiagMatr or FullStateDiagMatr |
| 178 | template <class T> |
| 179 | void validateMatrixAllocs(T matr, const char* caller) { |
| 180 | |
| 181 | // free memory before throwing validation error to avoid memory leaks |
| 182 | freeAllMemoryIfAnyAllocsFailed(matr); |
| 183 | validate_newMatrixAllocs(matr, caller); |
| 184 | } |
| 185 | |
| 186 | |
| 187 | // type T can be CompMatr, DiagMatr or FullStateDiagMatr |
no test coverage detected