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/imcombine/pmImageSubtract.c

    r8815 r9730  
    77 *  @author GLG, MHPCC
    88 *
    9  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2006-09-15 09:49:01 $
     9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2006-10-24 22:55:05 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    122122    tmp->u = psVectorAlloc(nBF, PS_TYPE_F32);
    123123    tmp->v = psVectorAlloc(nBF, PS_TYPE_F32);
    124     tmp->u->n = tmp->u->nalloc;
    125     tmp->v->n = tmp->v->nalloc;
    126124    tmp->sigma = NULL;
    127125    tmp->xOrder = psVectorAlloc(nBF, PS_TYPE_F32);
    128     tmp->xOrder->n = tmp->xOrder->nalloc;
    129126    tmp->yOrder = psVectorAlloc(nBF, PS_TYPE_F32);
    130     tmp->yOrder->n = tmp->yOrder->nalloc;
    131127    tmp->subIndex = 0;
    132128    tmp->preCalc = NULL;
     
    223219    tmp->u = psVectorAlloc(nBF, PS_TYPE_F32);
    224220    tmp->v = psVectorAlloc(nBF, PS_TYPE_F32);
    225     tmp->u->n = tmp->u->nalloc;
    226     tmp->v->n = tmp->v->nalloc;
    227221    tmp->sigma = psVectorAlloc(nBF, PS_TYPE_F32);
    228222    tmp->xOrder = psVectorAlloc(nBF, PS_TYPE_F32);
     
    232226    tmp->spatialOrder = spatialOrder;
    233227    tmp->preCalc = psArrayAlloc(nBF);
    234     tmp->u->n = tmp->u->nalloc;
    235     tmp->v->n = tmp->v->nalloc;
    236     tmp->sigma->n = tmp->sigma->nalloc;
    237     tmp->xOrder->n = tmp->xOrder->nalloc;
    238     tmp->yOrder->n = tmp->yOrder->nalloc;
    239     tmp->preCalc->n = tmp->preCalc->nalloc;
    240228
    241229    //
     
    367355    } else {
    368356        stamps = (psArray *) psArrayAlloc(xNum * yNum);
    369         stamps->n = stamps->nalloc;
    370357        for (psS32 s = 0 ; s < (xNum * yNum) ; s++) {
    371358            stamps->data[s] = (psPtr *) p_pmStampAlloc(PM_STAMP_REJECTED);
     
    826813            if (stampVector == NULL) {
    827814                stampVector = psVectorAlloc(numSolveParams, PS_TYPE_F64);
    828                 stampVector->n = stampVector->nalloc;
    829815                stamp->vector = stampVector;
    830816            } else {
     
    10451031    } else {
    10461032        solution = psVectorAlloc(size, PS_TYPE_F64);
    1047         solution->n = solution->nalloc;
    10481033    }
    10491034
     
    10571042    psImage *sumMatrix = psImageAlloc(size, size, PS_TYPE_F64);
    10581043    psVector *sumVector = psVectorAlloc(size, PS_TYPE_F64);
    1059     sumVector->n = sumVector->nalloc;
    10601044    psVectorInit(sumVector, 0.0);
    10611045    psImageInit(sumMatrix, 0.0);
     
    11501134    } else {
    11511135        deviations = psVectorAlloc(stamps->n, PS_TYPE_F32);
    1152         deviations->n = deviations->nalloc;
    11531136        // XXX: Probably not necessary.
    11541137        psVectorInit(deviations, 0.0);
Note: See TracChangeset for help on using the changeset viewer.