Changeset 1426 for trunk/psLib/src/sysUtils
- Timestamp:
- Aug 9, 2004, 12:44:25 PM (22 years ago)
- Location:
- trunk/psLib/src/sysUtils
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psAbort.h
r1407 r1426 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.6 $ $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 … … 37 37 * 38 38 */ 39 void psAbort(const char *name, // /< Source of abort such as file or function detected40 const char *fmt, // /< A printf style formatting statement defining msg39 void psAbort(const char *name, ///< Source of abort such as file or function detected 40 const char *fmt, ///< A printf style formatting statement defining msg 41 41 ... 42 42 ); -
trunk/psLib/src/sysUtils/psError.h
r1407 r1426 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 35 35 * 36 36 */ 37 void psError(const char *name, // /< Source of error such as file or function detected38 const char *fmt, // /< A printf style formatting statement defining msg37 void psError(const char *name, ///< Source of error such as file or function detected 38 const char *fmt, ///< A printf style formatting statement defining msg 39 39 ... 40 40 ); -
trunk/psLib/src/sysUtils/psLogMsg.h
r1407 r1426 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.14 $ $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 … … 30 30 /// In future versions, this procedure will take a character string as an 31 31 /// argument which can specify more general log destinations. 32 int psLogSetDestination(const char *dest // /< Specifies where to send messages.32 int psLogSetDestination(const char *dest ///< Specifies where to send messages. 33 33 ); 34 34 … … 38 38 /// Ie. higher values set by this procedure will cause more log messages to 39 39 /// be displayed. 40 int psLogSetLevel(int level // /< Specifies the system log level40 int psLogSetLevel(int level ///< Specifies the system log level 41 41 ); 42 42 … … 46 46 /// Deleting a letter from the string will cause the associated information 47 47 /// to not be logged. 48 void psLogSetFormat(const char *fmt // /< Specifies the system log format48 void psLogSetFormat(const char *fmt ///< Specifies the system log format 49 49 ); 50 50 … … 53 53 /// specified by a prior call to psLogSetLevel(). The message is specified 54 54 /// with a printf-stype string an arguments. 55 void psLogMsg(const char *name, // /< name of the log source56 int myLevel, // /< severity level of this log message57 const char *fmt, ... // /< printf-style format command55 void psLogMsg(const char *name, ///< name of the log source 56 int myLevel, ///< severity level of this log message 57 const char *fmt, ... ///< printf-style format command 58 58 ); 59 59 60 60 /// This procedure is functionally equivalent to psLogMsg(), except that 61 61 /// it takes a va_list as the message parameter, not a printf-style string. 62 void psLogMsgV(const char *name, // /< name of the log source63 int myLevel, // /< severity level of this log message64 const char *fmt, // /< printf-style format command65 va_list ap // /< varargs argument list62 void psLogMsgV(const char *name, ///< name of the log source 63 int myLevel, ///< severity level of this log message 64 const char *fmt, ///< printf-style format command 65 va_list ap ///< varargs argument list 66 66 ); 67 67 -
trunk/psLib/src/sysUtils/psMemory.h
r1407 r1426 15 15 * @ingroup MemoryManagement 16 16 * 17 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-08-0 7 00:06:06$17 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 18 * @date $Date: 2004-08-09 22:44:25 $ 19 19 * 20 20 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 63 63 typedef struct psMemBlock 64 64 { 65 const void *startblock; // /< initialised to p_psMEMMAGIC66 struct psMemBlock *previousBlock; // /< previous block in allocation list67 struct psMemBlock *nextBlock; // /< next block allocation list68 psFreeFcn freeFcn; // /< deallocator. If NULL, use generic deallocation.69 size_t userMemorySize; // /< the size of the user-portion of the memory block70 const psMemoryId id; // /< a unique ID for this allocation71 const char *file; // /< set from __FILE__ in e.g. p_psAlloc72 const int lineno; // /< set from __LINE__ in e.g. p_psAlloc73 pthread_mutex_t refCounterMutex; // /< mutex to ensure exclusive access to reference counter74 psReferenceCount refCounter; // /< how many times pointer is referenced75 const void *endblock; // /< initialised to p_psMEMMAGIC65 const void *startblock; ///< initialised to p_psMEMMAGIC 66 struct psMemBlock *previousBlock; ///< previous block in allocation list 67 struct psMemBlock *nextBlock; ///< next block allocation list 68 psFreeFcn freeFcn; ///< deallocator. If NULL, use generic deallocation. 69 size_t userMemorySize; ///< the size of the user-portion of the memory block 70 const psMemoryId id; ///< a unique ID for this allocation 71 const char *file; ///< set from __FILE__ in e.g. p_psAlloc 72 const int lineno; ///< set from __LINE__ in e.g. p_psAlloc 73 pthread_mutex_t refCounterMutex; ///< mutex to ensure exclusive access to reference counter 74 psReferenceCount refCounter; ///< how many times pointer is referenced 75 const void *endblock; ///< initialised to p_psMEMMAGIC 76 76 } 77 77 psMemBlock; … … 82 82 * @ingroup memCallback 83 83 */ 84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr // /< the psMemBlock just allocated84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr ///< the psMemBlock just allocated 85 85 ); 86 86 … … 90 90 * @ingroup memCallback 91 91 */ 92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr // /< the psMemBlock being freed92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr ///< the psMemBlock being freed 93 93 ); 94 94 … … 100 100 * @ingroup memCallback 101 101 */ 102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr, // /< the pointer to the problematic memory102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr, ///< the pointer to the problematic memory 103 103 // block. 104 const char *file, // /< the file in which the problem originated105 int lineno // /< the line number in which the problem originated104 const char *file, ///< the file in which the problem originated 105 int lineno ///< the line number in which the problem originated 106 106 ); 107 107 … … 123 123 */ 124 124 # ifdef DOXYGEN 125 void *psAlloc(size_t size // /< Size required125 void *psAlloc(size_t size ///< Size required 126 126 ); 127 127 # else 128 void *p_psAlloc(size_t size, // /< Size required 129 const char *file, // /< File of call 130 int lineno // /< Line number of call 128 129 void *p_psAlloc(size_t size, ///< Size required 130 const char *file, ///< File of call 131 int lineno ///< Line number of call 131 132 ); 132 133 … … 144 145 */ 145 146 # ifdef DOXYGEN 146 void *psRealloc(void *ptr // /< Pointer to re-allocate147 size_t size, // /< Size required147 void *psRealloc(void *ptr ///< Pointer to re-allocate 148 size_t size, ///< Size required 148 149 ); 149 150 # else 150 void *p_psRealloc(void *ptr, // /< Pointer to re-allocate 151 size_t size, // /< Size required 152 const char *file, // /< File of call 153 int lineno // /< Line number of call 151 152 void *p_psRealloc(void *ptr, ///< Pointer to re-allocate 153 size_t size, ///< Size required 154 const char *file, ///< File of call 155 int lineno ///< Line number of call 154 156 ); 155 157 … … 164 166 */ 165 167 # ifdef DOXYGEN 166 void psFree(void *ptr, // /< Pointer to free, if NULL, function returns immediately.168 void psFree(void *ptr, ///< Pointer to free, if NULL, function returns immediately. 167 169 ); 168 170 # else 169 void p_psFree(void *ptr, // /< Pointer to free 170 const char *file, // /< File of call 171 int lineno // /< Line number of call 171 172 void p_psFree(void *ptr, ///< Pointer to free 173 const char *file, ///< File of call 174 int lineno ///< Line number of call 172 175 ); 173 176 … … 191 194 * @ingroup memTracing 192 195 */ 193 int psMemCheckLeaks(psMemoryId id0, // /< don't list blocks with id < id0194 psMemBlock *** arr, // /< pointer to array of pointers to leaked blocks, or NULL195 FILE * fd // /< print list of leaks to fd (or NULL)196 int psMemCheckLeaks(psMemoryId id0, ///< don't list blocks with id < id0 197 psMemBlock *** arr, ///< pointer to array of pointers to leaked blocks, or NULL 198 FILE * fd ///< print list of leaks to fd (or NULL) 196 199 ); 197 200 … … 201 204 * @ingroup memTracing 202 205 */ 203 int psMemCheckCorruption(bool abort_on_error // /< Abort on detecting corruption?206 int psMemCheckCorruption(bool abort_on_error ///< Abort on detecting corruption? 204 207 ); 205 208 … … 208 211 * @ingroup memRefCount 209 212 */ 210 psReferenceCount psMemGetRefCounter(void *vptr // /< Pointer to get refCounter for213 psReferenceCount psMemGetRefCounter(void *vptr ///< Pointer to get refCounter for 211 214 ); 212 215 … … 216 219 */ 217 220 # ifdef DOXYGEN 218 void *psMemIncrRefCounter(void *vptr // /< Pointer to increment refCounter, and return221 void *psMemIncrRefCounter(void *vptr ///< Pointer to increment refCounter, and return 219 222 ); 220 223 # else 221 void *p_psMemIncrRefCounter(void *vptr, // /< Pointer to increment refCounter, and return 222 const char *file, // /< File of call 223 int lineno // /< Line number of call 224 225 void *p_psMemIncrRefCounter(void *vptr, ///< Pointer to increment refCounter, and return 226 const char *file, ///< File of call 227 int lineno ///< Line number of call 224 228 ); 225 229 … … 232 236 */ 233 237 # ifdef DOXYGEN 234 void *psMemDecrRefCounter(void *vptr // /< Pointer to decrement refCounter, and return238 void *psMemDecrRefCounter(void *vptr ///< Pointer to decrement refCounter, and return 235 239 ); 236 240 # else 237 void *p_psMemDecrRefCounter(void *vptr, // /< Pointer to decrement refCounter, and return 238 const char *file, // /< File of call 239 int lineno // /< Line number of call 241 242 void *p_psMemDecrRefCounter(void *vptr, ///< Pointer to decrement refCounter, and return 243 const char *file, ///< File of call 244 int lineno ///< Line number of call 240 245 ); 241 246 … … 246 251 * @ingroup memCallback 247 252 */ 248 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func // /< Function to run253 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func ///< Function to run 249 254 ); 250 255 … … 253 258 * @ingroup memCallback 254 259 */ 255 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func // /< Function to run260 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func ///< Function to run 256 261 ); 257 262 … … 260 265 * @ingroup memCallback 261 266 */ 262 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func // /< Function to run267 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func ///< Function to run 263 268 ); 264 269 … … 267 272 * @ingroup memCallback 268 273 */ 269 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func // /< Function to run274 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func ///< Function to run 270 275 ); 271 276 … … 280 285 * @ingroup memCallback 281 286 */ 282 psMemoryId psMemAllocateCallbackSetID(psMemoryId id // /< ID to set287 psMemoryId psMemAllocateCallbackSetID(psMemoryId id ///< ID to set 283 288 ); 284 289 … … 287 292 * @ingroup memCallback 288 293 */ 289 psMemoryId psMemFreeCallbackSetID(psMemoryId id // /< ID to set294 psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set 290 295 ); 291 296 -
trunk/psLib/src/sysUtils/psTrace.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.13 $ $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 … … 59 59 # ifndef DOXYGEN 60 60 /// Send a trace message 61 void p_psTrace(const char *facil, // /< facilty of interest62 int myLevel, // /< desired trace level63 ...) // /< trace message arguments61 void p_psTrace(const char *facil, ///< facilty of interest 62 int myLevel, ///< desired trace level 63 ...) ///< trace message arguments 64 64 ; 65 65 # endif 66 66 67 67 /// Set trace level 68 int psTraceSetLevel(const char *facil, // /< facilty of interest69 int level) // /< desired trace level68 int psTraceSetLevel(const char *facil, ///< facilty of interest 69 int level) ///< desired trace level 70 70 ; 71 71 72 72 /// Get the trace level 73 int psTraceGetLevel(const char *facil) // /< facilty of interest73 int psTraceGetLevel(const char *facil) ///< facilty of interest 74 74 ; 75 75 -
trunk/psLib/src/sysUtils/psType.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.18 $ $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 … … 40 40 */ 41 41 42 typedef uint8_t psU8; // /< 8-bit unsigned int43 typedef uint16_t psU16; // /< 16-bit unsigned int44 typedef uint32_t psU32; // /< 32-bit unsigned int45 typedef uint64_t psU64; // /< 64-bit unsigned int46 typedef int8_t psS8; // /< 8-bit signed int47 typedef int16_t psS16; // /< 16-bit signed int48 typedef int32_t psS32; // /< 32-bit signed int49 typedef int64_t psS64; // /< 64-bit signed int50 typedef float psF32; // /< 32-bit floating point51 typedef double psF64; // /< 64-bit floating point52 typedef complex float psC32; // /< complex with 32-bit floating point Real and Imagary numbers53 typedef complex double psC64; // /< complex with 64-bit floating point Real and Imagary numbers54 typedef void *psPTR; // /< void pointer42 typedef uint8_t psU8; ///< 8-bit unsigned int 43 typedef uint16_t psU16; ///< 16-bit unsigned int 44 typedef uint32_t psU32; ///< 32-bit unsigned int 45 typedef uint64_t psU64; ///< 64-bit unsigned int 46 typedef int8_t psS8; ///< 8-bit signed int 47 typedef int16_t psS16; ///< 16-bit signed int 48 typedef int32_t psS32; ///< 32-bit signed int 49 typedef int64_t psS64; ///< 64-bit signed int 50 typedef float psF32; ///< 32-bit floating point 51 typedef double psF64; ///< 64-bit floating point 52 typedef complex float psC32; ///< complex with 32-bit floating point Real and Imagary numbers 53 typedef complex double psC64; ///< complex with 64-bit floating point Real and Imagary numbers 54 typedef void *psPTR; ///< void pointer 55 55 56 56 typedef enum { 57 PS_TYPE_S8 = 0x0101, // /< Character.58 PS_TYPE_S16 = 0x0102, // /< Short integer.59 PS_TYPE_S32 = 0x0104, // /< Integer.60 PS_TYPE_S64 = 0x0108, // /< Long integer.61 PS_TYPE_U8 = 0x0301, // /< Unsigned character.62 PS_TYPE_U16 = 0x0302, // /< Unsigned short integer.63 PS_TYPE_U32 = 0x0304, // /< Unsigned integer.64 PS_TYPE_U64 = 0x0308, // /< Unsigned long integer.65 PS_TYPE_F32 = 0x0404, // /< Single-precision Floating point.66 PS_TYPE_F64 = 0x0408, // /< Double-precision floating point.67 PS_TYPE_C32 = 0x0808, // /< Complex numbers consisting of single-precision floating57 PS_TYPE_S8 = 0x0101, ///< Character. 58 PS_TYPE_S16 = 0x0102, ///< Short integer. 59 PS_TYPE_S32 = 0x0104, ///< Integer. 60 PS_TYPE_S64 = 0x0108, ///< Long integer. 61 PS_TYPE_U8 = 0x0301, ///< Unsigned character. 62 PS_TYPE_U16 = 0x0302, ///< Unsigned short integer. 63 PS_TYPE_U32 = 0x0304, ///< Unsigned integer. 64 PS_TYPE_U64 = 0x0308, ///< Unsigned long integer. 65 PS_TYPE_F32 = 0x0404, ///< Single-precision Floating point. 66 PS_TYPE_F64 = 0x0408, ///< Double-precision floating point. 67 PS_TYPE_C32 = 0x0808, ///< Complex numbers consisting of single-precision floating 68 68 // point. 69 PS_TYPE_C64 = 0x0810, // /< Complex numbers consisting of double-precision floating69 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating 70 70 // point. 71 PS_TYPE_PTR = 0x0000 // /< Something else that's not supported for arithmetic.71 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 72 72 } psElemType; 73 73 74 # define PS_TYPE_MASK PS_TYPE_U8 // /< the psElemType to use for mask image75 # define PS_TYPE_MASK_DATA U8 // /< the data member to use for mask image74 # define PS_TYPE_MASK PS_TYPE_U8 ///< the psElemType to use for mask image 75 # define PS_TYPE_MASK_DATA U8 ///< the data member to use for mask image 76 76 # define PS_TYPE_MASK_NAME "psU8" 77 typedef psU8 psMaskType; // /< the C datatype for a mask image77 typedef psU8 psMaskType; ///< the C datatype for a mask image 78 78 79 79 # define PS_MIN_S8 INT8_MIN … … 132 132 */ 133 133 typedef enum { 134 PS_DIMEN_SCALAR, // /< Scalar.135 PS_DIMEN_VECTOR, // /< Vector.136 PS_DIMEN_TRANSV, // /< Transposed vector.137 PS_DIMEN_IMAGE, // /< Image.138 PS_DIMEN_OTHER // /< Something else that's not supported for arithmetic.134 PS_DIMEN_SCALAR, ///< Scalar. 135 PS_DIMEN_VECTOR, ///< Vector. 136 PS_DIMEN_TRANSV, ///< Transposed vector. 137 PS_DIMEN_IMAGE, ///< Image. 138 PS_DIMEN_OTHER ///< Something else that's not supported for arithmetic. 139 139 } psDimen; 140 140 … … 147 147 typedef struct 148 148 { 149 psElemType type; // /< Primitive type.150 psDimen dimen; // /< Dimensionality.149 psElemType type; ///< Primitive type. 150 psDimen dimen; ///< Dimensionality. 151 151 } 152 152 psType;
Note:
See TracChangeset
for help on using the changeset viewer.
