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/Utils.c | 155 ----------------------------------------- 1 file changed, 155 deletions(-) delete mode 100644 benchmarks/CUDA/DG/src/Utils.c (limited to 'benchmarks/CUDA/DG/src/Utils.c') diff --git a/benchmarks/CUDA/DG/src/Utils.c b/benchmarks/CUDA/DG/src/Utils.c deleted file mode 100644 index e0364cf..0000000 --- a/benchmarks/CUDA/DG/src/Utils.c +++ /dev/null @@ -1,155 +0,0 @@ -#include "fem.h" - -/* some very basic memory allocation routines */ - -/* row major storage for a 2D matrix array */ -double **BuildMatrix(int Nrows, int Ncols){ - int n; - double **A = (double**) calloc(Nrows, sizeof(double*)); - - A[0] = (double*) calloc(Nrows*Ncols, sizeof(double)); - - for(n=1;nGX[k][0]; - double x2 = mesh->GX[k][1]; - double x3 = mesh->GX[k][2]; - - double y1 = mesh->GY[k][0]; - double y2 = mesh->GY[k][1]; - double y3 = mesh->GY[k][2]; - - double d1 = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2); - double d2 = (x2-x3)*(x2-x3) + (y2-y3)*(y2-y3); - double d3 = (x3-x1)*(x3-x1) + (y3-y1)*(y3-y1); - - /* find maximum length face */ - if(d1>=d2 && d1>=d3) - return 0; - else if(d2>=d3) - return 1; - - return 2; -} - - -int tetbase(Mesh *mesh, int k){ - - double x1 = mesh->GX[k][0]; - double x2 = mesh->GX[k][1]; - double x3 = mesh->GX[k][2]; - double x4 = mesh->GX[k][3]; - - double y1 = mesh->GY[k][0]; - double y2 = mesh->GY[k][1]; - double y3 = mesh->GY[k][2]; - double y4 = mesh->GY[k][3]; - - double z1 = mesh->GZ[k][0]; - double z2 = mesh->GZ[k][1]; - double z3 = mesh->GZ[k][2]; - double z4 = mesh->GZ[k][3]; - - double d1 = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(z1-z2); - double d2 = (x2-x3)*(x2-x3) + (y2-y3)*(y2-y3) + (z2-z3)*(z2-z3); - double d3 = (x3-x4)*(x3-x4) + (y3-y4)*(y3-y4) + (z3-z4)*(z3-z4); - double d4 = (x4-x1)*(x4-x1) + (y4-y1)*(y4-y1) + (z4-z1)*(z4-z1); - - /* find maximum length face */ - if(d1>=d2 && d1>=d3 && d1>=d4) - return 0; - else if(d2>=d3 && d2>=d4) - return 1; - else if(d3>=d4) - return 2; - - return 3; -} -- cgit v1.3