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/psLib/src/imageops/psImageConvolve.c

    r9538 r9730  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-10-13 21:13:48 $
     7 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-10-24 22:52:55 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    505505        /* generate normalized gaussian */ \
    506506        psVector *gaussnorm = psVectorAlloc(Npixel, PS_TYPE_##TYPE); \
    507         gaussnorm->n = gaussnorm->nalloc; \
    508507        { \
    509508            double sum = 0.0; \
     
    522521        { \
    523522            psVector *calculation = psVectorAlloc(Nx, PS_TYPE_##TYPE); \
    524             calculation->n = calculation->nalloc; \
    525523            for (int j = 0; j < Ny; j++) { \
    526524                ps##TYPE *vi = image->data.TYPE[j]; \
     
    573571        /* Smooth in Y direction */ \
    574572        psArray *rows = psArrayAlloc(Nrange); \
    575         rows->n = Nrange; \
    576573        /* Smooth the first Nrange pixels, with renorm */ \
    577574        int yMax = PS_MIN(Nrange, Ny); \
     
    579576        for (int j = 0; j < yMax; j++) { \
    580577            psVector *calculation = psVectorAlloc(Nx, PS_TYPE_##TYPE); \
    581             calculation->n = calculation->nalloc; \
    582578            /* Zero the output row */ \
    583579            memset(calculation->data.TYPE, 0, Nx*sizeof(ps##TYPE)); \
Note: See TracChangeset for help on using the changeset viewer.