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

    r7917 r20839  
    2828  /* check size of ivec, tvec: must match */
    2929
    30   REALLOCATE (ovec[0].elements, float, MAX (tvec[0].Nelements, 1));
     30  REALLOCATE (ovec[0].elements.Flt, opihi_flt, MAX (tvec[0].Nelements, 1));
    3131  for (j = i = 0; i < tvec[0].Nelements; i++) {
    32     if (tvec[0].elements[i]) {
    33       ovec[0].elements[j] = ivec[0].elements[i];
     32    if (tvec[0].elements.Flt[i]) {
     33      ovec[0].elements.Flt[j] = ivec[0].elements.Flt[i];
    3434      j++;
    3535    }
    3636  }
    3737  ovec[0].Nelements = j;
    38   REALLOCATE (ovec[0].elements, float, MAX (ovec[0].Nelements, 1));
     38  REALLOCATE (ovec[0].elements.Flt, opihi_flt, MAX (ovec[0].Nelements, 1));
    3939
    4040  DeleteVector (tvec);
Note: See TracChangeset for help on using the changeset viewer.