Changeset 1393 for trunk/psLib/src/math/psCompare.c
- Timestamp:
- Aug 5, 2004, 9:38:52 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psCompare.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psCompare.c
r1127 r1393 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-0 6-29 23:19:11$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-08-05 19:38:52 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 15 15 #include "psCompare.h" 16 16 17 #define compareNumericPtr(TYPE) \17 #define COMPARE_NUMERIC_PTR(TYPE) \ 18 18 int psCompare##TYPE##Ptr(const void** a, const void** b) { \ 19 19 return **((ps##TYPE**)a) - **((ps##TYPE**)b); \ 20 20 } 21 21 22 #define compareNumericPtrDescending(TYPE) \22 #define COMPARE_NUMERIC_PTR_DESCENDING(TYPE) \ 23 23 int psCompareDescending##TYPE##Ptr(const void** a, const void** b) { \ 24 24 return **((ps##TYPE**)b) - **((ps##TYPE**)a); \ 25 25 } 26 26 27 #define compareNumeric(TYPE) \27 #define COMPARE_NUMERIC(TYPE) \ 28 28 int psCompare##TYPE(const void* a, const void* b) { \ 29 29 return *((ps##TYPE*)a) - *((ps##TYPE*)b); \ 30 30 } 31 31 32 #define compareNumericDescending(TYPE) \32 #define COMPARE_NUMERIC_DESCENDING(TYPE) \ 33 33 int psCompare##TYPE##Descending(const void* a, const void* b) { \ 34 34 return *((ps##TYPE*)b) - *((ps##TYPE*)a); \ 35 35 } 36 36 37 compareNumericPtr(S8)38 compareNumericPtr(S16)39 compareNumericPtr(S32)40 compareNumericPtr(S64)41 compareNumericPtr(U8)42 compareNumericPtr(U16)43 compareNumericPtr(U32)44 compareNumericPtr(U64)45 compareNumericPtr(F32)46 compareNumericPtr(F64)37 COMPARE_NUMERIC_PTR(S8) 38 COMPARE_NUMERIC_PTR(S16) 39 COMPARE_NUMERIC_PTR(S32) 40 COMPARE_NUMERIC_PTR(S64) 41 COMPARE_NUMERIC_PTR(U8) 42 COMPARE_NUMERIC_PTR(U16) 43 COMPARE_NUMERIC_PTR(U32) 44 COMPARE_NUMERIC_PTR(U64) 45 COMPARE_NUMERIC_PTR(F32) 46 COMPARE_NUMERIC_PTR(F64) 47 47 48 compareNumericPtrDescending(S8)49 compareNumericPtrDescending(S16)50 compareNumericPtrDescending(S32)51 compareNumericPtrDescending(S64)52 compareNumericPtrDescending(U8)53 compareNumericPtrDescending(U16)54 compareNumericPtrDescending(U32)55 compareNumericPtrDescending(U64)56 compareNumericPtrDescending(F32)57 compareNumericPtrDescending(F64)48 COMPARE_NUMERIC_PTR_DESCENDING(S8) 49 COMPARE_NUMERIC_PTR_DESCENDING(S16) 50 COMPARE_NUMERIC_PTR_DESCENDING(S32) 51 COMPARE_NUMERIC_PTR_DESCENDING(S64) 52 COMPARE_NUMERIC_PTR_DESCENDING(U8) 53 COMPARE_NUMERIC_PTR_DESCENDING(U16) 54 COMPARE_NUMERIC_PTR_DESCENDING(U32) 55 COMPARE_NUMERIC_PTR_DESCENDING(U64) 56 COMPARE_NUMERIC_PTR_DESCENDING(F32) 57 COMPARE_NUMERIC_PTR_DESCENDING(F64) 58 58 59 compareNumeric(S8)60 compareNumeric(S16)61 compareNumeric(S32)62 compareNumeric(S64)63 compareNumeric(U8)64 compareNumeric(U16)65 compareNumeric(U32)66 compareNumeric(U64)67 compareNumeric(F32)68 compareNumeric(F64)59 COMPARE_NUMERIC(S8) 60 COMPARE_NUMERIC(S16) 61 COMPARE_NUMERIC(S32) 62 COMPARE_NUMERIC(S64) 63 COMPARE_NUMERIC(U8) 64 COMPARE_NUMERIC(U16) 65 COMPARE_NUMERIC(U32) 66 COMPARE_NUMERIC(U64) 67 COMPARE_NUMERIC(F32) 68 COMPARE_NUMERIC(F64) 69 69 70 compareNumericDescending(S8)71 compareNumericDescending(S16)72 compareNumericDescending(S32)73 compareNumericDescending(S64)74 compareNumericDescending(U8)75 compareNumericDescending(U16)76 compareNumericDescending(U32)77 compareNumericDescending(U64)78 compareNumericDescending(F32)79 compareNumericDescending(F64)70 COMPARE_NUMERIC_DESCENDING(S8) 71 COMPARE_NUMERIC_DESCENDING(S16) 72 COMPARE_NUMERIC_DESCENDING(S32) 73 COMPARE_NUMERIC_DESCENDING(S64) 74 COMPARE_NUMERIC_DESCENDING(U8) 75 COMPARE_NUMERIC_DESCENDING(U16) 76 COMPARE_NUMERIC_DESCENDING(U32) 77 COMPARE_NUMERIC_DESCENDING(U64) 78 COMPARE_NUMERIC_DESCENDING(F32) 79 COMPARE_NUMERIC_DESCENDING(F64)
Note:
See TracChangeset
for help on using the changeset viewer.
