IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 4, 2004, 3:43:58 PM (22 years ago)
Author:
gusciora
Message:

Added F32 types for the VectorFit routine.

File:
1 edited

Legend:

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

    r1945 r1953  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-03 23:35:47 $
     8 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-05 01:43:58 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1818#define RIGHT_SPLINE_DERIV 0.0
    1919
     20#define GEN_STATIC_RECYCLED_VECTOR(NAME, SIZE, TYPE) \
     21static psVector *NAME = NULL; \
     22NAME = psVectorRecycle(NAME, SIZE, TYPE); \
     23p_psMemSetPersistent(NAME, true); \
     24p_psMemSetPersistent(NAME->data.V, true); \
     25
     26
     27
     28
    2029/** Preprocessor macro to generate error on an incorrect type */
    2130#define PS_CHECK_VECTOR_TYPE(NAME, TYPE) \
    2231if (NAME->type.type != TYPE) { \
    23     psError(__func__,"Invalid operation: %s has incorrect type.", #NAME); \
     32    psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \
    2433}
    2534
     
    2736#define PS_CHECK_NULL_VECTOR(NAME) \
    2837if (NAME == NULL || NAME->data.V == NULL) { \
    29     psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME); \
     38    psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
    3039}
    3140
     
    3443if (NAME == NULL || NAME->data.V == NULL) { \
    3544    if (ACTION == 0) { \
    36         psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME); \
     45        psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
    3746        return(NULL); \
    3847    } \
    3948    if (ACTION == 1) { \
    40         psAbort(__func__, "Invalid operation: %s or its data is NULL.", #NAME); \
     49        psAbort(__func__, "Unallowable operation: %s or its data is NULL.", #NAME); \
    4150    } \
    4251}
     
    4554#define PS_CHECK_NULL_PTR(NAME) \
    4655if (NAME == NULL) { \
    47     psError(__func__,"Invalid operation: %s is NULL.", #NAME); \
     56    psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
    4857}
    4958
     
    5160#define PS_CHECK_EMPTY_VECTOR(NAME) \
    5261if (NAME->n < 1) { \
    53     psError(__func__,"Invalid operation: %s has zero n value.", #NAME); \
     62    psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    5463}
    5564
     
    5867if (NAME->n < 1) { \
    5968    if (ACTION == 0) { \
    60         psError(__func__,"Invalid operation: %s has zero n value.", #NAME); \
     69        psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    6170        return(NULL); \
    6271    } \
    6372    if (ACTION == 1) { \
    64         psAbort(__func__,"Invalid operation: %s has zero n value.", #NAME); \
     73        psAbort(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
    6574    } \
    6675}
     
    7584#define PS_CHECK_NULL_IMAGE(NAME)                                                           \
    7685if (NAME == NULL || NAME->data.V == NULL) {                                                         \
    77     psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME);                          \
     86    psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME);                          \
    7887}
    7988
     
    8190#define PS_CHECK_EMPTY_IMAGE(NAME)                                                           \
    8291if (NAME->numCols < 1 || NAME->numRows < 1) {                                                       \
    83     psError(__func__,"Invalid operation: %s has zero rows or columns (%dx%d).", #NAME,              \
     92    psError(__func__,"Unallowable operation: %s has zero rows or columns (%dx%d).", #NAME,              \
    8493            NAME->numCols, NAME->numRows);                                                          \
    8594}
     
    8897#define PS_CHECK_NULL_1DPOLY(NAME)                                                          \
    8998if (NAME == NULL || NAME->coeff == NULL) {                                                         \
    90     psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME);                          \
     99    psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME);                          \
    91100}
    92101
     
    95104if (NAME == NULL || NAME->coeff == NULL) {                                                         \
    96105    if (ACTION == 0) { \
    97         psError(__func__,"Invalid operation: %s or its coeffs is NULL.", #NAME);                          \
     106        psError(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME);                          \
    98107        return(NULL); \
    99108    } \
    100109    if (ACTION == 1) { \
    101         psAbort(__func__,"Invalid operation: %s or its coeffs is NULL.", #NAME);                          \
     110        psAbort(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME);                          \
    102111    } \
    103112}
Note: See TracChangeset for help on using the changeset viewer.