Changeset 2762 for trunk/psLib/src/dataManip
- Timestamp:
- Dec 20, 2004, 11:39:42 AM (22 years ago)
- Location:
- trunk/psLib/src/dataManip
- Files:
-
- 2 edited
-
psConstants.h (modified) (2 diffs)
-
psStats.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psConstants.h
r2741 r2762 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12- 17 00:18:31$8 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-20 21:39:42 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 429 429 } 430 430 431 431 #define PS_IMAGE_PRINT_F32(NAME) \ 432 printf("======== printing %s ========\n", #NAME); \ 433 for (int i = 0 ; i < NAME->numRows ; i++) { \ 434 for (int j = 0 ; j < NAME->numCols ; j++) { \ 435 printf("%.2f ", NAME->data.F32[i][j]); \ 436 } \ 437 printf("\n"); \ 438 }\ 439 440 #define PS_IMAGE_SET_F32(NAME, VALUE) \ 441 for (int i = 0 ; i < NAME->numRows ; i++) { \ 442 for (int j = 0 ; j < NAME->numCols ; j++) { \ 443 NAME->data.F32[i][j] = VALUE; \ 444 } \ 445 }\ 446 447 #define PS_IMAGE_SET_U8(NAME, VALUE) \ 448 for (int i = 0 ; i < NAME->numRows ; i++) { \ 449 for (int j = 0 ; j < NAME->numCols ; j++) { \ 450 NAME->data.U8[i][j] = VALUE; \ 451 } \ 452 }\ 432 453 433 454 /***************************************************************************** 434 455 PS_READOUT macros: 435 *****************************************************************************/456 *****************************************************************************/ 436 457 #define PS_READOUT_CHECK_NULL(NAME, RVAL) \ 437 458 if (NAME == NULL || NAME->image == NULL) { \ -
trunk/psLib/src/dataManip/psStats.c
r2739 r2762 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.10 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-12- 16 23:04:18$11 * @version $Revision: 1.104 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-12-20 21:39:42 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 793 793 } 794 794 } 795 if (countInt <= 1) {795 if (countInt == 0) { 796 796 stats->sampleStdev = NAN; 797 psLogMsg(__func__, PS_LOG_WARN, "WARNING: p_psVectorSampleStdev(): no valid psVector elements. Setting stats->sampleStdev = NAN.\n"); 797 psLogMsg(__func__, PS_LOG_WARN, "WARNING: p_psVectorSampleStdev(): no valid psVector elements (%d). Setting stats->sampleStdev = NAN.\n", countInt); 798 } else if (countInt == 1) { 799 stats->sampleStdev = 0.0; 800 psLogMsg(__func__, PS_LOG_WARN, "WARNING: p_psVectorSampleStdev(): only one valid psVector elements (%d). Setting stats->sampleStdev = 0.0.\n", countInt); 798 801 } else { 799 802 countFloat = (float)countInt;
Note:
See TracChangeset
for help on using the changeset viewer.
