@ -178,7 +178,6 @@ extern "C"
# define MilanRealMin MINUS_INFINITY
# define MilanRealMin MINUS_INFINITY
# endif
# endif
# ifdef OPENMP
/* These functions are only used in the experimental OMP implementation, if that
/* These functions are only used in the experimental OMP implementation, if that
is disabled there is no reason to actually compile or reference them . */
is disabled there is no reason to actually compile or reference them . */
@ -186,11 +185,12 @@ is disabled there is no reason to actually compile or reference them. */
MilanInt findOwnerOfGhost ( MilanLongInt vtxIndex , MilanLongInt * mVerDistance ,
MilanInt findOwnerOfGhost ( MilanLongInt vtxIndex , MilanLongInt * mVerDistance ,
MilanInt myRank , MilanInt numProcs ) ;
MilanInt myRank , MilanInt numProcs ) ;
MilanLongInt firstComputeCandidateMate ( MilanLongInt adj1 ,
MilanLongInt firstComputeCandidateMate D ( MilanLongInt adj1 ,
MilanLongInt adj2 ,
MilanLongInt adj2 ,
MilanLongInt * verLocInd ,
MilanLongInt * verLocInd ,
MilanReal * edgeLocWeight ) ;
MilanReal * edgeLocWeight ) ;
void queuesTransfer ( vector < MilanLongInt > & U ,
void queuesTransfer ( vector < MilanLongInt > & U ,
vector < MilanLongInt > & privateU ,
vector < MilanLongInt > & privateU ,
vector < MilanLongInt > & QLocalVtx ,
vector < MilanLongInt > & QLocalVtx ,
@ -209,7 +209,7 @@ is disabled there is no reason to actually compile or reference them. */
MilanLongInt * Mate ,
MilanLongInt * Mate ,
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ) ;
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ) ;
MilanLongInt computeCandidateMate ( MilanLongInt adj1 ,
MilanLongInt computeCandidateMate D ( MilanLongInt adj1 ,
MilanLongInt adj2 ,
MilanLongInt adj2 ,
MilanReal * edgeLocWeight ,
MilanReal * edgeLocWeight ,
MilanLongInt k ,
MilanLongInt k ,
@ -260,14 +260,14 @@ is disabled there is no reason to actually compile or reference them. */
MilanLongInt NumMessagesBundled ,
MilanLongInt NumMessagesBundled ,
MilanReal * msgPercent ) ;
MilanReal * msgPercent ) ;
void PARALLEL_COMPUTE_CANDIDATE_MATE_B ( MilanLongInt NLVer ,
void PARALLEL_COMPUTE_CANDIDATE_MATE_B D ( MilanLongInt NLVer ,
MilanLongInt * verLocPtr ,
MilanLongInt * verLocPtr ,
MilanLongInt * verLocInd ,
MilanLongInt * verLocInd ,
MilanInt myRank ,
MilanInt myRank ,
MilanReal * edgeLocWeight ,
MilanReal * edgeLocWeight ,
MilanLongInt * candidateMate ) ;
MilanLongInt * candidateMate ) ;
void PARALLEL_PROCESS_EXPOSED_VERTEX_B ( MilanLongInt NLVer ,
void PARALLEL_PROCESS_EXPOSED_VERTEX_B D ( MilanLongInt NLVer ,
MilanLongInt * candidateMate ,
MilanLongInt * candidateMate ,
MilanLongInt * verLocInd ,
MilanLongInt * verLocInd ,
MilanLongInt * verLocPtr ,
MilanLongInt * verLocPtr ,
@ -300,7 +300,7 @@ is disabled there is no reason to actually compile or reference them. */
void PROCESS_CROSS_EDGE ( MilanLongInt * edge ,
void PROCESS_CROSS_EDGE ( MilanLongInt * edge ,
MilanLongInt * SPtr ) ;
MilanLongInt * SPtr ) ;
void processMatchedVertices (
void processMatchedVertices D (
MilanLongInt NLVer ,
MilanLongInt NLVer ,
vector < MilanLongInt > & UChunkBeingProcessed ,
vector < MilanLongInt > & UChunkBeingProcessed ,
vector < MilanLongInt > & U ,
vector < MilanLongInt > & U ,
@ -332,7 +332,7 @@ is disabled there is no reason to actually compile or reference them. */
vector < MilanLongInt > & privateQMsgType ,
vector < MilanLongInt > & privateQMsgType ,
vector < MilanInt > & privateQOwner ) ;
vector < MilanInt > & privateQOwner ) ;
void processMatchedVerticesAndSendMessages (
void processMatchedVerticesAndSendMessages D (
MilanLongInt NLVer ,
MilanLongInt NLVer ,
vector < MilanLongInt > & UChunkBeingProcessed ,
vector < MilanLongInt > & UChunkBeingProcessed ,
vector < MilanLongInt > & U ,
vector < MilanLongInt > & U ,
@ -387,7 +387,7 @@ is disabled there is no reason to actually compile or reference them. */
vector < MPI_Request > & SRequest ,
vector < MPI_Request > & SRequest ,
vector < MPI_Status > & SStatus ) ;
vector < MPI_Status > & SStatus ) ;
void processMessages (
void processMessages D (
MilanLongInt NLVer ,
MilanLongInt NLVer ,
MilanLongInt * Mate ,
MilanLongInt * Mate ,
MilanLongInt * candidateMate ,
MilanLongInt * candidateMate ,
@ -419,6 +419,153 @@ is disabled there is no reason to actually compile or reference them. */
vector < MilanLongInt > & U ,
vector < MilanLongInt > & U ,
vector < MilanLongInt > & privateU ) ;
vector < MilanLongInt > & privateU ) ;
MilanLongInt firstComputeCandidateMateS ( MilanLongInt adj1 ,
MilanLongInt adj2 ,
MilanLongInt * verLocInd ,
MilanFloat * edgeLocWeight ) ;
MilanLongInt computeCandidateMateS ( MilanLongInt adj1 ,
MilanLongInt adj2 ,
MilanFloat * edgeLocWeight ,
MilanLongInt k ,
MilanLongInt * verLocInd ,
MilanLongInt StartIndex ,
MilanLongInt EndIndex ,
vector < MilanLongInt > & GMate ,
MilanLongInt * Mate ,
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ) ;
void PARALLEL_COMPUTE_CANDIDATE_MATE_BS ( MilanLongInt NLVer ,
MilanLongInt * verLocPtr ,
MilanLongInt * verLocInd ,
MilanInt myRank ,
MilanFloat * edgeLocWeight ,
MilanLongInt * candidateMate ) ;
void PARALLEL_PROCESS_EXPOSED_VERTEX_BS ( MilanLongInt NLVer ,
MilanLongInt * candidateMate ,
MilanLongInt * verLocInd ,
MilanLongInt * verLocPtr ,
MilanLongInt StartIndex ,
MilanLongInt EndIndex ,
MilanLongInt * Mate ,
vector < MilanLongInt > & GMate ,
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ,
MilanFloat * edgeLocWeight ,
MilanLongInt * myCardPtr ,
MilanLongInt * msgIndPtr ,
MilanLongInt * NumMessagesBundledPtr ,
MilanLongInt * SPtr ,
MilanLongInt * verDistance ,
MilanLongInt * PCounter ,
vector < MilanLongInt > & Counter ,
MilanInt myRank ,
MilanInt numProcs ,
vector < MilanLongInt > & U ,
vector < MilanLongInt > & privateU ,
vector < MilanLongInt > & QLocalVtx ,
vector < MilanLongInt > & QGhostVtx ,
vector < MilanLongInt > & QMsgType ,
vector < MilanInt > & QOwner ,
vector < MilanLongInt > & privateQLocalVtx ,
vector < MilanLongInt > & privateQGhostVtx ,
vector < MilanLongInt > & privateQMsgType ,
vector < MilanInt > & privateQOwner ) ;
void processMatchedVerticesS (
MilanLongInt NLVer ,
vector < MilanLongInt > & UChunkBeingProcessed ,
vector < MilanLongInt > & U ,
vector < MilanLongInt > & privateU ,
MilanLongInt StartIndex ,
MilanLongInt EndIndex ,
MilanLongInt * myCardPtr ,
MilanLongInt * msgIndPtr ,
MilanLongInt * NumMessagesBundledPtr ,
MilanLongInt * SPtr ,
MilanLongInt * verLocPtr ,
MilanLongInt * verLocInd ,
MilanLongInt * verDistance ,
MilanLongInt * PCounter ,
vector < MilanLongInt > & Counter ,
MilanInt myRank ,
MilanInt numProcs ,
MilanLongInt * candidateMate ,
vector < MilanLongInt > & GMate ,
MilanLongInt * Mate ,
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ,
MilanFloat * edgeLocWeight ,
vector < MilanLongInt > & QLocalVtx ,
vector < MilanLongInt > & QGhostVtx ,
vector < MilanLongInt > & QMsgType ,
vector < MilanInt > & QOwner ,
vector < MilanLongInt > & privateQLocalVtx ,
vector < MilanLongInt > & privateQGhostVtx ,
vector < MilanLongInt > & privateQMsgType ,
vector < MilanInt > & privateQOwner ) ;
void processMatchedVerticesAndSendMessagesS (
MilanLongInt NLVer ,
vector < MilanLongInt > & UChunkBeingProcessed ,
vector < MilanLongInt > & U ,
vector < MilanLongInt > & privateU ,
MilanLongInt StartIndex ,
MilanLongInt EndIndex ,
MilanLongInt * myCardPtr ,
MilanLongInt * msgIndPtr ,
MilanLongInt * NumMessagesBundledPtr ,
MilanLongInt * SPtr ,
MilanLongInt * verLocPtr ,
MilanLongInt * verLocInd ,
MilanLongInt * verDistance ,
MilanLongInt * PCounter ,
vector < MilanLongInt > & Counter ,
MilanInt myRank ,
MilanInt numProcs ,
MilanLongInt * candidateMate ,
vector < MilanLongInt > & GMate ,
MilanLongInt * Mate ,
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ,
MilanFloat * edgeLocWeight ,
vector < MilanLongInt > & QLocalVtx ,
vector < MilanLongInt > & QGhostVtx ,
vector < MilanLongInt > & QMsgType ,
vector < MilanInt > & QOwner ,
vector < MilanLongInt > & privateQLocalVtx ,
vector < MilanLongInt > & privateQGhostVtx ,
vector < MilanLongInt > & privateQMsgType ,
vector < MilanInt > & privateQOwner ,
MPI_Comm comm ,
MilanLongInt * msgActual ,
vector < MilanLongInt > & Message ) ;
void processMessagesS (
MilanLongInt NLVer ,
MilanLongInt * Mate ,
MilanLongInt * candidateMate ,
map < MilanLongInt , MilanLongInt > & Ghost2LocalMap ,
vector < MilanLongInt > & GMate ,
vector < MilanLongInt > & Counter ,
MilanLongInt StartIndex ,
MilanLongInt EndIndex ,
MilanLongInt * myCardPtr ,
MilanLongInt * msgIndPtr ,
MilanLongInt * msgActualPtr ,
MilanFloat * edgeLocWeight ,
MilanLongInt * verDistance ,
MilanLongInt * verLocPtr ,
MilanLongInt k ,
MilanLongInt * verLocInd ,
MilanInt numProcs ,
MilanInt myRank ,
MPI_Comm comm ,
vector < MilanLongInt > & Message ,
MilanLongInt numGhostEdges ,
MilanLongInt u ,
MilanLongInt v ,
MilanLongInt * SPtr ,
vector < MilanLongInt > & U ) ;
void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP (
void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP (
MilanLongInt NLVer , MilanLongInt NLEdge ,
MilanLongInt NLVer , MilanLongInt NLEdge ,
MilanLongInt * verLocPtr , MilanLongInt * verLocInd , MilanReal * edgeLocWeight ,
MilanLongInt * verLocPtr , MilanLongInt * verLocInd , MilanReal * edgeLocWeight ,
@ -428,14 +575,19 @@ is disabled there is no reason to actually compile or reference them. */
MilanLongInt * msgIndSent , MilanLongInt * msgActualSent , MilanReal * msgPercent ,
MilanLongInt * msgIndSent , MilanLongInt * msgActualSent , MilanReal * msgPercent ,
MilanReal * ph0_time , MilanReal * ph1_time , MilanReal * ph2_time ,
MilanReal * ph0_time , MilanReal * ph1_time , MilanReal * ph2_time ,
MilanLongInt * ph1_card , MilanLongInt * ph2_card ) ;
MilanLongInt * ph1_card , MilanLongInt * ph2_card ) ;
# endif
# ifndef OPENMP
void salgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP (
//Function of find the owner of a ghost vertex using binary search:
MilanLongInt NLVer , MilanLongInt NLEdge ,
inline MilanInt findOwnerOfGhost ( MilanLongInt vtxIndex , MilanLongInt * mVerDistance ,
MilanLongInt * verLocPtr , MilanLongInt * verLocInd , MilanFloat * edgeLocWeight ,
MilanInt myRank , MilanInt numProcs ) ;
MilanLongInt * verDistance ,
# endif
MilanLongInt * Mate ,
MilanInt myRank , MilanInt numProcs , MPI_Comm comm ,
MilanLongInt * msgIndSent , MilanLongInt * msgActualSent , MilanReal * msgPercent ,
MilanReal * ph0_time , MilanReal * ph1_time , MilanReal * ph2_time ,
MilanLongInt * ph1_card , MilanLongInt * ph2_card ) ;
void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC (
void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC (
MilanLongInt NLVer , MilanLongInt NLEdge ,
MilanLongInt NLVer , MilanLongInt NLEdge ,