PPL Logo

libs/ck-libs/parmetis/ParMETISLib/util.c File Reference

Go to the source code of this file.

Functions

void errexit (char *f_str,...)
void myprintf (CtrlType *ctrl, char *f_str,...)
void rprintf (CtrlType *ctrl, char *f_str,...)
intimalloc (int n, char *msg)
idxtypeidxmalloc (int n, char *msg)
floattypefmalloc (int n, char *msg)
intismalloc (int n, int ival, char *msg)
idxtypeidxsmalloc (int n, idxtype ival, char *msg)
void * GKmalloc (int nbytes, char *msg)
void GKfree (void **ptr1,...)
intiset (int n, int val, int *x)
idxtypeidxset (int n, idxtype val, idxtype *x)
int idxamax (int n, idxtype *x)
int idxamin (int n, idxtype *x)
int idxsum (int n, idxtype *x)
int charsum (int n, char *x)
int isum (int n, int *x)
floattype snorm2 (int n, floattype *v)
floattype sdot (int n, floattype *x, floattype *y)
void saxpy (int n, floattype alpha, floattype *x, floattype *y)
void ikeyvalsort_org (int n, KeyValueType *nodes)
int IncKeyValueCmp (const void *v1, const void *v2)
void dkeyvalsort (int n, KeyValueType *nodes)
int DecKeyValueCmp (const void *v1, const void *v2)
int BSearch (int n, idxtype *array, int key)
void RandomPermute (int n, idxtype *p, int flag)
void FastRandomPermute (int n, idxtype *p, int flag)
int ispow2 (int a)
int log2Int (int a)
floattypesset (int n, floattype val, floattype *x)
int iamax (int n, int *x)
int samax_strd (int n, floattype *x, int incx)
int sfamax (int n, floattype *x)
int samin_strd (int n, floattype *x, int incx)
int idxamax_strd (int n, idxtype *x, int incx)
int idxamin_strd (int n, idxtype *x, int incx)
floattype idxavg (int n, idxtype *x)
floattype savg (int n, floattype *x)
int samax (int n, floattype *x)
int sfavg (int n, floattype *x)
int samax2 (int n, floattype *x)
int samin (int n, floattype *x)
int idxsum_strd (int n, idxtype *x, int incx)
void idxadd (int n, idxtype *x, idxtype *y)
floattype ssum (int n, floattype *x)
floattype ssum_strd (int n, floattype *x, int incx)
void sscale (int n, floattype alpha, floattype *x)
void saneg (int n, floattype *x)
floattype BetterVBalance (int ncon, floattype *vwgt, floattype *u1wgt, floattype *u2wgt)
int IsHBalanceBetterFT (int ncon, floattype *pfrom, floattype *pto, floattype *nvwgt, floattype *ubvec)
int IsHBalanceBetterTT (int ncon, floattype *pt1, floattype *pt2, floattype *nvwgt, floattype *ubvec)
int myvalkeycompare (const void *fptr, const void *sptr)
int imyvalkeycompare (const void *fptr, const void *sptr)
floattypefsmalloc (int n, floattype fval, char *msg)
void saxpy2 (int n, floattype alpha, floattype *x, int incx, floattype *y, int incy)
void GetThreeMax (int n, floattype *x, int *first, int *second, int *third)


Function Documentation

void errexit ( char *  f_str,
  ... 
)

void myprintf ( CtrlType ctrl,
char *  f_str,
  ... 
)

void rprintf ( CtrlType ctrl,
char *  f_str,
  ... 
)

int* imalloc ( int  n,
char *  msg 
)

Definition at line 83 of file util.c.

References GKmalloc().

idxtype* idxmalloc ( int  n,
char *  msg 
)

Definition at line 95 of file util.c.

References GKmalloc().

floattype* fmalloc ( int  n,
char *  msg 
)

Definition at line 107 of file util.c.

References GKmalloc().

int* ismalloc ( int  n,
int  ival,
char *  msg 
)

Definition at line 119 of file util.c.

References GKmalloc(), and iset().

idxtype* idxsmalloc ( int  n,
idxtype  ival,
char *  msg 
)

Definition at line 132 of file util.c.

References GKmalloc(), and idxset().

void* GKmalloc ( int  nbytes,
char *  msg 
)

Definition at line 144 of file util.c.

References errexit(), malloc(), and ptr.

void GKfree ( void **  ptr1,
  ... 
)

Definition at line 162 of file util.c.

References free(), and ptr.

int* iset ( int  n,
int  val,
int x 
)

idxtype* idxset ( int  n,
idxtype  val,
idxtype x 
)

Definition at line 200 of file util.c.

