IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 25, 2008, 4:51:39 PM (18 years ago)
Author:
eugene
Message:

convert opihi vectors to double type, add option for int type as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/lookup.c

    r7952 r20839  
    44 
    55  int i, j;
    6   float *ip, *op, *xp, *yp;
     6  opihi_flt *ip, *op, *xp, *yp;
    77  Vector *in, *out, *xv, *yv;
    88
     
    2323
    2424  out[0].Nelements = in[0].Nelements;
    25   REALLOCATE (out[0].elements, float, out[0].Nelements);
     25  REALLOCATE (out[0].elements.Flt, opihi_flt, out[0].Nelements);
    2626
    27   ip = in[0].elements;
    28   op = out[0].elements;
     27  ip = in[0].elements.Flt;
     28  op = out[0].elements.Flt;
    2929
    3030  for (i = 0; i < in[0].Nelements; i++, ip++, op++) {
    3131    // re-write this using bisection
    32     xp = xv[0].elements;
    33     yp = yv[0].elements;
     32    xp = xv[0].elements.Flt;
     33    yp = yv[0].elements.Flt;
    3434
    3535    for (j = 0; (*ip < *xp) && (j < yv[0].Nelements); j++);
Note: See TracChangeset for help on using the changeset viewer.