From 11b308e7363e937966b035b4891db32b4eece3bf Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Fri, 1 Oct 2010 08:55:28 -0800 Subject: integrating recent changes from fermi-test into fermi (i'll use "fermi" for more disruptive changes to the pipeline model such as updating the MSHRs and getting rid of the warp tracker, ripping out DWF, etc...) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7805] --- .../CUDA/DG/3rdParty/ParMetis-3.1/METISLib/stat.c | 316 --------------------- 1 file changed, 316 deletions(-) delete mode 100644 benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/stat.c (limited to 'benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/stat.c') diff --git a/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/stat.c b/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/stat.c deleted file mode 100644 index 6156d6d..0000000 --- a/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/stat.c +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright 1997, Regents of the University of Minnesota - * - * stat.c - * - * This file computes various statistics - * - * Started 7/25/97 - * George - * - * $Id: stat.c,v 1.2 2003/07/24 18:39:12 karypis Exp $ - * - */ - -#include - - -/************************************************************************* -* This function computes cuts and balance information -**************************************************************************/ -void ComputePartitionInfo(GraphType *graph, int nparts, idxtype *where) -{ - int i, j, k, nvtxs, ncon, mustfree=0; - idxtype *xadj, *adjncy, *vwgt, *adjwgt, *kpwgts, *tmpptr; - idxtype *padjncy, *padjwgt, *padjcut; - - nvtxs = graph->nvtxs; - ncon = graph->ncon; - xadj = graph->xadj; - adjncy = graph->adjncy; - vwgt = graph->vwgt; - adjwgt = graph->adjwgt; - - if (vwgt == NULL) { - vwgt = graph->vwgt = idxsmalloc(nvtxs, 1, "vwgt"); - mustfree = 1; - } - if (adjwgt == NULL) { - adjwgt = graph->adjwgt = idxsmalloc(xadj[nvtxs], 1, "adjwgt"); - mustfree += 2; - } - - printf("%d-way Cut: %5d, Vol: %5d, ", nparts, ComputeCut(graph, where), ComputeVolume(graph, where)); - - /* Compute balance information */ - kpwgts = idxsmalloc(ncon*nparts, 0, "ComputePartitionInfo: kpwgts"); - - for (i=0; iwhere; - graph->where = where; - for (i=0; iwhere = tmpptr; - - if (mustfree == 1 || mustfree == 3) { - free(vwgt); - graph->vwgt = NULL; - } - if (mustfree == 2 || mustfree == 3) { - free(adjwgt); - graph->adjwgt = NULL; - } - - GKfree(&kpwgts, &padjncy, &padjwgt, &padjcut, LTERM); -} - - -/************************************************************************* -* This function computes cuts and balance information -**************************************************************************/ -void ComputePartitionInfoBipartite(GraphType *graph, int nparts, idxtype *where) -{ - int i, j, k, nvtxs, ncon, mustfree=0; - idxtype *xadj, *adjncy, *vwgt, *vsize, *adjwgt, *kpwgts, *tmpptr; - idxtype *padjncy, *padjwgt, *padjcut; - - nvtxs = graph->nvtxs; - ncon = graph->ncon; - xadj = graph->xadj; - adjncy = graph->adjncy; - vwgt = graph->vwgt; - vsize = graph->vsize; - adjwgt = graph->adjwgt; - - if (vwgt == NULL) { - vwgt = graph->vwgt = idxsmalloc(nvtxs, 1, "vwgt"); - mustfree = 1; - } - if (adjwgt == NULL) { - adjwgt = graph->adjwgt = idxsmalloc(xadj[nvtxs], 1, "adjwgt"); - mustfree += 2; - } - - printf("%d-way Cut: %5d, Vol: %5d, ", nparts, ComputeCut(graph, where), ComputeVolume(graph, where)); - - /* Compute balance information */ - kpwgts = idxsmalloc(ncon*nparts, 0, "ComputePartitionInfo: kpwgts"); - - for (i=0; ivwgt = NULL; - } - if (mustfree == 2 || mustfree == 3) { - free(adjwgt); - graph->adjwgt = NULL; - } - - GKfree(&kpwgts, &padjncy, &padjwgt, &padjcut, LTERM); -} - - - -/************************************************************************* -* This function computes the balance of the partitioning -**************************************************************************/ -void ComputePartitionBalance(GraphType *graph, int nparts, idxtype *where, float *ubvec) -{ - int i, j, nvtxs, ncon; - idxtype *kpwgts, *vwgt; - float balance; - - nvtxs = graph->nvtxs; - ncon = graph->ncon; - vwgt = graph->vwgt; - - kpwgts = idxsmalloc(nparts, 0, "ComputePartitionInfo: kpwgts"); - - if (vwgt == NULL && ncon == 1) { - for (i=0; invtxs; i++) - kpwgts[where[i]] += vwgt[i*ncon+j]; - - ubvec[j] = 1.0*nparts*kpwgts[idxamax(nparts, kpwgts)]/(1.0*idxsum(nparts, kpwgts)); - } - } - - free(kpwgts); - -} - - -/************************************************************************* -* This function computes the balance of the element partitioning -**************************************************************************/ -float ComputeElementBalance(int ne, int nparts, idxtype *where) -{ - int i; - idxtype *kpwgts; - float balance; - - kpwgts = idxsmalloc(nparts, 0, "ComputeElementBalance: kpwgts"); - - for (i=0; invtxs; - ncon = graph->ncon; - nvwgt = graph->nvwgt; - - kpwgts = fmalloc(nparts, "ComputePartitionInfo: kpwgts"); - - for (j=0; jnvtxs; i++) - kpwgts[where[i]] += nvwgt[i*ncon+j]; - - ubvec[j] = (float)nparts*kpwgts[samax(nparts, kpwgts)]/ssum(nparts, kpwgts); - } - - free(kpwgts); - -} - -- cgit v1.3