Changeset 1953 for trunk/psLib/src/math/psConstants.h
- Timestamp:
- Oct 4, 2004, 3:43:58 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psConstants.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psConstants.h
r1945 r1953 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-10-0 3 23:35:47$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-10-05 01:43:58 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 18 18 #define RIGHT_SPLINE_DERIV 0.0 19 19 20 #define GEN_STATIC_RECYCLED_VECTOR(NAME, SIZE, TYPE) \ 21 static psVector *NAME = NULL; \ 22 NAME = psVectorRecycle(NAME, SIZE, TYPE); \ 23 p_psMemSetPersistent(NAME, true); \ 24 p_psMemSetPersistent(NAME->data.V, true); \ 25 26 27 28 20 29 /** Preprocessor macro to generate error on an incorrect type */ 21 30 #define PS_CHECK_VECTOR_TYPE(NAME, TYPE) \ 22 31 if (NAME->type.type != TYPE) { \ 23 psError(__func__," Invalidoperation: %s has incorrect type.", #NAME); \32 psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \ 24 33 } 25 34 … … 27 36 #define PS_CHECK_NULL_VECTOR(NAME) \ 28 37 if (NAME == NULL || NAME->data.V == NULL) { \ 29 psError(__func__," Invalidoperation: %s or its data is NULL.", #NAME); \38 psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \ 30 39 } 31 40 … … 34 43 if (NAME == NULL || NAME->data.V == NULL) { \ 35 44 if (ACTION == 0) { \ 36 psError(__func__," Invalidoperation: %s or its data is NULL.", #NAME); \45 psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \ 37 46 return(NULL); \ 38 47 } \ 39 48 if (ACTION == 1) { \ 40 psAbort(__func__, " Invalidoperation: %s or its data is NULL.", #NAME); \49 psAbort(__func__, "Unallowable operation: %s or its data is NULL.", #NAME); \ 41 50 } \ 42 51 } … … 45 54 #define PS_CHECK_NULL_PTR(NAME) \ 46 55 if (NAME == NULL) { \ 47 psError(__func__," Invalidoperation: %s is NULL.", #NAME); \56 psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \ 48 57 } 49 58 … … 51 60 #define PS_CHECK_EMPTY_VECTOR(NAME) \ 52 61 if (NAME->n < 1) { \ 53 psError(__func__," Invalidoperation: %s has zero n value.", #NAME); \62 psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \ 54 63 } 55 64 … … 58 67 if (NAME->n < 1) { \ 59 68 if (ACTION == 0) { \ 60 psError(__func__," Invalidoperation: %s has zero n value.", #NAME); \69 psError(__func__,"Unallowable operation: %s has zero n value.", #NAME); \ 61 70 return(NULL); \ 62 71 } \ 63 72 if (ACTION == 1) { \ 64 psAbort(__func__," Invalidoperation: %s has zero n value.", #NAME); \73 psAbort(__func__,"Unallowable operation: %s has zero n value.", #NAME); \ 65 74 } \ 66 75 } … … 75 84 #define PS_CHECK_NULL_IMAGE(NAME) \ 76 85 if (NAME == NULL || NAME->data.V == NULL) { \ 77 psError(__func__," Invalidoperation: %s or its data is NULL.", #NAME); \86 psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \ 78 87 } 79 88 … … 81 90 #define PS_CHECK_EMPTY_IMAGE(NAME) \ 82 91 if (NAME->numCols < 1 || NAME->numRows < 1) { \ 83 psError(__func__," Invalidoperation: %s has zero rows or columns (%dx%d).", #NAME, \92 psError(__func__,"Unallowable operation: %s has zero rows or columns (%dx%d).", #NAME, \ 84 93 NAME->numCols, NAME->numRows); \ 85 94 } … … 88 97 #define PS_CHECK_NULL_1DPOLY(NAME) \ 89 98 if (NAME == NULL || NAME->coeff == NULL) { \ 90 psError(__func__," Invalidoperation: %s or its data is NULL.", #NAME); \99 psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \ 91 100 } 92 101 … … 95 104 if (NAME == NULL || NAME->coeff == NULL) { \ 96 105 if (ACTION == 0) { \ 97 psError(__func__," Invalidoperation: %s or its coeffs is NULL.", #NAME); \106 psError(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME); \ 98 107 return(NULL); \ 99 108 } \ 100 109 if (ACTION == 1) { \ 101 psAbort(__func__," Invalidoperation: %s or its coeffs is NULL.", #NAME); \110 psAbort(__func__,"Unallowable operation: %s or its coeffs is NULL.", #NAME); \ 102 111 } \ 103 112 }
Note:
See TracChangeset
for help on using the changeset viewer.
