diff options
| author | Tor Aamodt <[email protected]> | 2010-10-01 08:55:28 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-10-01 08:55:28 -0800 |
| commit | 11b308e7363e937966b035b4891db32b4eece3bf (patch) | |
| tree | 50ca4c9ad6f163ac4acb2bf505e64dfebed66947 /benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/mutil.c | |
| parent | bb820c116764d7a1b8e071137d32b74e7f34dd2f (diff) | |
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]
Diffstat (limited to 'benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/mutil.c')
| -rw-r--r-- | benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/mutil.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/mutil.c b/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/mutil.c deleted file mode 100644 index 68dc5c5..0000000 --- a/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/mutil.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * mutil.c - * - * This file contains various utility functions for the MOC portion of the - * code - * - * Started 2/15/98 - * George - * - * $Id: mutil.c,v 1.1 2003/07/16 15:55:13 karypis Exp $ - * - */ - -#include <metis.h> - - -/************************************************************************* -* This function checks if the vertex weights of two vertices are below -* a given set of values -**************************************************************************/ -int AreAllVwgtsBelow(int ncon, float alpha, float *vwgt1, float beta, float *vwgt2, float limit) -{ - int i; - - for (i=0; i<ncon; i++) - if (alpha*vwgt1[i] + beta*vwgt2[i] > limit) - return 0; - - return 1; -} - - -/************************************************************************* -* This function checks if the vertex weights of two vertices are below -* a given set of values -**************************************************************************/ -int AreAnyVwgtsBelow(int ncon, float alpha, float *vwgt1, float beta, float *vwgt2, float limit) -{ - int i; - - for (i=0; i<ncon; i++) - if (alpha*vwgt1[i] + beta*vwgt2[i] < limit) - return 1; - - return 0; -} - - - -/************************************************************************* -* This function checks if the vertex weights of two vertices are above -* a given set of values -**************************************************************************/ -int AreAllVwgtsAbove(int ncon, float alpha, float *vwgt1, float beta, float *vwgt2, float limit) -{ - int i; - - for (i=0; i<ncon; i++) - if (alpha*vwgt1[i] + beta*vwgt2[i] < limit) - return 0; - - return 1; -} - - -/************************************************************************* -* This function computes the load imbalance over all the constrains -* For now assume that we just want balanced partitionings -**************************************************************************/ -float ComputeLoadImbalance(int ncon, int nparts, float *npwgts, float *tpwgts) -{ - int i, j; - float max, lb=0.0; - - for (i=0; i<ncon; i++) { - max = 0.0; - for (j=0; j<nparts; j++) { - if (npwgts[j*ncon+i] > max) - max = npwgts[j*ncon+i]; - } - if (max*nparts > lb) - lb = max*nparts; - } - - return lb; -} - -/************************************************************************* -* This function checks if the vertex weights of two vertices are below -* a given set of values -**************************************************************************/ -int AreAllBelow(int ncon, float *v1, float *v2) -{ - int i; - - for (i=0; i<ncon; i++) - if (v1[i] > v2[i]) - return 0; - - return 1; -} |
