From 69f2911e04ffb1b19eef1fafb8c040af271f656e Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Thu, 15 Jul 2010 18:09:46 -0800 Subject: creating branch for adding support for CUDA 3.x and Fermi [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829] --- .../3rdParty/ParMetis-3.1/ParMETISLib/backcompat.c | 517 +++++++++++++++++++++ 1 file changed, 517 insertions(+) create mode 100644 benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/ParMETISLib/backcompat.c (limited to 'benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/ParMETISLib/backcompat.c') diff --git a/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/ParMETISLib/backcompat.c b/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/ParMETISLib/backcompat.c new file mode 100644 index 0000000..b62d4bb --- /dev/null +++ b/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/ParMETISLib/backcompat.c @@ -0,0 +1,517 @@ +/* + * Copyright 1997, Regents of the University of Minnesota + * + * backcompat.c + * + * This file ensures backwards compatability with previous ParMETIS releases + * + * Started 10/19/96 + * George + * + * $Id: backcompat.c,v 1.2 2003/07/21 17:18:48 karypis Exp $ + * + */ + +#include + +/***************************************************************************** +* This function computes a partitioning. +*****************************************************************************/ +void ParMETIS_PartKway(idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, + idxtype *adjwgt, int *wgtflag, int *numflag, int *nparts, int *options, int *edgecut, + idxtype *part, MPI_Comm *comm) +{ + int i; + int ncon = 1; + float *tpwgts, ubvec[MAXNCON]; + int myoptions[10]; + + tpwgts = fmalloc(*nparts*ncon, "tpwgts"); + for (i=0; i<*nparts*ncon; i++) + tpwgts[i] = 1.0/(float)(*nparts); + for (i=0; i