IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2639


Ignore:
Timestamp:
Dec 6, 2004, 10:52:56 AM (22 years ago)
Author:
harman
Message:

Added boolean to enumeration and associated function macros

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psType.h

    r2607 r2639  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-12-03 23:16:05 $
     13*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-12-06 20:52:56 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5757
    5858typedef enum {
    59     PS_TYPE_BOOL = 0x0100,             ///< Boolean.
    6059    PS_TYPE_S8   = 0x0101,             ///< Character.
    6160    PS_TYPE_S16  = 0x0102,             ///< Short integer.
     
    7069    PS_TYPE_C32  = 0x0808,             ///< Complex numbers consisting of single-precision floating point.
    7170    PS_TYPE_C64  = 0x0810,             ///< Complex numbers consisting of double-precision floating point.
     71    PS_TYPE_BOOL = 0x1301,             ///< Boolean.
    7272    PS_TYPE_PTR  = 0x0000              ///< Something else that's not supported for arithmetic.
    7373} psElemType;
     
    106106#define PS_MAX_C64       DBL_MAX       /**< maximum valid real or imaginary psC32 value */
    107107
    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"
    121122
    122123#define PS_TYPE_NAME(value,type) \
    123124switch(type) { \
     125case PS_TYPE_BOOL: \
     126    value = PS_TYPE_BOOL_NAME; \
     127    break; \
    124128case PS_TYPE_S8: \
    125129    value = PS_TYPE_S8_NAME; \
     
    185189/// Macro to determine if the psElemType is complex number type.
    186190#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)
    187193/// Macro to determine the storage size, in bytes, of the psElemType.
    188194#define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(psPtr) :(x & 0xFF) )
  • trunk/psLib/src/sysUtils/psType.h

    r2607 r2639  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-12-03 23:16:05 $
     13*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-12-06 20:52:56 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5757
    5858typedef enum {
    59     PS_TYPE_BOOL = 0x0100,             ///< Boolean.
    6059    PS_TYPE_S8   = 0x0101,             ///< Character.
    6160    PS_TYPE_S16  = 0x0102,             ///< Short integer.
     
    7069    PS_TYPE_C32  = 0x0808,             ///< Complex numbers consisting of single-precision floating point.
    7170    PS_TYPE_C64  = 0x0810,             ///< Complex numbers consisting of double-precision floating point.
     71    PS_TYPE_BOOL = 0x1301,             ///< Boolean.
    7272    PS_TYPE_PTR  = 0x0000              ///< Something else that's not supported for arithmetic.
    7373} psElemType;
     
    106106#define PS_MAX_C64       DBL_MAX       /**< maximum valid real or imaginary psC32 value */
    107107
    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"
    121122
    122123#define PS_TYPE_NAME(value,type) \
    123124switch(type) { \
     125case PS_TYPE_BOOL: \
     126    value = PS_TYPE_BOOL_NAME; \
     127    break; \
    124128case PS_TYPE_S8: \
    125129    value = PS_TYPE_S8_NAME; \
     
    185189/// Macro to determine if the psElemType is complex number type.
    186190#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)
    187193/// Macro to determine the storage size, in bytes, of the psElemType.
    188194#define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(psPtr) :(x & 0xFF) )
Note: See TracChangeset for help on using the changeset viewer.