Changeset 4321
- Timestamp:
- Jun 20, 2005, 12:42:30 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 33 edited
-
pslib.kdevses (modified) (1 diff)
-
src/astro/psCoord.c (modified) (2 diffs)
-
src/astro/psCoord.h (modified) (2 diffs)
-
src/astronomy/psCoord.c (modified) (2 diffs)
-
src/astronomy/psCoord.h (modified) (2 diffs)
-
src/collections/psMetadata.c (modified) (8 diffs)
-
src/collections/psMetadata.h (modified) (17 diffs)
-
src/collections/psPixels.c (modified) (3 diffs)
-
src/collections/psPixels.h (modified) (2 diffs)
-
src/dataIO/psLookupTable.c (modified) (3 diffs)
-
src/dataIO/psLookupTable.h (modified) (3 diffs)
-
src/dataManip/psMatrix.c (modified) (11 diffs)
-
src/dataManip/psMatrix.h (modified) (4 diffs)
-
src/dataManip/psMinimize.c (modified) (5 diffs)
-
src/dataManip/psMinimize.h (modified) (6 diffs)
-
src/math/psMatrix.c (modified) (11 diffs)
-
src/math/psMatrix.h (modified) (4 diffs)
-
src/math/psMinimize.c (modified) (5 diffs)
-
src/math/psMinimize.h (modified) (6 diffs)
-
src/sys/psLogMsg.c (modified) (5 diffs)
-
src/sys/psLogMsg.h (modified) (3 diffs)
-
src/sys/psMemory.c (modified) (3 diffs)
-
src/sys/psMemory.h (modified) (5 diffs)
-
src/sysUtils/psLogMsg.c (modified) (5 diffs)
-
src/sysUtils/psLogMsg.h (modified) (3 diffs)
-
src/sysUtils/psMemory.c (modified) (3 diffs)
-
src/sysUtils/psMemory.h (modified) (5 diffs)
-
src/types/psLookupTable.c (modified) (3 diffs)
-
src/types/psLookupTable.h (modified) (3 diffs)
-
src/types/psMetadata.c (modified) (8 diffs)
-
src/types/psMetadata.h (modified) (17 diffs)
-
src/types/psPixels.c (modified) (3 diffs)
-
src/types/psPixels.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/pslib.kdevses
r4316 r4321 4 4 <DocsAndViews NumberOfDocuments="4" > 5 5 <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psList.h" > 6 <View0 line="197"Type="Source" />6 <View0 Type="Source" /> 7 7 </Doc0> 8 8 <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psList.c" > 9 <View0 line="565"Type="Source" />9 <View0 Type="Source" /> 10 10 </Doc1> 11 11 <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/sysUtils/psLogMsg.h" > 12 <View0 line="69"Type="Source" />12 <View0 Type="Source" /> 13 13 </Doc2> 14 14 <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/sysUtils/psLogMsg.c" > -
trunk/psLib/src/astro/psCoord.c
r4289 r4321 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 16 22:42:09 $12 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-20 22:42:29 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 268 268 } 269 269 270 psPlaneDistort* psPlaneDistortAlloc( psS32 n1, psS32 n2, psS32 n3, psS32n4)270 psPlaneDistort* psPlaneDistortAlloc(int n1, int n2, int n3, int n4) 271 271 { 272 272 PS_ASSERT_INT_NONNEGATIVE(n1, NULL); -
trunk/psLib/src/astro/psCoord.h
r4190 r4321 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 09 19:26:47$12 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-20 22:42:29 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 208 208 209 209 psPlaneDistort* psPlaneDistortAlloc( 210 psS32 n1,///< The order of the w term in the transform.211 psS32 n2,///< The order of the x term in the transform.212 psS32 n3,///< The order of the y term in the transform.213 psS32 n4///< The order of the z term in the transform.210 int n1, ///< The order of the w term in the transform. 211 int n2, ///< The order of the x term in the transform. 212 int n3, ///< The order of the y term in the transform. 213 int n4 ///< The order of the z term in the transform. 214 214 ); 215 215 -
trunk/psLib/src/astronomy/psCoord.c
r4289 r4321 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 16 22:42:09 $12 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-20 22:42:29 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 268 268 } 269 269 270 psPlaneDistort* psPlaneDistortAlloc( psS32 n1, psS32 n2, psS32 n3, psS32n4)270 psPlaneDistort* psPlaneDistortAlloc(int n1, int n2, int n3, int n4) 271 271 { 272 272 PS_ASSERT_INT_NONNEGATIVE(n1, NULL); -
trunk/psLib/src/astronomy/psCoord.h
r4190 r4321 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 09 19:26:47$12 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-20 22:42:29 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 208 208 209 209 psPlaneDistort* psPlaneDistortAlloc( 210 psS32 n1,///< The order of the w term in the transform.211 psS32 n2,///< The order of the x term in the transform.212 psS32 n3,///< The order of the y term in the transform.213 psS32 n4///< The order of the z term in the transform.210 int n1, ///< The order of the w term in the transform. 211 int n2, ///< The order of the x term in the transform. 212 int n3, ///< The order of the y term in the transform. 213 int n4 ///< The order of the z term in the transform. 214 214 ); 215 215 -
trunk/psLib/src/collections/psMetadata.c
r4308 r4321 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.6 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 17 23:44:21$14 * @version $Revision: 1.66 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-20 22:42:29 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 267 267 } 268 268 269 psBool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags)269 bool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags) 270 270 { 271 271 char * key = NULL; … … 359 359 } 360 360 361 psBool psMetadataAdd(psMetadata *md, psS32location, const char *name,362 psS32 type, const char *comment, ...)361 bool psMetadataAdd(psMetadata *md, int location, const char *name, 362 int format, const char *comment, ...) 363 363 { 364 364 va_list argPtr; 365 365 366 366 va_start(argPtr, comment); 367 psBool result = psMetadataAddV(md,location,name, type,comment,argPtr);367 psBool result = psMetadataAddV(md,location,name,format,comment,argPtr); 368 368 va_end(argPtr); 369 369 … … 371 371 } 372 372 373 psBool psMetadataAddV(psMetadata *md, psS32location, const char *name,374 psS32 type, const char *comment, va_list list)373 bool psMetadataAddV(psMetadata *md, int location, const char *name, 374 int format, const char *comment, va_list list) 375 375 { 376 376 psMetadataItem* metadataItem = NULL; 377 377 378 metadataItem = psMetadataItemAllocV(name, type& PS_METADATA_TYPE_MASK, comment, list);379 380 if (!psMetadataAddItem(md, metadataItem, location, type& PS_METADATA_FLAGS_MASK)) {378 metadataItem = psMetadataItemAllocV(name, format & PS_METADATA_TYPE_MASK, comment, list); 379 380 if (!psMetadataAddItem(md, metadataItem, location, format & PS_METADATA_FLAGS_MASK)) { 381 381 psError(PS_ERR_UNKNOWN,false,PS_ERRORTEXT_psMetadata_ADD_FAILED); 382 382 psFree(metadataItem); … … 475 475 } 476 476 477 psMetadataItem* psMetadataLookup( psMetadata *md, const char *key)477 psMetadataItem* psMetadataLookup(const psMetadata *md, const char *key) 478 478 { 479 479 psHash* mdTable = NULL; … … 491 491 } 492 492 493 void* psMetadataLookupPtr( psBool *status,psMetadata *md, const char *key)493 void* psMetadataLookupPtr(bool *status, const psMetadata *md, const char *key) 494 494 { 495 495 psMetadataItem *metadataItem = NULL; … … 525 525 526 526 #define psMetadataLookupNumTYPE(TYPE) \ 527 ps##TYPE psMetadataLookup##TYPE( psBool *status,psMetadata *md, const char *key) \527 ps##TYPE psMetadataLookup##TYPE(bool *status, const psMetadata *md, const char *key) \ 528 528 { \ 529 529 psMetadataItem *metadataItem = NULL; \ … … 630 630 } 631 631 632 psBool psMetadataIteratorSet(psMetadataIterator* iterator,633 int location)632 bool psMetadataIteratorSet(psMetadataIterator* iterator, 633 int location) 634 634 { 635 635 int match; -
trunk/psLib/src/collections/psMetadata.h
r4243 r4321 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 14 02:54:06$13 * @version $Revision: 1.49 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-20 22:42:29 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 214 214 const char* name, ///< Name of metadata item. 215 215 const char* comment, ///< Comment for metadata item. 216 psBool value ///< the value of the metadata item.216 bool value ///< the value of the metadata item. 217 217 ); 218 218 … … 257 257 * @return bool: True for success, false for failure. 258 258 */ 259 psBool psMetadataAddItem(259 bool psMetadataAddItem( 260 260 psMetadata* md, ///< Metadata collection to insert metadat item. 261 261 psMetadataItem* item, ///< Metadata item to be added. … … 270 270 * @return bool: True for success, false for failure. 271 271 */ 272 psBool psMetadataAdd(272 bool psMetadataAdd( 273 273 psMetadata* md, ///< Metadata collection to insert metadata item. 274 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL274 int location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 275 275 const char *name, ///< Name of metadata item. 276 int type,///< Type of metadata item (psMetadataType) and options (psMetadataFlags)276 int format, ///< Type of metadata item (psMetadataType) and options (psMetadataFlags) 277 277 const char *comment, ///< Comment for metadata item. 278 278 ... ///< Arguments for name formatting and metadata item data. … … 286 286 * @return bool: True for success, false for failure. 287 287 */ 288 psBool psMetadataAddV(288 bool psMetadataAddV( 289 289 psMetadata* md, ///< Metadata collection to insert metadata item. 290 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL290 int location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 291 291 const char *name, ///< Name of metadata item. 292 int type,///< Type of metadata item (psMetadataType) and options (psMetadataFlags)292 int format, ///< Type of metadata item (psMetadataType) and options (psMetadataFlags) 293 293 const char *comment, ///< Comment for metadata item. 294 294 va_list list ///< Arguments for name formatting and metadata item data. … … 300 300 * @return psBool: True for success, False for failure. 301 301 */ 302 psBool psMetadataAddS32(302 bool psMetadataAddS32( 303 303 psMetadata* md, ///< Metadata collection to insert metadata item 304 304 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 312 312 * @return psBool: True for success, False for failure. 313 313 */ 314 psBool psMetadataAddF32(314 bool psMetadataAddF32( 315 315 psMetadata* md, ///< Metadata collection to insert metadata item 316 316 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 324 324 * @return psBool: True for success, False for failure. 325 325 */ 326 psBool psMetadataAddF64(326 bool psMetadataAddF64( 327 327 psMetadata* md, ///< Metadata collection to insert metadata item 328 328 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 348 348 * @return psBool: True for success, False for failure. 349 349 */ 350 psBool psMetadataAddStr(350 bool psMetadataAddStr( 351 351 psMetadata* md, ///< Metadata collection to insert metadata item 352 352 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 438 438 * @return bool: True for success, false for failure. 439 439 */ 440 psBool psMetadataRemove(441 psMetadata* md, ///< Metadata collection to remove metadata item.442 psS32 where,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL443 const char * key ///< Name of metadata key.440 bool psMetadataRemove( 441 psMetadata* md, ///< Metadata collection to remove metadata item. 442 int location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 443 const char * key ///< Name of metadata key. 444 444 ); 445 445 … … 453 453 */ 454 454 psMetadataItem* psMetadataLookup( 455 psMetadata * md, ///< Metadata collection to lookup metadata item.455 const psMetadata * md, ///< Metadata collection to lookup metadata item. 456 456 const char * key ///< Name of metadata key. 457 457 ); … … 466 466 */ 467 467 psF64 psMetadataLookupF64( 468 psBool *status, ///< Status of lookup.469 psMetadata *md, ///< Metadata collection to lookup metadata item.468 bool *status, ///< Status of lookup. 469 const psMetadata *md, ///< Metadata collection to lookup metadata item. 470 470 const char *key ///< Name of metadata key. 471 471 ); … … 480 480 */ 481 481 psF32 psMetadataLookupF32( 482 psBool *status, ///< Status of lookup.483 psMetadata *md, ///< Metadata collection to lookup metadata item.482 bool *status, ///< Status of lookup. 483 const psMetadata *md, ///< Metadata collection to lookup metadata item. 484 484 const char *key ///< Name of metadata key. 485 485 ); … … 494 494 */ 495 495 psS32 psMetadataLookupS32( 496 psBool *status, ///< Status of lookup.497 psMetadata *md, ///< Metadata collection to lookup metadata item.496 bool *status, ///< Status of lookup. 497 const psMetadata *md, ///< Metadata collection to lookup metadata item. 498 498 const char *key ///< Name of metadata key. 499 499 ); … … 508 508 */ 509 509 psBool psMetadataLookupBool( 510 psBool *status, ///< Status of lookup.511 psMetadata *md, ///< Metadata collection to lookup metadata item.510 bool *status, ///< Status of lookup. 511 const psMetadata *md, ///< Metadata collection to lookup metadata item. 512 512 const char *key ///< Name of metadata key. 513 513 ); … … 522 522 */ 523 523 psPtr psMetadataLookupPtr( 524 psBool *status, ///< Status of lookup.525 psMetadata* md, ///< Metadata collection to lookup metadata item.524 bool *status, ///< Status of lookup. 525 const psMetadata* md, ///< Metadata collection to lookup metadata item. 526 526 const char *key ///< Name of metadata key. 527 527 ); … … 560 560 * @return psBool TRUE if iterator successfully set, otherwise FALSE. 561 561 */ 562 psBool psMetadataIteratorSet(562 bool psMetadataIteratorSet( 563 563 psMetadataIterator* iterator, ///< psMetadata iterator 564 564 int location ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL -
trunk/psLib/src/collections/psPixels.c
r4230 r4321 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 13 20:43:40$9 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 114 114 } 115 115 116 psPixels* psPixelsCopy(psPixels* out, const psPixels* in)117 { 118 if ( in== NULL) {116 psPixels* psPixelsCopy(psPixels* out, const psPixels* pixels) 117 { 118 if (pixels == NULL) { 119 119 psError(PS_ERR_BAD_PARAMETER_NULL,true,PS_ERRORTEXT_psPixels_NULL); 120 120 psFree(out); … … 122 122 } 123 123 124 out = psPixelsRealloc(out, in->n);125 126 memcpy(out->data, in->data, in->n*sizeof(psPixelCoord));127 out->n = in->n;124 out = psPixelsRealloc(out, pixels->n); 125 126 memcpy(out->data,pixels->data, pixels->n*sizeof(psPixelCoord)); 127 out->n = pixels->n; 128 128 129 129 return out; -
trunk/psLib/src/collections/psPixels.h
r4293 r4321 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 17 00:11:02$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 85 85 psPixels* psPixelsCopy( 86 86 psPixels* out, ///< psPixels struct to recycle, or NULL 87 const psPixels* in///< psPixels struct to copy87 const psPixels* pixels ///< psPixels struct to copy 88 88 ); 89 89 -
trunk/psLib/src/dataIO/psLookupTable.c
r4308 r4321 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 17 23:44:21$9 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 254 254 /*****************************************************************************/ 255 255 256 psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, intindexCol)256 psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, long indexCol) 257 257 { 258 258 psLookupTable *outTable = NULL; … … 633 633 } 634 634 635 psS32psLookupTableRead(psLookupTable* table)635 long psLookupTableRead(psLookupTable* table) 636 636 { 637 637 psS32 numRows = 0; -
trunk/psLib/src/dataIO/psLookupTable.h
r4162 r4321 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 08 23:40:45$9 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 70 70 const char *fileName, ///< Name of file to read 71 71 const char *format, ///< scanf-like format string 72 intindexCol ///< Column of the index vector (starting at zero)72 long indexCol ///< Column of the index vector (starting at zero) 73 73 ); 74 74 … … 102 102 * @return psS32 Number of valid lines read 103 103 */ 104 psS32psLookupTableRead(104 long psLookupTableRead( 105 105 psLookupTable *table ///< Table to read 106 106 ); -
trunk/psLib/src/dataManip/psMatrix.c
r4160 r4321 21 21 * @author Robert DeSonia, MHPCC 22 22 * 23 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06- 08 22:28:07$23 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-20 22:42:29 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 191 191 psS32 numCols = 0; 192 192 gsl_matrix *lu = NULL; 193 gsl_permutation perm ;193 gsl_permutation permGSL; 194 194 195 195 … … 212 212 213 213 // Initialize GSL data 214 perm .size = numCols;214 permGSL.size = numCols; 215 215 if (sizeof(size_t) == 4) { 216 216 *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S32); … … 225 225 226 226 (*outPerm)->n = numCols; 227 perm .data = (psPtr)((*outPerm)->data.U8);227 permGSL.data = (psPtr)((*outPerm)->data.U8); 228 228 lu = gsl_matrix_alloc(numRows, numCols); 229 229 … … 232 232 233 233 // Calculate LU decomposition 234 gsl_linalg_LU_decomp(lu, &perm , &signum); // N.B., uses Gaussian Elimination with partial pivoting.234 gsl_linalg_LU_decomp(lu, &permGSL, &signum); // N.B., uses Gaussian Elimination with partial pivoting. 235 235 236 236 // Copy GSL matrix data to psImage data … … 298 298 } 299 299 300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, psF32*det)300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det) 301 301 { 302 302 psS32 signum = 0; … … 346 346 } 347 347 348 psF32 *psMatrixDeterminant(const psImage* inImage)348 float *psMatrixDeterminant(const psImage* in) 349 349 { 350 350 psS32 signum = 0; … … 357 357 #define DETERMINANT_EXIT { return NULL; } 358 358 // Error checks 359 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in Image, DETERMINANT_EXIT);360 PS_CHECK_DIMEN_AND_TYPE(in Image, PS_DIMEN_IMAGE, DETERMINANT_EXIT);361 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in Image, DETERMINANT_EXIT);362 PS_CHECK_SQUARE(in Image, DETERMINANT_EXIT);359 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, DETERMINANT_EXIT); 360 PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, DETERMINANT_EXIT); 361 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, DETERMINANT_EXIT); 362 PS_CHECK_SQUARE(in, DETERMINANT_EXIT); 363 363 364 364 // Initialize data 365 numRows = in Image->numRows;366 numCols = in Image->numCols;365 numRows = in->numRows; 366 numCols = in->numCols; 367 367 368 368 // Allocate GSL structs 369 369 perm = gsl_permutation_alloc(numRows); 370 370 lu = gsl_matrix_alloc(numRows, numCols); 371 psImageToGslMatrix(lu, in Image);371 psImageToGslMatrix(lu, in); 372 372 373 373 // Calculate determinant … … 480 480 } 481 481 482 psImage* psMatrixEigenvectors(psImage* out Image, psImage* inImage)482 psImage* psMatrixEigenvectors(psImage* out, psImage* in) 483 483 { 484 484 psS32 numRows = 0; … … 486 486 gsl_vector *eVals = NULL; 487 487 gsl_eigen_symmv_workspace *w = NULL; 488 gsl_matrix *out = NULL;489 gsl_matrix *in = NULL;490 491 #define EIGENVECTORS_CLEANUP { psFree(out Image); return NULL; }492 // Error checks 493 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in Image, EIGENVECTORS_CLEANUP);494 PS_CHECK_DIMEN_AND_TYPE(in Image, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);495 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in Image, EIGENVECTORS_CLEANUP);496 PS_CHECK_POINTERS(in Image, outImage, EIGENVECTORS_CLEANUP);497 498 out Image = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);488 gsl_matrix *outGSL = NULL; 489 gsl_matrix *inGSL = NULL; 490 491 #define EIGENVECTORS_CLEANUP { psFree(out); return NULL; } 492 // Error checks 493 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, EIGENVECTORS_CLEANUP); 494 PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP); 495 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, EIGENVECTORS_CLEANUP); 496 PS_CHECK_POINTERS(in, out, EIGENVECTORS_CLEANUP); 497 498 out = psImageRecycle(out, in->numCols, in->numRows, in->type.type); 499 499 500 500 // Initialize data 501 numRows = in Image->numRows;502 numCols = in Image->numCols;503 504 in = gsl_matrix_alloc(numRows, numCols);505 psImageToGslMatrix(in , inImage);506 out = gsl_matrix_alloc(numRows, numCols);501 numRows = in->numRows; 502 numCols = in->numCols; 503 504 inGSL = gsl_matrix_alloc(numRows, numCols); 505 psImageToGslMatrix(inGSL, in); 506 outGSL = gsl_matrix_alloc(numRows, numCols); 507 507 508 508 // Allocate GSL structs … … 511 511 512 512 // Non-square matrices not allowed 513 PS_CHECK_SQUARE(in Image, EIGENVECTORS_CLEANUP);514 PS_CHECK_SQUARE(out Image, EIGENVECTORS_CLEANUP);513 PS_CHECK_SQUARE(in, EIGENVECTORS_CLEANUP); 514 PS_CHECK_SQUARE(out, EIGENVECTORS_CLEANUP); 515 515 516 516 // Calculate Eigenvalues and Eigenvectors...Eigenvalues not currently used 517 gsl_eigen_symmv(in , eVals, out, w);517 gsl_eigen_symmv(inGSL, eVals, outGSL, w); 518 518 519 519 // Copy GSL matrix data to psImage data 520 gslMatrixToPsImage(out Image, out);520 gslMatrixToPsImage(out, outGSL); 521 521 522 522 // Free GSL structs 523 gsl_matrix_free(in );524 gsl_matrix_free(out );523 gsl_matrix_free(inGSL); 524 gsl_matrix_free(outGSL); 525 525 gsl_eigen_symmv_free(w); 526 526 gsl_vector_free(eVals); 527 527 528 return out Image;528 return out; 529 529 } 530 530 -
trunk/psLib/src/dataManip/psMatrix.h
r4162 r4321 21 21 * @author Ross Harman, MHPCC 22 22 * 23 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06- 08 23:40:45$23 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-20 22:42:29 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 76 76 psImage* outImage, ///< Image to return, or NULL for in-place substitution. 77 77 const psImage* inImage, ///< Image to be inverted 78 psF32*det ///< Determinant to return, or NULL78 float *det ///< Determinant to return, or NULL 79 79 ); 80 80 … … 87 87 * @return float: Determinant from psImage. 88 88 */ 89 psF32*psMatrixDeterminant(90 const psImage* in Matrix///< Image used to calculate determinant.89 float *psMatrixDeterminant( 90 const psImage* in ///< Image used to calculate determinant. 91 91 ); 92 92 … … 129 129 */ 130 130 psImage* psMatrixEigenvectors( 131 psImage* out Image,///< Eigenvectors to return, or NULL.132 psImage* in Image///< Input image.131 psImage* out, ///< Eigenvectors to return, or NULL. 132 psImage* in ///< Input image. 133 133 ); 134 134 -
trunk/psLib/src/dataManip/psMinimize.c
r4225 r4321 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.12 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 13 20:18:18$11 * @version $Revision: 1.123 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-20 22:42:30 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 562 562 563 563 // XXX EAM this is my re-implementation of MinLM 564 psBool psMinimizeLMChi2(psMinimization *min,565 psImage *covar,566 psVector *params,567 const psVector *paramMask,568 const psArray *x,569 const psVector *y,570 const psVector *yErr,571 psMinimizeLMChi2Func func)564 bool psMinimizeLMChi2(psMinimization *min, 565 psImage *covar, 566 psVector *params, 567 const psVector *paramMask, 568 const psArray *x, 569 const psVector *y, 570 const psVector *yErr, 571 psMinimizeLMChi2Func func) 572 572 { 573 573 PS_ASSERT_PTR_NON_NULL(min, NULL); … … 1426 1426 /****************************************************************************** 1427 1427 *****************************************************************************/ 1428 psMinimization *psMinimizationAlloc( psS32maxIter,1429 psF32tol)1428 psMinimization *psMinimizationAlloc(int maxIter, 1429 float tol) 1430 1430 { 1431 1431 PS_ASSERT_INT_NONNEGATIVE(maxIter, NULL); … … 1912 1912 #define PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE 0.01 1913 1913 1914 psBool psMinimizePowell(psMinimization *min,1915 psVector *params,1916 const psVector *paramMask,1917 const psArray *coords,1918 psMinimizePowellFunc func)1914 bool psMinimizePowell(psMinimization *min, 1915 psVector *params, 1916 const psVector *paramMask, 1917 const psArray *coords, 1918 psMinimizePowellFunc func) 1919 1919 { 1920 1920 PS_ASSERT_PTR_NON_NULL(min, NULL); … … 2189 2189 psMinimizePowell(). 2190 2190 *****************************************************************************/ 2191 psBool psMinimizeChi2Powell(psMinimization *min,2192 psVector *params,2193 const psVector *paramMask,2194 const psArray *coords,2195 const psVector *value,2196 const psVector *error,2197 psMinimizeChi2PowellFunc func)2191 bool psMinimizeChi2Powell(psMinimization *min, 2192 psVector *params, 2193 const psVector *paramMask, 2194 const psArray *coords, 2195 const psVector *value, 2196 const psVector *error, 2197 psMinimizeChi2PowellFunc model) 2198 2198 { 2199 2199 myValue = (psVector *) value; 2200 2200 myError = (psVector *) error; 2201 2201 2202 Chi2PowellFunc = func;2202 Chi2PowellFunc = model; 2203 2203 2204 2204 return(psMinimizePowell(min, params, paramMask, coords, myPowellChi2Func)); -
trunk/psLib/src/dataManip/psMinimize.h
r4285 r4321 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 16 03:51:58$10 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-20 22:42:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 56 56 */ 57 57 psMinimization *psMinimizationAlloc( 58 psS32 maxIter,///< Number of minimization iterations to perform.59 psF32tol ///< Requested error tolerance58 int maxIter, ///< Number of minimization iterations to perform. 59 float tol ///< Requested error tolerance 60 60 ); 61 61 … … 111 111 * @return psBool: True if successful. 112 112 */ 113 psBool psMinimizeLMChi2(113 bool psMinimizeLMChi2( 114 114 psMinimization *min, ///< Minimization specification 115 115 psImage *covar, ///< Covariance matrix … … 167 167 * @return psBool: True if successful. 168 168 */ 169 psBool psMinimizePowell(169 bool psMinimizePowell( 170 170 psMinimization *min, ///< Minimization specification 171 171 psVector *params, ///< "Best guess" for parameters that minimize func … … 211 211 * @return psBool: True is successful. 212 212 */ 213 psBool psMinimizeChi2Powell(213 bool psMinimizeChi2Powell( 214 214 psMinimization *min, ///< Minimization specification 215 215 psVector *params, ///< "Best guess" for parameters that minimize func … … 218 218 const psVector *value, ///< Measured values at the coordinates 219 219 const psVector *error, ///< Errors in the measure values (or NULL) 220 psMinimizeChi2PowellFunc func///< Specified function220 psMinimizeChi2PowellFunc model ///< Specified function 221 221 ); 222 222 -
trunk/psLib/src/math/psMatrix.c
r4160 r4321 21 21 * @author Robert DeSonia, MHPCC 22 22 * 23 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06- 08 22:28:07$23 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-20 22:42:29 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 191 191 psS32 numCols = 0; 192 192 gsl_matrix *lu = NULL; 193 gsl_permutation perm ;193 gsl_permutation permGSL; 194 194 195 195 … … 212 212 213 213 // Initialize GSL data 214 perm .size = numCols;214 permGSL.size = numCols; 215 215 if (sizeof(size_t) == 4) { 216 216 *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S32); … … 225 225 226 226 (*outPerm)->n = numCols; 227 perm .data = (psPtr)((*outPerm)->data.U8);227 permGSL.data = (psPtr)((*outPerm)->data.U8); 228 228 lu = gsl_matrix_alloc(numRows, numCols); 229 229 … … 232 232 233 233 // Calculate LU decomposition 234 gsl_linalg_LU_decomp(lu, &perm , &signum); // N.B., uses Gaussian Elimination with partial pivoting.234 gsl_linalg_LU_decomp(lu, &permGSL, &signum); // N.B., uses Gaussian Elimination with partial pivoting. 235 235 236 236 // Copy GSL matrix data to psImage data … … 298 298 } 299 299 300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, psF32*det)300 psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det) 301 301 { 302 302 psS32 signum = 0; … … 346 346 } 347 347 348 psF32 *psMatrixDeterminant(const psImage* inImage)348 float *psMatrixDeterminant(const psImage* in) 349 349 { 350 350 psS32 signum = 0; … … 357 357 #define DETERMINANT_EXIT { return NULL; } 358 358 // Error checks 359 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in Image, DETERMINANT_EXIT);360 PS_CHECK_DIMEN_AND_TYPE(in Image, PS_DIMEN_IMAGE, DETERMINANT_EXIT);361 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in Image, DETERMINANT_EXIT);362 PS_CHECK_SQUARE(in Image, DETERMINANT_EXIT);359 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, DETERMINANT_EXIT); 360 PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, DETERMINANT_EXIT); 361 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, DETERMINANT_EXIT); 362 PS_CHECK_SQUARE(in, DETERMINANT_EXIT); 363 363 364 364 // Initialize data 365 numRows = in Image->numRows;366 numCols = in Image->numCols;365 numRows = in->numRows; 366 numCols = in->numCols; 367 367 368 368 // Allocate GSL structs 369 369 perm = gsl_permutation_alloc(numRows); 370 370 lu = gsl_matrix_alloc(numRows, numCols); 371 psImageToGslMatrix(lu, in Image);371 psImageToGslMatrix(lu, in); 372 372 373 373 // Calculate determinant … … 480 480 } 481 481 482 psImage* psMatrixEigenvectors(psImage* out Image, psImage* inImage)482 psImage* psMatrixEigenvectors(psImage* out, psImage* in) 483 483 { 484 484 psS32 numRows = 0; … … 486 486 gsl_vector *eVals = NULL; 487 487 gsl_eigen_symmv_workspace *w = NULL; 488 gsl_matrix *out = NULL;489 gsl_matrix *in = NULL;490 491 #define EIGENVECTORS_CLEANUP { psFree(out Image); return NULL; }492 // Error checks 493 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in Image, EIGENVECTORS_CLEANUP);494 PS_CHECK_DIMEN_AND_TYPE(in Image, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);495 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in Image, EIGENVECTORS_CLEANUP);496 PS_CHECK_POINTERS(in Image, outImage, EIGENVECTORS_CLEANUP);497 498 out Image = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);488 gsl_matrix *outGSL = NULL; 489 gsl_matrix *inGSL = NULL; 490 491 #define EIGENVECTORS_CLEANUP { psFree(out); return NULL; } 492 // Error checks 493 PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, EIGENVECTORS_CLEANUP); 494 PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP); 495 PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, EIGENVECTORS_CLEANUP); 496 PS_CHECK_POINTERS(in, out, EIGENVECTORS_CLEANUP); 497 498 out = psImageRecycle(out, in->numCols, in->numRows, in->type.type); 499 499 500 500 // Initialize data 501 numRows = in Image->numRows;502 numCols = in Image->numCols;503 504 in = gsl_matrix_alloc(numRows, numCols);505 psImageToGslMatrix(in , inImage);506 out = gsl_matrix_alloc(numRows, numCols);501 numRows = in->numRows; 502 numCols = in->numCols; 503 504 inGSL = gsl_matrix_alloc(numRows, numCols); 505 psImageToGslMatrix(inGSL, in); 506 outGSL = gsl_matrix_alloc(numRows, numCols); 507 507 508 508 // Allocate GSL structs … … 511 511 512 512 // Non-square matrices not allowed 513 PS_CHECK_SQUARE(in Image, EIGENVECTORS_CLEANUP);514 PS_CHECK_SQUARE(out Image, EIGENVECTORS_CLEANUP);513 PS_CHECK_SQUARE(in, EIGENVECTORS_CLEANUP); 514 PS_CHECK_SQUARE(out, EIGENVECTORS_CLEANUP); 515 515 516 516 // Calculate Eigenvalues and Eigenvectors...Eigenvalues not currently used 517 gsl_eigen_symmv(in , eVals, out, w);517 gsl_eigen_symmv(inGSL, eVals, outGSL, w); 518 518 519 519 // Copy GSL matrix data to psImage data 520 gslMatrixToPsImage(out Image, out);520 gslMatrixToPsImage(out, outGSL); 521 521 522 522 // Free GSL structs 523 gsl_matrix_free(in );524 gsl_matrix_free(out );523 gsl_matrix_free(inGSL); 524 gsl_matrix_free(outGSL); 525 525 gsl_eigen_symmv_free(w); 526 526 gsl_vector_free(eVals); 527 527 528 return out Image;528 return out; 529 529 } 530 530 -
trunk/psLib/src/math/psMatrix.h
r4162 r4321 21 21 * @author Ross Harman, MHPCC 22 22 * 23 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $24 * @date $Date: 2005-06- 08 23:40:45$23 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-06-20 22:42:29 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 76 76 psImage* outImage, ///< Image to return, or NULL for in-place substitution. 77 77 const psImage* inImage, ///< Image to be inverted 78 psF32*det ///< Determinant to return, or NULL78 float *det ///< Determinant to return, or NULL 79 79 ); 80 80 … … 87 87 * @return float: Determinant from psImage. 88 88 */ 89 psF32*psMatrixDeterminant(90 const psImage* in Matrix///< Image used to calculate determinant.89 float *psMatrixDeterminant( 90 const psImage* in ///< Image used to calculate determinant. 91 91 ); 92 92 … … 129 129 */ 130 130 psImage* psMatrixEigenvectors( 131 psImage* out Image,///< Eigenvectors to return, or NULL.132 psImage* in Image///< Input image.131 psImage* out, ///< Eigenvectors to return, or NULL. 132 psImage* in ///< Input image. 133 133 ); 134 134 -
trunk/psLib/src/math/psMinimize.c
r4225 r4321 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.12 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 13 20:18:18$11 * @version $Revision: 1.123 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-20 22:42:30 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 562 562 563 563 // XXX EAM this is my re-implementation of MinLM 564 psBool psMinimizeLMChi2(psMinimization *min,565 psImage *covar,566 psVector *params,567 const psVector *paramMask,568 const psArray *x,569 const psVector *y,570 const psVector *yErr,571 psMinimizeLMChi2Func func)564 bool psMinimizeLMChi2(psMinimization *min, 565 psImage *covar, 566 psVector *params, 567 const psVector *paramMask, 568 const psArray *x, 569 const psVector *y, 570 const psVector *yErr, 571 psMinimizeLMChi2Func func) 572 572 { 573 573 PS_ASSERT_PTR_NON_NULL(min, NULL); … … 1426 1426 /****************************************************************************** 1427 1427 *****************************************************************************/ 1428 psMinimization *psMinimizationAlloc( psS32maxIter,1429 psF32tol)1428 psMinimization *psMinimizationAlloc(int maxIter, 1429 float tol) 1430 1430 { 1431 1431 PS_ASSERT_INT_NONNEGATIVE(maxIter, NULL); … … 1912 1912 #define PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE 0.01 1913 1913 1914 psBool psMinimizePowell(psMinimization *min,1915 psVector *params,1916 const psVector *paramMask,1917 const psArray *coords,1918 psMinimizePowellFunc func)1914 bool psMinimizePowell(psMinimization *min, 1915 psVector *params, 1916 const psVector *paramMask, 1917 const psArray *coords, 1918 psMinimizePowellFunc func) 1919 1919 { 1920 1920 PS_ASSERT_PTR_NON_NULL(min, NULL); … … 2189 2189 psMinimizePowell(). 2190 2190 *****************************************************************************/ 2191 psBool psMinimizeChi2Powell(psMinimization *min,2192 psVector *params,2193 const psVector *paramMask,2194 const psArray *coords,2195 const psVector *value,2196 const psVector *error,2197 psMinimizeChi2PowellFunc func)2191 bool psMinimizeChi2Powell(psMinimization *min, 2192 psVector *params, 2193 const psVector *paramMask, 2194 const psArray *coords, 2195 const psVector *value, 2196 const psVector *error, 2197 psMinimizeChi2PowellFunc model) 2198 2198 { 2199 2199 myValue = (psVector *) value; 2200 2200 myError = (psVector *) error; 2201 2201 2202 Chi2PowellFunc = func;2202 Chi2PowellFunc = model; 2203 2203 2204 2204 return(psMinimizePowell(min, params, paramMask, coords, myPowellChi2Func)); -
trunk/psLib/src/math/psMinimize.h
r4285 r4321 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 16 03:51:58$10 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-20 22:42:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 56 56 */ 57 57 psMinimization *psMinimizationAlloc( 58 psS32 maxIter,///< Number of minimization iterations to perform.59 psF32tol ///< Requested error tolerance58 int maxIter, ///< Number of minimization iterations to perform. 59 float tol ///< Requested error tolerance 60 60 ); 61 61 … … 111 111 * @return psBool: True if successful. 112 112 */ 113 psBool psMinimizeLMChi2(113 bool psMinimizeLMChi2( 114 114 psMinimization *min, ///< Minimization specification 115 115 psImage *covar, ///< Covariance matrix … … 167 167 * @return psBool: True if successful. 168 168 */ 169 psBool psMinimizePowell(169 bool psMinimizePowell( 170 170 psMinimization *min, ///< Minimization specification 171 171 psVector *params, ///< "Best guess" for parameters that minimize func … … 211 211 * @return psBool: True is successful. 212 212 */ 213 psBool psMinimizeChi2Powell(213 bool psMinimizeChi2Powell( 214 214 psMinimization *min, ///< Minimization specification 215 215 psVector *params, ///< "Best guess" for parameters that minimize func … … 218 218 const psVector *value, ///< Measured values at the coordinates 219 219 const psVector *error, ///< Errors in the measure values (or NULL) 220 psMinimizeChi2PowellFunc func///< Specified function220 psMinimizeChi2PowellFunc model ///< Specified function 221 221 ); 222 222 -
trunk/psLib/src/sys/psLogMsg.c
r4316 r4321 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 18 03:13:02$14 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-20 22:42:30 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 The old log level. 65 65 *****************************************************************************/ 66 psS32 psLogSetLevel(psS32level)66 int psLogSetLevel(int level) 67 67 { 68 68 // Save old global log level for changing it. … … 233 233 ap 234 234 *****************************************************************************/ 235 void psLogMsgV(const char *name, psS32 level, const char *fmt, va_list ap)235 void psLogMsgV(const char *name, int level, const char *format, va_list ap) 236 236 { 237 237 static psS32 first = 1; // Flag for calling gethostname() … … 287 287 288 288 default: 289 psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, f mt);289 psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, format); 290 290 level = (level < 0) ? 0 : 9; 291 291 clevel = level + '0'; … … 335 335 char msg[1024]; 336 336 char* msgPtr; 337 vsnprintf(msg,1024, f mt, ap); // create message337 vsnprintf(msg,1024, format, ap); // create message 338 338 339 339 // detect multiple lines in message and indent each line by 4 spaces. -
trunk/psLib/src/sys/psLogMsg.h
r4316 r4321 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 18 03:13:02$13 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-20 22:42:30 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 44 44 * @return psS32 old logging level 45 45 */ 46 psS32psLogSetLevel(47 psS32level ///< Specifies the system log level46 int psLogSetLevel( 47 int level ///< Specifies the system log level 48 48 ); 49 49 … … 79 79 void psLogMsgV( 80 80 const char *name, ///< name of the log source 81 psS32 myLevel,///< severity level of this log message82 const char *f mt,///< printf-style format command81 int level, ///< severity level of this log message 82 const char *format, ///< printf-style format command 83 83 va_list ap ///< varargs argument list 84 84 ); -
trunk/psLib/src/sys/psMemory.c
r4298 r4321 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.5 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 17 21:42:02$10 * @version $Revision: 1.54 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-20 22:42:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 255 255 } 256 256 257 psS32 psMemCheckCorruption(psBool abort_on_error)257 int psMemCheckCorruption(bool abort_on_error) 258 258 { 259 259 psS32 nbad = 0; // number of bad blocks … … 504 504 505 505 // return refCounter 506 psReferenceCount psMemGetRefCounter( psPtr vptr)507 { 508 psMemBlock* ptr ;506 psReferenceCount psMemGetRefCounter(const psPtr ptr) 507 { 508 psMemBlock* ptr2; 509 509 psU32 refCount; 510 510 511 if ( vptr == NULL) {511 if (ptr == NULL) { 512 512 return 0; 513 513 } 514 514 515 ptr = ((psMemBlock* ) vptr) - 1;516 517 if (checkMemBlock(ptr , __func__) != 0) {518 memProblemCallback(ptr , __func__, __LINE__);519 } 520 521 pthread_mutex_lock(&ptr ->refCounterMutex);522 refCount = ptr ->refCounter;523 pthread_mutex_unlock(&ptr ->refCounterMutex);515 ptr2 = ((psMemBlock* ) ptr) - 1; 516 517 if (checkMemBlock(ptr2, __func__) != 0) { 518 memProblemCallback(ptr2, __func__, __LINE__); 519 } 520 521 pthread_mutex_lock(&ptr2->refCounterMutex); 522 refCount = ptr2->refCounter; 523 pthread_mutex_unlock(&ptr2->refCounterMutex); 524 524 525 525 return refCount; -
trunk/psLib/src/sys/psMemory.h
r4308 r4321 12 12 * @ingroup MemoryManagement 13 13 * 14 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 17 23:44:21$14 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-20 22:42:30 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 270 270 * @ingroup memTracing 271 271 */ 272 psS32psMemCheckCorruption(273 psBool abort_on_error ///< Abort on detecting corruption?272 int psMemCheckCorruption( 273 bool abort_on_error ///< Abort on detecting corruption? 274 274 ); 275 275 … … 279 279 */ 280 280 psReferenceCount psMemGetRefCounter( 281 psPtr vptr///< Pointer to get refCounter for281 const psPtr ptr ///< Pointer to get refCounter for 282 282 ); 283 283 … … 288 288 #ifdef DOXYGEN 289 289 psPtr psMemIncrRefCounter( 290 psPtr vptr ///< Pointer to increment refCounter, and return290 const psPtr ptr ///< Pointer to increment refCounter, and return 291 291 ); 292 292 #else … … 312 312 #ifdef DOXYGEN 313 313 psPtr psMemDecrRefCounter( 314 psPtr vptr ///< Pointer to decrement refCounter, and return314 psPtr ptr ///< Pointer to decrement refCounter, and return 315 315 ); 316 316 #else // DOXYGEN -
trunk/psLib/src/sysUtils/psLogMsg.c
r4316 r4321 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 18 03:13:02$14 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-20 22:42:30 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 The old log level. 65 65 *****************************************************************************/ 66 psS32 psLogSetLevel(psS32level)66 int psLogSetLevel(int level) 67 67 { 68 68 // Save old global log level for changing it. … … 233 233 ap 234 234 *****************************************************************************/ 235 void psLogMsgV(const char *name, psS32 level, const char *fmt, va_list ap)235 void psLogMsgV(const char *name, int level, const char *format, va_list ap) 236 236 { 237 237 static psS32 first = 1; // Flag for calling gethostname() … … 287 287 288 288 default: 289 psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, f mt);289 psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, format); 290 290 level = (level < 0) ? 0 : 9; 291 291 clevel = level + '0'; … … 335 335 char msg[1024]; 336 336 char* msgPtr; 337 vsnprintf(msg,1024, f mt, ap); // create message337 vsnprintf(msg,1024, format, ap); // create message 338 338 339 339 // detect multiple lines in message and indent each line by 4 spaces. -
trunk/psLib/src/sysUtils/psLogMsg.h
r4316 r4321 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 18 03:13:02$13 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-20 22:42:30 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 44 44 * @return psS32 old logging level 45 45 */ 46 psS32psLogSetLevel(47 psS32level ///< Specifies the system log level46 int psLogSetLevel( 47 int level ///< Specifies the system log level 48 48 ); 49 49 … … 79 79 void psLogMsgV( 80 80 const char *name, ///< name of the log source 81 psS32 myLevel,///< severity level of this log message82 const char *f mt,///< printf-style format command81 int level, ///< severity level of this log message 82 const char *format, ///< printf-style format command 83 83 va_list ap ///< varargs argument list 84 84 ); -
trunk/psLib/src/sysUtils/psMemory.c
r4298 r4321 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.5 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 17 21:42:02$10 * @version $Revision: 1.54 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-20 22:42:30 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 255 255 } 256 256 257 psS32 psMemCheckCorruption(psBool abort_on_error)257 int psMemCheckCorruption(bool abort_on_error) 258 258 { 259 259 psS32 nbad = 0; // number of bad blocks … … 504 504 505 505 // return refCounter 506 psReferenceCount psMemGetRefCounter( psPtr vptr)507 { 508 psMemBlock* ptr ;506 psReferenceCount psMemGetRefCounter(const psPtr ptr) 507 { 508 psMemBlock* ptr2; 509 509 psU32 refCount; 510 510 511 if ( vptr == NULL) {511 if (ptr == NULL) { 512 512 return 0; 513 513 } 514 514 515 ptr = ((psMemBlock* ) vptr) - 1;516 517 if (checkMemBlock(ptr , __func__) != 0) {518 memProblemCallback(ptr , __func__, __LINE__);519 } 520 521 pthread_mutex_lock(&ptr ->refCounterMutex);522 refCount = ptr ->refCounter;523 pthread_mutex_unlock(&ptr ->refCounterMutex);515 ptr2 = ((psMemBlock* ) ptr) - 1; 516 517 if (checkMemBlock(ptr2, __func__) != 0) { 518 memProblemCallback(ptr2, __func__, __LINE__); 519 } 520 521 pthread_mutex_lock(&ptr2->refCounterMutex); 522 refCount = ptr2->refCounter; 523 pthread_mutex_unlock(&ptr2->refCounterMutex); 524 524 525 525 return refCount; -
trunk/psLib/src/sysUtils/psMemory.h
r4308 r4321 12 12 * @ingroup MemoryManagement 13 13 * 14 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 17 23:44:21$14 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-20 22:42:30 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 270 270 * @ingroup memTracing 271 271 */ 272 psS32psMemCheckCorruption(273 psBool abort_on_error ///< Abort on detecting corruption?272 int psMemCheckCorruption( 273 bool abort_on_error ///< Abort on detecting corruption? 274 274 ); 275 275 … … 279 279 */ 280 280 psReferenceCount psMemGetRefCounter( 281 psPtr vptr///< Pointer to get refCounter for281 const psPtr ptr ///< Pointer to get refCounter for 282 282 ); 283 283 … … 288 288 #ifdef DOXYGEN 289 289 psPtr psMemIncrRefCounter( 290 psPtr vptr ///< Pointer to increment refCounter, and return290 const psPtr ptr ///< Pointer to increment refCounter, and return 291 291 ); 292 292 #else … … 312 312 #ifdef DOXYGEN 313 313 psPtr psMemDecrRefCounter( 314 psPtr vptr ///< Pointer to decrement refCounter, and return314 psPtr ptr ///< Pointer to decrement refCounter, and return 315 315 ); 316 316 #else // DOXYGEN -
trunk/psLib/src/types/psLookupTable.c
r4308 r4321 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 17 23:44:21$9 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 254 254 /*****************************************************************************/ 255 255 256 psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, intindexCol)256 psLookupTable* psLookupTableAlloc(const char *fileName, const char *format, long indexCol) 257 257 { 258 258 psLookupTable *outTable = NULL; … … 633 633 } 634 634 635 psS32psLookupTableRead(psLookupTable* table)635 long psLookupTableRead(psLookupTable* table) 636 636 { 637 637 psS32 numRows = 0; -
trunk/psLib/src/types/psLookupTable.h
r4162 r4321 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 08 23:40:45$9 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 70 70 const char *fileName, ///< Name of file to read 71 71 const char *format, ///< scanf-like format string 72 intindexCol ///< Column of the index vector (starting at zero)72 long indexCol ///< Column of the index vector (starting at zero) 73 73 ); 74 74 … … 102 102 * @return psS32 Number of valid lines read 103 103 */ 104 psS32psLookupTableRead(104 long psLookupTableRead( 105 105 psLookupTable *table ///< Table to read 106 106 ); -
trunk/psLib/src/types/psMetadata.c
r4308 r4321 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.6 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 17 23:44:21$14 * @version $Revision: 1.66 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-20 22:42:29 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 267 267 } 268 268 269 psBool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags)269 bool psMetadataAddItem(psMetadata *md, psMetadataItem *metadataItem, psS32 location, psS32 flags) 270 270 { 271 271 char * key = NULL; … … 359 359 } 360 360 361 psBool psMetadataAdd(psMetadata *md, psS32location, const char *name,362 psS32 type, const char *comment, ...)361 bool psMetadataAdd(psMetadata *md, int location, const char *name, 362 int format, const char *comment, ...) 363 363 { 364 364 va_list argPtr; 365 365 366 366 va_start(argPtr, comment); 367 psBool result = psMetadataAddV(md,location,name, type,comment,argPtr);367 psBool result = psMetadataAddV(md,location,name,format,comment,argPtr); 368 368 va_end(argPtr); 369 369 … … 371 371 } 372 372 373 psBool psMetadataAddV(psMetadata *md, psS32location, const char *name,374 psS32 type, const char *comment, va_list list)373 bool psMetadataAddV(psMetadata *md, int location, const char *name, 374 int format, const char *comment, va_list list) 375 375 { 376 376 psMetadataItem* metadataItem = NULL; 377 377 378 metadataItem = psMetadataItemAllocV(name, type& PS_METADATA_TYPE_MASK, comment, list);379 380 if (!psMetadataAddItem(md, metadataItem, location, type& PS_METADATA_FLAGS_MASK)) {378 metadataItem = psMetadataItemAllocV(name, format & PS_METADATA_TYPE_MASK, comment, list); 379 380 if (!psMetadataAddItem(md, metadataItem, location, format & PS_METADATA_FLAGS_MASK)) { 381 381 psError(PS_ERR_UNKNOWN,false,PS_ERRORTEXT_psMetadata_ADD_FAILED); 382 382 psFree(metadataItem); … … 475 475 } 476 476 477 psMetadataItem* psMetadataLookup( psMetadata *md, const char *key)477 psMetadataItem* psMetadataLookup(const psMetadata *md, const char *key) 478 478 { 479 479 psHash* mdTable = NULL; … … 491 491 } 492 492 493 void* psMetadataLookupPtr( psBool *status,psMetadata *md, const char *key)493 void* psMetadataLookupPtr(bool *status, const psMetadata *md, const char *key) 494 494 { 495 495 psMetadataItem *metadataItem = NULL; … … 525 525 526 526 #define psMetadataLookupNumTYPE(TYPE) \ 527 ps##TYPE psMetadataLookup##TYPE( psBool *status,psMetadata *md, const char *key) \527 ps##TYPE psMetadataLookup##TYPE(bool *status, const psMetadata *md, const char *key) \ 528 528 { \ 529 529 psMetadataItem *metadataItem = NULL; \ … … 630 630 } 631 631 632 psBool psMetadataIteratorSet(psMetadataIterator* iterator,633 int location)632 bool psMetadataIteratorSet(psMetadataIterator* iterator, 633 int location) 634 634 { 635 635 int match; -
trunk/psLib/src/types/psMetadata.h
r4243 r4321 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 14 02:54:06$13 * @version $Revision: 1.49 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-20 22:42:29 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 214 214 const char* name, ///< Name of metadata item. 215 215 const char* comment, ///< Comment for metadata item. 216 psBool value ///< the value of the metadata item.216 bool value ///< the value of the metadata item. 217 217 ); 218 218 … … 257 257 * @return bool: True for success, false for failure. 258 258 */ 259 psBool psMetadataAddItem(259 bool psMetadataAddItem( 260 260 psMetadata* md, ///< Metadata collection to insert metadat item. 261 261 psMetadataItem* item, ///< Metadata item to be added. … … 270 270 * @return bool: True for success, false for failure. 271 271 */ 272 psBool psMetadataAdd(272 bool psMetadataAdd( 273 273 psMetadata* md, ///< Metadata collection to insert metadata item. 274 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL274 int location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 275 275 const char *name, ///< Name of metadata item. 276 int type,///< Type of metadata item (psMetadataType) and options (psMetadataFlags)276 int format, ///< Type of metadata item (psMetadataType) and options (psMetadataFlags) 277 277 const char *comment, ///< Comment for metadata item. 278 278 ... ///< Arguments for name formatting and metadata item data. … … 286 286 * @return bool: True for success, false for failure. 287 287 */ 288 psBool psMetadataAddV(288 bool psMetadataAddV( 289 289 psMetadata* md, ///< Metadata collection to insert metadata item. 290 psS32 location,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL290 int location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 291 291 const char *name, ///< Name of metadata item. 292 int type,///< Type of metadata item (psMetadataType) and options (psMetadataFlags)292 int format, ///< Type of metadata item (psMetadataType) and options (psMetadataFlags) 293 293 const char *comment, ///< Comment for metadata item. 294 294 va_list list ///< Arguments for name formatting and metadata item data. … … 300 300 * @return psBool: True for success, False for failure. 301 301 */ 302 psBool psMetadataAddS32(302 bool psMetadataAddS32( 303 303 psMetadata* md, ///< Metadata collection to insert metadata item 304 304 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 312 312 * @return psBool: True for success, False for failure. 313 313 */ 314 psBool psMetadataAddF32(314 bool psMetadataAddF32( 315 315 psMetadata* md, ///< Metadata collection to insert metadata item 316 316 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 324 324 * @return psBool: True for success, False for failure. 325 325 */ 326 psBool psMetadataAddF64(326 bool psMetadataAddF64( 327 327 psMetadata* md, ///< Metadata collection to insert metadata item 328 328 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 348 348 * @return psBool: True for success, False for failure. 349 349 */ 350 psBool psMetadataAddStr(350 bool psMetadataAddStr( 351 351 psMetadata* md, ///< Metadata collection to insert metadata item 352 352 psS32 location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 438 438 * @return bool: True for success, false for failure. 439 439 */ 440 psBool psMetadataRemove(441 psMetadata* md, ///< Metadata collection to remove metadata item.442 psS32 where,///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL443 const char * key ///< Name of metadata key.440 bool psMetadataRemove( 441 psMetadata* md, ///< Metadata collection to remove metadata item. 442 int location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL 443 const char * key ///< Name of metadata key. 444 444 ); 445 445 … … 453 453 */ 454 454 psMetadataItem* psMetadataLookup( 455 psMetadata * md, ///< Metadata collection to lookup metadata item.455 const psMetadata * md, ///< Metadata collection to lookup metadata item. 456 456 const char * key ///< Name of metadata key. 457 457 ); … … 466 466 */ 467 467 psF64 psMetadataLookupF64( 468 psBool *status, ///< Status of lookup.469 psMetadata *md, ///< Metadata collection to lookup metadata item.468 bool *status, ///< Status of lookup. 469 const psMetadata *md, ///< Metadata collection to lookup metadata item. 470 470 const char *key ///< Name of metadata key. 471 471 ); … … 480 480 */ 481 481 psF32 psMetadataLookupF32( 482 psBool *status, ///< Status of lookup.483 psMetadata *md, ///< Metadata collection to lookup metadata item.482 bool *status, ///< Status of lookup. 483 const psMetadata *md, ///< Metadata collection to lookup metadata item. 484 484 const char *key ///< Name of metadata key. 485 485 ); … … 494 494 */ 495 495 psS32 psMetadataLookupS32( 496 psBool *status, ///< Status of lookup.497 psMetadata *md, ///< Metadata collection to lookup metadata item.496 bool *status, ///< Status of lookup. 497 const psMetadata *md, ///< Metadata collection to lookup metadata item. 498 498 const char *key ///< Name of metadata key. 499 499 ); … … 508 508 */ 509 509 psBool psMetadataLookupBool( 510 psBool *status, ///< Status of lookup.511 psMetadata *md, ///< Metadata collection to lookup metadata item.510 bool *status, ///< Status of lookup. 511 const psMetadata *md, ///< Metadata collection to lookup metadata item. 512 512 const char *key ///< Name of metadata key. 513 513 ); … … 522 522 */ 523 523 psPtr psMetadataLookupPtr( 524 psBool *status, ///< Status of lookup.525 psMetadata* md, ///< Metadata collection to lookup metadata item.524 bool *status, ///< Status of lookup. 525 const psMetadata* md, ///< Metadata collection to lookup metadata item. 526 526 const char *key ///< Name of metadata key. 527 527 ); … … 560 560 * @return psBool TRUE if iterator successfully set, otherwise FALSE. 561 561 */ 562 psBool psMetadataIteratorSet(562 bool psMetadataIteratorSet( 563 563 psMetadataIterator* iterator, ///< psMetadata iterator 564 564 int location ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL -
trunk/psLib/src/types/psPixels.c
r4230 r4321 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 13 20:43:40$9 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 114 114 } 115 115 116 psPixels* psPixelsCopy(psPixels* out, const psPixels* in)117 { 118 if ( in== NULL) {116 psPixels* psPixelsCopy(psPixels* out, const psPixels* pixels) 117 { 118 if (pixels == NULL) { 119 119 psError(PS_ERR_BAD_PARAMETER_NULL,true,PS_ERRORTEXT_psPixels_NULL); 120 120 psFree(out); … … 122 122 } 123 123 124 out = psPixelsRealloc(out, in->n);125 126 memcpy(out->data, in->data, in->n*sizeof(psPixelCoord));127 out->n = in->n;124 out = psPixelsRealloc(out, pixels->n); 125 126 memcpy(out->data,pixels->data, pixels->n*sizeof(psPixelCoord)); 127 out->n = pixels->n; 128 128 129 129 return out; -
trunk/psLib/src/types/psPixels.h
r4293 r4321 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06- 17 00:11:02$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-20 22:42:29 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 85 85 psPixels* psPixelsCopy( 86 86 psPixels* out, ///< psPixels struct to recycle, or NULL 87 const psPixels* in///< psPixels struct to copy87 const psPixels* pixels ///< psPixels struct to copy 88 88 ); 89 89
Note:
See TracChangeset
for help on using the changeset viewer.
