IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1964


Ignore:
Timestamp:
Oct 5, 2004, 1:14:15 PM (22 years ago)
Author:
gusciora
Message:

Improved the CHECK macros in psConstants.h.

Location:
trunk/psLib/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psConstants.h

    r1963 r1964  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-05 22:47:21 $
     8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-05 23:14:15 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8888p_psMemSetPersistent(NAME->data.V, true); \
    8989
     90
     91
     92
     93
     94
    9095/** Preprocessor macro to generate error on an incorrect type */
    91 #define PS_CHECK_VECTOR_TYPE(NAME, TYPE) \
     96#define PS_CHECK_VECTOR_TYPE_RETURN_NULL(NAME, TYPE) \
    9297if (NAME->type.type != TYPE) { \
    9398    psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \
    94 }
    95 
    96 /** Preprocessor macro to generate error on a NULL vector */
    97 #define PS_CHECK_NULL_VECTOR(NAME) \
    98 if (NAME == NULL || NAME->data.V == NULL) { \
    99     psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
    100 }
    101 
    102 /** Preprocessor macro to generate error on a NULL vector */
    103 #define PS_CHECK_NULL_VECTOR_ACTION(NAME, ACTION) \
    104 if (NAME == NULL || NAME->data.V == NULL) { \
    105     if (ACTION == 0) { \
    106         psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
    107         return(NULL); \
    108     } \
    109     if (ACTION == 1) { \
    110         psAbort(__func__, "Unallowable operation: %s or its data is NULL.", #NAME); \
    111     } \
     99    return(NULL); \
    112100}
    113101
     
    120108
    121109/** Preprocessor macro to generate error on a NULL poniter */
    122 #define PS_CHECK_NULL_PTR(NAME) \
    123 if (NAME == NULL) { \
    124     psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
    125 }
    126 
    127 /** Preprocessor macro to generate error on a NULL poniter */
    128110#define PS_CHECK_NULL_PTR_RETURN_NULL(NAME) \
    129111if (NAME == NULL) { \
    130112    psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
    131113    return(NULL); \
    132 }
    133 
    134 /** Preprocessor macro to generate error for zero length vector */
    135 #define PS_CHECK_EMPTY_VECTOR(NAME) \
    136 if (NAME->n < 1) { \
    137     psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    138 }
    139 
    140 /** Preprocessor macro to generate error for zero length vector */
    141 #define PS_CHECK_EMPTY_VECTOR_ACTION(NAME, ACTION) \
    142 if (NAME->n < 1) { \
    143     if (ACTION == 0) { \
    144         psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    145         return(NULL); \
    146     } \
    147     if (ACTION == 1) { \
    148         psAbort(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    149     } \
    150114}
    151115
     
    158122
    159123/** Preprocessor macro to generate error on differing size vectors */
    160 #define PS_CHECK_VECTOR_SIZE_EQUAL(VEC1, VEC2) \
     124#define PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_NULL(VEC1, VEC2) \
    161125if (VEC1->n != VEC2->n) { \
    162126    psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
     127    return(NULL); \
    163128}
    164129
     
    171136
    172137/** Preprocessor macro to generate error on a NULL image */
    173 #define PS_CHECK_NULL_IMAGE(NAME)                                                          \
     138#define PS_CHECK_NULL_IMAGE_RETURN_NULL(NAME) \
    174139if (NAME == NULL || NAME->data.V == NULL) {                                                         \
    175140    psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME);                          \
     141    return(NULL); \
    176142}
    177143
    178144/** Preprocessor macro to generate error for zero length rows or columns */
    179 #define PS_CHECK_EMPTY_IMAGE(NAME)                                                          \
     145#define PS_CHECK_EMPTY_IMAGE_RETURN_NULL(NAME) \
    180146if (NAME->numCols < 1 || NAME->numRows < 1) {                                                       \
    181147    psError(__func__,"Unallowable operation: %s has zero rows or columns (%dx%d).", #NAME,              \
    182148            NAME->numCols, NAME->numRows);                                                          \
    183 }
    184 
    185 /** Preprocessor macro to generate error on a NULL 1DPolynomial */
    186 #define PS_CHECK_NULL_1DPOLY(NAME)                                                          \
    187 if (NAME == NULL || NAME->coeff == NULL) {                                                         \
    188     psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME);                          \
    189 }
    190 
    191 /** Preprocessor macro to generate error on a NULL 1DPolynomial */
    192 #define PS_CHECK_NULL_1DPOLY_ACTION(NAME, ACTION)                                                          \
    193 if (NAME == NULL || NAME->coeff == NULL) {                                                         \
    194     if (ACTION == 0) { \
    195         psError(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME);                          \
    196         return(NULL); \
    197     } \
    198     if (ACTION == 1) { \
    199         psAbort(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME);                          \
    200     } \
     149    return(NULL); \
    201150}
    202151
     
    206155    return(NULL); \
    207156} \
     157
     158
     159
     160
    208161
    209162#define PS_PRINT_VECTOR(NAME) \
     
    216169psVector *X32 = psVectorAlloc(X64->n, PS_TYPE_F32); \
    217170for (int i=0;i<X64->n;i++) { \
    218     X32->data.F32[i] = X64->data.F64[i]; \
     171    X32->data.F32[i] = (float) X64->data.F64[i]; \
    219172} \
     173
     174#define PS_VECTOR_F32_TO_F64(X32, X64) \
     175psVector *X64 = psVectorAlloc(X32->n, PS_TYPE_F64); \
     176for (int i=0;i<X32->n;i++) { \
     177    X64->data.F64[i] = (float) X32->data.F32[i]; \
     178} \
     179
    220180
    221181#define PS_MAX(A, B) \
  • trunk/psLib/src/dataManip/psMinimize.c

    r1963 r1964  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-05 22:47:21 $
     11 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-05 23:14:15 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8080}
    8181
    82 /******************************************************************************
    83 VectorNormalizeGen(): this routine returns a psVector with "x" elements.  The
    84 values of the vector will be scaled uniformly between -1.0 and 1.0.
    85  
    86 XXX: use a static vector.
    87 *****************************************************************************/
    88 psVector* VectorNormalizeGen(int x)
    89 {
    90     int i = 0;
    91     psVector *tmp = NULL;
    92 
    93     tmp = psVectorAlloc(x, PS_TYPE_F32);
    94     for (i = 0; i < x; i++) {
    95         tmp->data.F32[i] = (((float)2 * i) / ((float)x)) - 1.0;
    96     }
    97 
    98     return (tmp);
    99 }
    100 
    10182/*****************************************************************************
    10283CalculateSecondDerivs(): Given a set of x/y vectors corresponding to a
     
    10788here defined to be 0.0.  They can be modified via ypo and yp1.
    10889 
     90This routine assumes that vectors x and y are of the appropriate types/sizes
     91(F32).
     92 
    10993XXX: This algorithm is derived from the Numerical Recipes.
    110 XXX: use recyvled vectors for internal data.
     94XXX: use recycled vectors for internal data.
     95XXX: do an F64 version?
    11196 *****************************************************************************/
    11297float *CalculateSecondDerivs(const psVector* restrict x,        ///< Ordinates (or NULL to just use the indices)
     
    179164evalSpline() which computes the interpolated value based on the cubic spline
    180165polynomials which are stored in psSpline1D.
     166 
     167XXX: check types/sizes
     168XXX: This is F32 only
    181169 *****************************************************************************/
    182170float p_psNRSpline1DEval(psSpline1D *spline,
     
    236224 
    237225XXX: usage of yErr is not specified in IfA documentation.
    238 XXX: Must do: if yErr==NULL, set all errors equal.
    239  
    240226XXX: Is the x argument redundant?  What do we do if the x argument is
    241  supplied, but does not equal the domains specified in mySpline?
    242  
     227supplied, but does not equal the domains specified in mySpline?
    243228XXX: can psSpline be NULL?
    244  
    245 XXX: Implemented in F32 only, must add F64.
    246229 *****************************************************************************/
    247230psSpline1D *psVectorFitSpline1D(psSpline1D *mySpline,              ///< The spline which will be generated.
     
    655638coefficients of that polynomial.
    656639 
    657 XXX:
    658 yErr is currently ignored.
    659  
    660 XXX:
    661 Use private name?
     640XXX: yErr is currently ignored.
     641 
     642XXX: Use private name?
    662643*****************************************************************************/
    663644psPolynomial1D *p_psVectorFitPolynomial1DCheby(psPolynomial1D* myPoly,
     
    737718 
    738719XXX: Use private name?
     720XXX: Use recycled vectors.
    739721 *****************************************************************************/
    740722psPolynomial1D* p_psVectorFitPolynomial1DOrd(psPolynomial1D* myPoly,
     
    761743    // printf("(x, y, yErr) is (%f, %f, %f)\n", x->data.F64[i], y->data.F64[i], yErr->data.F64[i]);
    762744    // }
    763 
    764     // XXX: Some of these are redundant.
    765     PS_CHECK_NULL_1DPOLY(myPoly);
    766     PS_CHECK_NULL_VECTOR(y);
    767     PS_CHECK_EMPTY_VECTOR(y);
    768     PS_CHECK_EMPTY_VECTOR(x);
    769     PS_CHECK_NULL_VECTOR(yErr);
    770     PS_CHECK_EMPTY_VECTOR(yErr);
    771     PS_CHECK_VECTOR_SIZE_EQUAL(x, y);
    772     PS_CHECK_VECTOR_SIZE_EQUAL(y, yErr);
    773745
    774746    A = psImageAlloc(polyOrder, polyOrder, PS_TYPE_F64);
     
    949921increases, or x is too large.  If thst does not work, expand in the other
    950922direction.
     923 
     924XXX: This is F32 only
    951925 *****************************************************************************/
    952926psVector *p_psDetermineBracket(psVector *params,
     
    11281102XXX: This routine is not very efficient in terms of total evaluations of the
    11291103function.
     1104XXX: This is F32 only
    11301105 *****************************************************************************/
    11311106float p_psLineMin(psMinimization *min,
     
    15011476This functions uses global variables to receive the function pointer, the
    15021477data values, and the data errors.
     1478XXX: This is F32 only
    15031479 *****************************************************************************/
    15041480float myPowellChi2Func(const psVector *params,
  • trunk/psLib/src/dataManip/psStats.c

    r1963 r1964  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-05 22:47:21 $
     11 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-05 23:14:15 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    18551855        psAbort(__func__, "psVectorStats() called with range: %f to %f\n", stats->min, stats->max);
    18561856    }
    1857     // PS_CHECK_VECTOR_TYPE(in, PS_TYPE_F32);
     1857
    18581858    if (mask != NULL) {
    1859         PS_CHECK_NULL_VECTOR(mask);
    1860         PS_CHECK_EMPTY_VECTOR(mask);
    1861         PS_CHECK_VECTOR_SIZE_EQUAL(mask, in);
    1862         PS_CHECK_VECTOR_TYPE(mask, PS_TYPE_U8);
     1859        PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_NULL(mask, in);
     1860        PS_CHECK_VECTOR_TYPE_RETURN_NULL(mask, PS_TYPE_U8);
    18631861    }
    18641862    // ************************************************************************
  • trunk/psLib/src/math/psConstants.h

    r1963 r1964  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-05 22:47:21 $
     8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-05 23:14:15 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8888p_psMemSetPersistent(NAME->data.V, true); \
    8989
     90
     91
     92
     93
     94
    9095/** Preprocessor macro to generate error on an incorrect type */
    91 #define PS_CHECK_VECTOR_TYPE(NAME, TYPE) \
     96#define PS_CHECK_VECTOR_TYPE_RETURN_NULL(NAME, TYPE) \
    9297if (NAME->type.type != TYPE) { \
    9398    psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \
    94 }
    95 
    96 /** Preprocessor macro to generate error on a NULL vector */
    97 #define PS_CHECK_NULL_VECTOR(NAME) \
    98 if (NAME == NULL || NAME->data.V == NULL) { \
    99     psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
    100 }
    101 
    102 /** Preprocessor macro to generate error on a NULL vector */
    103 #define PS_CHECK_NULL_VECTOR_ACTION(NAME, ACTION) \
    104 if (NAME == NULL || NAME->data.V == NULL) { \
    105     if (ACTION == 0) { \
    106         psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
    107         return(NULL); \
    108     } \
    109     if (ACTION == 1) { \
    110         psAbort(__func__, "Unallowable operation: %s or its data is NULL.", #NAME); \
    111     } \
     99    return(NULL); \
    112100}
    113101
     
    120108
    121109/** Preprocessor macro to generate error on a NULL poniter */
    122 #define PS_CHECK_NULL_PTR(NAME) \
    123 if (NAME == NULL) { \
    124     psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
    125 }
    126 
    127 /** Preprocessor macro to generate error on a NULL poniter */
    128110#define PS_CHECK_NULL_PTR_RETURN_NULL(NAME) \
    129111if (NAME == NULL) { \
    130112    psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
    131113    return(NULL); \
    132 }
    133 
    134 /** Preprocessor macro to generate error for zero length vector */
    135 #define PS_CHECK_EMPTY_VECTOR(NAME) \
    136 if (NAME->n < 1) { \
    137     psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    138 }
    139 
    140 /** Preprocessor macro to generate error for zero length vector */
    141 #define PS_CHECK_EMPTY_VECTOR_ACTION(NAME, ACTION) \
    142 if (NAME->n < 1) { \
    143     if (ACTION == 0) { \
    144         psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    145         return(NULL); \
    146     } \
    147     if (ACTION == 1) { \
    148         psAbort(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    149     } \
    150114}
    151115
     
    158122
    159123/** Preprocessor macro to generate error on differing size vectors */
    160 #define PS_CHECK_VECTOR_SIZE_EQUAL(VEC1, VEC2) \
     124#define PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_NULL(VEC1, VEC2) \
    161125if (VEC1->n != VEC2->n) { \
    162126    psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
     127    return(NULL); \
    163128}
    164129
     
    171136
    172137/** Preprocessor macro to generate error on a NULL image */
    173 #define PS_CHECK_NULL_IMAGE(NAME)                                                          \
     138#define PS_CHECK_NULL_IMAGE_RETURN_NULL(NAME) \
    174139if (NAME == NULL || NAME->data.V == NULL) {                                                         \
    175140    psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME);                          \
     141    return(NULL); \
    176142}
    177143
    178144/** Preprocessor macro to generate error for zero length rows or columns */
    179 #define PS_CHECK_EMPTY_IMAGE(NAME)                                                          \
     145#define PS_CHECK_EMPTY_IMAGE_RETURN_NULL(NAME) \
    180146if (NAME->numCols < 1 || NAME->numRows < 1) {                                                       \
    181147    psError(__func__,"Unallowable operation: %s has zero rows or columns (%dx%d).", #NAME,              \
    182148            NAME->numCols, NAME->numRows);                                                          \
    183 }
    184 
    185 /** Preprocessor macro to generate error on a NULL 1DPolynomial */
    186 #define PS_CHECK_NULL_1DPOLY(NAME)                                                          \
    187 if (NAME == NULL || NAME->coeff == NULL) {                                                         \
    188     psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME);                          \
    189 }
    190 
    191 /** Preprocessor macro to generate error on a NULL 1DPolynomial */
    192 #define PS_CHECK_NULL_1DPOLY_ACTION(NAME, ACTION)                                                          \
    193 if (NAME == NULL || NAME->coeff == NULL) {                                                         \
    194     if (ACTION == 0) { \
    195         psError(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME);                          \
    196         return(NULL); \
    197     } \
    198     if (ACTION == 1) { \
    199         psAbort(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME);                          \
    200     } \
     149    return(NULL); \
    201150}
    202151
     
    206155    return(NULL); \
    207156} \
     157
     158
     159
     160
    208161
    209162#define PS_PRINT_VECTOR(NAME) \
     
    216169psVector *X32 = psVectorAlloc(X64->n, PS_TYPE_F32); \
    217170for (int i=0;i<X64->n;i++) { \
    218     X32->data.F32[i] = X64->data.F64[i]; \
     171    X32->data.F32[i] = (float) X64->data.F64[i]; \
    219172} \
     173
     174#define PS_VECTOR_F32_TO_F64(X32, X64) \
     175psVector *X64 = psVectorAlloc(X32->n, PS_TYPE_F64); \
     176for (int i=0;i<X32->n;i++) { \
     177    X64->data.F64[i] = (float) X32->data.F32[i]; \
     178} \
     179
    220180
    221181#define PS_MAX(A, B) \
  • trunk/psLib/src/math/psMinimize.c

    r1963 r1964  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-05 22:47:21 $
     11 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-05 23:14:15 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8080}
    8181
    82 /******************************************************************************
    83 VectorNormalizeGen(): this routine returns a psVector with "x" elements.  The
    84 values of the vector will be scaled uniformly between -1.0 and 1.0.
    85  
    86 XXX: use a static vector.
    87 *****************************************************************************/
    88 psVector* VectorNormalizeGen(int x)
    89 {
    90     int i = 0;
    91     psVector *tmp = NULL;
    92 
    93     tmp = psVectorAlloc(x, PS_TYPE_F32);
    94     for (i = 0; i < x; i++) {
    95         tmp->data.F32[i] = (((float)2 * i) / ((float)x)) - 1.0;
    96     }
    97 
    98     return (tmp);
    99 }
    100 
    10182/*****************************************************************************
    10283CalculateSecondDerivs(): Given a set of x/y vectors corresponding to a
     
    10788here defined to be 0.0.  They can be modified via ypo and yp1.
    10889 
     90This routine assumes that vectors x and y are of the appropriate types/sizes
     91(F32).
     92 
    10993XXX: This algorithm is derived from the Numerical Recipes.
    110 XXX: use recyvled vectors for internal data.
     94XXX: use recycled vectors for internal data.
     95XXX: do an F64 version?
    11196 *****************************************************************************/
    11297float *CalculateSecondDerivs(const psVector* restrict x,        ///< Ordinates (or NULL to just use the indices)
     
    179164evalSpline() which computes the interpolated value based on the cubic spline
    180165polynomials which are stored in psSpline1D.
     166 
     167XXX: check types/sizes
     168XXX: This is F32 only
    181169 *****************************************************************************/
    182170float p_psNRSpline1DEval(psSpline1D *spline,
     
    236224 
    237225XXX: usage of yErr is not specified in IfA documentation.
    238 XXX: Must do: if yErr==NULL, set all errors equal.
    239  
    240226XXX: Is the x argument redundant?  What do we do if the x argument is
    241  supplied, but does not equal the domains specified in mySpline?
    242  
     227supplied, but does not equal the domains specified in mySpline?
    243228XXX: can psSpline be NULL?
    244  
    245 XXX: Implemented in F32 only, must add F64.
    246229 *****************************************************************************/
    247230psSpline1D *psVectorFitSpline1D(psSpline1D *mySpline,              ///< The spline which will be generated.
     
    655638coefficients of that polynomial.
    656639 
    657 XXX:
    658 yErr is currently ignored.
    659  
    660 XXX:
    661 Use private name?
     640XXX: yErr is currently ignored.
     641 
     642XXX: Use private name?
    662643*****************************************************************************/
    663644psPolynomial1D *p_psVectorFitPolynomial1DCheby(psPolynomial1D* myPoly,
     
    737718 
    738719XXX: Use private name?
     720XXX: Use recycled vectors.
    739721 *****************************************************************************/
    740722psPolynomial1D* p_psVectorFitPolynomial1DOrd(psPolynomial1D* myPoly,
     
    761743    // printf("(x, y, yErr) is (%f, %f, %f)\n", x->data.F64[i], y->data.F64[i], yErr->data.F64[i]);
    762744    // }
    763 
    764     // XXX: Some of these are redundant.
    765     PS_CHECK_NULL_1DPOLY(myPoly);
    766     PS_CHECK_NULL_VECTOR(y);
    767     PS_CHECK_EMPTY_VECTOR(y);
    768     PS_CHECK_EMPTY_VECTOR(x);
    769     PS_CHECK_NULL_VECTOR(yErr);
    770     PS_CHECK_EMPTY_VECTOR(yErr);
    771     PS_CHECK_VECTOR_SIZE_EQUAL(x, y);
    772     PS_CHECK_VECTOR_SIZE_EQUAL(y, yErr);
    773745
    774746    A = psImageAlloc(polyOrder, polyOrder, PS_TYPE_F64);
     
    949921increases, or x is too large.  If thst does not work, expand in the other
    950922direction.
     923 
     924XXX: This is F32 only
    951925 *****************************************************************************/
    952926psVector *p_psDetermineBracket(psVector *params,
     
    11281102XXX: This routine is not very efficient in terms of total evaluations of the
    11291103function.
     1104XXX: This is F32 only
    11301105 *****************************************************************************/
    11311106float p_psLineMin(psMinimization *min,
     
    15011476This functions uses global variables to receive the function pointer, the
    15021477data values, and the data errors.
     1478XXX: This is F32 only
    15031479 *****************************************************************************/
    15041480float myPowellChi2Func(const psVector *params,
  • trunk/psLib/src/math/psStats.c

    r1963 r1964  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-10-05 22:47:21 $
     11 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-10-05 23:14:15 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    18551855        psAbort(__func__, "psVectorStats() called with range: %f to %f\n", stats->min, stats->max);
    18561856    }
    1857     // PS_CHECK_VECTOR_TYPE(in, PS_TYPE_F32);
     1857
    18581858    if (mask != NULL) {
    1859         PS_CHECK_NULL_VECTOR(mask);
    1860         PS_CHECK_EMPTY_VECTOR(mask);
    1861         PS_CHECK_VECTOR_SIZE_EQUAL(mask, in);
    1862         PS_CHECK_VECTOR_TYPE(mask, PS_TYPE_U8);
     1859        PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_NULL(mask, in);
     1860        PS_CHECK_VECTOR_TYPE_RETURN_NULL(mask, PS_TYPE_U8);
    18631861    }
    18641862    // ************************************************************************
Note: See TracChangeset for help on using the changeset viewer.