From 735bf55d792ef3e868740b21c457360cbdf84b77 Mon Sep 17 00:00:00 2001 From: Giovanni La Mura <giovanni.lamura@inaf.it> Date: Sun, 14 Jan 2024 15:31:44 +0100 Subject: [PATCH] Zero-init AM matrix --- src/cluster/cluster.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp index 5c1f96e7..92646598 100644 --- a/src/cluster/cluster.cpp +++ b/src/cluster/cluster.cpp @@ -116,7 +116,7 @@ void cluster(string config_file, string data_file, string output_path) { } C2 *c2 = new C2(nsph, max_ici, npnt, npntts); complex<double> **am = new complex<double>*[mxndm]; - for (int ai = 0; ai < mxndm; ai++) am[ai] = new complex<double>[mxndm]; + for (int ai = 0; ai < mxndm; ai++) am[ai] = new complex<double>[mxndm](); const int ndi = c4->nsph * c4->nlim; C9 *c9 = new C9(ndi, c4->nlem, 2 * ndi, 2 * c4->nlem); double *gaps = new double[nsph](); @@ -322,17 +322,9 @@ void cluster(string config_file, string data_file, string output_path) { } if (jer != 0) break; } // i132 loop - //printf("INFO: initializing matrix..."); cms(am, c1, c1ao, c4, c6); - //printf(" done.\n"); - //ccsam = summat(am, 960, 960); - //printf("DEBUG: after CMS CCSAM = (%lE,%lE)\n", ccsam.real(), ccsam.imag()); int ndit = 2 * nsph * c4->nlim; - //printf("INFO: inverting matrix..."); lucin(am, mxndm, ndit, jer); - //printf(" done.\n"); - //ccsam = summat(am, 960, 960); - //printf("DEBUG: after LUCIN CCSAM = (%lE,%lE)\n", ccsam.real(), ccsam.imag()); if (jer != 0) break; // jxi488 loop: goes to memory clean ztm(am, c1, c1ao, c4, c6, c9); if (sconf->idfc >= 0) { -- GitLab