Referenced by Balance_Partition(), BalanceMyLink(), Bnd2WayBalance(), CompressGraph(), Compute2WayNodePartitionParams(), Compute2WayPartitionParams(), ComputeKWayBalanceBoundary(), ComputeKWayBoundary(), ComputeKWayPartitionParams(), ComputeKWayVolGains(), ComputePartitionBalance(), ComputePartitionInfo(), ComputePartitionInfoBipartite(), ComputeSubDomainGraph(), ComputeVolKWayBalanceBoundary(), ComputeVolKWayBoundary(), ComputeVolKWayPartitionParams(), ComputeVolSubDomainGraph(), ConstructMinCoverSeparator(), ConstructMinCoverSeparator0(), CreateCoarseGraph(), CreateCoarseGraph_NVW(), CreateCoarseGraphNoMask(), CSR_Match_SHEM(), EliminateComponents(), EliminateSubDomainEdges(), EliminateVolComponents(), EliminateVolSubDomainEdges(), ExtractGraph(), FindVtxPerm(), FM_2WayEdgeRefine(), FM_2WayNodeBalance(), FM_2WayNodeRefine(), FM_2WayNodeRefine2(), FM_2WayNodeRefineEqWgt(), FPQueueInit(), FPQueueReset(), General2WayBalance(), Greedy_KWayEdgeBalance(), Greedy_KWayEdgeBalanceMConn(), Greedy_KWayEdgeRefine(), Greedy_KWayVolBalance(), Greedy_KWayVolBalanceMConn(), GrowBisection(), GrowBisectionNode(), idxsmalloc(), LabelSeparators(), Match_HEM(), Match_RM(), Match_RM_NVW(), Match_SHEM(), Mc_LocalMatch_HEM(), MCGreedy_KWayEdgeBalanceHorizontal(), MCMatch_HEM(), MCMatch_RM(), MCMatch_SBHEM(), MCMatch_SHEBM(), MCMatch_SHEM(), METIS_NodeNDP(), METIS_PartMeshDual(), METIS_PartMeshNodal(), Moc_Diffusion(), Moc_Global_CreateCoarseGraph(), Moc_Serial_Balance2Way(), Moc_Serial_Compute2WayPartitionParams(), Moc_Serial_FM_2WayRefine(), MocCompute2WayPartitionParams(), MocComputeKWayBalanceBoundary(), MocComputeKWayPartitionParams(), MocFM_2WayEdgeRefine(), MocFM_2WayEdgeRefine2(), MocGeneral2WayBalance(), MocGeneral2WayBalance2(), MocGrowBisection(), MocGrowBisection2(), MocGrowBisectionNew2(), MocInit2WayBalance2(), MocProject2WayPartition(), MocProjectKWayPartition(), MultilevelOrder(), ParallelReMapGraph(), ParallelTotalVReMap(), ParMETIS_V3_AdaptiveRepart(), ParMETIS_V3_Mesh2Dual(), ParMETIS_V3_PartGeom(), ParMETIS_V3_PartGeomKway(), ParMETIS_V3_PartKway(), ParMETIS_V3_RefineKway(), PartSort(), PQueueInit(), PQueueReset(), Project2WayPartition(), ProjectInfoBack(), ProjectKWayPartition(), ProjectVolKWayPartition(), PruneGraph(), RandomBisection(), RedoMyLink(), SetUp(), SetUpConnectGraph(), SetUpGraph(), SplitGraphOrder(), SplitGraphOrderCC(), VolSetUpGraph(), and WavefrontDiffusion().

int idxamax ( int  n,
idxtype x 
)

int idxamin ( int  n,
idxtype x 
)

int idxsum ( int  n,
idxtype x 
)

int charsum ( int  n,
char *  x 
)

Definition at line 257 of file util.c.

int isum ( int  n,
int x 
)

Definition at line 270 of file util.c.

floattype snorm2 ( int  n,
floattype v 
)

Definition at line 284 of file util.c.

Referenced by BetterBalance(), ConjGrad2(), and Serial_BetterBalance().

floattype sdot ( int  n,
floattype x,
floattype y 
)

Definition at line 300 of file util.c.

Referenced by ConjGrad2().

void saxpy ( int  n,
floattype  alpha,
floattype x,
floattype y 
)

Definition at line 315 of file util.c.

void ikeyvalsort_org ( int  n,
KeyValueType nodes 
)

Definition at line 331 of file util.c.

References IncKeyValueCmp(), and qsort().

int IncKeyValueCmp ( const void *  v1,
const void *  v2 
)

Definition at line 340 of file util.c.

References KeyValueType::key, n1, n2, and KeyValueType::val.

Referenced by ikeyvalsort_org().

void dkeyvalsort ( int  n,
KeyValueType nodes 
)

Definition at line 355 of file util.c.

References DecKeyValueCmp(), and qsort().

int DecKeyValueCmp ( const void *  v1,
const void *  v2 
)

