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

    r7917 r20839  
    44 
    55  int i, Nx, Ny, Npix, xdir, Nset;
    6   float *in, *out;
     6  float *in;
     7  opihi_flt *out;
    78  Buffer *buf;
    89  Vector *vec;
     
    3334  if (xdir) {
    3435    vec[0].Nelements = Npix = Nx;
    35     REALLOCATE (vec[0].elements, float, Npix);
     36    REALLOCATE (vec[0].elements.Flt, opihi_flt, Npix);
    3637    if (Nset >= Ny) {
    3738      gprint (GP_ERR, "row out of range\n");
     
    3940    }
    4041    in  = (float *) buf[0].matrix.buffer + Nx*Nset;
    41     out = vec[0].elements;
     42    out = vec[0].elements.Flt;
    4243    for (i = 0; i < Npix; i++, in++, out++) {
    4344      *out = *in;
    4445    }
    45     return (TRUE);
    4646  } else {
    4747    vec[0].Nelements = Npix = Ny;
    48     REALLOCATE (vec[0].elements, float, Npix);
     48    REALLOCATE (vec[0].elements.Flt, opihi_flt, Npix);
    4949    if (Nset >= Nx) {
    5050      gprint (GP_ERR, "column out of range\n");
     
    5252    }
    5353    in  = (float *) buf[0].matrix.buffer + Nset;
    54     out = vec[0].elements;
     54    out = vec[0].elements.Flt;
    5555    for (i = 0; i < Npix; i++, in+=Nx, out++) {
    5656      *out = *in;
    5757    }
    58     return (TRUE);
    59   }   
     58  }
     59  return (TRUE);
    6060}
    61 
Note: See TracChangeset for help on using the changeset viewer.