Changeset 672 for trunk/psLib/src/collections/psVector.h
- Timestamp:
- May 13, 2004, 1:36:27 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psVector.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psVector.h
r670 r672 3 3 * @brief Contains support for basic vector types 4 4 * 5 * This file defines types and functions for one dimensional vectors which include: 5 * This file defines types and functions for one dimensional vectors which include: 6 6 * char 7 7 * short … … 18 18 * 19 19 * @author Ross Harman, MHPCC 20 * 21 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $22 * @date $Date: 2004-05-13 2 2:47:52$20 * 21 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2004-05-13 23:36:27 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 28 28 #define PS_VECTOR_H 29 29 30 #include <complex.h> 31 #include <stdint.h> 32 33 /******************************************************************************/ 34 /* DEFINE STATEMENTS */ 35 /******************************************************************************/ 36 37 // None 38 39 /******************************************************************************/ 40 /* TYPE DEFINITIONS */ 41 /******************************************************************************/ 42 43 /** Basic data types used by the containers. 44 * 45 * The basic types of the primitives used by psLib are defined within this enum. This enum is in turn used by 46 * the psType struct. 47 * 48 */ 49 typedef enum { 50 PS_TYPE_INT8 = 0x11, ///< Character. 51 PS_TYPE_INT16 = 0x12, ///< Short integer. 52 PS_TYPE_INT32 = 0x14, ///< Integer. 53 PS_TYPE_INT64 = 0x18, ///< Long integer. 54 PS_TYPE_UINT8 = 0x31, ///< Unsigned character. 55 PS_TYPE_UINT16 = 0x32, ///< Unsigned short integer. 56 PS_TYPE_UINT32 = 0x34, ///< Unsigned integer. 57 PS_TYPE_UINT64 = 0x38, ///< Unsigned long integer. 58 PS_TYPE_FLOAT = 0x44, ///< Single-precision Floating point. 59 PS_TYPE_DOUBLE = 0x48, ///< Double-precision floating point. 60 PS_TYPE_COMPLEX_FLOAT = 0x84, ///< Complex numbers consisting of single-precision floating point. 61 PS_TYPE_COMPLEX_DOUBLE = 0x88, ///< Complex numbers consisting of double-precision floating point. 62 PS_TYPE_PTR = 0x00, ///< Something else that's not supported for arithmetic.} 63 } psElemType; 64 65 #define IS_PSELEMTYPE_INT(x) (x & 0x10 == 0x10) 66 #define IS_PSELEMTYPE_UNSIGNED(x) (x & 0x20 == 0x20) 67 #define IS_PSELEMTYPE_REAL(x) (x & 0x40 == 0x40) 68 #define IS_PSELEMTYPE_COMPLEX(x) (x & 0x80 == 0x80) 69 #define PSELEMTYPE_SIZEOF(x) (x & 0x0F) 70 71 /** Dimensions of a data type. 72 * 73 * The dimensions of containers used by psLib are defined within this enum. This enum is used by the psType struct. 74 * 75 */ 76 typedef enum { 77 PS_DIMEN_SCALAR, ///< Scalar. 78 PS_DIMEN_VECTOR, ///< Vector. 79 PS_DIMEN_TRANSV, ///< Transposed vector. 80 PS_DIMEN_IMAGE, ///< Image. 81 PS_DIMEN_OTHER ///< Something else that's not supported for arithmetic. 82 } psDimen; 83 84 /** The type of a data type. 85 * 86 * All psLib complex types consist of primitive components. This struct provides the description of those 87 * primitives. 88 * 89 */ 90 typedef struct 91 { 92 psElemType type; ///< Primitive type. 93 psDimen dimen; ///< Dimensionality. 94 } 95 psType; 30 #include "psType.h" 96 31 97 32 /** An vector to support primitive types. … … 174 109 * 175 110 */ 176 void psV oidPtrVectorFree(111 void psVectorElementFree( 177 112 psVector *restrict psVec, ///< Void pointer vector to destroy. 178 113 void (*elemFree)(void *) ///< Optional callback function to remove vector elements.
Note:
See TracChangeset
for help on using the changeset viewer.
