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 */ |
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 |
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 */ |
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 |
|
|
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; |
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 |
|
|