20 #define USE_HW_COUNTER 0
32 #define TNTOT (TNR*TNS)
36 static const unsigned nr[2] = {
NR,
NS};
42 #define TOL 1024*DBL_EPSILON
48 static const double *
const elxy[2] = {
elx,ely};
54 int failure=0, unconv=0;
58 unsigned long long tic,toc, tot=0;
73 tensor_2t(telx[0], Jr,TNR,NR, Js,TNS,NS, elx, work);
74 tensor_2t(telx[1], Jr,TNR,NR, Js,TNS,NS, ely, work);
81 ie = i+
NPT, ie = ie>TNTOT ? TNTOT : ie;
84 const double x=telx[0][
i],
y=telx[1][
i];
92 const double r=tzr[i%
TNR], s=tzs[i/
TNR];
93 if((p->
flags&(1u<<4))==0) ++unconv;
94 if(fabs(p->
r[0]-r)+fabs(p->
r[1]-s)>1024*DBL_EPSILON) {
95 printf(
"found (%g,%g) for (%g,%g) ; error (%g,%g)\n",
96 p->
r[0],p->
r[1], r,s, p->
r[0]-r,p->
r[1]-s);
97 printf(
"(%g,%g) for (%.15g,%.15g) ; dist2 = %g\n",
99 telx[0][i],telx[1][i],p->
dist2);
107 printf(
"element took %llu cycles\n",toc-tic);
114 #if !(USE_HW_COUNTER)
115 printf(
"%u failed points (out of %u)\n", failure, REPEAT*
TNTOT);
116 printf(
"%u unconverged points\n", unconv);
118 printf(
"average cycles = %g\n", tot/(
double)REPEAT);
static double Jr[NR *TNR]
static double ely[NR *NS]
static double telx[2][TNR *TNS]
static void findpts_el_start_2(struct findpts_el_data_2 *const fd, const double *const x[2])
static const double *const elxy[2]
void rand_elt_2(double *x, double *y, const double *zr, unsigned nr, const double *zs, unsigned ns)
static void tensor_2t(double *out, const double *Jrt, uint nr, uint mr, const double *Jst, uint ns, uint ms, const double *u, double *work)
static struct findpts_el_pt_2 * findpts_el_points_2(struct findpts_el_data_2 *const fd)
#define findpts_el_setup_2
#define findpts_el_free_2
#define DEFINE_HW_COUNTER()
static double elx[NR *NS]
static const unsigned nr[2]
static double Js[NS *TNS]
static double work[TNR *NS]
establishes some macros to establish naming conventions
static double y[NR *NS *NT *N]