Changeset 2214 for trunk/psLib/src/math/psMatrix.c
- Timestamp:
- Oct 27, 2004, 10:20:11 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psMatrix.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMatrix.c
r2213 r2214 20 20 * @author Ross Harman, MHPCC 21 21 * 22 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $23 * @date $Date: 2004-10-27 20: 11:47$22 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2004-10-27 20:20:11 $ 24 24 * 25 25 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 42 42 43 43 /** Preprocessor macro to generate error a NULL image */ 44 #define PS_VECTOR_CHEC _NULL(NAME, RETURN) \44 #define PS_VECTOR_CHECK_NULL(NAME, RETURN) \ 45 45 if (NAME == NULL || NAME->data.V == NULL) { \ 46 46 psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME); \ … … 62 62 63 63 /** Preprocessor macro to generate error a NULL image */ 64 #define PS_ CHECK_NULL_IMAGE(NAME, RETURN) \64 #define PS_IMAGE_CHECK_NULL(NAME, RETURN) \ 65 65 if (NAME == NULL || NAME->data.V == NULL) { \ 66 66 psError(__func__,"Invalid operation: %s or its data is NULL.", #NAME); \ … … 128 128 // Error checks 129 129 PS_CHECK_POINTERS(inImage, outImage, outImage); 130 PS_ CHECK_NULL_IMAGE(inImage, outImage);130 PS_IMAGE_CHECK_NULL(inImage, outImage); 131 131 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outImage); 132 132 PS_CHECK_SIZE_IMAGE(inImage, outImage); … … 135 135 PS_CHECK_SIZE_IMAGE(outImage, outImage); 136 136 PS_CHECK_ALLOC_VECTOR(outPerm, inImage->numRows, inImage->type.type); 137 PS_VECTOR_CHEC _NULL(outPerm, outImage);137 PS_VECTOR_CHECK_NULL(outPerm, outImage); 138 138 PS_CHECK_DIMEN_AND_TYPE(outPerm, PS_DIMEN_VECTOR, outImage); 139 139 … … 177 177 PS_CHECK_POINTERS(inVector, inPerm, outVector); 178 178 PS_CHECK_POINTERS(outVector, inPerm, outVector); 179 PS_ CHECK_NULL_IMAGE(inImage, outVector);179 PS_IMAGE_CHECK_NULL(inImage, outVector); 180 180 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outVector); 181 181 PS_CHECK_SIZE_IMAGE(inImage, outVector); 182 182 PS_CHECK_ALLOC_VECTOR(outVector, inImage->numRows, inImage->type.type); 183 PS_VECTOR_CHEC _NULL(outVector, outVector);183 PS_VECTOR_CHECK_NULL(outVector, outVector); 184 184 PS_CHECK_DIMEN_AND_TYPE(outVector, PS_DIMEN_VECTOR, outVector); 185 PS_VECTOR_CHEC _NULL(inVector, outVector);185 PS_VECTOR_CHECK_NULL(inVector, outVector); 186 186 PS_CHECK_DIMEN_AND_TYPE(inVector, PS_DIMEN_VECTOR, outVector); 187 PS_VECTOR_CHEC _NULL(inPerm, outVector);187 PS_VECTOR_CHECK_NULL(inPerm, outVector); 188 188 PS_CHECK_DIMEN_AND_TYPE(inPerm, PS_DIMEN_VECTOR, outVector); 189 189 … … 231 231 } 232 232 PS_CHECK_POINTERS(inImage, outImage, outImage); 233 PS_ CHECK_NULL_IMAGE(inImage, outImage);233 PS_IMAGE_CHECK_NULL(inImage, outImage); 234 234 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outImage); 235 235 PS_CHECK_SIZE_IMAGE(inImage, outImage); … … 280 280 281 281 // Error checks 282 PS_ CHECK_NULL_IMAGE(inImage, NULL);282 PS_IMAGE_CHECK_NULL(inImage, NULL); 283 283 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, NULL); 284 284 PS_CHECK_SIZE_IMAGE(inImage, NULL); … … 323 323 PS_CHECK_POINTERS(inImage1, outImage, outImage); 324 324 PS_CHECK_POINTERS(inImage1, inImage2, outImage); 325 PS_ CHECK_NULL_IMAGE(inImage1, outImage);325 PS_IMAGE_CHECK_NULL(inImage1, outImage); 326 326 PS_CHECK_DIMEN_AND_TYPE(inImage1, PS_DIMEN_IMAGE, outImage); 327 327 PS_CHECK_SIZE_IMAGE(inImage1, outImage); 328 PS_ CHECK_NULL_IMAGE(inImage2, outImage);328 PS_IMAGE_CHECK_NULL(inImage2, outImage); 329 329 PS_CHECK_DIMEN_AND_TYPE(inImage2, PS_DIMEN_IMAGE, outImage); 330 330 PS_CHECK_SIZE_IMAGE(inImage2, outImage); … … 362 362 // Error checks 363 363 PS_CHECK_POINTERS(inImage, outImage, outImage); 364 PS_ CHECK_NULL_IMAGE(inImage, outImage);364 PS_IMAGE_CHECK_NULL(inImage, outImage); 365 365 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outImage); 366 366 PS_CHECK_SIZE_IMAGE(inImage, outImage); … … 401 401 // Error checks 402 402 PS_CHECK_POINTERS(inImage, outImage, outImage); 403 PS_ CHECK_NULL_IMAGE(inImage, outImage);403 PS_IMAGE_CHECK_NULL(inImage, outImage); 404 404 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outImage); 405 405 PS_CHECK_SIZE_IMAGE(inImage, outImage); … … 439 439 440 440 // Error checks 441 PS_ CHECK_NULL_IMAGE(inImage, outVector);441 PS_IMAGE_CHECK_NULL(inImage, outVector); 442 442 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outVector); 443 443 PS_CHECK_SIZE_IMAGE(inImage, outVector); … … 456 456 } 457 457 458 PS_VECTOR_CHEC _NULL(outVector, outVector);458 PS_VECTOR_CHECK_NULL(outVector, outVector); 459 459 460 460 // More checks … … 498 498 499 499 // Error checks 500 PS_VECTOR_CHEC _NULL(inVector, outImage);500 PS_VECTOR_CHECK_NULL(inVector, outImage); 501 501 502 502 if (inVector->type.dimen == PS_DIMEN_VECTOR) { … … 531 531 } 532 532 533 PS_ CHECK_NULL_IMAGE(outImage, outImage);533 PS_IMAGE_CHECK_NULL(outImage, outImage); 534 534 PS_CHECK_DIMEN_AND_TYPE(outImage, PS_DIMEN_IMAGE, outImage); 535 535
Note:
See TracChangeset
for help on using the changeset viewer.
