IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2004, 10:11:47 AM (22 years ago)
Author:
gusciora
Message:

I've been unifying the naming conventions for various macros that check
functions parameters for type, size, non-NULL ...

File:
1 edited

Legend:

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

    r2212 r2213  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 20:07:17 $
     8 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 20:11:46 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    119119
    120120/** Preprocessor macro to generate error on an incorrect type */
    121 #define PS_CHECK_VECTOR_TYPE(NAME, TYPE, RVAL) \
     121#define PS_VECTOR_CHECK_TYPE(NAME, TYPE, RVAL) \
    122122if (NAME->type.type != TYPE) { \
    123123    psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \
     
    126126
    127127/** Preprocessor macro to generate error on a NULL vector */
    128 #define PS_CHECK_NULL_VECTOR(NAME, RVAL) \
     128#define PS_VECTOR_CHEC_NULL(NAME, RVAL) \
    129129if (NAME == NULL || NAME->data.V == NULL) { \
    130130    psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \
     
    133133
    134134/** Preprocessor macro to generate error for zero length vector */
    135 #define PS_CHECK_EMPTY_VECTOR(NAME, RVAL) \
     135#define PS_VECTOR_CHECK_EMPTY(NAME, RVAL) \
    136136if (NAME->n < 1) { \
    137137    psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \
     
    140140
    141141/** Preprocessor macro to generate error on differing size vectors */
    142 #define PS_CHECK_VECTOR_SIZE_EQUAL(VEC1, VEC2, RVAL) \
     142#define PS_VECTOR_CHECK_SIZE_EQUAL(VEC1, VEC2, RVAL) \
    143143if (VEC1->n != VEC2->n) { \
    144144    psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
     
    146146}
    147147
    148 #define PS_PRINT_VECTOR(NAME) \
     148#define PS_VECTOR_PRINT(NAME) \
    149149for (int my_i=0;my_i<NAME->n;my_i++) { \
    150150    printf("%s->data.F32[%d] is %f\n", #NAME, my_i, NAME->data.F32[my_i]); \
Note: See TracChangeset for help on using the changeset viewer.