MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / cpu_deallocMatrix

Function cpu_deallocMatrix

quest/src/cpu/cpu_config.cpp:348–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346
347
348void 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
362qcomp*** cpu_allocMatrixList(qindex numRows, int numMatrices) {

Callers 1

cpu_deallocMatrixListFunction · 0.85

Calls 1

cpu_deallocArrayFunction · 0.85

Tested by

no test coverage detected