| 346 | |
| 347 | |
| 348 | void cpu_deallocMatrix(qcomp** matrix, qindex dim) { |
| 349 | |
| 350 | // we attempt to deallocate every row (assuming the outer array was |
| 351 | // successfully allocated), regardless of whether they are actually |
| 352 | // allocated; it is legal to call free() on nullptr |
| 353 | |
| 354 | if (matrix != nullptr) |
| 355 | for (qindex r=0; r<dim; r++) |
| 356 | cpu_deallocArray(matrix[r]); |
| 357 | |
| 358 | free(matrix); |
| 359 | } |
| 360 | |
| 361 | |
| 362 | qcomp*** cpu_allocMatrixList(qindex numRows, int numMatrices) { |
no test coverage detected