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] --- .../DG/3rdParty/ParMetis-3.1/METISLib/fortran.c | 141 +++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/fortran.c (limited to 'benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/fortran.c') diff --git a/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/fortran.c b/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/fortran.c new file mode 100644 index 0000000..46ebefd --- /dev/null +++ b/benchmarks/CUDA/DG/3rdParty/ParMetis-3.1/METISLib/fortran.c @@ -0,0 +1,141 @@ +/* + * Copyright 1997, Regents of the University of Minnesota + * + * fortran.c + * + * This file contains code for the fortran to C interface + * + * Started 8/19/97 + * George + * + * $Id: fortran.c,v 1.1 2003/07/16 15:55:02 karypis Exp $ + * + */ + +#include + + +/************************************************************************* +* This function changes the numbering to start from 0 instead of 1 +**************************************************************************/ +void Change2CNumbering(int nvtxs, idxtype *xadj, idxtype *adjncy) +{ + int i, nedges; + + for (i=0; i<=nvtxs; i++) + xadj[i]--; + + nedges = xadj[nvtxs]; + for (i=0; i