IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2008, 11:13:15 AM (18 years ago)
Author:
eugene
Message:

allow functions to use FLT or INT vectors as appropriate; document valid types

File:
1 edited

Legend:

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

    r20839 r20859  
    44 
    55  int i, Nx, Ny, Npix;
    6   opihi_flt *in;
    76  float *out;
    87  Vector *vec;
     
    3029
    3130  out = (float *) buf[0].matrix.buffer;
    32   in = vec[0].elements.Flt;
    3331
    34   for (i = 0; i < Npix; i++, in++, out++) {
    35     *out = *in;
     32  if (vec[0].type == OPIHI_FLT) {
     33    opihi_flt *in = vec[0].elements.Flt;
     34    for (i = 0; i < Npix; i++, in++, out++) {
     35      *out = *in;
     36    }
     37  } else {
     38    opihi_int *in = vec[0].elements.Int;
     39    for (i = 0; i < Npix; i++, in++, out++) {
     40      *out = *in;
     41    }
    3642  }
    3743
Note: See TracChangeset for help on using the changeset viewer.