IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32610


Ignore:
Timestamp:
Nov 3, 2011, 7:39:25 PM (15 years ago)
Author:
eugene
Message:

failed to move pointer to new memory when reallocating vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110906/Ohana/src/opihi/cmd.astro/ringflux.c

    r32608 r32610  
    11# include "astro.h"
    22
    3 # define FLUX(BUF,X,Y) { out[Nvec] = BUF[(int)(X) + ((int)(Y))*Nx]; Nvec++; }
     3# define FLUX(BUF,X,Y) {                                                \
     4        char valid = TRUE;                                              \
     5        valid &= (X >= 0);                                              \
     6        valid &= (Y >= 0);                                              \
     7        valid &= (X < Nx);                                              \
     8        valid &= (Y < Ny);                                              \
     9        if (valid) {                                                    \
     10            out[Nvec] = BUF[(int)(X) + ((int)(Y))*Nx];                  \
     11            Nvec++;                                                     \
     12            if (Nvec >= vec[0].Nelements) abort();                      \
     13        }                                                               \
     14    }
     15
    416# define C1 0
    517
     
    6476          // counting error here
    6577        ResetVector (vec, OPIHI_FLT, vec[0].Nelements + 64);
     78        out = vec[0].elements.Flt;
    6679      }
    6780
Note: See TracChangeset for help on using the changeset viewer.