Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /benchmarks/programs/ridge3d/bmark-teem.c
ViewVC logotype

Diff of /benchmarks/programs/ridge3d/bmark-teem.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1582, Mon Oct 31 04:20:56 2011 UTC revision 1584, Mon Oct 31 10:37:14 2011 UTC
# Line 1  Line 1 
1    /*! \file bmark-teem.c
2     *
3     * \author Gordon Kindlmann
4     */
5    
6    /*
7     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
8     * All rights reserved.
9     */
10    
11  #include <stdio.h>  #include <stdio.h>
12  #include <math.h>  #include <math.h>
13  #include "teem/nrrd.h"  #include "teem/nrrd.h"
14  #include "teem/gage.h"  #include "teem/gage.h"
15  #include "teem/ell.h"  #include "teem/ell.h"
16    
17  int  static double GetTime ()
18  inside(double pos[3]) {  {
19        struct timeval tv;
20    
21        gettimeofday (&tv, 0);
22    
23        return (double)tv.tv_sec + 0.000001 * (double)tv.tv_usec;
24    }
25    
26    #define STATIC_INLINE static inline
27    
28    int inside (double pos[3]) {
29    if(pos[0] < -0.5 || pos[0] > 175.5) return 0;    if(pos[0] < -0.5 || pos[0] > 175.5) return 0;
30    if(pos[1] < -0.5 || pos[1] > 186.5) return 0;    if(pos[1] < -0.5 || pos[1] > 186.5) return 0;
31    if(pos[2] < -0.5 || pos[2] > 189.5) return 0;    if(pos[2] < -0.5 || pos[2] > 189.5) return 0;
# Line 80  Line 100 
100    int ui, vi, wi;    int ui, vi, wi;
101    float xx, yy, zz;    float xx, yy, zz;
102    
103      double t0 = GetTime(); // start timing
104    
105    /* COMPUTATION GOES HERE */
106    
107      double totalTime = GetTime() - t0;  // report timing
108      printf("usr=%f\n", totalTime);
109    
110    airMopOkay(mop);    airMopOkay(mop);
111    return 0;    return 0;
112  }  }

Legend:
Removed from v.1582  
changed lines
  Added in v.1584

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0