PPL Logo

libs/ck-libs/metis/libmetis/wspace.c File Reference

Functions dealing with memory allocation and workspace management. More...

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_tiwspacemalloc (ctrl_t *ctrl, idx_t n)
real_trwspacemalloc (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)


Detailed Description

Functions dealing with memory allocation and workspace management.

Date:
Started 2/24/96
Author:
George

Copyright 1997-2009, Regents of the University of Minnesota

Version:
Id
wspace.c 10492 2011-07-06 09:28:42Z karypis

Definition in file wspace.c.


Function Documentation

void AllocateWorkSpace ( ctrl_t ctrl,
graph_t graph 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void AllocateRefinementWorkSpace ( ctrl_t ctrl,
idx_t  nbrpoolsize 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void* wspacemalloc ( ctrl_t ctrl,
size_t  nbytes 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

idx_t* iwspacemalloc ( ctrl_t ctrl,
idx_t  n 
)

real_t* rwspacemalloc ( ctrl_t ctrl,
idx_t  n 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

ikv_t* ikvwspacemalloc ( ctrl_t ctrl,
idx_t  n 
)

This function allocate space from the core

Definition at line 154 of file wspace.c.

References wspacemalloc().

Referenced by EliminateSubDomainEdges(), and Match_2HopAll().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

idx_t cnbrpoolGetNext ( ctrl_t ctrl,
idx_t  nnbrs 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

idx_t vnbrpoolGetNext ( ctrl_t ctrl,
idx_t  nnbrs 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Mon Sep 21 08:10:21 2020 for Charm++ by  doxygen 1.5.5