Changeset 12431 for trunk/psLib/src/sys
- Timestamp:
- Mar 13, 2007, 2:39:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psType.h (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psType.h
r11694 r12431 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.5 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2007-0 2-08 01:59:28$12 * @version $Revision: 1.57 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2007-03-14 00:39:51 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 22 22 /// @{ 23 23 24 #include <complex.h>25 24 #include <stdint.h> 26 25 #include <float.h> … … 50 49 typedef float psF32; ///< 32-bit floating point 51 50 typedef double psF64; ///< 64-bit floating point 52 53 #ifdef SWIG54 /** 32-bit complex value */55 typedef struct56 {57 float re, im;58 }59 psC32;60 61 62 /** 64-bit complex value */63 typedef struct64 {65 double re,im;66 }67 psC64;68 69 70 #else // SWIG71 typedef float complex psC32; ///< complex with 32-bit floating point Real and Imagary numbers72 typedef double complex psC64; ///< complex with 64-bit floating point Real and Imagary numbers73 #endif // !SWIG74 75 51 typedef char* psString; ///< string value 76 52 typedef void* psPtr; ///< void pointer 53 77 54 // XXX psBool can't be removed until all macros that 'generate' this type are 78 55 // fixed -JH … … 98 75 PS_TYPE_F32 = 0x0404, ///< Single-precision Floating point. 99 76 PS_TYPE_F64 = 0x0408, ///< Double-precision floating point. 100 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating point.101 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point.102 77 PS_TYPE_BOOL = 0x1301 ///< Boolean. 103 78 } psElemType; … … 170 145 #define PS_MIN_F32 -FLT_MAX /**< minimum valid psF32 value */ 171 146 #define PS_MIN_F64 -DBL_MAX /**< minimum valid psF64 value */ 172 #define PS_MIN_C32 -FLT_MAX /**< minimum valid real or imaginary psC32 value */173 #define PS_MIN_C64 -DBL_MAX /**< minimum valid real or imaginary psC32 value */174 147 175 148 #define PS_MAX_S8 INT8_MAX /**< maximum valid psS8 value */ … … 183 156 #define PS_MAX_F32 FLT_MAX /**< maximum valid psF32 value */ 184 157 #define PS_MAX_F64 DBL_MAX /**< maximum valid psF64 value */ 185 #define PS_MAX_C32 FLT_MAX /**< maximum valid real or imaginary psC32 value */186 #define PS_MAX_C64 DBL_MAX /**< maximum valid real or imaginary psC32 value */187 158 188 159 #define PS_TYPE_BOOL_NAME "psBool" … … 197 168 #define PS_TYPE_F32_NAME "psF32" 198 169 #define PS_TYPE_F64_NAME "psF64" 199 #define PS_TYPE_C32_NAME "psC32"200 #define PS_TYPE_C64_NAME "psC64"201 170 202 171 #define PS_TYPE_NAME(value,type) \ … … 234 203 case PS_TYPE_F64: \ 235 204 value = PS_TYPE_F64_NAME; \ 236 break; \237 case PS_TYPE_C32: \238 value = PS_TYPE_C32_NAME; \239 break; \240 case PS_TYPE_C64: \241 value = PS_TYPE_C64_NAME; \242 205 break; \ 243 206 default: \ … … 261 224 /// Macro to determine if the psElemType is unsigned. 262 225 #define PS_IS_PSELEMTYPE_UNSIGNED(x) ((x & 0x200) == 0x200) 263 /// Macro to determine if the psElemType is a real (non-complex)floating-point type.226 /// Macro to determine if the psElemType is a real floating-point type. 264 227 #define PS_IS_PSELEMTYPE_REAL(x) ((x & 0x400) == 0x400) 265 /// Macro to determine if the psElemType is complex number type.266 #define PS_IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800)267 228 /// Macro to determine if the psElemType is boolean type. 268 229 #define PS_IS_PSELEMTYPE_BOOL(x) ((x & 0x1000) == 0x1000)
Note:
See TracChangeset
for help on using the changeset viewer.
