Changeset 1448
- Timestamp:
- Aug 9, 2004, 3:55:34 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 18 edited
-
image/psImageStats.c (modified) (2 diffs)
-
image/psImageStats.h (modified) (2 diffs)
-
imageops/psImageStats.c (modified) (2 diffs)
-
imageops/psImageStats.h (modified) (2 diffs)
-
sys/psAbort.h (modified) (2 diffs)
-
sys/psError.h (modified) (2 diffs)
-
sys/psLogMsg.c (modified) (7 diffs)
-
sys/psLogMsg.h (modified) (3 diffs)
-
sys/psMemory.h (modified) (15 diffs)
-
sys/psString.h (modified) (5 diffs)
-
sys/psType.h (modified) (2 diffs)
-
sysUtils/psAbort.h (modified) (2 diffs)
-
sysUtils/psError.h (modified) (2 diffs)
-
sysUtils/psLogMsg.c (modified) (7 diffs)
-
sysUtils/psLogMsg.h (modified) (3 diffs)
-
sysUtils/psMemory.h (modified) (15 diffs)
-
sysUtils/psString.h (modified) (5 diffs)
-
sysUtils/psType.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageStats.c
r1442 r1448 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-10 01: 05:53$12 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-10 01:55:34 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 327 327 328 328 *****************************************************************************/ 329 int psImageEvalPolynomial(constpsImage* input, const psPolynomial2D* coeffs)329 psImage* psImageEvalPolynomial(psImage* input, const psPolynomial2D* coeffs) 330 330 { 331 331 int x = 0; -
trunk/psLib/src/image/psImageStats.h
r1442 r1448 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-08-10 01: 05:53$11 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-08-10 01:55:34 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 80 80 * @return psImage* the resulting image 81 81 */ 82 intpsImageEvalPolynomial(83 const psImage* input,///< input image82 psImage* psImageEvalPolynomial( 83 psImage* input, ///< input image 84 84 const psPolynomial2D* coeffs ///< coefficient structure carries in desired terms 85 85 ); -
trunk/psLib/src/imageops/psImageStats.c
r1442 r1448 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-10 01: 05:53$12 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-10 01:55:34 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 327 327 328 328 *****************************************************************************/ 329 int psImageEvalPolynomial(constpsImage* input, const psPolynomial2D* coeffs)329 psImage* psImageEvalPolynomial(psImage* input, const psPolynomial2D* coeffs) 330 330 { 331 331 int x = 0; -
trunk/psLib/src/imageops/psImageStats.h
r1442 r1448 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-08-10 01: 05:53$11 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-08-10 01:55:34 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 80 80 * @return psImage* the resulting image 81 81 */ 82 intpsImageEvalPolynomial(83 const psImage* input,///< input image82 psImage* psImageEvalPolynomial( 83 psImage* input, ///< input image 84 84 const psPolynomial2D* coeffs ///< coefficient structure carries in desired terms 85 85 ); -
trunk/psLib/src/sys/psAbort.h
r1441 r1448 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 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 detected 40 const char *fmt, ///< A printf style formatting statement defining msg 41 ... 42 ); 39 void psAbort( 40 const char *name, ///< Source of abort such as file or function detected 41 const char *fmt, ///< A printf style formatting statement defining msg 42 ... 43 ); 43 44 44 45 /* @} */// Doxygen - End of SystemGroup Functions -
trunk/psLib/src/sys/psError.h
r1441 r1448 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08- 09 23:40:55$15 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-10 01:55:34 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 * log message. 33 33 * 34 * @return void No return value35 *36 34 */ 37 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 ... 40 ); 35 void psError( 36 const char *name, ///< Source of error such as file or function detected 37 const char *fmt, ///< A printf style formatting statement defining msg 38 ... 39 ); 41 40 42 41 /* @} */// End of SysUtils Functions -
trunk/psLib/src/sys/psLogMsg.c
r1441 r1448 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 89 89 An integer specifying the old log destination. 90 90 *****************************************************************************/ 91 intpsLogSetDestination(const char *dest)91 bool psLogSetDestination(const char *dest) 92 92 { 93 93 char protocol[5]; … … 104 104 } 105 105 logDest = NULL; 106 return 0;106 return true; 107 107 } 108 108 109 109 if (sscanf(dest, "%4s:%256s", protocol, location) < 2) { 110 110 psError(__func__, "The specified destination, %s, is malformed.", dest); 111 return 1;111 return false; 112 112 } 113 113 … … 118 118 } 119 119 logDest = stderr; 120 return 0;120 return true; 121 121 } 122 122 if (strcmp(location, "stdout") == 0) { … … 125 125 } 126 126 logDest = stdout; 127 return 0;127 return true; 128 128 } 129 129 psError(__func__, "The location, %s, for protocol 'dest' is invalid.", location); … … 134 134 if (file == NULL) { 135 135 psError(__func__, "Could not open file '%s' for output.", location); 136 return 1;136 return false; 137 137 } 138 138 if (logDest != NULL && logDest != stderr && logDest != stdout) { … … 140 140 } 141 141 logDest = file; 142 return 0;142 return true; 143 143 } 144 144 145 145 psError(__func__, "Do not know how to handle the protocol '%s'.", protocol); 146 return 1;146 return false; 147 147 } 148 148 -
trunk/psLib/src/sys/psLogMsg.h
r1441 r1448 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 20 #define PS_LOG_MSG_H 21 21 #include <stdarg.h> 22 #include <stdbool.h> 22 23 23 24 /** @addtogroup LogTrace … … 25 26 */ 26 27 27 /// This procedure sets the destination for future log messages. Currently 28 /// the destination is specified by an integer which can have the following 29 /// pre-defined values: PS_LOG_NONE, PS_LOG_TO_STDOUT, and PS_LOG_TO_STDERR. 30 /// In future versions, this procedure will take a character string as an 31 /// argument which can specify more general log destinations. 32 int psLogSetDestination(const char *dest ///< Specifies where to send messages. 33 ); 28 /** This procedure sets the destination for future log messages. Currently 29 * the destination is specified by an integer which can have the following 30 * pre-defined values: PS_LOG_NONE, PS_LOG_TO_STDOUT, and PS_LOG_TO_STDERR. 31 * In future versions, this procedure will take a character string as an 32 * argument which can specify more general log destinations. 33 * 34 * @return int true if set successfully, otherwise false. 35 */ 36 bool psLogSetDestination( 37 const char *dest ///< Specifies where to send messages. 38 ); 34 39 35 /// This procedure sets the message level for future log messages. Subsequent 36 /// log messages, with a log level of "mylevel", will only be logged if 37 /// "mylevel" is less than the current log level set by this procedure. 38 /// Ie. higher values set by this procedure will cause more log messages to 39 /// be displayed. 40 int psLogSetLevel(int level ///< Specifies the system log level 41 ); 40 /** This procedure sets the message level for future log messages. Subsequent 41 * log messages, with a log level of "mylevel", will only be logged if 42 * "mylevel" is less than the current log level set by this procedure. 43 * Ie. higher values set by this procedure will cause more log messages to 44 * be displayed. 45 * 46 * @return int old logging level 47 */ 48 int psLogSetLevel( 49 int level ///< Specifies the system log level 50 ); 42 51 43 /// This procedure sets the log format for future log messages. The argument 44 /// must be a character string consistsing of the letters H (host), L 45 /// (level), M (message), N (name), and T (time). The default is "THLNM". 46 /// Deleting a letter from the string will cause the associated information 47 /// to not be logged. 48 void psLogSetFormat(const char *fmt ///< Specifies the system log format 49 ); 52 /** This procedure sets the log format for future log messages. The argument 53 * must be a character string consistsing of the letters H (host), L 54 * (level), M (message), N (name), and T (time). The default is "THLNM". 55 * Deleting a letter from the string will cause the associated information 56 * to not be logged. 57 * 58 */ 59 void psLogSetFormat( 60 const char *fmt ///< Specifies the system log format 61 ); 50 62 51 /// This procedure logs a message to the destination set by a prior 52 /// call to psLogSetDestination(), if myLevel is less than the level 53 /// specified by a prior call to psLogSetLevel(). The message is specified 54 /// with a printf-stype string an arguments. 55 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 ); 63 /** This procedure logs a message to the destination set by a prior 64 * call to psLogSetDestination(), if myLevel is less than the level 65 * specified by a prior call to psLogSetLevel(). The message is specified 66 * with a printf-stype string an arguments. 67 * 68 */ 69 void psLogMsg( 70 const char *name, ///< name of the log source 71 int myLevel, ///< severity level of this log message 72 const char *fmt, ///< printf-style format command 73 ... 74 ); 59 75 60 /// This procedure is functionally equivalent to psLogMsg(), except that 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 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 ); 76 /** This procedure is functionally equivalent to psLogMsg(), except that 77 * it takes a va_list as the message parameter, not a printf-style string. 78 * 79 */ 80 void psLogMsgV( 81 const char *name, ///< name of the log source 82 int myLevel, ///< severity level of this log message 83 const char *fmt, ///< printf-style format command 84 va_list ap ///< varargs argument list 85 ); 67 86 68 87 ///< Status codes for log messages 69 88 enum { 70 PS_LOG_ABORT = 0, 71 PS_LOG_ERROR, 72 PS_LOG_WARN, 73 PS_LOG_INFO 89 PS_LOG_ABORT = 0, ///< log message is a critical error, perform an abort after printing 90 PS_LOG_ERROR, ///< log message is an error, but don't abort 91 PS_LOG_WARN, ///< log message is a warning 92 PS_LOG_INFO ///< log message is informational only 74 93 }; 75 94 76 95 ///< Destinations for log messages 77 96 enum { 78 PS_LOG_NONE, 79 PS_LOG_TO_STDERR, 80 PS_LOG_TO_STDOUT 97 PS_LOG_NONE, ///< turn off logging 98 PS_LOG_TO_STDERR, ///< log to system's stderr 99 PS_LOG_TO_STDOUT ///< log to system's stdout 81 100 }; 82 101 -
trunk/psLib/src/sys/psMemory.h
r1441 r1448 1 #if !defined(PS_MEMORY_H)2 #define PS_MEMORY_H3 4 1 /** @file psMemory.h 5 2 * … … 15 12 * @ingroup MemoryManagement 16 13 * 17 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 19 16 * 20 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 21 18 */ 19 20 #if !defined(PS_MEMORY_H) 21 #define PS_MEMORY_H 22 22 23 23 #include <stdio.h> // needed for FILE … … 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 allocated 85 ); 84 typedef psMemoryId(*psMemAllocateCallback) ( 85 const psMemBlock* ptr ///< the psMemBlock just allocated 86 ); 86 87 87 88 /** prototype of memory free callback used by memory functions … … 90 91 * @ingroup memCallback 91 92 */ 92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock* ptr ///< the psMemBlock being freed 93 ); 93 typedef psMemoryId(*psMemFreeCallback) ( 94 const psMemBlock* ptr ///< the psMemBlock being freed 95 ); 94 96 95 97 /** prototype of a callback used in error conditions … … 100 102 * @ingroup memCallback 101 103 */ 102 typedef void (*psMemProblemCallback) ( const psMemBlock* ptr, ///< the pointer to the problematic memory103 //block.104 const char *file,///< the file in which the problem originated105 int lineno///< the line number in which the problem originated106 );104 typedef void (*psMemProblemCallback) ( 105 const psMemBlock* ptr, ///< the pointer to the problematic memory block. 106 const char *file, ///< the file in which the problem originated 107 int lineno ///< the line number in which the problem originated 108 ); 107 109 108 110 /** prototype of a callback function used when memory runs out … … 114 116 * @ingroup memCallback 115 117 */ 116 typedef void *(*psMemExhaustedCallback) (size_t size // < the size of buffer required 117 ); 118 typedef void *(*psMemExhaustedCallback) ( 119 size_t size ///< the size of buffer required 120 ); 118 121 119 122 /** Memory allocation. This operates much like malloc(), but is guaranteed to return a non-NULL value. … … 145 148 */ 146 149 #ifdef DOXYGEN 147 void *psRealloc(void *ptr ///< Pointer to re-allocate 148 size_t size, ///< Size required 149 ); 150 #else 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 156 ); 150 void *psRealloc( 151 void *ptr ///< Pointer to re-allocate 152 size_t size, ///< Size required 153 ); 154 #else 155 156 void *p_psRealloc( 157 void *ptr, ///< Pointer to re-allocate 158 size_t size, ///< Size required 159 const char *file, ///< File of call 160 int lineno ///< Line number of call 161 ); 157 162 158 163 /// Memory re-allocation. psRealloc sends file and line number to p_psRealloc. … … 166 171 */ 167 172 #ifdef DOXYGEN 168 void psFree(void *ptr, ///< Pointer to free, if NULL, function returns immediately. 169 ); 170 #else 171 172 void p_psFree(void *ptr, ///< Pointer to free 173 const char *file, ///< File of call 174 int lineno ///< Line number of call 175 ); 173 void psFree( 174 void *ptr, ///< Pointer to free, if NULL, function returns immediately. 175 ); 176 #else 177 178 void p_psFree( 179 void *ptr, ///< Pointer to free 180 const char *file, ///< File of call 181 int lineno ///< Line number of call 182 ); 176 183 177 184 /// Free memory. psFree sends file and line number to p_psFree. … … 194 201 * @ingroup memTracing 195 202 */ 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) 199 ); 203 int psMemCheckLeaks( 204 psMemoryId id0, ///< don't list blocks with id < id0 205 psMemBlock* ** arr, ///< pointer to array of pointers to leaked blocks, or NULL 206 FILE * fd ///< print list of leaks to fd (or NULL) 207 ); 200 208 201 209 /** Check for memory corruption. Scans all currently allocated memory buffers and checks for corruptions, … … 204 212 * @ingroup memTracing 205 213 */ 206 int psMemCheckCorruption(bool abort_on_error ///< Abort on detecting corruption? 207 ); 214 int psMemCheckCorruption( 215 bool abort_on_error ///< Abort on detecting corruption? 216 ); 208 217 209 218 /** Return reference counter … … 211 220 * @ingroup memRefCount 212 221 */ 213 psReferenceCount psMemGetRefCounter(void *vptr ///< Pointer to get refCounter for 214 ); 222 psReferenceCount psMemGetRefCounter( 223 void *vptr ///< Pointer to get refCounter for 224 ); 215 225 216 226 /** Increment reference counter and return the pointer … … 219 229 */ 220 230 #ifdef DOXYGEN 221 void *psMemIncrRefCounter(void *vptr ///< Pointer to increment refCounter, and return 222 ); 223 #else 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 228 ); 231 void *psMemIncrRefCounter( 232 void *vptr ///< Pointer to increment refCounter, and return 233 ); 234 #else 235 236 void *p_psMemIncrRefCounter( 237 void *vptr, ///< Pointer to increment refCounter, and return 238 const char *file, ///< File of call 239 int lineno ///< Line number of call 240 ); 229 241 230 242 #define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__) … … 234 246 * 235 247 * @ingroup memRefCount 236 */ 237 #ifdef DOXYGEN 238 void *psMemDecrRefCounter(void *vptr ///< Pointer to decrement refCounter, and return 239 ); 240 #else 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 245 ); 248 * 249 * @return void* the pointer deremented in refCount, or NULL if pointer is 250 * fully dereferenced. 251 */ 252 #ifdef DOXYGEN 253 void* psMemDecrRefCounter( 254 void* vptr ///< Pointer to decrement refCounter, and return 255 ); 256 #else 257 258 void *p_psMemDecrRefCounter( 259 void *vptr, ///< Pointer to decrement refCounter, and return 260 const char *file, ///< File of call 261 int lineno ///< Line number of call 262 ); 246 263 247 264 #define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__) 248 265 #endif 249 266 250 /** Set callback for problems 251 * @ingroup memCallback 252 */ 253 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func ///< Function to run 254 ); 255 256 /** Set callback for out-of-memory 257 * 258 * @ingroup memCallback 259 */ 260 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func ///< Function to run 261 ); 267 /** Set callback for problems. 268 * 269 * At various occasions, the memory manager can check the state of the memory 270 * stack. If any of these checks discover that the memory stack is corrupted, 271 * the psMemProblemCallback is called. 272 273 * @ingroup memCallback 274 * 275 * @return psMemProblemCallback old psMemProblemCallback function 276 */ 277 psMemProblemCallback psMemProblemCallbackSet( 278 psMemProblemCallback func ///< Function to run at memory problem detection 279 ); 280 281 /** Set callback for out-of-memory. 282 * 283 * If not enough memory is available to satisfy a request by psAlloc or 284 * psRealloc, these functions attempt to find an alternative solution by 285 * calling the psMemExhaustedCallback, a function which may be set by the 286 * programmer in appropriate circumstances, rather than immediately fail. 287 * The typical use of such a feature may be when a program needs a large 288 * chunk of memory to do an operation, but the exact size is not critical. 289 * This feature gives the programmer the opportunity to make a smaller 290 * request and try again, limiting the size of the operating buffer. 291 * 292 * @ingroup memCallback 293 * 294 * @return psMemExhaustedCallback old psMemExhaustedCallback function 295 */ 296 psMemExhaustedCallback psMemExhaustedCallbackSet( 297 psMemExhaustedCallback func ///< Function to run at memory exhaustion 298 ); 262 299 263 300 /** Set call back for when a particular memory block is allocated 264 301 * 265 * @ingroup memCallback 266 */ 267 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func ///< Function to run 268 ); 302 * A private variable, p_psMemAllocateID, can be used to trace the allocation 303 * and freeing of specific memory blocks. If p_psMemAllocateID is set and a 304 * memory block with that ID is allocated, psMemAllocateCallback is called 305 * just before memory is returned to the calling function. 306 * 307 * @ingroup memCallback 308 * 309 * @return psMemAllocateCallback old psMemAllocateCallback function 310 */ 311 psMemAllocateCallback psMemAllocateCallbackSet( 312 psMemAllocateCallback func ///< Function to run at memory allocation of specific mem block 313 ); 269 314 270 315 /** Set call back for when a particular memory block is freed 271 316 * 272 * @ingroup memCallback 273 */ 274 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func ///< Function to run 275 ); 317 * A private variable, p_psMemFreeID, can be used to trace the freeing of 318 * specific memory blocks. If p_psMemFreeID is set and the memory block with 319 * the ID is about to be freed, the psMemFreeCallback callback is called just 320 * before the memory block is freed. 321 * 322 * @ingroup memCallback 323 * 324 * @return psMemFreeCallback old psMemFreeCallback function 325 */ 326 psMemFreeCallback psMemFreeCallbackSet( 327 psMemFreeCallback func ///< Function to run at memory free of specific mem block 328 ); 276 329 277 330 /** get next memory ID 278 331 * 279 332 * @ingroup memCallback 333 * 334 * @return psMemoryId the next memory ID to be used 280 335 */ 281 336 psMemoryId psMemGetId(void); 282 337 283 /** set p_psMemAllocateID to id 284 * 285 * @ingroup memCallback 286 */ 287 psMemoryId psMemAllocateCallbackSetID(psMemoryId id ///< ID to set 288 ); 338 /** set p_psMemAllocateID to specific id 339 * 340 * A private variable, p_psMemAllocateID, can be used to trace the allocation 341 * and freeing of specific memory blocks. If p_psMemAllocateID is set and a 342 * memory block with that ID is allocated, psMemAllocateCallback is called 343 * just before memory is returned to the calling function. 344 * 345 * @ingroup memCallback 346 * 347 * @return psMemoryId 348 * 349 * @see psMemAllocateCallbackSet 350 */ 351 psMemoryId psMemAllocateCallbackSetID( 352 psMemoryId id ///< ID to set 353 ); 289 354 290 355 /** set p_psMemFreeID to id 291 356 * 292 * @ingroup memCallback 293 */ 294 psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set 295 ); 357 * A private variable, p_psMemFreeID, can be used to trace the freeing of 358 * specific memory blocks. If p_psMemFreeID is set and the memory block with 359 * the ID is about to be freed, the psMemFreeCallback callback is called just 360 * before the memory block is freed. 361 * 362 * @ingroup memCallback 363 * 364 * @return psMemoryId the old p_psMemFreeID 365 * 366 * @see psMemFreeCallbackSet 367 */ 368 psMemoryId psMemFreeCallbackSetID( 369 psMemoryId id ///< ID to set 370 ); 296 371 297 372 //@} End of Memory Management Functions … … 306 381 #pragma GCC poison malloc realloc calloc free 307 382 #else 308 # define malloc(S) _Pragma("error Use of malloc is not allowed. Use psAlloc instead.")309 # define realloc(P,S) _Pragma("error Use of realloc is not allowed. Use psRealloc instead.")310 # define calloc(S) _Pragma("error Use of calloc is not allowed. Use psAlloc instead.")311 # define free(P) _Pragma("error Use of free is not allowed. Use psFree instead.")312 # endif313 # endif314 315 # endif383 #define malloc(S) _Pragma("error Use of malloc is not allowed. Use psAlloc instead.") 384 #define realloc(P,S) _Pragma("error Use of realloc is not allowed. Use psRealloc instead.") 385 #define calloc(S) _Pragma("error Use of calloc is not allowed. Use psAlloc instead.") 386 #define free(P) _Pragma("error Use of free is not allowed. Use psFree instead.") 387 #endif 388 #endif 389 390 #endif 316 391 // doxygen skip 317 392 -
trunk/psLib/src/sys/psString.h
r1441 r1448 1 2 1 /** @file psString.h 3 2 * … … 11 10 * @author Eric Van Alst, MHPCC 12 11 * 13 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08- 09 23:40:55$12 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-10 01:55:34 $ 15 14 * 16 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 19 #define PS_STRING_H 21 20 22 /******************************************************************************/23 21 24 /* DEFINE STATEMENTS */ 25 26 /******************************************************************************/ 27 28 /** This macro will convert the arguement to a quoted string */ 22 /** This macro will convert the argument to a quoted string */ 29 23 #define PS_STRING(S) #S 30 31 /******************************************************************************/32 33 /* TYPE DEFINITIONS */34 35 /******************************************************************************/36 37 // None38 39 /*****************************************************************************/40 41 /* FUNCTION PROTOTYPES */42 43 /*****************************************************************************/44 24 45 25 // Doxygen group tags … … 54 34 * plus one and copy the input string to the newly allocated memory. 55 35 * 56 * @return char*Copy of input string36 * @return char* Copy of input string 57 37 * 58 38 */ 59 60 char *psStringCopy(const char *str61 /**< Input string of characters to copy */62 );39 char *psStringCopy( 40 const char *str 41 /**< Input string of characters to copy */ 42 ); 63 43 64 44 /** Copies the input string up to the specified number of characters … … 78 58 /*@null@*/ 79 59 80 char *psStringNCopy(const char *str, 81 /**< Input string of characters to copy */ 60 char *psStringNCopy( 61 const char *str, 62 /**< Input string of characters to copy */ 82 63 83 int nChar84 /**< Number of bytes to allocate for string copy */85 );64 int nChar 65 /**< Number of bytes to allocate for string copy */ 66 ); 86 67 87 68 /* @} */// Doxygen - End of SystemGroup Functions -
trunk/psLib/src/sys/psType.h
r1441 r1448 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08- 09 23:40:55$13 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-10 01:55:34 $ 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 floating 68 // point. 69 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating 70 // point. 71 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 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 floating point. 68 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 69 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 72 70 } psElemType; 73 71 74 #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 #define PS_TYPE_MASK_NAME "psU8" 77 typedef psU8 psMaskType; ///< the C datatype for a mask image 72 #define PS_TYPE_MASK PS_TYPE_U8 /**< the psElemType to use for mask image */ 73 #define PS_TYPE_MASK_DATA U8 /**< the data member to use for mask image */ 74 #define PS_TYPE_MASK_NAME "psU8" /**< the data type for mask as a string */ 78 75 79 #define PS_MIN_S8 INT8_MIN 80 #define PS_MIN_S16 INT16_MIN 81 #define PS_MIN_S32 INT32_MIN 82 #define PS_MIN_S64 INT64_MIN 83 #define PS_MIN_U8 0 84 #define PS_MIN_U16 0 85 #define PS_MIN_U32 0 86 #define PS_MIN_U64 0 87 #define PS_MIN_F32 -FLT_MAX 88 #define PS_MIN_F64 -DBL_MAX 89 #define PS_MIN_C32 -FLT_MAX 90 #define PS_MIN_C64 -DBL_MAX 76 typedef psU8 psMaskType; ///< the C datatype for a mask image 91 77 92 #define PS_MAX_S8 INT8_MAX 93 #define PS_MAX_S16 INT16_MAX 94 #define PS_MAX_S32 INT32_MAX 95 #define PS_MAX_S64 INT64_MAX 96 #define PS_MAX_U8 UINT8_MAX 97 #define PS_MAX_U16 UINT16_MAX 98 #define PS_MAX_U32 UINT32_MAX 99 #define PS_MAX_U64 UINT64_MAX 100 #define PS_MAX_F32 FLT_MAX 101 #define PS_MAX_F64 DBL_MAX 102 #define PS_MAX_C32 FLT_MAX 103 #define PS_MAX_C64 DBL_MAX 78 79 #define PS_MIN_S8 INT8_MIN /**< minimum valid psS8 value */ 80 #define PS_MIN_S16 INT16_MIN /**< minimum valid psS16 value */ 81 #define PS_MIN_S32 INT32_MIN /**< minimum valid psS32 value */ 82 #define PS_MIN_S64 INT64_MIN /**< minimum valid psS64 value */ 83 #define PS_MIN_U8 0 /**< minimum valid psU8 value */ 84 #define PS_MIN_U16 0 /**< minimum valid psU16 value */ 85 #define PS_MIN_U32 0 /**< minimum valid psU32 value */ 86 #define PS_MIN_U64 0 /**< minimum valid psU64 value */ 87 #define PS_MIN_F32 -FLT_MAX /**< minimum valid psF32 value */ 88 #define PS_MIN_F64 -DBL_MAX /**< minimum valid psF64 value */ 89 #define PS_MIN_C32 -FLT_MAX /**< minimum valid real or imaginary psC32 value */ 90 #define PS_MIN_C64 -DBL_MAX /**< minimum valid real or imaginary psC32 value */ 91 92 #define PS_MAX_S8 INT8_MAX /**< maximum valid psS8 value */ 93 #define PS_MAX_S16 INT16_MAX /**< maximum valid psS16 value */ 94 #define PS_MAX_S32 INT32_MAX /**< maximum valid psS32 value */ 95 #define PS_MAX_S64 INT64_MAX /**< maximum valid psS64 value */ 96 #define PS_MAX_U8 UINT8_MAX /**< maximum valid psU8 value */ 97 #define PS_MAX_U16 UINT16_MAX /**< maximum valid psU16 value */ 98 #define PS_MAX_U32 UINT32_MAX /**< maximum valid psU32 value */ 99 #define PS_MAX_U64 UINT64_MAX /**< maximum valid psU64 value */ 100 #define PS_MAX_F32 FLT_MAX /**< maximum valid psF32 value */ 101 #define PS_MAX_F64 DBL_MAX /**< maximum valid psF64 value */ 102 #define PS_MAX_C32 FLT_MAX /**< maximum valid real or imaginary psC32 value */ 103 #define PS_MAX_C64 DBL_MAX /**< maximum valid real or imaginary psC32 value */ 104 104 105 105 /// Macro to get the bad pixel reason code (stored as part of mask value) -
trunk/psLib/src/sysUtils/psAbort.h
r1441 r1448 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 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 detected 40 const char *fmt, ///< A printf style formatting statement defining msg 41 ... 42 ); 39 void psAbort( 40 const char *name, ///< Source of abort such as file or function detected 41 const char *fmt, ///< A printf style formatting statement defining msg 42 ... 43 ); 43 44 44 45 /* @} */// Doxygen - End of SystemGroup Functions -
trunk/psLib/src/sysUtils/psError.h
r1441 r1448 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08- 09 23:40:55$15 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-10 01:55:34 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 * log message. 33 33 * 34 * @return void No return value35 *36 34 */ 37 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 ... 40 ); 35 void psError( 36 const char *name, ///< Source of error such as file or function detected 37 const char *fmt, ///< A printf style formatting statement defining msg 38 ... 39 ); 41 40 42 41 /* @} */// End of SysUtils Functions -
trunk/psLib/src/sysUtils/psLogMsg.c
r1441 r1448 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 89 89 An integer specifying the old log destination. 90 90 *****************************************************************************/ 91 intpsLogSetDestination(const char *dest)91 bool psLogSetDestination(const char *dest) 92 92 { 93 93 char protocol[5]; … … 104 104 } 105 105 logDest = NULL; 106 return 0;106 return true; 107 107 } 108 108 109 109 if (sscanf(dest, "%4s:%256s", protocol, location) < 2) { 110 110 psError(__func__, "The specified destination, %s, is malformed.", dest); 111 return 1;111 return false; 112 112 } 113 113 … … 118 118 } 119 119 logDest = stderr; 120 return 0;120 return true; 121 121 } 122 122 if (strcmp(location, "stdout") == 0) { … … 125 125 } 126 126 logDest = stdout; 127 return 0;127 return true; 128 128 } 129 129 psError(__func__, "The location, %s, for protocol 'dest' is invalid.", location); … … 134 134 if (file == NULL) { 135 135 psError(__func__, "Could not open file '%s' for output.", location); 136 return 1;136 return false; 137 137 } 138 138 if (logDest != NULL && logDest != stderr && logDest != stdout) { … … 140 140 } 141 141 logDest = file; 142 return 0;142 return true; 143 143 } 144 144 145 145 psError(__func__, "Do not know how to handle the protocol '%s'.", protocol); 146 return 1;146 return false; 147 147 } 148 148 -
trunk/psLib/src/sysUtils/psLogMsg.h
r1441 r1448 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 20 #define PS_LOG_MSG_H 21 21 #include <stdarg.h> 22 #include <stdbool.h> 22 23 23 24 /** @addtogroup LogTrace … … 25 26 */ 26 27 27 /// This procedure sets the destination for future log messages. Currently 28 /// the destination is specified by an integer which can have the following 29 /// pre-defined values: PS_LOG_NONE, PS_LOG_TO_STDOUT, and PS_LOG_TO_STDERR. 30 /// In future versions, this procedure will take a character string as an 31 /// argument which can specify more general log destinations. 32 int psLogSetDestination(const char *dest ///< Specifies where to send messages. 33 ); 28 /** This procedure sets the destination for future log messages. Currently 29 * the destination is specified by an integer which can have the following 30 * pre-defined values: PS_LOG_NONE, PS_LOG_TO_STDOUT, and PS_LOG_TO_STDERR. 31 * In future versions, this procedure will take a character string as an 32 * argument which can specify more general log destinations. 33 * 34 * @return int true if set successfully, otherwise false. 35 */ 36 bool psLogSetDestination( 37 const char *dest ///< Specifies where to send messages. 38 ); 34 39 35 /// This procedure sets the message level for future log messages. Subsequent 36 /// log messages, with a log level of "mylevel", will only be logged if 37 /// "mylevel" is less than the current log level set by this procedure. 38 /// Ie. higher values set by this procedure will cause more log messages to 39 /// be displayed. 40 int psLogSetLevel(int level ///< Specifies the system log level 41 ); 40 /** This procedure sets the message level for future log messages. Subsequent 41 * log messages, with a log level of "mylevel", will only be logged if 42 * "mylevel" is less than the current log level set by this procedure. 43 * Ie. higher values set by this procedure will cause more log messages to 44 * be displayed. 45 * 46 * @return int old logging level 47 */ 48 int psLogSetLevel( 49 int level ///< Specifies the system log level 50 ); 42 51 43 /// This procedure sets the log format for future log messages. The argument 44 /// must be a character string consistsing of the letters H (host), L 45 /// (level), M (message), N (name), and T (time). The default is "THLNM". 46 /// Deleting a letter from the string will cause the associated information 47 /// to not be logged. 48 void psLogSetFormat(const char *fmt ///< Specifies the system log format 49 ); 52 /** This procedure sets the log format for future log messages. The argument 53 * must be a character string consistsing of the letters H (host), L 54 * (level), M (message), N (name), and T (time). The default is "THLNM". 55 * Deleting a letter from the string will cause the associated information 56 * to not be logged. 57 * 58 */ 59 void psLogSetFormat( 60 const char *fmt ///< Specifies the system log format 61 ); 50 62 51 /// This procedure logs a message to the destination set by a prior 52 /// call to psLogSetDestination(), if myLevel is less than the level 53 /// specified by a prior call to psLogSetLevel(). The message is specified 54 /// with a printf-stype string an arguments. 55 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 ); 63 /** This procedure logs a message to the destination set by a prior 64 * call to psLogSetDestination(), if myLevel is less than the level 65 * specified by a prior call to psLogSetLevel(). The message is specified 66 * with a printf-stype string an arguments. 67 * 68 */ 69 void psLogMsg( 70 const char *name, ///< name of the log source 71 int myLevel, ///< severity level of this log message 72 const char *fmt, ///< printf-style format command 73 ... 74 ); 59 75 60 /// This procedure is functionally equivalent to psLogMsg(), except that 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 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 ); 76 /** This procedure is functionally equivalent to psLogMsg(), except that 77 * it takes a va_list as the message parameter, not a printf-style string. 78 * 79 */ 80 void psLogMsgV( 81 const char *name, ///< name of the log source 82 int myLevel, ///< severity level of this log message 83 const char *fmt, ///< printf-style format command 84 va_list ap ///< varargs argument list 85 ); 67 86 68 87 ///< Status codes for log messages 69 88 enum { 70 PS_LOG_ABORT = 0, 71 PS_LOG_ERROR, 72 PS_LOG_WARN, 73 PS_LOG_INFO 89 PS_LOG_ABORT = 0, ///< log message is a critical error, perform an abort after printing 90 PS_LOG_ERROR, ///< log message is an error, but don't abort 91 PS_LOG_WARN, ///< log message is a warning 92 PS_LOG_INFO ///< log message is informational only 74 93 }; 75 94 76 95 ///< Destinations for log messages 77 96 enum { 78 PS_LOG_NONE, 79 PS_LOG_TO_STDERR, 80 PS_LOG_TO_STDOUT 97 PS_LOG_NONE, ///< turn off logging 98 PS_LOG_TO_STDERR, ///< log to system's stderr 99 PS_LOG_TO_STDOUT ///< log to system's stdout 81 100 }; 82 101 -
trunk/psLib/src/sysUtils/psMemory.h
r1441 r1448 1 #if !defined(PS_MEMORY_H)2 #define PS_MEMORY_H3 4 1 /** @file psMemory.h 5 2 * … … 15 12 * @ingroup MemoryManagement 16 13 * 17 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:55:34 $ 19 16 * 20 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 21 18 */ 19 20 #if !defined(PS_MEMORY_H) 21 #define PS_MEMORY_H 22 22 23 23 #include <stdio.h> // needed for FILE … … 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 allocated 85 ); 84 typedef psMemoryId(*psMemAllocateCallback) ( 85 const psMemBlock* ptr ///< the psMemBlock just allocated 86 ); 86 87 87 88 /** prototype of memory free callback used by memory functions … … 90 91 * @ingroup memCallback 91 92 */ 92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock* ptr ///< the psMemBlock being freed 93 ); 93 typedef psMemoryId(*psMemFreeCallback) ( 94 const psMemBlock* ptr ///< the psMemBlock being freed 95 ); 94 96 95 97 /** prototype of a callback used in error conditions … … 100 102 * @ingroup memCallback 101 103 */ 102 typedef void (*psMemProblemCallback) ( const psMemBlock* ptr, ///< the pointer to the problematic memory103 //block.104 const char *file,///< the file in which the problem originated105 int lineno///< the line number in which the problem originated106 );104 typedef void (*psMemProblemCallback) ( 105 const psMemBlock* ptr, ///< the pointer to the problematic memory block. 106 const char *file, ///< the file in which the problem originated 107 int lineno ///< the line number in which the problem originated 108 ); 107 109 108 110 /** prototype of a callback function used when memory runs out … … 114 116 * @ingroup memCallback 115 117 */ 116 typedef void *(*psMemExhaustedCallback) (size_t size // < the size of buffer required 117 ); 118 typedef void *(*psMemExhaustedCallback) ( 119 size_t size ///< the size of buffer required 120 ); 118 121 119 122 /** Memory allocation. This operates much like malloc(), but is guaranteed to return a non-NULL value. … … 145 148 */ 146 149 #ifdef DOXYGEN 147 void *psRealloc(void *ptr ///< Pointer to re-allocate 148 size_t size, ///< Size required 149 ); 150 #else 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 156 ); 150 void *psRealloc( 151 void *ptr ///< Pointer to re-allocate 152 size_t size, ///< Size required 153 ); 154 #else 155 156 void *p_psRealloc( 157 void *ptr, ///< Pointer to re-allocate 158 size_t size, ///< Size required 159 const char *file, ///< File of call 160 int lineno ///< Line number of call 161 ); 157 162 158 163 /// Memory re-allocation. psRealloc sends file and line number to p_psRealloc. … … 166 171 */ 167 172 #ifdef DOXYGEN 168 void psFree(void *ptr, ///< Pointer to free, if NULL, function returns immediately. 169 ); 170 #else 171 172 void p_psFree(void *ptr, ///< Pointer to free 173 const char *file, ///< File of call 174 int lineno ///< Line number of call 175 ); 173 void psFree( 174 void *ptr, ///< Pointer to free, if NULL, function returns immediately. 175 ); 176 #else 177 178 void p_psFree( 179 void *ptr, ///< Pointer to free 180 const char *file, ///< File of call 181 int lineno ///< Line number of call 182 ); 176 183 177 184 /// Free memory. psFree sends file and line number to p_psFree. … … 194 201 * @ingroup memTracing 195 202 */ 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) 199 ); 203 int psMemCheckLeaks( 204 psMemoryId id0, ///< don't list blocks with id < id0 205 psMemBlock* ** arr, ///< pointer to array of pointers to leaked blocks, or NULL 206 FILE * fd ///< print list of leaks to fd (or NULL) 207 ); 200 208 201 209 /** Check for memory corruption. Scans all currently allocated memory buffers and checks for corruptions, … … 204 212 * @ingroup memTracing 205 213 */ 206 int psMemCheckCorruption(bool abort_on_error ///< Abort on detecting corruption? 207 ); 214 int psMemCheckCorruption( 215 bool abort_on_error ///< Abort on detecting corruption? 216 ); 208 217 209 218 /** Return reference counter … … 211 220 * @ingroup memRefCount 212 221 */ 213 psReferenceCount psMemGetRefCounter(void *vptr ///< Pointer to get refCounter for 214 ); 222 psReferenceCount psMemGetRefCounter( 223 void *vptr ///< Pointer to get refCounter for 224 ); 215 225 216 226 /** Increment reference counter and return the pointer … … 219 229 */ 220 230 #ifdef DOXYGEN 221 void *psMemIncrRefCounter(void *vptr ///< Pointer to increment refCounter, and return 222 ); 223 #else 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 228 ); 231 void *psMemIncrRefCounter( 232 void *vptr ///< Pointer to increment refCounter, and return 233 ); 234 #else 235 236 void *p_psMemIncrRefCounter( 237 void *vptr, ///< Pointer to increment refCounter, and return 238 const char *file, ///< File of call 239 int lineno ///< Line number of call 240 ); 229 241 230 242 #define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__) … … 234 246 * 235 247 * @ingroup memRefCount 236 */ 237 #ifdef DOXYGEN 238 void *psMemDecrRefCounter(void *vptr ///< Pointer to decrement refCounter, and return 239 ); 240 #else 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 245 ); 248 * 249 * @return void* the pointer deremented in refCount, or NULL if pointer is 250 * fully dereferenced. 251 */ 252 #ifdef DOXYGEN 253 void* psMemDecrRefCounter( 254 void* vptr ///< Pointer to decrement refCounter, and return 255 ); 256 #else 257 258 void *p_psMemDecrRefCounter( 259 void *vptr, ///< Pointer to decrement refCounter, and return 260 const char *file, ///< File of call 261 int lineno ///< Line number of call 262 ); 246 263 247 264 #define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__) 248 265 #endif 249 266 250 /** Set callback for problems 251 * @ingroup memCallback 252 */ 253 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func ///< Function to run 254 ); 255 256 /** Set callback for out-of-memory 257 * 258 * @ingroup memCallback 259 */ 260 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func ///< Function to run 261 ); 267 /** Set callback for problems. 268 * 269 * At various occasions, the memory manager can check the state of the memory 270 * stack. If any of these checks discover that the memory stack is corrupted, 271 * the psMemProblemCallback is called. 272 273 * @ingroup memCallback 274 * 275 * @return psMemProblemCallback old psMemProblemCallback function 276 */ 277 psMemProblemCallback psMemProblemCallbackSet( 278 psMemProblemCallback func ///< Function to run at memory problem detection 279 ); 280 281 /** Set callback for out-of-memory. 282 * 283 * If not enough memory is available to satisfy a request by psAlloc or 284 * psRealloc, these functions attempt to find an alternative solution by 285 * calling the psMemExhaustedCallback, a function which may be set by the 286 * programmer in appropriate circumstances, rather than immediately fail. 287 * The typical use of such a feature may be when a program needs a large 288 * chunk of memory to do an operation, but the exact size is not critical. 289 * This feature gives the programmer the opportunity to make a smaller 290 * request and try again, limiting the size of the operating buffer. 291 * 292 * @ingroup memCallback 293 * 294 * @return psMemExhaustedCallback old psMemExhaustedCallback function 295 */ 296 psMemExhaustedCallback psMemExhaustedCallbackSet( 297 psMemExhaustedCallback func ///< Function to run at memory exhaustion 298 ); 262 299 263 300 /** Set call back for when a particular memory block is allocated 264 301 * 265 * @ingroup memCallback 266 */ 267 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func ///< Function to run 268 ); 302 * A private variable, p_psMemAllocateID, can be used to trace the allocation 303 * and freeing of specific memory blocks. If p_psMemAllocateID is set and a 304 * memory block with that ID is allocated, psMemAllocateCallback is called 305 * just before memory is returned to the calling function. 306 * 307 * @ingroup memCallback 308 * 309 * @return psMemAllocateCallback old psMemAllocateCallback function 310 */ 311 psMemAllocateCallback psMemAllocateCallbackSet( 312 psMemAllocateCallback func ///< Function to run at memory allocation of specific mem block 313 ); 269 314 270 315 /** Set call back for when a particular memory block is freed 271 316 * 272 * @ingroup memCallback 273 */ 274 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func ///< Function to run 275 ); 317 * A private variable, p_psMemFreeID, can be used to trace the freeing of 318 * specific memory blocks. If p_psMemFreeID is set and the memory block with 319 * the ID is about to be freed, the psMemFreeCallback callback is called just 320 * before the memory block is freed. 321 * 322 * @ingroup memCallback 323 * 324 * @return psMemFreeCallback old psMemFreeCallback function 325 */ 326 psMemFreeCallback psMemFreeCallbackSet( 327 psMemFreeCallback func ///< Function to run at memory free of specific mem block 328 ); 276 329 277 330 /** get next memory ID 278 331 * 279 332 * @ingroup memCallback 333 * 334 * @return psMemoryId the next memory ID to be used 280 335 */ 281 336 psMemoryId psMemGetId(void); 282 337 283 /** set p_psMemAllocateID to id 284 * 285 * @ingroup memCallback 286 */ 287 psMemoryId psMemAllocateCallbackSetID(psMemoryId id ///< ID to set 288 ); 338 /** set p_psMemAllocateID to specific id 339 * 340 * A private variable, p_psMemAllocateID, can be used to trace the allocation 341 * and freeing of specific memory blocks. If p_psMemAllocateID is set and a 342 * memory block with that ID is allocated, psMemAllocateCallback is called 343 * just before memory is returned to the calling function. 344 * 345 * @ingroup memCallback 346 * 347 * @return psMemoryId 348 * 349 * @see psMemAllocateCallbackSet 350 */ 351 psMemoryId psMemAllocateCallbackSetID( 352 psMemoryId id ///< ID to set 353 ); 289 354 290 355 /** set p_psMemFreeID to id 291 356 * 292 * @ingroup memCallback 293 */ 294 psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set 295 ); 357 * A private variable, p_psMemFreeID, can be used to trace the freeing of 358 * specific memory blocks. If p_psMemFreeID is set and the memory block with 359 * the ID is about to be freed, the psMemFreeCallback callback is called just 360 * before the memory block is freed. 361 * 362 * @ingroup memCallback 363 * 364 * @return psMemoryId the old p_psMemFreeID 365 * 366 * @see psMemFreeCallbackSet 367 */ 368 psMemoryId psMemFreeCallbackSetID( 369 psMemoryId id ///< ID to set 370 ); 296 371 297 372 //@} End of Memory Management Functions … … 306 381 #pragma GCC poison malloc realloc calloc free 307 382 #else 308 # define malloc(S) _Pragma("error Use of malloc is not allowed. Use psAlloc instead.")309 # define realloc(P,S) _Pragma("error Use of realloc is not allowed. Use psRealloc instead.")310 # define calloc(S) _Pragma("error Use of calloc is not allowed. Use psAlloc instead.")311 # define free(P) _Pragma("error Use of free is not allowed. Use psFree instead.")312 # endif313 # endif314 315 # endif383 #define malloc(S) _Pragma("error Use of malloc is not allowed. Use psAlloc instead.") 384 #define realloc(P,S) _Pragma("error Use of realloc is not allowed. Use psRealloc instead.") 385 #define calloc(S) _Pragma("error Use of calloc is not allowed. Use psAlloc instead.") 386 #define free(P) _Pragma("error Use of free is not allowed. Use psFree instead.") 387 #endif 388 #endif 389 390 #endif 316 391 // doxygen skip 317 392 -
trunk/psLib/src/sysUtils/psString.h
r1441 r1448 1 2 1 /** @file psString.h 3 2 * … … 11 10 * @author Eric Van Alst, MHPCC 12 11 * 13 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08- 09 23:40:55$12 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-10 01:55:34 $ 15 14 * 16 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 19 #define PS_STRING_H 21 20 22 /******************************************************************************/23 21 24 /* DEFINE STATEMENTS */ 25 26 /******************************************************************************/ 27 28 /** This macro will convert the arguement to a quoted string */ 22 /** This macro will convert the argument to a quoted string */ 29 23 #define PS_STRING(S) #S 30 31 /******************************************************************************/32 33 /* TYPE DEFINITIONS */34 35 /******************************************************************************/36 37 // None38 39 /*****************************************************************************/40 41 /* FUNCTION PROTOTYPES */42 43 /*****************************************************************************/44 24 45 25 // Doxygen group tags … … 54 34 * plus one and copy the input string to the newly allocated memory. 55 35 * 56 * @return char*Copy of input string36 * @return char* Copy of input string 57 37 * 58 38 */ 59 60 char *psStringCopy(const char *str61 /**< Input string of characters to copy */62 );39 char *psStringCopy( 40 const char *str 41 /**< Input string of characters to copy */ 42 ); 63 43 64 44 /** Copies the input string up to the specified number of characters … … 78 58 /*@null@*/ 79 59 80 char *psStringNCopy(const char *str, 81 /**< Input string of characters to copy */ 60 char *psStringNCopy( 61 const char *str, 62 /**< Input string of characters to copy */ 82 63 83 int nChar84 /**< Number of bytes to allocate for string copy */85 );64 int nChar 65 /**< Number of bytes to allocate for string copy */ 66 ); 86 67 87 68 /* @} */// Doxygen - End of SystemGroup Functions -
trunk/psLib/src/sysUtils/psType.h
r1441 r1448 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08- 09 23:40:55$13 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-10 01:55:34 $ 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 floating 68 // point. 69 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating 70 // point. 71 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 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 floating point. 68 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating point. 69 PS_TYPE_PTR = 0x0000 ///< Something else that's not supported for arithmetic. 72 70 } psElemType; 73 71 74 #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 #define PS_TYPE_MASK_NAME "psU8" 77 typedef psU8 psMaskType; ///< the C datatype for a mask image 72 #define PS_TYPE_MASK PS_TYPE_U8 /**< the psElemType to use for mask image */ 73 #define PS_TYPE_MASK_DATA U8 /**< the data member to use for mask image */ 74 #define PS_TYPE_MASK_NAME "psU8" /**< the data type for mask as a string */ 78 75 79 #define PS_MIN_S8 INT8_MIN 80 #define PS_MIN_S16 INT16_MIN 81 #define PS_MIN_S32 INT32_MIN 82 #define PS_MIN_S64 INT64_MIN 83 #define PS_MIN_U8 0 84 #define PS_MIN_U16 0 85 #define PS_MIN_U32 0 86 #define PS_MIN_U64 0 87 #define PS_MIN_F32 -FLT_MAX 88 #define PS_MIN_F64 -DBL_MAX 89 #define PS_MIN_C32 -FLT_MAX 90 #define PS_MIN_C64 -DBL_MAX 76 typedef psU8 psMaskType; ///< the C datatype for a mask image 91 77 92 #define PS_MAX_S8 INT8_MAX 93 #define PS_MAX_S16 INT16_MAX 94 #define PS_MAX_S32 INT32_MAX 95 #define PS_MAX_S64 INT64_MAX 96 #define PS_MAX_U8 UINT8_MAX 97 #define PS_MAX_U16 UINT16_MAX 98 #define PS_MAX_U32 UINT32_MAX 99 #define PS_MAX_U64 UINT64_MAX 100 #define PS_MAX_F32 FLT_MAX 101 #define PS_MAX_F64 DBL_MAX 102 #define PS_MAX_C32 FLT_MAX 103 #define PS_MAX_C64 DBL_MAX 78 79 #define PS_MIN_S8 INT8_MIN /**< minimum valid psS8 value */ 80 #define PS_MIN_S16 INT16_MIN /**< minimum valid psS16 value */ 81 #define PS_MIN_S32 INT32_MIN /**< minimum valid psS32 value */ 82 #define PS_MIN_S64 INT64_MIN /**< minimum valid psS64 value */ 83 #define PS_MIN_U8 0 /**< minimum valid psU8 value */ 84 #define PS_MIN_U16 0 /**< minimum valid psU16 value */ 85 #define PS_MIN_U32 0 /**< minimum valid psU32 value */ 86 #define PS_MIN_U64 0 /**< minimum valid psU64 value */ 87 #define PS_MIN_F32 -FLT_MAX /**< minimum valid psF32 value */ 88 #define PS_MIN_F64 -DBL_MAX /**< minimum valid psF64 value */ 89 #define PS_MIN_C32 -FLT_MAX /**< minimum valid real or imaginary psC32 value */ 90 #define PS_MIN_C64 -DBL_MAX /**< minimum valid real or imaginary psC32 value */ 91 92 #define PS_MAX_S8 INT8_MAX /**< maximum valid psS8 value */ 93 #define PS_MAX_S16 INT16_MAX /**< maximum valid psS16 value */ 94 #define PS_MAX_S32 INT32_MAX /**< maximum valid psS32 value */ 95 #define PS_MAX_S64 INT64_MAX /**< maximum valid psS64 value */ 96 #define PS_MAX_U8 UINT8_MAX /**< maximum valid psU8 value */ 97 #define PS_MAX_U16 UINT16_MAX /**< maximum valid psU16 value */ 98 #define PS_MAX_U32 UINT32_MAX /**< maximum valid psU32 value */ 99 #define PS_MAX_U64 UINT64_MAX /**< maximum valid psU64 value */ 100 #define PS_MAX_F32 FLT_MAX /**< maximum valid psF32 value */ 101 #define PS_MAX_F64 DBL_MAX /**< maximum valid psF64 value */ 102 #define PS_MAX_C32 FLT_MAX /**< maximum valid real or imaginary psC32 value */ 103 #define PS_MAX_C64 DBL_MAX /**< maximum valid real or imaginary psC32 value */ 104 104 105 105 /// Macro to get the bad pixel reason code (stored as part of mask value)
Note:
See TracChangeset
for help on using the changeset viewer.
