Changeset 1903 for trunk/psLib/src/math/psStats.c
- Timestamp:
- Sep 25, 2004, 1:05:07 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r1879 r1903 7 7 * on those data structures. 8 8 * 9 * @author G eorge Gusciora, MHPCC9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.5 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-09-2 4 20:08:22$11 * @version $Revision: 1.59 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-09-25 23:05:07 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 #include "psMinimize.h" 35 35 #include "psFunctions.h" 36 #include "psConstants.h" 36 37 37 38 /*****************************************************************************/ … … 51 52 void p_psVectorRobustStats(const psVector* restrict myVector, 52 53 const psVector* restrict maskVector, unsigned int maskVal, psStats* stats); 53 54 /** Preprocessor macro to generate error on an incorrect type */55 #define PS_CHECK_VECTOR_TYPE(NAME, TYPE) \56 if (NAME->type.type != TYPE) { \57 psError(__func__,"Invalid operation: %s has incorrect type.", #NAME); \58 }59 60 /** Preprocessor macro to generate error on a NULL vector */61 #define PS_CHECK_NULL_VECTOR(NAME) \62 if (NAME == NULL || NAME->data.V == NULL) { \63 psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME); \64 }65 66 /** Preprocessor macro to generate error for zero length vector */67 #define PS_CHECK_EMPTY_VECTOR(NAME) \68 if (NAME->n < 1) { \69 psError(__func__,"Invalid operation: %s has zero n value.", #NAME); \70 }71 72 /** Preprocessor macro to generate error on differing size vectors */73 #define PS_CHECK_VECTOR_SIZE_EQUAL(VEC1, VEC2) \74 if (VEC1->n != VEC2->n) { \75 psError(__func__,"Vector %s has size %d, Vector %s has size %d.", #VEC1, VEC1->n, #VEC2, VEC2->n); \76 }77 78 #define PS_PRINT_VECTOR(NAME) \79 for (int my_i=0;my_i<NAME->n;my_i++) { \80 printf("%s->data.F32[%d] is %f\n", #NAME, my_i, NAME->data.F32[my_i]); \81 } \82 printf("\n"); \83 54 84 55
Note:
See TracChangeset
for help on using the changeset viewer.
