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 1596, Wed Nov 2 13:33:41 2011 UTC revision 1597, Wed Nov 2 13:41:37 2011 UTC
# Line 9  Line 9 
9  #include "teem/gage.h"  #include "teem/gage.h"
10  #include "teem/ell.h"  #include "teem/ell.h"
11    
12  extern int  extern int _gageProbe(gageContext *ctx, double _xi, double _yi, double _zi, double _si);
 _gageProbe(gageContext *ctx, double _xi, double _yi, double _zi, double _si);  
   
13    
14  #include "teem-defs.h"  #include "teem-defs.h"
15    
   
16  #define ROOT_TRIPLE 2           /* ell_cubic_root_triple */  #define ROOT_TRIPLE 2           /* ell_cubic_root_triple */
17  #define ROOT_SINGLE_DOUBLE 3    /* ell_cubic_root_single_double */  #define ROOT_SINGLE_DOUBLE 3    /* ell_cubic_root_single_double */
18  #define ROOT_THREE 4            /* ell_cubic_root_three */  #define ROOT_THREE 4            /* ell_cubic_root_three */
# Line 52  Line 49 
49     (v1)[1] = (v2)[1], \     (v1)[1] = (v2)[1], \
50     (v1)[2] = (v2)[2])     (v1)[2] = (v2)[2])
51    
   
52  #if 1  #if 1
53  #  define REAL  float  #  define REAL  float
54  #  define ATAN2 atan2f  #  define ATAN2 atan2f
# Line 73  Line 69 
69  ** cross-products to get a good estimate.  Trick is getting the cross  ** cross-products to get a good estimate.  Trick is getting the cross
70  ** products to line up before summing.  ** products to line up before summing.
71  */  */
72  static inline void  static inline void nullspace1(REAL ret[3],  const REAL r0[3], const REAL r1[3], const REAL r2[3])
73  nullspace1(REAL ret[3],  {
            const REAL r0[3], const REAL r1[3], const REAL r2[3]) {  
74    REAL crs[3];    REAL crs[3];
75    
76    /* ret = r0 x r1 */    /* ret = r0 x r1 */
# Line 104  Line 99 
99  ** All vectors are in the same 1D space, we have to find two  ** All vectors are in the same 1D space, we have to find two
100  ** mutually vectors perpendicular to that span  ** mutually vectors perpendicular to that span
101  */  */
102  static inline void  static inline void nullspace2(REAL reta[3], REAL retb[3], const REAL r0[3], const REAL r1[3], const REAL r2[3])
103  nullspace2(REAL reta[3], REAL retb[3],  {
            const REAL r0[3], const REAL r1[3], const REAL r2[3]) {  
104    REAL sqr[3], sum[3];    REAL sqr[3], sum[3];
105    int idx;    int idx;
106    
# Line 289  Line 283 
283    return roots;    return roots;
284  }  }
285    
286    int main (int argc, const char *argv[])
287  int main (int argc, const char *argv[]) {  {
288    hestOpt *hopt=NULL;    hestOpt *hopt=NULL;
289    hestParm *hparm;    hestParm *hparm;
290    airArray *mop;    airArray *mop;
# Line 454  Line 448 
448    /* update number of actual output points */    /* update number of actual output points */
449    npos->axis[1].size = posIdx;    npos->axis[1].size = posIdx;
450    
   
451    double totalTime = GetTime() - t0;  // report timing    double totalTime = GetTime() - t0;  // report timing
452    printf("usr=%f\n", totalTime);    printf("usr=%f\n", totalTime);
453    

Legend:
Removed from v.1596  
changed lines
  Added in v.1597

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