IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 12:55:05 PM (20 years ago)
Author:
Paul Price
Message:

Following today's meeting, we agreed that psVectorAlloc (and therefore
psArrayAlloc also) shall set the number of elements in use to equal the
number of elements allocated. We introduce new functions,
psVectorAllocEmpty and psArrayAllocEmpty, that allocate a vector and set
the length to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSource.c

    r9651 r9730  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-10-19 21:10:08 $
     8 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-10-24 22:55:05 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    294294        maxSy = clump->y * SCALE + 0.2;
    295295
    296         tmpSx = psVectorAlloc (sources->n, PS_TYPE_F32);
    297         tmpSy = psVectorAlloc (sources->n, PS_TYPE_F32);
    298         tmpSx->n = 0;
    299         tmpSy->n = 0;
     296        tmpSx = psVectorAllocEmpty (sources->n, PS_TYPE_F32);
     297        tmpSy = psVectorAllocEmpty (sources->n, PS_TYPE_F32);
    300298
    301299        // XXX clip sources based on flux?
     
    375373
    376374    // report stats on S/N values for star-like objects
    377     psVector *starsn = psVectorAlloc (sources->n, PS_TYPE_F32);
    378     starsn->n = 0;
     375    psVector *starsn = psVectorAllocEmpty (sources->n, PS_TYPE_F32);
    379376
    380377    // check return status value (do these exist?)
Note: See TracChangeset for help on using the changeset viewer.