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/vbin.c

    r7917 r20839  
    55  int i, j, n, N, Nin, Nout;
    66  int Normalize, Ignore;
    7   float *Vout, *Vin, IgnoreValue;
     7  opihi_flt *Vout, *Vin, IgnoreValue;
    88  double scale;
    99  Vector *in, *out;
     
    4242  Nout = Nin / scale;
    4343
    44   REALLOCATE (out[0].elements, float, Nout);
     44  REALLOCATE (out[0].elements.Flt, opihi_flt, Nout);
    4545  out[0].Nelements = Nout;
    4646
    47   Vin  = in[0].elements;
    48   Vout = out[0].elements;
     47  Vin  = in[0].elements.Flt;
     48  Vout = out[0].elements.Flt;
    4949  for (n = j = 0; j < Nout; j++, Vout++) {
    5050    *Vout = 0;
     
    5757    if (Normalize) {
    5858      if (N > 0) {
    59         *Vout /= (float) N;
     59        *Vout /= (opihi_flt) N;
    6060      } else {
    6161        *Vout = 0;
Note: See TracChangeset for help on using the changeset viewer.