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] --- benchmarks/CUDA/DG/src/FacePair2d.c | 154 ------------------------------------ 1 file changed, 154 deletions(-) delete mode 100644 benchmarks/CUDA/DG/src/FacePair2d.c (limited to 'benchmarks/CUDA/DG/src/FacePair2d.c') diff --git a/benchmarks/CUDA/DG/src/FacePair2d.c b/benchmarks/CUDA/DG/src/FacePair2d.c deleted file mode 100644 index 92e47f5..0000000 --- a/benchmarks/CUDA/DG/src/FacePair2d.c +++ /dev/null @@ -1,154 +0,0 @@ -#include "mpi.h" -#include "fem.h" - -typedef struct foob { - int p1, k1, f1, p2, k2, f2, va, vb, g; -}face; - -int compare_pairs(const void *obj1, const void *obj2){ - - face *e1 = (face*) obj1; - face *e2 = (face*) obj2; - - int a1 = e1->va, b1 = e1->vb; - int a2 = e2->va, b2 = e2->vb; - - int va1, vb1, va2, vb2; - - va1 = min(a1, b1); - vb1 = max(a1, b1); - - va2 = min(a2, b2); - vb2 = max(a2, b2); - - if(vb1vb2) - return 1; - else if(va1va2) - return 1; - - return 0; -} - -int pairprocget(const void *obj1){ - face *e1 = (face*) obj1; - return (e1->p1); -} - - -int pairnumget(const void *obj1){ - face *e1 = (face*) obj1; - return (e1->g); -} - -void pairnumset(const void *obj1, int g){ - face *e1 = (face*) obj1; - e1->g = g; -} - -void pairmarry(const void *obj1, const void *obj2){ - - face *e1 = (face*) obj1; - face *e2 = (face*) obj2; - e1->p2 = e2->p1; e1->k2 = e2->k1; e1->f2 = e2->f1; - e2->p2 = e1->p1; e2->k2 = e1->k1; e2->f2 = e1->f1; -} - -void FacePair2d(Mesh *mesh, int *maxNv){ - - int procid = mesh->procid; - int nprocs = mesh->nprocs; - - int Klocal = mesh->K; - int Nfaces = mesh->Nfaces; - int Nverts = mesh->Nverts; - - int **EToV = mesh->EToV; - - const int vnum[3][2] = { {0,1}, {1,2}, {2,0} }; - - int n, k, e, sk, v; - - face *myfaces = (face*) calloc(Klocal*Nfaces, sizeof(face)); - - /* find maximum local vertex number */ - int localmaxgnum = 0; - for(k=0;kNpar = BuildIntVector(nprocs); - - mesh->EToE = BuildIntMatrix(Klocal, Nfaces); - mesh->EToF = BuildIntMatrix(Klocal, Nfaces); - mesh->EToP = BuildIntMatrix(Klocal, Nfaces); - - int id, k1, k2, f1, f2, p1, p2; - sk = 0; - - for(n=0;nEToE[k1][f1] = k2; - mesh->EToF[k1][f1] = f2; - mesh->EToP[k1][f1] = p2; - - if(p1!=p2){ - /* increment number of links */ - ++mesh->Npar[p2]; - } - } - - mesh->parK = (int**) calloc(nprocs, sizeof(int*)); - mesh->parF = (int**) calloc(nprocs, sizeof(int*)); - for(p2=0;p2parK[p2] = BuildIntVector(mesh->Npar[p2]); - mesh->parF[p2] = BuildIntVector(mesh->Npar[p2]); - mesh->Npar[p2] = 0; - for(n=0;nparK[p2][mesh->Npar[p2] ] = k1; - mesh->parF[p2][mesh->Npar[p2]++] = f1; - } - } - } - - free(myfaces); -} - - -- cgit v1.3