Changeset 670 for trunk/psLib/src/collections/psVector.h
- Timestamp:
- May 13, 2004, 12:47:52 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psVector.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psVector.h
r663 r670 19 19 * @author Ross Harman, MHPCC 20 20 * 21 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $22 * @date $Date: 2004-05-13 19:54:26$21 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2004-05-13 22:47:52 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 PS_TYPE_COMPLEX_FLOAT = 0x84, ///< Complex numbers consisting of single-precision floating point. 61 61 PS_TYPE_COMPLEX_DOUBLE = 0x88, ///< Complex numbers consisting of double-precision floating point. 62 PS_TYPE_ OTHER, ///< Something else that's not supported for arithmetic.} psElemType;62 PS_TYPE_PTR = 0x00, ///< Something else that's not supported for arithmetic.} 63 63 } psElemType; 64 64 … … 118 118 double *d; ///< Pointers to double precision data. 119 119 complex float *cf; ///< Pointers to complex floating point data. 120 void *v; ///< Pointers to generic void data 120 121 void **vp; ///< Void pointer vector. 121 122 }vec; ///< Union for data types. … … 135 136 */ 136 137 psVector *psVectorAlloc( 137 psElemType dataType, ///< Type of data to be held by vector.138 int nalloc///< Total number of elements to make available.138 psElemType dataType, ///< Type of data to be held by vector. 139 unsigned int nalloc ///< Total number of elements to make available. 139 140 ); 140 141 … … 164 165 ); 165 166 166 /** Allocate a void pointer vector. 167 168 /** Deallocate/Dereference elements of a void pointer vector. 167 169 * 168 * Uses psLib memory allocation functions to create a vector of void pointers as defined by the psVoidPtrVector 169 * struct. 170 * 171 * @return psVector*: Pointer to psVector. 172 * 173 */ 174 psVector *psVoidPtrVectorAlloc( 175 unsigned int nalloc ///< Number of elements to use. 176 ); 177 178 /** Reallocate a void pointer vector. 179 * 180 * Uses psLib memory allocation functions to reallocate a vector of void pointers as defined by the 181 * psVoidPtrVector struct. If the vector size is increased or decreased, this function does not allocate or 182 * deallocate the contents of individual vector elements. The user must do this after calling this function. 183 * 184 * @return psVector*: Pointer to psVector. 185 * 186 */ 187 psVector *psVoidPtrVectorRealloc( 188 psVector *restrict psVec, ///< Void pointer vector to destroy. 189 unsigned int nalloc ///< Number of elements. 190 ); 191 192 /** Deallocate a void pointer vector. 193 * 194 * Uses psLib memory allocation functions to deallocate a vector of void pointers as defined by the 195 * psVoidPtrVector struct. This function does not free the vector elements unless the user provides a callback 196 * function. NULL may be passed as an alternative to supplying a callback, but the user must remember to 197 * delete the vector elements afterwards. The user must not delete or deallocate the vector elements prior to 198 * calling this function, as it requires valid elements for memory reference decrementation operations. 199 * 200 * @return: void 170 * Uses psLib memory allocation functions to deallocate/dereference elements of a vector of void pointers. 171 * This function does not free the vector elements unless the user provides a elemFree function 172 * pointer. If the elemFree function pointer is NULL, the reference cound of the elements are decremented 173 * without being freed. The vector psVec is not freed, and its elements will all be set to NULL. 201 174 * 202 175 */
Note:
See TracChangeset
for help on using the changeset viewer.
