IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 22, 2011, 12:27:33 AM (15 years ago)
Author:
eugene
Message:

merged from eam_branches/ipp-20110505: update memory locking to allow paralled realloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psVectorSmooth.c

    r15959 r31660  
    3030    if (output == input) {
    3131        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot smooth vector in-place.");
    32         return false;
     32        return NULL;
    3333    }
    3434
     
    3838    long Nbin = input->n;               // Number of elements
    3939    double factor = -0.5/(sigma*sigma); // Factor for Gaussian
     40
     41    if (Nbin < Npixel) {
     42        // cannot smooth narrow vector
     43        return NULL;
     44    }
    4045
    4146    #define VECTOR_SMOOTH_CASE(TYPE) \
     
    6065        /* smooth first Nrange pixels, with renorm */ \
    6166        /* XXX need to check that this does not run over end for narrow vectors */ \
    62         for (long i = 0; i < Nrange; i++, vi++, vo++) { \
     67        for (long i = 0; i < Nrange; i++, vi++, vo++) { \
    6368            ps##TYPE *vr = vi - i; \
    6469            ps##TYPE *vg = gauss - i; \
Note: See TracChangeset for help on using the changeset viewer.