Definition at line 364 of file util.c.

References KeyValueType::key, n1, and n2.

Referenced by dkeyvalsort().

int BSearch ( int  n,
idxtype array,
int  key 
)

Definition at line 381 of file util.c.

References c, and errexit().

Referenced by Moc_Global_CreateCoarseGraph().

void RandomPermute ( int  n,
idxtype p,
int  flag 
)

void FastRandomPermute ( int  n,
idxtype p,
int  flag 
)

int ispow2 ( int  a  ) 

Definition at line 462 of file util.c.

Referenced by ParMETIS_SerialNodeND(), and ParMETIS_V3_NodeND().

int log2Int ( int  a  ) 

Definition at line 471 of file util.c.

Referenced by METIS_mCPartGraphKway(), METIS_WPartGraphKway(), and METIS_WPartGraphVKway().

floattype* sset ( int  n,
floattype  val,
floattype x 
)

int iamax ( int  n,
int x 
)

Definition at line 498 of file util.c.

References max().

Referenced by METIS_PartMeshDual(), and METIS_PartMeshNodal().

int samax_strd ( int  n,
floattype x,
int  incx 
)

Definition at line 512 of file util.c.

References max().

Referenced by Moc_Diffusion(), and Moc_Global_Partition().

int sfamax ( int  n,
floattype x 
)

Definition at line 528 of file util.c.

References max().

int samin_strd ( int  n,
floattype x,
int  incx 
)

Definition at line 544 of file util.c.

References min().

Referenced by Moc_Global_Partition().

int idxamax_strd ( int  n,
idxtype x,
int  incx 
)

Definition at line 560 of file util.c.

References max().

Referenced by ComputePartitionInfo(), and ComputePartitionInfoBipartite().

int idxamin_strd ( int  n,
idxtype x,
int  incx 
)

Definition at line 575 of file util.c.

References min().

floattype idxavg ( int  n,
idxtype x 
)

Definition at line 590 of file util.c.

floattype savg ( int  n,
floattype x 
)

int samax ( int  n,
floattype x 
)

int sfavg ( int  n,
floattype x 
)

Definition at line 634 of file util.c.

int samax2 ( int  n,
floattype x 
)

Definition at line 652 of file util.c.

Referenced by Moc_Serial_Balance2Way(), and MocGeneral2WayBalance().

int samin ( int  n,
floattype x 
)

Definition at line 681 of file util.c.

References min().

Referenced by MCGreedy_KWayEdgeBalanceHorizontal(), MCRandom_KWayEdgeRefineHorizontal(), and Moc_Diffusion().

int idxsum_strd ( int  n,
idxtype x,
int  incx 
)

void idxadd ( int  n,
idxtype x,
idxtype y 
)

Definition at line 710 of file util.c.

floattype ssum ( int  n,
floattype x 
)

floattype ssum_strd ( int  n,
floattype x,
int  incx 
)

Definition at line 734 of file util.c.

Referenced by MCCoarsen2Way(), Moc_ComputeRefineStats(), and Moc_Global_Partition().

void sscale ( int  n,
floattype  alpha,
floattype x 
)

void saneg ( int  n,
floattype x 
)

Definition at line 760 of file util.c.

floattype BetterVBalance ( int  ncon,
floattype vwgt,
floattype u1wgt,
floattype u2wgt 
)

Definition at line 774 of file util.c.

int IsHBalanceBetterFT ( int  ncon,
floattype pfrom,
floattype pto,
floattype nvwgt,
floattype ubvec 
)

Definition at line 806 of file util.c.

int IsHBalanceBetterTT ( int  ncon,
floattype pt1,
floattype pt2,
floattype nvwgt,
floattype ubvec 
)

Definition at line 851 of file util.c.

int myvalkeycompare ( const void *  fptr,
const void *  sptr 
)

Definition at line 889 of file util.c.

References KVType::val.

Referenced by CSR_Match_SHEM(), Moc_DynamicSelectQueue(), and Moc_HashVwgts().

int imyvalkeycompare ( const void *  fptr,
const void *  sptr 
)

Definition at line 908 of file util.c.

References KVType::val.

floattype* fsmalloc ( int  n,
floattype  fval,
char *  msg 
)

Definition at line 928 of file util.c.

References GKmalloc(), and sset().

Referenced by Balance_Partition(), Moc_InitPartition_RB(), and ParMETIS_V3_NodeND().

void saxpy2 ( int  n,
floattype  alpha,
floattype x,
int  incx,
floattype y,
int  incy 
)

void GetThreeMax ( int  n,
floattype x,
int first,
int second,
int third 
)

Definition at line 952 of file util.c.

Referenced by WavefrontDiffusion().


Generated on Tue May 22 07:44:30 2012 for Charm++ by  doxygen 1.5.5