Changeset 4898 for trunk/psLib/src
- Timestamp:
- Aug 29, 2005, 3:14:13 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 38 edited
-
astro/psCoord.c (modified) (4 diffs)
-
astro/psCoord.h (modified) (2 diffs)
-
astro/psSphereOps.c (modified) (3 diffs)
-
astro/psSphereOps.h (modified) (2 diffs)
-
astro/psTime.c (modified) (4 diffs)
-
astro/psTime.h (modified) (2 diffs)
-
fits/psFits.c (modified) (2 diffs)
-
fits/psFits.h (modified) (2 diffs)
-
imageops/psImageConvolve.c (modified) (2 diffs)
-
imageops/psImageConvolve.h (modified) (2 diffs)
-
math/psFunctions.c (modified) (2 diffs)
-
math/psFunctions.h (modified) (2 diffs)
-
math/psMinimize.c (modified) (4 diffs)
-
math/psMinimize.h (modified) (2 diffs)
-
math/psStats.c (modified) (5 diffs)
-
math/psStats.h (modified) (3 diffs)
-
mathtypes/psImage.c (modified) (2 diffs)
-
mathtypes/psImage.h (modified) (2 diffs)
-
mathtypes/psScalar.c (modified) (4 diffs)
-
mathtypes/psScalar.h (modified) (2 diffs)
-
mathtypes/psVector.c (modified) (2 diffs)
-
mathtypes/psVector.h (modified) (3 diffs)
-
sys/psMemory.c (modified) (3 diffs)
-
sys/psMemory.h (modified) (2 diffs)
-
types/psArray.c (modified) (2 diffs)
-
types/psArray.h (modified) (3 diffs)
-
types/psBitSet.c (modified) (2 diffs)
-
types/psBitSet.h (modified) (3 diffs)
-
types/psHash.c (modified) (2 diffs)
-
types/psHash.h (modified) (2 diffs)
-
types/psList.c (modified) (2 diffs)
-
types/psList.h (modified) (2 diffs)
-
types/psLookupTable.c (modified) (2 diffs)
-
types/psLookupTable.h (modified) (2 diffs)
-
types/psMetadata.c (modified) (3 diffs)
-
types/psMetadata.h (modified) (3 diffs)
-
types/psPixels.c (modified) (2 diffs)
-
types/psPixels.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r4857 r4898 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.8 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-08- 23 23:23:05$12 * @version $Revision: 1.84 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-08-30 01:14:10 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 219 219 } 220 220 221 222 bool psMemCheckPlane(psPtr ptr) 223 { 224 return ( psMemGetDeallocator(ptr) == (psFreeFunc)planeFree ); 225 } 226 227 bool psMemCheckSphere(psPtr ptr) 228 { 229 return ( psMemGetDeallocator(ptr) == (psFreeFunc)sphereFree ); 230 } 231 232 bool psMemCheckCube(psPtr ptr) 233 { 234 return ( psMemGetDeallocator(ptr) == (psFreeFunc)cubeFree ); 235 } 236 237 bool psMemCheckPlaneTransform(psPtr ptr) 238 { 239 return ( psMemGetDeallocator(ptr) == (psFreeFunc)planeTransformFree ); 240 } 241 221 242 psPlane* psPlaneTransformApply(psPlane* out, 222 243 const psPlaneTransform* transform, … … 267 288 return(pt); 268 289 } 290 291 bool psMemCheckPlaneDistort(psPtr ptr) 292 { 293 return ( psMemGetDeallocator(ptr) == (psFreeFunc)planeDistortFree ); 294 } 295 296 269 297 270 298 /****************************************************************************** … … 343 371 return(p); 344 372 } 373 374 bool psMemCheckProjection(psPtr ptr) 375 { 376 return ( psMemGetDeallocator(ptr) == (psFreeFunc)projectionFree ); 377 } 378 379 345 380 346 381 psPlane* psProject(const psSphere* coord, -
trunk/psLib/src/astro/psCoord.h
r4877 r4898 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-08- 25 23:42:01$12 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-08-30 01:14:10 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 219 219 ); 220 220 221 /** Checks the type of a particular pointer. 222 * 223 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 224 * 225 * @return bool: True if the pointer matches a psPlane structure, false otherwise. 226 */ 227 bool psMemCheckPlane( 228 psPtr ptr ///< the pointer whose type to check 229 ); 230 231 /** Checks the type of a particular pointer. 232 * 233 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 234 * 235 * @return bool: True if the pointer matches a psSphere structure, false otherwise. 236 */ 237 bool psMemCheckSphere( 238 psPtr ptr ///< the pointer whose type to check 239 ); 240 241 /** Checks the type of a particular pointer. 242 * 243 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 244 * 245 * @return bool: True if the pointer matches a psCube structure, false otherwise. 246 */ 247 bool psMemCheckCube( 248 psPtr ptr ///< the pointer whose type to check 249 ); 250 251 /** Checks the type of a particular pointer. 252 * 253 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 254 * 255 * @return bool: True if the pointer matches a psPlaneTransform structure, false otherwise. 256 */ 257 bool psMemCheckPlaneTransform( 258 psPtr ptr ///< the pointer whose type to check 259 ); 260 261 /** Checks the type of a particular pointer. 262 * 263 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 264 * 265 * @return bool: True if the pointer matches a psPlaneDistort structure, false otherwise. 266 */ 267 bool psMemCheckPlaneDistort( 268 psPtr ptr ///< the pointer whose type to check 269 ); 270 271 /** Checks the type of a particular pointer. 272 * 273 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 274 * 275 * @return bool: True if the pointer matches a psProjection structure, false otherwise. 276 */ 277 bool psMemCheckProjection( 278 psPtr ptr ///< the pointer whose type to check 279 ); 280 281 221 282 /** Projects a spherical coordinate to a linear coordinate system 222 283 * -
trunk/psLib/src/astro/psSphereOps.c
r4708 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-08- 05 01:40:45$9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:10 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 33 #define JULIAN_CENTURY 36525.0 34 34 35 static void sphereRotFree(psSphereRot *result) 36 { 37 // There are non dynamic allocated items 38 } 35 39 36 40 psSphereRot* psSphereRotAlloc(double alphaP, … … 58 62 // calculate t*s*r. 59 63 psSphereRot* result = psSphereRotCombine(NULL,&t,&s); 64 psMemSetDeallocator(result, (psFreeFunc)sphereRotFree); 60 65 psSphereRotCombine(result,result,&r); 61 66 62 67 return result; 63 68 } 69 70 bool psMemCheckSphereRot(psPtr ptr) 71 { 72 return ( psMemGetDeallocator(ptr) == (psFreeFunc)sphereRotFree ); 73 } 74 64 75 65 76 psSphereRot* psSphereRotQuat(double q0, -
trunk/psLib/src/astro/psSphereOps.h
r4708 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-08- 05 01:40:45$9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:10 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 72 72 ); 73 73 74 75 /** Checks the type of a particular pointer. 76 * 77 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 78 * 79 * @return bool: True if the pointer matches a psSphereRot structure, false otherwise. 80 */ 81 bool psMemCheckSphereRot( 82 psPtr ptr ///< the pointer whose type to check 83 ); 84 85 74 86 /** Allocator for psSphereRot given quaternions. 75 87 * -
trunk/psLib/src/astro/psTime.c
r4540 r4898 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.6 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 7-12 19:12:00 $12 * @version $Revision: 1.67 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-08-30 01:14:10 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 434 434 } 435 435 436 static void timeFree(psTime *outTime) 437 { 438 // There are non dynamic allocated items 439 } 440 436 441 psTime* psTimeAlloc(psTimeType type) 437 442 { … … 449 454 // Allocate memory for structure 450 455 outTime = (psTime*)psAlloc(sizeof(psTime)); 451 456 psMemSetDeallocator(outTime, (psFreeFunc)timeFree); 452 457 // Initialize members 453 458 outTime->sec = 0; … … 458 463 return outTime; 459 464 } 465 466 467 bool psMemCheckTime(psPtr ptr) 468 { 469 return ( psMemGetDeallocator(ptr) == (psFreeFunc)timeFree ); 470 } 471 460 472 461 473 psTime* psTimeGetNow(psTimeType type) -
trunk/psLib/src/astro/psTime.h
r4590 r4898 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 7-21 02:39:57$13 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:10 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 100 100 ); 101 101 102 103 /** Checks the type of a particular pointer. 104 * 105 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 106 * 107 * @return bool: True if the pointer matches a psTime structure, false otherwise. 108 */ 109 bool psMemCheckTime( 110 psPtr ptr ///< the pointer whose type to check 111 ); 112 113 102 114 /** Get current time. 103 115 * -
trunk/psLib/src/fits/psFits.c
r4891 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-08- 27 01:33:41$9 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 253 253 return fits; 254 254 } 255 256 257 bool psMemCheckFits(psPtr ptr) 258 { 259 return ( psMemGetDeallocator(ptr) == (psFreeFunc)fitsFree ); 260 } 261 255 262 256 263 bool psFitsMoveExtName(const psFits* fits, -
trunk/psLib/src/fits/psFits.h
r4343 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 6-22 03:00:27$9 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 62 62 ); 63 63 64 /** Checks the type of a particular pointer. 65 * 66 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 67 * 68 * @return bool: True if the pointer matches a psFits structure, false otherwise. 69 */ 70 bool psMemCheckFits( 71 psPtr ptr ///< the pointer whose type to check 72 ); 73 74 64 75 /** Moves the FITS HDU to the specified extension name. 65 76 * -
trunk/psLib/src/imageops/psImageConvolve.c
r4815 r4898 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-08- 18 21:44:40$7 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-08-30 01:14:13 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 86 86 } 87 87 } 88 89 90 bool psMemCheckKernel(psPtr ptr) 91 { 92 return ( psMemGetDeallocator(ptr) == (psFreeFunc)freeKernel ); 93 } 94 88 95 89 96 psKernel* psKernelGenerate(const psVector* tShifts, -
trunk/psLib/src/imageops/psImageConvolve.h
r4815 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-08- 18 21:44:40$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 77 77 ); 78 78 79 /** Checks the type of a particular pointer. 80 * 81 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 82 * 83 * @return bool: True if the pointer matches a psKernel structure, false otherwise. 84 */ 85 bool psMemCheckKernel( 86 psPtr ptr ///< the pointer whose type to check 87 ); 88 89 79 90 /** Generates a kernel given a list of shift values 80 91 * -
trunk/psLib/src/math/psFunctions.c
r4876 r4898 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-08- 25 22:52:29$9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 871 871 return(newPoly); 872 872 } 873 874 875 bool psMemCheckPolynomial1D(psPtr ptr) 876 { 877 return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial1DFree ); 878 } 879 880 bool psMemCheckPolynomial2D(psPtr ptr) 881 { 882 return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial2DFree ); 883 } 884 885 bool psMemCheckPolynomial3D(psPtr ptr) 886 { 887 return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial3DFree ); 888 } 889 890 bool psMemCheckPolynomial4D(psPtr ptr) 891 { 892 return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial4DFree ); 893 } 894 895 bool psMemCheckSpline1D(psPtr ptr) 896 { 897 return ( psMemGetDeallocator(ptr) == (psFreeFunc)spline1DFree ); 898 } 899 873 900 874 901 psF64 psPolynomial1DEval(const psPolynomial1D* poly, psF64 x) -
trunk/psLib/src/math/psFunctions.h
r4581 r4898 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 7-20 01:21:13 $14 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-30 01:14:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 163 163 ); 164 164 165 /** Checks the type of a particular pointer. 166 * 167 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 168 * 169 * @return bool: True if the pointer matches a psPolynomial1D structure, false otherwise. 170 */ 171 bool psMemCheckPolynomial1D( 172 psPtr ptr ///< the pointer whose type to check 173 ); 174 175 /** Checks the type of a particular pointer. 176 * 177 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 178 * 179 * @return bool: True if the pointer matches a psPolynomial2D structure, false otherwise. 180 */ 181 bool psMemCheckPolynomial2D( 182 psPtr ptr ///< the pointer whose type to check 183 ); 184 185 /** Checks the type of a particular pointer. 186 * 187 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 188 * 189 * @return bool: True if the pointer matches a psPolynomial3D structure, false otherwise. 190 */ 191 bool psMemCheckPolynomial3D( 192 psPtr ptr ///< the pointer whose type to check 193 ); 194 195 /** Checks the type of a particular pointer. 196 * 197 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 198 * 199 * @return bool: True if the pointer matches a psPolynomial4D structure, false otherwise. 200 */ 201 bool psMemCheckPolynomial4D( 202 psPtr ptr ///< the pointer whose type to check 203 ); 204 205 /** Checks the type of a particular pointer. 206 * 207 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 208 * 209 * @return bool: True if the pointer matches a psSpline1D structure, false otherwise. 210 */ 211 bool psMemCheckSpline1D( 212 psPtr ptr ///< the pointer whose type to check 213 ); 214 215 216 165 217 /** Evaluates a 1-D polynomial at specific coordinates. 166 218 * -
trunk/psLib/src/math/psMinimize.c
r4858 r4898 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.13 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-08- 24 01:04:37$11 * @version $Revision: 1.132 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-08-30 01:14:13 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1372 1372 } 1373 1373 1374 1374 static void minimizationFree(psMinimization *min) 1375 { 1376 // There are non dynamic allocated items 1377 } 1375 1378 1376 1379 /****************************************************************************** … … 1382 1385 1383 1386 psMinimization *min = psAlloc(sizeof(psMinimization)); 1387 psMemSetDeallocator(min, (psFreeFunc)minimizationFree); 1384 1388 *(int*)&min->maxIter = maxIter; 1385 1389 *(float*)&min->tol = tol; … … 1390 1394 return(min); 1391 1395 } 1396 1397 bool psMemCheckMinimization(psPtr ptr) 1398 { 1399 return ( psMemGetDeallocator(ptr) == (psFreeFunc)minimizationFree ); 1400 } 1401 1392 1402 1393 1403 // This macro takes as input the vector BASE and adds a multiple of the vector -
trunk/psLib/src/math/psMinimize.h
r4760 r4898 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.5 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-08- 11 23:04:32$10 * @version $Revision: 1.53 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-30 01:14:13 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 60 60 ); 61 61 62 /** Checks the type of a particular pointer. 63 * 64 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 65 * 66 * @return bool: True if the pointer matches a psMinimization structure, false otherwise. 67 */ 68 bool psMemCheckMinimization( 69 psPtr ptr ///< the pointer whose type to check 70 ); 71 72 62 73 /** Derive a polynomial fit. 63 74 * -
trunk/psLib/src/math/psStats.c
r4620 r4898 14 14 * stats->binsize 15 15 * 16 * @version $Revision: 1.13 8$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-0 7-27 19:55:16$16 * @version $Revision: 1.139 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-08-30 01:14:13 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1753 1753 static void histogramFree(psHistogram* myHist); 1754 1754 1755 static void statsFree(psStats *newStruct) 1756 { 1757 // There are non dynamic allocated items 1758 } 1759 1755 1760 /****************************************************************************** 1756 1761 psStatsAlloc(): This routine must create a new psStats data structure. … … 1761 1766 1762 1767 newStruct = (psStats* ) psAlloc(sizeof(psStats)); 1768 psMemSetDeallocator(newStruct, (psFreeFunc)statsFree); 1763 1769 newStruct->sampleMean = NAN; 1764 1770 newStruct->sampleMedian = NAN; … … 1787 1793 } 1788 1794 1795 1796 bool psMemCheckStats(psPtr ptr) 1797 { 1798 return ( psMemGetDeallocator(ptr) == (psFreeFunc)statsFree ); 1799 } 1800 1801 1802 1789 1803 /****************************************************************************** 1790 1804 psHistogramAlloc(lower, upper, n): allocate a uniform histogram structure … … 1885 1899 psFree(myHist->nums); 1886 1900 } 1901 1902 1903 bool psMemCheckHistogram(psPtr ptr) 1904 { 1905 return ( psMemGetDeallocator(ptr) == (psFreeFunc)histogramFree ); 1906 } 1907 1908 1887 1909 1888 1910 /***************************************************************************** -
trunk/psLib/src/math/psStats.h
r4857 r4898 14 14 * @author GLG, MHPCC 15 15 * 16 * @version $Revision: 1.4 7$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-08- 23 23:23:05$16 * @version $Revision: 1.48 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-08-30 01:14:13 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 105 105 ); 106 106 107 108 /** Checks the type of a particular pointer. 109 * 110 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 111 * 112 * @return bool: True if the pointer matches a psStats structure, false otherwise. 113 */ 114 bool psMemCheckStats( 115 psPtr ptr ///< the pointer whose type to check 116 ); 117 118 107 119 /****************************************************************************** 108 120 Histogram functions and data structures. … … 140 152 ); 141 153 154 155 /** Checks the type of a particular pointer. 156 * 157 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 158 * 159 * @return bool: True if the pointer matches a psHistogram structure, false otherwise. 160 */ 161 bool psMemCheckHistogram( 162 psPtr ptr ///< the pointer whose type to check 163 ); 164 165 142 166 /** Allocator for psHistogram where the bounds of the bins are explicitly 143 167 * specified. -
trunk/psLib/src/mathtypes/psImage.c
r4887 r4898 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.7 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-08- 26 23:01:17$11 * @version $Revision: 1.78 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-08-30 01:14:13 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 90 90 return image; 91 91 } 92 93 94 bool psMemCheckImage(psPtr ptr) 95 { 96 return ( psMemGetDeallocator(ptr) == (psFreeFunc)imageFree ); 97 } 98 92 99 93 100 psRegion psRegionSet(float x0, -
trunk/psLib/src/mathtypes/psImage.h
r4886 r4898 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.6 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08- 26 03:35:02$13 * @version $Revision: 1.64 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:13 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 111 111 ; 112 112 113 114 /** Checks the type of a particular pointer. 115 * 116 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 117 * 118 * @return bool: True if the pointer matches a psImage structure, false otherwise. 119 */ 120 bool psMemCheckImage( 121 psPtr ptr ///< the pointer whose type to check 122 ); 123 124 113 125 /** Create a psRegion with the specified attributes. 114 126 * -
trunk/psLib/src/mathtypes/psScalar.c
r4540 r4898 8 8 * @author Ross Harman, MHPCC 9 9 * 10 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-0 7-12 19:12:01$10 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-30 01:14:13 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 22 22 #include "psErrorText.h" 23 23 24 static void scalarFree(psScalar *scalar) 25 { 26 // There are non dynamic allocated items 27 } 28 24 29 psScalar* psScalarAlloc(complex value, psElemType type) 25 30 { … … 28 33 // Create scalar 29 34 scalar = (psScalar* ) psAlloc(sizeof(psScalar)); 30 35 psMemSetDeallocator(scalar, (psFreeFunc)scalarFree); 31 36 scalar->type.dimen = PS_DIMEN_SCALAR; 32 37 scalar->type.type = type; … … 79 84 return scalar; 80 85 } 86 87 88 bool psMemCheckScalar(psPtr ptr) 89 { 90 return ( psMemGetDeallocator(ptr) == (psFreeFunc)scalarFree ); 91 } 92 81 93 82 94 psScalar* psScalarCopy(const psScalar *value) -
trunk/psLib/src/mathtypes/psScalar.h
r4540 r4898 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 7-12 19:12:01$13 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:13 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 70 70 ); 71 71 72 73 /** Checks the type of a particular pointer. 74 * 75 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 76 * 77 * @return bool: True if the pointer matches a psScalar structure, false otherwise. 78 */ 79 bool psMemCheckScalar( 80 psPtr ptr ///< the pointer whose type to check 81 ); 82 83 72 84 /** Copy a scalar. 73 85 * -
trunk/psLib/src/mathtypes/psVector.c
r4887 r4898 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 49$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-08- 26 23:01:17$11 * @version $Revision: 1.50 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-08-30 01:14:13 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 60 60 61 61 // FUNCTION IMPLEMENTATION - PUBLIC 62 bool psMemCheckVector(psPtr ptr) 63 { 64 return ( psMemGetDeallocator(ptr) == (psFreeFunc)vectorFree ); 65 } 66 62 67 63 68 psVector* psVectorAlloc(long nalloc, -
trunk/psLib/src/mathtypes/psVector.h
r4887 r4898 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08- 26 23:01:17$13 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:13 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 61 61 /*****************************************************************************/ 62 62 63 /** Checks the type of a particular pointer. 64 * 65 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 66 * 67 * @return bool: True if the pointer matches a psVector structure, false otherwise. 68 */ 69 bool psMemCheckVector( 70 psPtr ptr ///< the pointer whose type to check 71 ) 72 ; 63 73 64 74 /** Allocate a vector. … … 72 82 long nalloc, ///< Total number of elements to make available. 73 83 psElemType type ///< Type of data to be held by vector. 74 ) 75 ; 84 ); 76 85 77 86 /** Reallocate a vector. -
trunk/psLib/src/sys/psMemory.c
r4877 r4898 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.6 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-08- 25 23:42:07$10 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-08-30 01:14:13 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 24 24 #include "psAbort.h" 25 25 #include "psLogMsg.h" 26 27 #include "psBitSet.h" 28 //#include "psArray.h" 29 //#include "psImage.h" 30 //#include "psList.h" 31 //#include "psLookupTable.h" 32 //#include "psHash.h" 33 34 //#include "psMetadata.h" 35 #include "psFits.h" 36 #include "psPixels.h" 37 //#include "psScalar.h" 38 //#include "psVector.h" 39 //#include "psFunctions.h" 40 //#include "psTime.h" 41 //#include "psCoord.h" 42 #include "psSphereOps.h" 43 //#include "psStats.h" 44 #include "psMinimize.h" 45 #include "psImageConvolve.h" 46 #include "psTime.h" 26 47 27 48 #include "psErrorText.h" … … 688 709 } 689 710 711 712 bool psMemCheckType(psDataType type, 713 psPtr ptr) 714 { 715 switch(type) { 716 case PS_DATA_ARRAY: 717 if ( psMemCheckArray(ptr) ) 718 return true; 719 else { 720 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 721 break; 722 } 723 case PS_DATA_BITSET: 724 if ( psMemCheckBitSet(ptr) ) 725 return true; 726 else { 727 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 728 break; 729 } 730 /* case PS_DATA_CELL: 731 if ( psMemCheckCell(ptr) ) 732 return true; 733 else 734 { 735 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 736 break; 737 } 738 case PS_DATA_CHIP: 739 if ( psMemCheckChip(ptr) ) 740 return true; 741 else 742 { 743 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 744 break; 745 } 746 */ 747 case PS_DATA_CUBE: 748 if ( psMemCheckCube(ptr) ) 749 return true; 750 else { 751 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 752 break; 753 } 754 755 756 case PS_DATA_FITS: 757 if ( psMemCheckFits(ptr) ) 758 return true; 759 else { 760 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 761 break; 762 } 763 764 case PS_DATA_HASH: 765 if ( psMemCheckHash(ptr) ) 766 return true; 767 else { 768 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 769 break; 770 } 771 case PS_DATA_HISTOGRAM: 772 if ( psMemCheckHistogram(ptr) ) 773 return true; 774 else { 775 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 776 break; 777 } 778 case PS_DATA_IMAGE: 779 if ( psMemCheckImage(ptr) ) 780 return true; 781 else { 782 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 783 break; 784 } 785 case PS_DATA_KERNEL: 786 if ( psMemCheckKernel(ptr) ) 787 return true; 788 else { 789 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 790 break; 791 } 792 case PS_DATA_LIST: 793 if ( psMemCheckList(ptr) ) 794 return true; 795 else { 796 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 797 break; 798 } 799 case PS_DATA_LOOKUPTABLE: 800 if ( psMemCheckLookupTable(ptr) ) 801 return true; 802 else { 803 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 804 break; 805 } 806 case PS_DATA_METADATA: 807 if ( psMemCheckMetadata(ptr) ) 808 return true; 809 else { 810 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 811 break; 812 } 813 case PS_DATA_METADATAITEM: 814 if ( psMemCheckMetadataItem(ptr) ) 815 return true; 816 else { 817 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 818 break; 819 } 820 case PS_DATA_MINIMIZATION: 821 if ( psMemCheckMinimization(ptr) ) 822 return true; 823 else { 824 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 825 break; 826 } 827 case PS_DATA_PIXELS: 828 if ( psMemCheckPixels(ptr) ) 829 return true; 830 else { 831 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 832 break; 833 } 834 case PS_DATA_PLANE: 835 if ( psMemCheckPlane(ptr) ) 836 return true; 837 else { 838 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 839 break; 840 } 841 case PS_DATA_PLANEDISTORT: 842 if ( psMemCheckPlaneDistort(ptr) ) 843 return true; 844 else { 845 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 846 break; 847 } 848 case PS_DATA_PLANETRANSFORM: 849 if ( psMemCheckPlaneTransform(ptr) ) 850 return true; 851 else { 852 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 853 break; 854 } 855 case PS_DATA_POLYNOMIAL1D: 856 if ( psMemCheckPolynomial1D(ptr) ) 857 return true; 858 else { 859 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 860 break; 861 } 862 case PS_DATA_POLYNOMIAL2D: 863 if ( psMemCheckPolynomial2D(ptr) ) 864 return true; 865 else { 866 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 867 break; 868 } 869 case PS_DATA_POLYNOMIAL3D: 870 if ( psMemCheckPolynomial3D(ptr) ) 871 return true; 872 else { 873 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 874 break; 875 } 876 case PS_DATA_POLYNOMIAL4D: 877 if ( psMemCheckPolynomial4D(ptr) ) 878 return true; 879 else { 880 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 881 break; 882 } 883 case PS_DATA_PROJECTION: 884 if ( psMemCheckProjection(ptr) ) 885 return true; 886 else { 887 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 888 break; 889 } 890 891 /* case PS_DATA_READOUT: 892 if ( psMemCheckReadout(ptr) ) 893 return true; 894 else 895 { 896 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 897 break; 898 } 899 900 *//* case PS_DATA_REGION: 901 if ( psMemCheckRegion(ptr) ) 902 return true; 903 else 904 { 905 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 906 break; 907 } 908 */ 909 case PS_DATA_SCALAR: 910 if ( psMemCheckScalar(ptr) ) 911 return true; 912 else { 913 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 914 break; 915 } 916 case PS_DATA_SPHERE: 917 if ( psMemCheckSphere(ptr) ) 918 return true; 919 else { 920 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 921 break; 922 } 923 case PS_DATA_SPHEREROT: 924 if ( psMemCheckSphereRot(ptr) ) 925 return true; 926 else { 927 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 928 break; 929 } 930 case PS_DATA_SPLINE1D: 931 if ( psMemCheckSpline1D(ptr) ) 932 return true; 933 else { 934 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 935 break; 936 } 937 case PS_DATA_STATS: 938 if ( psMemCheckStats(ptr) ) 939 return true; 940 else { 941 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 942 break; 943 } 944 case PS_DATA_TIME: 945 if ( psMemCheckTime(ptr) ) 946 return true; 947 else { 948 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 949 break; 950 } 951 case PS_DATA_VECTOR: 952 if ( psMemCheckVector(ptr) ) 953 return true; 954 else { 955 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer. Datatypes do not match.\n"); 956 break; 957 } 958 default: 959 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Invalid datatype specified.\n"); 960 } 961 return false; 962 } 963 964 690 965 bool p_psMemGetPersistent(psPtr vptr) 691 966 { -
trunk/psLib/src/sys/psMemory.h
r4590 r4898 12 12 * @ingroup MemoryManagement 13 13 * 14 * @version $Revision: 1.4 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 7-21 02:39:57$14 * @version $Revision: 1.49 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-30 01:14:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 172 172 ); 173 173 174 /** Checks the deallocator to see if the pointer matches the desired datatype. 175 * 176 * @return bool: True if type matches, otherwise false. 177 */ 178 bool psMemCheckType( 179 psDataType type, ///< The desired psDataType to match 180 psPtr ptr ///< The desired pointer to match 181 ); 182 183 174 184 /** Set the memory as persistent so that it is ignored when detecting memory leaks. 175 185 * -
trunk/psLib/src/types/psArray.c
r4600 r4898 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 7-22 23:47:13 $11 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-08-30 01:14:13 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 45 45 psFree(psArr->data); 46 46 } 47 48 bool psMemCheckArray(psPtr ptr) 49 { 50 return ( psMemGetDeallocator(ptr) == (psFreeFunc)arrayFree ); 51 } 52 47 53 48 54 /***************************************************************************** -
trunk/psLib/src/types/psArray.h
r4600 r4898 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.3 0$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 7-22 23:47:13 $14 * @version $Revision: 1.31 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-30 01:14:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 /*****************************************************************************/ 48 48 49 /** Checks the type of a particular pointer. 50 * 51 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 52 * 53 * @return bool: True if the pointer matches a psArray structure, false otherwise. 54 */ 55 bool psMemCheckArray( 56 psPtr ptr ///< the pointer whose type to check 57 ) 58 ; 59 60 49 61 /** Allocate an array. 50 62 * … … 57 69 psArray* psArrayAlloc( 58 70 long nalloc ///< Total number of elements to make available. 59 ) 60 ; 71 ); 61 72 62 73 /** Reallocate an array. -
trunk/psLib/src/types/psBitSet.c
r4819 r4898 11 11 * @author Robert DeSonia, MHPCC 12 12 * 13 * @version $Revision: 1.3 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08- 19 00:31:42$13 * @version $Revision: 1.31 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:13 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 65 65 psFree(inBitSet->bits); 66 66 } 67 68 bool psMemCheckBitSet(psPtr ptr) 69 { 70 return ( psMemGetDeallocator(ptr) == (psFreeFunc)bitSetFree ); 71 } 72 67 73 68 74 psBitSet* psBitSetAlloc(long nalloc) -
trunk/psLib/src/types/psBitSet.h
r4610 r4898 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 7-26 00:44:45$14 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-30 01:14:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 /*****************************************************************************/ 48 48 49 /** Checks the type of a particular pointer. 50 * 51 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 52 * 53 * @return bool: True if the pointer matches a psBitSet structure, false otherwise. 54 */ 55 bool psMemCheckBitSet( 56 psPtr ptr ///< the pointer whose type to check 57 ) 58 ; 59 60 49 61 /** Allocate a psBitSet. 50 62 * … … 56 68 psBitSet* psBitSetAlloc( 57 69 long nalloc ///< Number of bits in psBitSet array 58 ) 59 ; 70 ); 60 71 61 72 /** Set a bit. -
trunk/psLib/src/types/psHash.c
r4556 r4898 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 7-15 02:33:54$14 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-30 01:14:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 160 160 } 161 161 162 bool psMemCheckHash(psPtr ptr) 163 { 164 return ( psMemGetDeallocator(ptr) == (psFreeFunc)hashFree ); 165 } 166 167 162 168 /****************************************************************************** 163 169 hashFree(table): This procedure deallocates the specified hash -
trunk/psLib/src/types/psHash.h
r4556 r4898 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 7-15 02:33:54$13 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:13 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 46 46 psHash; 47 47 48 /** Checks the type of a particular pointer. 49 * 50 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 51 * 52 * @return bool: True if the pointer matches a psHash structure, false otherwise. 53 */ 54 bool psMemCheckHash( 55 psPtr ptr ///< the pointer whose type to check 56 ) 57 ; 58 59 48 60 /// Allocate hash buckets in table. 49 61 psHash* psHashAlloc( 50 62 long nalloc ///< The number of buckets to allocate. 51 ) 52 ; 63 ); 53 64 54 65 /// Insert entry into table. -
trunk/psLib/src/types/psList.c
r4556 r4898 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 7-15 02:33:54$8 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-08-30 01:14:13 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 148 148 return list; 149 149 } 150 151 bool psMemCheckList(psPtr ptr) 152 { 153 return ( psMemGetDeallocator(ptr) == (psFreeFunc)listFree ); 154 } 155 156 150 157 151 158 psListIterator* psListIteratorAlloc(psList* list, long location, bool mutable) -
trunk/psLib/src/types/psList.h
r4590 r4898 7 7 * @ingroup LinkedList 8 8 * 9 * @version $Revision: 1.3 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 7-21 02:39:57$9 * @version $Revision: 1.31 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 84 84 85 85 86 /** Creates a psList linked list object. 87 * 88 * @return psList* A new psList object. 89 */ 90 psList* psListAlloc( 91 psPtr data 92 ///< initial data item; may be NULL if no an empty psList is desired 86 /** Checks the type of a particular pointer. 87 * 88 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 89 * 90 * @return bool: True if the pointer matches a psList structure, false otherwise. 91 */ 92 bool psMemCheckList( 93 psPtr ptr ///< the pointer whose type to check 93 94 ) 94 95 ; 96 97 98 /** Creates a psList linked list object. 99 * 100 * @return psList* A new psList object. 101 */ 102 psList* psListAlloc( 103 psPtr data ///< initial data item; may be NULL if an empty psList is desired 104 ); 95 105 96 106 /** Creates a psListIterator object and associates it with a psList. -
trunk/psLib/src/types/psLookupTable.c
r4589 r4898 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 7-21 01:40:10$9 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 263 263 /* FUNCTION IMPLEMENTATION - PUBLIC */ 264 264 /*****************************************************************************/ 265 266 bool psMemCheckLookupTable(psPtr ptr) 267 { 268 return ( psMemGetDeallocator(ptr) == (psFreeFunc)lookupTableFree ); 269 } 270 265 271 266 272 psLookupTable* psLookupTableAlloc(const char *filename, -
trunk/psLib/src/types/psLookupTable.h
r4589 r4898 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 7-21 01:40:10$9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 PS_PARSE_ERROR_GENERAL = 0x0104 ///< Any other type of lookup error 61 61 }psParseErrorType; 62 63 /** Checks the type of a particular pointer. 64 * 65 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 66 * 67 * @return bool: True if the pointer matches a psLookupTable structure, false otherwise. 68 */ 69 bool psMemCheckLookupTable( 70 psPtr ptr ///< the pointer whose type to check 71 ); 72 62 73 63 74 /** Allocator for psLookupTable struct -
trunk/psLib/src/types/psMetadata.c
r4891 r4898 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.7 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-08- 27 01:33:41$14 * @version $Revision: 1.79 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-08-30 01:14:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 162 162 return metadataItem; 163 163 } 164 165 bool psMemCheckMetadataItem(psPtr ptr) 166 { 167 return ( psMemGetDeallocator(ptr) == (psFreeFunc)metadataItemFree ); 168 } 169 164 170 165 171 #define METADATAITEM_ALLOC_TYPE(NAME,TYPE,METATYPE) \ … … 273 279 return metadata; 274 280 } 281 282 283 bool psMemCheckMetadata(psPtr ptr) 284 { 285 return ( psMemGetDeallocator(ptr) == (psFreeFunc)metadataFree ); 286 } 287 288 275 289 276 290 bool psMetadataAddItem(psMetadata *md, -
trunk/psLib/src/types/psMetadata.h
r4891 r4898 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 59$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-08- 27 01:33:41$13 * @version $Revision: 1.60 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-08-30 01:14:13 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 155 155 ; 156 156 157 158 /** Checks the type of a particular pointer. 159 * 160 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 161 * 162 * @return bool: True if the pointer matches a psMetadataItem structure, false otherwise. 163 */ 164 bool psMemCheckMetadataItem( 165 psPtr ptr ///< the pointer whose type to check 166 ); 167 168 157 169 /** Create a metadata item with specified string data. 158 170 * … … 253 265 psMetadata* psMetadataAlloc(void); 254 266 267 268 /** Checks the type of a particular pointer. 269 * 270 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 271 * 272 * @return bool: True if the pointer matches a psMetadata structure, false otherwise. 273 */ 274 bool psMemCheckMetadata( 275 psPtr ptr ///< the pointer whose type to check 276 ); 277 278 255 279 /** Add existing metadata item to metadata collection. 256 280 * -
trunk/psLib/src/types/psPixels.c
r4597 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 7-22 22:19:27$9 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 return out; 72 72 } 73 74 75 bool psMemCheckPixels(psPtr ptr) 76 { 77 return ( psMemGetDeallocator(ptr) == (psFreeFunc)pixelsFree ); 78 } 79 73 80 74 81 psPixels* psPixelsRealloc(psPixels* pixels, long nalloc) -
trunk/psLib/src/types/psPixels.h
r4608 r4898 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 7-25 20:49:04$9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-30 01:14:13 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 57 57 ) 58 58 ; 59 60 /** Checks the type of a particular pointer. 61 * 62 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 63 * 64 * @return bool: True if the pointer matches a psPixels structure, false otherwise. 65 */ 66 bool psMemCheckPixels( 67 psPtr ptr ///< the pointer whose type to check 68 ); 69 59 70 60 71 /** resizes a psPixels structure
Note:
See TracChangeset
for help on using the changeset viewer.
