Go to the source code of this file.
Functions | |
void | AllocateWorkSpace (ctrl_t *ctrl, graph_t *graph) |
void | AllocateRefinementWorkSpace (ctrl_t *ctrl, idx_t nbrpoolsize) |
void | FreeWorkSpace (ctrl_t *ctrl) |
void * | wspacemalloc (ctrl_t *ctrl, size_t nbytes) |
void | wspacepush (ctrl_t *ctrl) |
void | wspacepop (ctrl_t *ctrl) |
idx_t * | iwspacemalloc (ctrl_t *ctrl, idx_t n) |
real_t * | rwspacemalloc (ctrl_t *ctrl, idx_t n) |
ikv_t * | ikvwspacemalloc (ctrl_t *ctrl, idx_t n) |
void | cnbrpoolReset (ctrl_t *ctrl) |
idx_t | cnbrpoolGetNext (ctrl_t *ctrl, idx_t nnbrs) |
void | vnbrpoolReset (ctrl_t *ctrl) |
idx_t | vnbrpoolGetNext (ctrl_t *ctrl, idx_t nnbrs) |
Definition in file wspace.c.
This function allocates memory for the workspace
Definition at line 17 of file wspace.c.
References gk_mcoreCreate(), ctrl_t::mcore, METIS_OP_PMETIS, ctrl_t::nbrpoolcpos, ctrl_t::nbrpoolsize, graph_t::ncon, ctrl_t::nparts, graph_t::nvtxs, and ctrl_t::optype.
Referenced by METIS_ComputeVertexSeparator(), METIS_NodeND(), METIS_NodeNDP(), METIS_NodeRefine(), METIS_PartGraphKway(), METIS_PartGraphRecursive(), and MlevelKWayPartitioning().
This function allocates refinement-specific memory for the workspace
Definition at line 43 of file wspace.c.
References ctrl_t::adids, ctrl_t::adwgts, ctrl_t::cnbrpool, gk_errexit(), gk_malloc(), ctrl_t::maxnads, METIS_OBJTYPE_CUT, METIS_OBJTYPE_VOL, ctrl_t::minconn, ctrl_t::nads, ctrl_t::nbrpoolcpos, ctrl_t::nbrpoolreallocs, ctrl_t::nbrpoolsize, ctrl_t::nparts, ctrl_t::objtype, ctrl_t::pvec1, ctrl_t::pvec2, and ctrl_t::vnbrpool.
Referenced by MlevelKWayPartitioning().
void FreeWorkSpace | ( | ctrl_t * | ctrl | ) |
This function frees the workspace
Definition at line 80 of file wspace.c.
References ctrl_t::adids, ctrl_t::adwgts, ctrl_t::cnbrpool, ctrl_t::dbglvl, gk_free(), gk_mcoreDestroy(), ctrl_t::maxnads, ctrl_t::mcore, METIS_DBG_INFO, ctrl_t::minconn, ctrl_t::nads, ctrl_t::nbrpoolcpos, ctrl_t::nbrpoolreallocs, ctrl_t::nbrpoolsize, ctrl_t::nparts, ctrl_t::pvec1, ctrl_t::pvec2, and ctrl_t::vnbrpool.
Referenced by FreeCtrl(), and MlevelKWayPartitioning().
This function allocate space from the workspace/heap
Definition at line 108 of file wspace.c.
References gk_mcoreMalloc(), and ctrl_t::mcore.
Referenced by CheckKWayVolPartitionParams(), EliminateComponents(), FM_Mc2WayCutRefine(), ikvwspacemalloc(), iwspacemalloc(), McGeneral2WayBalance(), and rwspacemalloc().
void wspacepush | ( | ctrl_t * | ctrl | ) |
This function sets a marker in the stack of malloc ops to be used subsequently for freeing purposes
Definition at line 118 of file wspace.c.
References gk_mcorePush(), and ctrl_t::mcore.
void wspacepop | ( | ctrl_t * | ctrl | ) |
This function frees all mops since the last push
Definition at line 127 of file wspace.c.
References gk_mcorePop(), and ctrl_t::mcore.
This function allocate space from the core
Definition at line 136 of file wspace.c.
References wspacemalloc().
Referenced by Bnd2WayBalance(), BucketSortKeysInc(), ComputeBFSOrdering(), ComputeKWayVolGains(), ComputeSubDomainGraph(), ConstructMinCoverSeparator(), ConstructSeparator(), CreateCoarseGraph(), CreateCoarseGraphNoMask(), CreateCoarseGraphPerm(), EliminateComponents(), EliminateSubDomainEdges(), FM_2WayCutRefine(), FM_2WayNodeBalance(), FM_2WayNodeRefine1Sided(), FM_2WayNodeRefine1SidedP(), FM_2WayNodeRefine2Sided(), FM_2WayNodeRefine2SidedP(), FM_Mc2WayCutRefine(), General2WayBalance(), Greedy_KWayCutOptimize(), Greedy_KWayVolOptimize(), Greedy_McKWayCutOptimize(), Greedy_McKWayVolOptimize(), GrowBisection(), GrowBisectionNode(), GrowBisectionNode2(), Match_2HopAll(), Match_2HopAny(), Match_RM(), Match_SHEM(), McGeneral2WayBalance(), McGrowBisection(), McRandomBisection(), MlevelNestedDissectionCC(), MlevelNodeBisectionL2(), MlevelNodeBisectionMultiple(), MMDOrder(), MultilevelBisect(), ProjectKWayPartition(), RandomBisection(), SplitGraphOrder(), SplitGraphOrderCC(), and SplitGraphPart().
This function allocate space from the core
Definition at line 145 of file wspace.c.
References wspacemalloc().
Referenced by FM_Mc2WayCutRefine(), Greedy_McKWayCutOptimize(), Greedy_McKWayVolOptimize(), McGeneral2WayBalance(), and MlevelRecursiveBisection().
This function allocate space from the core
Definition at line 154 of file wspace.c.
References wspacemalloc().
Referenced by EliminateSubDomainEdges(), and Match_2HopAll().
void cnbrpoolReset | ( | ctrl_t * | ctrl | ) |
This function resets the cnbrpool
Definition at line 163 of file wspace.c.
References ctrl_t::nbrpoolcpos.
Referenced by ComputeKWayPartitionParams(), and ProjectKWayPartition().
This function gets the next free index from cnbrpool
Definition at line 172 of file wspace.c.
References ctrl_t::cnbrpool, gk_realloc(), ctrl_t::nbrpoolcpos, ctrl_t::nbrpoolreallocs, and ctrl_t::nbrpoolsize.
Referenced by ComputeKWayPartitionParams(), MoveGroupContigForCut(), MoveGroupMinConnForCut(), and ProjectKWayPartition().
void vnbrpoolReset | ( | ctrl_t * | ctrl | ) |
This function resets the vnbrpool
Definition at line 191 of file wspace.c.
References ctrl_t::nbrpoolcpos.
Referenced by ComputeKWayPartitionParams(), and ProjectKWayPartition().
This function gets the next free index from vnbrpool
Definition at line 200 of file wspace.c.
References gk_realloc(), ctrl_t::nbrpoolcpos, ctrl_t::nbrpoolreallocs, ctrl_t::nbrpoolsize, and ctrl_t::vnbrpool.
Referenced by ComputeKWayPartitionParams(), KWayVolUpdate(), MoveGroupContigForVol(), MoveGroupMinConnForVol(), and ProjectKWayPartition().