Changeset 1426 for trunk/psLib/src/collections
- Timestamp:
- Aug 9, 2004, 12:44:25 PM (22 years ago)
- Location:
- trunk/psLib/src/collections
- Files:
-
- 6 edited
-
psArray.h (modified) (5 diffs)
-
psHash.h (modified) (3 diffs)
-
psList.h (modified) (14 diffs)
-
psMetadata.h (modified) (17 diffs)
-
psScalar.h (modified) (4 diffs)
-
psVector.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psArray.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 typedef struct 35 35 { 36 unsigned int nalloc; // /< Total number of elements available.37 unsigned int n; // /< Number of elements in use.38 psPTR *data; // /< An Array of pointer elements36 unsigned int nalloc; ///< Total number of elements available. 37 unsigned int n; ///< Number of elements in use. 38 psPTR *data; ///< An Array of pointer elements 39 39 } 40 40 psArray; … … 54 54 * 55 55 */ 56 psArray *psArrayAlloc(unsigned int nalloc // /< Total number of elements to make available.56 psArray *psArrayAlloc(unsigned int nalloc ///< Total number of elements to make available. 57 57 ); 58 58 … … 65 65 * 66 66 */ 67 psArray *psArrayRealloc(unsigned int nalloc, // /< Total number of elements to make available.68 psArray * restrict psArr // /< array to reallocate.67 psArray *psArrayRealloc(unsigned int nalloc, ///< Total number of elements to make available. 68 psArray * restrict psArr ///< array to reallocate. 69 69 ); 70 70 … … 76 76 * 77 77 */ 78 void psArrayElementFree(psArray * restrict psArr // /< Void pointer array to destroy.78 void psArrayElementFree(psArray * restrict psArr ///< Void pointer array to destroy. 79 79 ); 80 80 -
trunk/psLib/src/collections/psHash.h
r1420 r1426 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-09 2 0:29:43$13 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 typedef struct psHashBucket 30 30 { 31 char *key; // /< key for this item of data32 void *data; // /< the data itself33 struct psHashBucket *next; // /< list of other possible keys31 char *key; ///< key for this item of data 32 void *data; ///< the data itself 33 struct psHashBucket *next; ///< list of other possible keys 34 34 } 35 35 psHashBucket; … … 40 40 typedef struct psHash 41 41 { 42 int nbucket; // /< Number of buckets in hash table.43 psHashBucket **buckets; // /< The bucket data.42 int nbucket; ///< Number of buckets in hash table. 43 psHashBucket **buckets; ///< The bucket data. 44 44 } 45 45 psHash; 46 46 47 47 /// Allocate hash buckets in table. 48 psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.48 psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate. 49 49 ); 50 50 51 51 /// Insert entry into table. 52 bool psHashAdd(psHash * table, // /< table to insert in53 const char *key, // /< key to use54 void *data // /< data to insert52 bool psHashAdd(psHash * table, ///< table to insert in 53 const char *key, ///< key to use 54 void *data ///< data to insert 55 55 ); 56 56 57 57 /// Lookup key in table. 58 void *psHashLookup(psHash * table, // /< table to lookup key in59 const char *key // /< key to lookup58 void *psHashLookup(psHash * table, ///< table to lookup key in 59 const char *key ///< key to lookup 60 60 ); 61 61 62 62 /// Remove key from table. 63 bool psHashRemove(psHash * table, // /< table to lookup key in64 const char *key // /< key to lookup63 bool psHashRemove(psHash * table, ///< table to lookup key in 64 const char *key ///< key to lookup 65 65 ); 66 66 67 67 /// List all keys in table. 68 psList *psHashKeyList(psHash * table // /< table to list keys from.68 psList *psHashKeyList(psHash * table ///< table to list keys from. 69 69 ); 70 70 -
trunk/psLib/src/collections/psList.h
r1407 r1426 10 10 * @ingroup LinkedList 11 11 * 12 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 */ 34 34 enum { 35 PS_LIST_HEAD = 0, // /< at head36 PS_LIST_TAIL = -1, // /< at tail37 PS_LIST_PREVIOUS = -2, // /< previous element38 PS_LIST_CURRENT = -3, // /< current element39 PS_LIST_NEXT = -4, // /< next element40 PS_LIST_UNKNOWN = -5 // /< unknown position (should be last in enum list)35 PS_LIST_HEAD = 0, ///< at head 36 PS_LIST_TAIL = -1, ///< at tail 37 PS_LIST_PREVIOUS = -2, ///< previous element 38 PS_LIST_CURRENT = -3, ///< current element 39 PS_LIST_NEXT = -4, ///< next element 40 PS_LIST_UNKNOWN = -5 ///< unknown position (should be last in enum list) 41 41 }; 42 42 … … 44 44 typedef struct psListElem 45 45 { 46 struct psListElem *prev; // /< previous link in list47 struct psListElem *next; // /< next link in list48 void *data; // /< real data item46 struct psListElem *prev; ///< previous link in list 47 struct psListElem *next; ///< next link in list 48 void *data; ///< real data item 49 49 } 50 50 psListElem; … … 57 57 typedef struct 58 58 { 59 unsigned int size; // /< number of elements on list60 psListElem *head; // /< first element on list (may be NULL)61 psListElem *tail; // /< last element on list (may be NULL)62 psListElem *iter; // /< iteration cursor63 unsigned int iterIndex; // /< the numeric position of the iteration cursor in the list64 pthread_mutex_t lock; // /< mutex to lock a node during changes59 unsigned int size; ///< number of elements on list 60 psListElem *head; ///< first element on list (may be NULL) 61 psListElem *tail; ///< last element on list (may be NULL) 62 psListElem *iter; ///< iteration cursor 63 unsigned int iterIndex; ///< the numeric position of the iteration cursor in the list 64 pthread_mutex_t lock; ///< mutex to lock a node during changes 65 65 } 66 66 psList; … … 71 71 */ 72 72 psList *psListAlloc(void *data 73 // /< initial data item; may be NULL if no an empty psList is desired73 ///< initial data item; may be NULL if no an empty psList is desired 74 74 ) 75 75 ; … … 80 80 * NULL, the return value will also be NULL. 81 81 */ 82 bool psListAdd(psList * restrict list, // /< list to add to (if NULL, nothing is done)83 void *data, // /< data item to add. If NULL, list is not modified.84 int where // /< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.82 bool psListAdd(psList * restrict list, ///< list to add to (if NULL, nothing is done) 83 void *data, ///< data item to add. If NULL, list is not modified. 84 int where ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location. 85 85 ); 86 86 … … 90 90 */ 91 91 bool psListRemove(psList * restrict list, 92 // /< list to remove element from92 ///< list to remove element from 93 93 void *data, 94 // /< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.94 ///< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored. 95 95 int which 96 // /< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.96 ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location. 97 97 ); 98 98 … … 104 104 * NULL is returned. 105 105 */ 106 void *psListGet(psList * restrict list, // /< list to retrieve element from107 int which // /< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN106 void *psListGet(psList * restrict list, ///< list to retrieve element from 107 int which ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN 108 108 ); 109 109 … … 112 112 * 113 113 */ 114 void psListSetIterator(psList * restrict list, // /< list to retrieve element from115 int where // /< index number, PS_LIST_HEAD, or PS_LIST_TAIL114 void psListSetIterator(psList * restrict list, ///< list to retrieve element from 115 int where ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL 116 116 ); 117 117 … … 123 123 * parameter was NULL. 124 124 */ 125 void *psListGetNext(psList * restrict list // /< list to retrieve element from125 void *psListGetNext(psList * restrict list ///< list to retrieve element from 126 126 ); 127 127 … … 133 133 * iterator is not valid or list parameter was NULL. 134 134 */ 135 void *psListGetCurrent(psList * restrict list // /< list to retrieve element from135 void *psListGetCurrent(psList * restrict list ///< list to retrieve element from 136 136 ); 137 137 … … 143 143 * parameter was NULL. 144 144 */ 145 void *psListGetPrevious(psList * restrict list // /< list to retrieve element from145 void *psListGetPrevious(psList * restrict list ///< list to retrieve element from 146 146 ); 147 147 … … 151 151 * or NULL if the given dlist parameter is NULL. 152 152 */ 153 psArray *psListToArray(psList * dlist // /< List to convert153 psArray *psListToArray(psList * dlist ///< List to convert 154 154 ); 155 155 … … 159 159 * or NULL is the given arr parameter is NULL. 160 160 */ 161 psList *psArrayToList(psArray * arr // /< vector to convert161 psList *psArrayToList(psArray * arr ///< vector to convert 162 162 ); 163 163 -
trunk/psLib/src/collections/psMetadata.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 */ 35 35 typedef enum { 36 PS_META_ITEM_SET = 0, // /< Null. Metadata is in psMetadataItem.items37 PS_META_BOOL, // /< Boolean data.38 PS_META_S32, // /< Signed 32-bit integer data.39 PS_META_F32, // /< Single-precision float data.40 PS_META_F64, // /< Double-precision float data.41 PS_META_STR, // /< String data (Stored in as void *).42 PS_META_IMG, // /< Image data (Stored in as void *).43 PS_META_JPEG, // /< JPEG data (Stored in as void .44 PS_META_PNG, // /< PNG data (Stored in as void *).45 PS_META_ASTROM, // /< Astrometric coefficients (Stored in as void *).46 PS_META_UNKNOWN, // /< Other data (Stored in as void *).47 PS_META_NTYPE // /< Number of types. Must be last.36 PS_META_ITEM_SET = 0, ///< Null. Metadata is in psMetadataItem.items 37 PS_META_BOOL, ///< Boolean data. 38 PS_META_S32, ///< Signed 32-bit integer data. 39 PS_META_F32, ///< Single-precision float data. 40 PS_META_F64, ///< Double-precision float data. 41 PS_META_STR, ///< String data (Stored in as void *). 42 PS_META_IMG, ///< Image data (Stored in as void *). 43 PS_META_JPEG, ///< JPEG data (Stored in as void . 44 PS_META_PNG, ///< PNG data (Stored in as void *). 45 PS_META_ASTROM, ///< Astrometric coefficients (Stored in as void *). 46 PS_META_UNKNOWN, ///< Other data (Stored in as void *). 47 PS_META_NTYPE ///< Number of types. Must be last. 48 48 } psMetadataType; 49 49 … … 55 55 typedef struct psMetadataItem 56 56 { 57 const int id; // /< Unique ID for metadata item.58 char *restrict name; // /< Name of metadata item.59 psMetadataType type; // /< Type of metadata item.57 const int id; ///< Unique ID for metadata item. 58 char *restrict name; ///< Name of metadata item. 59 psMetadataType type; ///< Type of metadata item. 60 60 union { 61 61 bool B; 62 psS32 S32; // /< Signed 32-bit integer data.63 psF32 F32; // /< Single-precision float data.64 psF64 F64; // /< Double-precision float data.65 psPTR V; // /< Pointer to other type of data.66 } data; // /< Union for data types.67 char *comment; // /< Optional comment ("", not NULL).68 psList *restrict items; // /< List of psMetadataItems with same name.62 psS32 S32; ///< Signed 32-bit integer data. 63 psF32 F32; ///< Single-precision float data. 64 psF64 F64; ///< Double-precision float data. 65 psPTR V; ///< Pointer to other type of data. 66 } data; ///< Union for data types. 67 char *comment; ///< Optional comment ("", not NULL). 68 psList *restrict items; ///< List of psMetadataItems with same name. 69 69 } 70 70 psMetadataItem; … … 102 102 * @return psMetadataItem*: Pointer metadata item. 103 103 */ 104 psMetadataItem *psMetadataItemAlloc(const char *name, // /< Name of metadata item.105 psMetadataType type, // /< Type of metadata item.106 const char *comment, // /< Comment for metadata item.107 ... // /< Arguments for name formatting and metadata item data.104 psMetadataItem *psMetadataItemAlloc(const char *name, ///< Name of metadata item. 105 psMetadataType type, ///< Type of metadata item. 106 const char *comment, ///< Comment for metadata item. 107 ... ///< Arguments for name formatting and metadata item data. 108 108 ); 109 109 … … 121 121 * @return psMetadataItem*: Pointer metadata item. 122 122 */ 123 psMetadataItem *psMetadataItemAllocV(const char *name, // /< Name of metadata item.124 psMetadataType type, // /< Type of metadata item.125 const char *comment, // /< Comment for metadata item.126 va_list list // /< Arguments for name formatting and metadata item123 psMetadataItem *psMetadataItemAllocV(const char *name, ///< Name of metadata item. 124 psMetadataType type, ///< Type of metadata item. 125 const char *comment, ///< Comment for metadata item. 126 va_list list ///< Arguments for name formatting and metadata item 127 127 // data. 128 128 ); … … 134 134 * @return psMetadata*: Pointer metadata. 135 135 */ 136 psMetadata *psMetadataAlloc(void // /< Void.136 psMetadata *psMetadataAlloc(void ///< Void. 137 137 ); 138 138 … … 143 143 * @return bool: True for success, false for failure. 144 144 */ 145 bool psMetadataAddItem(psMetadata * restrict md, // /< Metadata collection to insert metadat item.146 int where, // /< Location to be added.147 psMetadataItem * restrict item // /< Metadata item to be added.145 bool psMetadataAddItem(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 146 int where, ///< Location to be added. 147 psMetadataItem * restrict item ///< Metadata item to be added. 148 148 ); 149 149 … … 154 154 * @return bool: True for success, false for failure. 155 155 */ 156 bool psMetadataAdd(psMetadata * restrict md, // /< Metadata collection to insert metadat item.157 int where, // /< Location to be added.158 const char *name, // /< Name of metadata item.159 psMetadataType type, // /< Type of metadata item.160 const char *comment, // /< Comment for metadata item.161 ... // /< Arguments for name formatting and metadata item data.156 bool psMetadataAdd(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 157 int where, ///< Location to be added. 158 const char *name, ///< Name of metadata item. 159 psMetadataType type, ///< Type of metadata item. 160 const char *comment, ///< Comment for metadata item. 161 ... ///< Arguments for name formatting and metadata item data. 162 162 ); 163 163 … … 171 171 * @return bool: True for success, false for failure. 172 172 */ 173 bool psMetadataRemove(psMetadata * restrict md, // /< Metadata collection to insert metadat item.174 int where, // /< Location to be removed.175 const char *restrict key // /< Name of metadata key.173 bool psMetadataRemove(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 174 int where, ///< Location to be removed. 175 const char *restrict key ///< Name of metadata key. 176 176 ); 177 177 … … 183 183 * @return psMetadataItem*: Pointer metadata item. 184 184 */ 185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, // /< Metadata collection to insert metadat185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, ///< Metadata collection to insert metadat 186 186 // item. 187 const char *restrict key // /< Name of metadata key.187 const char *restrict key ///< Name of metadata key. 188 188 ); 189 189 … … 194 194 * @return psMetadataItem*: Pointer metadata item. 195 195 */ 196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.197 int where // /< Location to be retrieved.196 psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 197 int where ///< Location to be retrieved. 198 198 ); 199 199 … … 204 204 * @return void: void. 205 205 */ 206 bool psMetadataSetIterator(psMetadata * restrict md, // /< Metadata collection to iterate.207 int where // /< Location of iterator.206 bool psMetadataSetIterator(psMetadata * restrict md, ///< Metadata collection to iterate. 207 int where ///< Location of iterator. 208 208 ); 209 209 … … 214 214 * @return psMetadataItem*: Pointer metadata item. 215 215 */ 216 psMetadataItem *psMetadataGetNext(psMetadata * restrict md, // /< Metadata collection to iterate.217 const char *restrict match, // /< Beginning of key name.218 int which // /< Iterator to be used.216 psMetadataItem *psMetadataGetNext(psMetadata * restrict md, ///< Metadata collection to iterate. 217 const char *restrict match, ///< Beginning of key name. 218 int which ///< Iterator to be used. 219 219 ); 220 220 … … 225 225 * @return psMetadataItem*: Pointer metadata item. 226 226 */ 227 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, // /< Metadata collection to iterate.228 const char *restrict match, // /< Beginning of key name.229 int which // /< Iterator to be used.227 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, ///< Metadata collection to iterate. 228 const char *restrict match, ///< Beginning of key name. 229 int which ///< Iterator to be used. 230 230 ); 231 231 … … 240 240 * @return psMetadataItem*: Pointer metadata item. 241 241 */ 242 void psMetadataItemPrint(FILE * fd, // /< Pointer to file to write metadata item.243 const char *format, // /< Format to print metadata item.244 const psMetadataItem * restrict metadataItem // /< Metadata item to print.242 void psMetadataItemPrint(FILE * fd, ///< Pointer to file to write metadata item. 243 const char *format, ///< Format to print metadata item. 244 const psMetadataItem * restrict metadataItem ///< Metadata item to print. 245 245 ); 246 246 … … 252 252 * @return psMetadata*: Pointer metadata. 253 253 */ 254 psMetadata *psMetadataReadHeader(psMetadata * output, // /< Resulting metadata from read.255 char *extname, // /< File name extension string.256 int extnum, // /< File name extension number. Starts at 1.257 char *filename // /< Name of file to read.254 psMetadata *psMetadataReadHeader(psMetadata * output, ///< Resulting metadata from read. 255 char *extname, ///< File name extension string. 256 int extnum, ///< File name extension number. Starts at 1. 257 char *filename ///< Name of file to read. 258 258 ); 259 259 … … 264 264 * @return psMetadata*: Pointer metadata. 265 265 */ 266 psMetadata *psMetadataFReadHeader(psMetadata * output, // /< Resulting metadata from read.267 char *extName, // /< File name extension string.268 int extNum, // /< File name extension number.269 fitsfile * fd // /< Pointer to file to read.266 psMetadata *psMetadataFReadHeader(psMetadata * output, ///< Resulting metadata from read. 267 char *extName, ///< File name extension string. 268 int extNum, ///< File name extension number. 269 fitsfile * fd ///< Pointer to file to read. 270 270 ); 271 271 -
trunk/psLib/src/collections/psScalar.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 typedef struct 33 33 { 34 psType type; // /< Type of data.34 psType type; ///< Type of data. 35 35 36 36 union { 37 psU8 U8; // /< Unsigned 8-bit integer data.38 psU16 U16; // /< Unsigned 16-bit integer data.39 psU32 U32; // /< Unsigned 32-bit integer data.40 psU64 U64; // /< Unsigned 64-bit integer data.41 psS8 S8; // /< Signed 8-bit integer data.42 psS16 S16; // /< Signed 16-bit integer data.43 psS32 S32; // /< Signed 32-bit integer data.44 psS64 S64; // /< Signed 64-bit integer data.45 psF32 F32; // /< Single-precision float data.46 psF64 F64; // /< Double-precision float data.47 psC32 C32; // /< Single-precision complex data.48 psC64 C64; // /< Double-precision complex data.49 } data; // /< Union for data types.37 psU8 U8; ///< Unsigned 8-bit integer data. 38 psU16 U16; ///< Unsigned 16-bit integer data. 39 psU32 U32; ///< Unsigned 32-bit integer data. 40 psU64 U64; ///< Unsigned 64-bit integer data. 41 psS8 S8; ///< Signed 8-bit integer data. 42 psS16 S16; ///< Signed 16-bit integer data. 43 psS32 S32; ///< Signed 32-bit integer data. 44 psS64 S64; ///< Signed 64-bit integer data. 45 psF32 F32; ///< Single-precision float data. 46 psF64 F64; ///< Double-precision float data. 47 psC32 C32; ///< Single-precision complex data. 48 psC64 C64; ///< Double-precision complex data. 49 } data; ///< Union for data types. 50 50 } 51 51 psScalar; … … 65 65 * 66 66 */ 67 psScalar *psScalarAlloc(psC64 value, // /< Data to be put into psScalar.68 psElemType dataType // /< Type of data to be held by psScalar.67 psScalar *psScalarAlloc(psC64 value, ///< Data to be put into psScalar. 68 psElemType dataType ///< Type of data to be held by psScalar. 69 69 ); 70 70 … … 76 76 * 77 77 */ 78 void psScalarFree(psScalar * restrict scalar // /< Scalar to free.78 void psScalarFree(psScalar * restrict scalar ///< Scalar to free. 79 79 ); 80 80 -
trunk/psLib/src/collections/psVector.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 typedef struct 34 34 { 35 psType type; // /< Type of data.36 unsigned int nalloc; // /< Total number of elements available.37 unsigned int n; // /< Number of elements in use.35 psType type; ///< Type of data. 36 unsigned int nalloc; ///< Total number of elements available. 37 unsigned int n; ///< Number of elements in use. 38 38 39 39 union { 40 psU8 *U8; // /< Unsigned 8-bit integer data.41 psU16 *U16; // /< Unsigned 16-bit integer data.42 psU32 *U32; // /< Unsigned 32-bit integer data.43 psU64 *U64; // /< Unsigned 64-bit integer data.44 psS8 *S8; // /< Signed 8-bit integer data.45 psS16 *S16; // /< Signed 16-bit integer data.46 psS32 *S32; // /< Signed 32-bit integer data.47 psS64 *S64; // /< Signed 64-bit integer data.48 psF32 *F32; // /< Single-precision float data.49 psF64 *F64; // /< Double-precision float data.50 psC32 *C32; // /< Single-precision complex data.51 psC64 *C64; // /< Double-precision complex data.52 psPTR V; // /< Pointer to data.53 } data; // /< Union for data types.40 psU8 *U8; ///< Unsigned 8-bit integer data. 41 psU16 *U16; ///< Unsigned 16-bit integer data. 42 psU32 *U32; ///< Unsigned 32-bit integer data. 43 psU64 *U64; ///< Unsigned 64-bit integer data. 44 psS8 *S8; ///< Signed 8-bit integer data. 45 psS16 *S16; ///< Signed 16-bit integer data. 46 psS32 *S32; ///< Signed 32-bit integer data. 47 psS64 *S64; ///< Signed 64-bit integer data. 48 psF32 *F32; ///< Single-precision float data. 49 psF64 *F64; ///< Double-precision float data. 50 psC32 *C32; ///< Single-precision complex data. 51 psC64 *C64; ///< Double-precision complex data. 52 psPTR V; ///< Pointer to data. 53 } data; ///< Union for data types. 54 54 } 55 55 psVector; … … 68 68 * 69 69 */ 70 psVector *psVectorAlloc(unsigned int nalloc, // /< Total number of elements to make available.71 psElemType dataType // /< Type of data to be held by vector.70 psVector *psVectorAlloc(unsigned int nalloc, ///< Total number of elements to make available. 71 psElemType dataType ///< Type of data to be held by vector. 72 72 ); 73 73 … … 80 80 * 81 81 */ 82 psVector *psVectorRealloc(unsigned int nalloc, // /< Total number of elements to make available.83 psVector * restrict psVec // /< Vector to reallocate.82 psVector *psVectorRealloc(unsigned int nalloc, ///< Total number of elements to make available. 83 psVector * restrict psVec ///< Vector to reallocate. 84 84 ); 85 85 … … 93 93 */ 94 94 psVector *psVectorRecycle(psVector * restrict psVec, 95 // /< Vector to recycle. If NULL, a new vector is created. No effort taken to95 ///< Vector to recycle. If NULL, a new vector is created. No effort taken to 96 96 // preserve the values. 97 unsigned int nalloc, // /< Total number of elements to make available.98 psElemType type // /< the datatype of the returned vector97 unsigned int nalloc, ///< Total number of elements to make available. 98 psElemType type ///< the datatype of the returned vector 99 99 ); 100 100 … … 107 107 */ 108 108 109 psVector *psVectorSort(psVector * restrict outVector, // /< the output vector to recycle, or NULL if new109 psVector *psVectorSort(psVector * restrict outVector, ///< the output vector to recycle, or NULL if new 110 110 // vector desired. 111 const psVector * restrict inVector // /< the vector to sort.111 const psVector * restrict inVector ///< the vector to sort. 112 112 ); 113 113
Note:
See TracChangeset
for help on using the changeset viewer.
