Changeset 2639
- Timestamp:
- Dec 6, 2004, 10:52:56 AM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
sys/psType.h (modified) (5 diffs)
-
sysUtils/psType.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psType.h
r2607 r2639 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-12-0 3 23:16:05$13 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-12-06 20:52:56 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 57 57 58 58 typedef enum { 59 PS_TYPE_BOOL = 0x0100, ///< Boolean.60 59 PS_TYPE_S8 = 0x0101, ///< Character. 61 60 PS_TYPE_S16 = 0x0102, ///< Short integer. … … 70 69 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point. 71 70 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 71 PS_TYPE_BOOL = 0x1301, ///< Boolean. 72 72 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 73 73 } psElemType; … … 106 106 #define PS_MAX_C64 DBL_MAX /**< maximum valid real or imaginary psC32 value */ 107 107 108 #define PS_TYPE_S8_NAME "psS8" 109 #define PS_TYPE_S16_NAME "psS16" 110 #define PS_TYPE_S32_NAME "psS32" 111 #define PS_TYPE_S64_NAME "psS64" 112 #define PS_TYPE_U8_NAME "psU8" 113 #define PS_TYPE_U16_NAME "psU16" 114 #define PS_TYPE_U32_NAME "psU32" 115 #define PS_TYPE_U64_NAME "psU64" 116 #define PS_TYPE_F32_NAME "psF32" 117 #define PS_TYPE_F64_NAME "psF64" 118 #define PS_TYPE_C32_NAME "psC32" 119 #define PS_TYPE_C64_NAME "psC64" 120 #define PS_TYPE_PTR_NAME "psPtr" 108 #define PS_TYPE_BOOL_NAME "psBool" 109 #define PS_TYPE_S8_NAME "psS8" 110 #define PS_TYPE_S16_NAME "psS16" 111 #define PS_TYPE_S32_NAME "psS32" 112 #define PS_TYPE_S64_NAME "psS64" 113 #define PS_TYPE_U8_NAME "psU8" 114 #define PS_TYPE_U16_NAME "psU16" 115 #define PS_TYPE_U32_NAME "psU32" 116 #define PS_TYPE_U64_NAME "psU64" 117 #define PS_TYPE_F32_NAME "psF32" 118 #define PS_TYPE_F64_NAME "psF64" 119 #define PS_TYPE_C32_NAME "psC32" 120 #define PS_TYPE_C64_NAME "psC64" 121 #define PS_TYPE_PTR_NAME "psPtr" 121 122 122 123 #define PS_TYPE_NAME(value,type) \ 123 124 switch(type) { \ 125 case PS_TYPE_BOOL: \ 126 value = PS_TYPE_BOOL_NAME; \ 127 break; \ 124 128 case PS_TYPE_S8: \ 125 129 value = PS_TYPE_S8_NAME; \ … … 185 189 /// Macro to determine if the psElemType is complex number type. 186 190 #define PS_IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800) 191 /// Macro to determine if the psElemType is boolean type. 192 #define PS_IS_PSELEMTYPE_BOOL(x) ((x & 0x1000) == 0x1000) 187 193 /// Macro to determine the storage size, in bytes, of the psElemType. 188 194 #define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(psPtr) :(x & 0xFF) ) -
trunk/psLib/src/sysUtils/psType.h
r2607 r2639 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-12-0 3 23:16:05$13 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-12-06 20:52:56 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 57 57 58 58 typedef enum { 59 PS_TYPE_BOOL = 0x0100, ///< Boolean.60 59 PS_TYPE_S8 = 0x0101, ///< Character. 61 60 PS_TYPE_S16 = 0x0102, ///< Short integer. … … 70 69 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point. 71 70 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 71 PS_TYPE_BOOL = 0x1301, ///< Boolean. 72 72 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 73 73 } psElemType; … … 106 106 #define PS_MAX_C64 DBL_MAX /**< maximum valid real or imaginary psC32 value */ 107 107 108 #define PS_TYPE_S8_NAME "psS8" 109 #define PS_TYPE_S16_NAME "psS16" 110 #define PS_TYPE_S32_NAME "psS32" 111 #define PS_TYPE_S64_NAME "psS64" 112 #define PS_TYPE_U8_NAME "psU8" 113 #define PS_TYPE_U16_NAME "psU16" 114 #define PS_TYPE_U32_NAME "psU32" 115 #define PS_TYPE_U64_NAME "psU64" 116 #define PS_TYPE_F32_NAME "psF32" 117 #define PS_TYPE_F64_NAME "psF64" 118 #define PS_TYPE_C32_NAME "psC32" 119 #define PS_TYPE_C64_NAME "psC64" 120 #define PS_TYPE_PTR_NAME "psPtr" 108 #define PS_TYPE_BOOL_NAME "psBool" 109 #define PS_TYPE_S8_NAME "psS8" 110 #define PS_TYPE_S16_NAME "psS16" 111 #define PS_TYPE_S32_NAME "psS32" 112 #define PS_TYPE_S64_NAME "psS64" 113 #define PS_TYPE_U8_NAME "psU8" 114 #define PS_TYPE_U16_NAME "psU16" 115 #define PS_TYPE_U32_NAME "psU32" 116 #define PS_TYPE_U64_NAME "psU64" 117 #define PS_TYPE_F32_NAME "psF32" 118 #define PS_TYPE_F64_NAME "psF64" 119 #define PS_TYPE_C32_NAME "psC32" 120 #define PS_TYPE_C64_NAME "psC64" 121 #define PS_TYPE_PTR_NAME "psPtr" 121 122 122 123 #define PS_TYPE_NAME(value,type) \ 123 124 switch(type) { \ 125 case PS_TYPE_BOOL: \ 126 value = PS_TYPE_BOOL_NAME; \ 127 break; \ 124 128 case PS_TYPE_S8: \ 125 129 value = PS_TYPE_S8_NAME; \ … … 185 189 /// Macro to determine if the psElemType is complex number type. 186 190 #define PS_IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800) 191 /// Macro to determine if the psElemType is boolean type. 192 #define PS_IS_PSELEMTYPE_BOOL(x) ((x & 0x1000) == 0x1000) 187 193 /// Macro to determine the storage size, in bytes, of the psElemType. 188 194 #define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(psPtr) :(x & 0xFF) )
Note:
See TracChangeset
for help on using the changeset viewer.
