IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 3:21:01 PM (22 years ago)
Author:
gusciora
Message:

added PS_CHECK_VECTOR_SIZE_EQUAL() macro

File:
1 edited

Legend:

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

    r2207 r2208  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 01:17:53 $
     8 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 01:21:01 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    121121} \
    122122
     123/** Preprocessor macro to generate error on differing size vectors */
     124#define PS_CHECK_VECTOR_SIZE_EQUAL(VEC1, VEC2, RVAL) \
     125if (VEC1->n != VEC2->n) { \
     126    psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
     127    return(RVAL); \
     128}
    123129
    124130
    125 /** Preprocessor macro to generate error on differing size vectors */
    126 #define PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_NULL(VEC1, VEC2) \
    127 if (VEC1->n != VEC2->n) { \
    128     psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
    129     return(NULL); \
    130 }
    131131
    132 /** Preprocessor macro to generate error on differing size vectors */
    133 #define PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_F0(VEC1, VEC2) \
    134 if (VEC1->n != VEC2->n) { \
    135     psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
    136     return(0.0); \
    137 }
    138132
    139 /** Preprocessor macro to generate error on differing size vectors */
    140 #define PS_CHECK_VECTOR_SIZE_EQUAL_RETURN_NULL(VEC1, VEC2) \
    141 if (VEC1->n != VEC2->n) { \
    142     psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \
    143     return(NULL); \
    144 }
     133
    145134
    146135/** Preprocessor macro to generate error on a NULL image */
Note: See TracChangeset for help on using the changeset viewer.