From deab695294e0001f35385019ff3c49dfbfc675d5 Mon Sep 17 00:00:00 2001 From: StefanoPetrilli Date: Sat, 25 Jun 2022 12:10:14 -0500 Subject: [PATCH] Refactoring Initialization --- amgprec/impl/aggregator/MatchBoxPC.h | 3 +- ...mEdgesLinearSearchMesgBndlSmallMateCMP.cpp | 66 ++----------------- amgprec/impl/aggregator/initialize.cpp | 44 ++++++++++++- 3 files changed, 49 insertions(+), 64 deletions(-) diff --git a/amgprec/impl/aggregator/MatchBoxPC.h b/amgprec/impl/aggregator/MatchBoxPC.h index 9b0218bc..f1cb257a 100644 --- a/amgprec/impl/aggregator/MatchBoxPC.h +++ b/amgprec/impl/aggregator/MatchBoxPC.h @@ -180,6 +180,7 @@ inline void initialize(MilanLongInt NLVer, MilanLongInt NLEdge, MilanLongInt* numGhostEdgesPtr, MilanLongInt* numGhostVerticesPtr, MilanLongInt* insertMePtr, + MilanLongInt* S, MilanLongInt* verLocInd, MilanLongInt* verLocPtr, omp_lock_t* MateLock, @@ -194,7 +195,7 @@ inline void initialize(MilanLongInt NLVer, MilanLongInt NLEdge, vector& QGhostVtx, vector& QMsgType, vector& QOwner, - MilanLongInt* candidateMate, + MilanLongInt* &candidateMate, staticQueue& U ); diff --git a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp index dc3606c3..174eb578 100644 --- a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp +++ b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP.cpp @@ -170,7 +170,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP( MilanLongInt NumMessagesBundled = 0; MilanInt ghostOwner = 0; // Changed by Fabio to be an integer, addresses needs to be integers! - MilanLongInt* candidateMate = new MilanLongInt[1]; + MilanLongInt* candidateMate = nullptr; #ifdef PRINT_DEBUG_INFO_ cout<<"\n("<& QGhostVtx, vector& QMsgType, vector& QOwner, - MilanLongInt* candidateMate, + MilanLongInt* &candidateMate, staticQueue& U ) { @@ -233,7 +234,48 @@ inline void initialize(MilanLongInt NLVer, MilanLongInt NLEdge, } // end of single region +#ifdef PRINT_DEBUG_INFO_ +cout<<"\n("<