Changeset 4811 for trunk/psModules/test/tst_pmReadoutCombine.c
- Timestamp:
- Aug 17, 2005, 12:49:18 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmReadoutCombine.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmReadoutCombine.c
r4770 r4811 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-08-1 6 01:10:36$7 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-08-17 22:49:18 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 static int test01(void); 27 27 testDescription tests[] = { 28 {test00, 000, "pmSubtractBias ", 0, false},29 {test01, 000, "pmSubtractBias(): input parameter error conditions", 0, false},28 {test00, 000, "pmSubtractBias(): Basic readout combines with no image overlap", true, false}, 29 {test01, 000, "pmSubtractBias(): input parameter error conditions", true, false}, 30 30 {NULL} 31 31 }; … … 64 64 readouts and calls pmReadoutCombine(). 65 65 *****************************************************************************/ 66 67 66 int simpleCombineNoOverlap(psS32 numInputCols, psS32 numInputRows) 68 67 { … … 99 98 params->nKeep = 0; 100 99 100 // 101 // Create a psList of psReadouts. The pixels in readout r will all have the 102 // value r. 103 // 101 104 for (r=0;r<NUM_READOUTS;r++) { 102 105 baseRowsReadout[r] = r + 40; … … 118 121 *(int *) (& (tmpImage->row0)) = baseRows[r]; 119 122 *(int *) (& (tmpImage->col0)) = baseCols[r]; 120 /*121 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r],122 baseRowsReadout[r],123 tmpImage);124 */125 123 pmReadout *tmpReadout = pmReadoutAlloc(NULL); 124 tmpReadout->row0 = 0; 125 tmpReadout->col0 = 0; 126 126 tmpReadout->image = tmpImage; 127 127 … … 142 142 output = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0); 143 143 psF32 NR = (psF32) NUM_READOUTS; 144 // psF32 expectedPixel = ((((NR-1.0) * (NR/2.0)) / NR) + VEC_ZERO) * VEC_SCALE;145 144 psF32 expectedPixel = ((NR/2.0) * (VEC_ZERO + (VEC_ZERO + VEC_SCALE * (NR - 1)))) / NR; 146 145 147 VerifyTheOutput(output, expectedPixel);146 int testStatus = VerifyTheOutput(output, expectedPixel); 148 147 149 148 psFree(params->stats); … … 162 161 163 162 printFooter(stdout, "pmReadoutCombine", "simpleCombineNoOverlap", true); 164 return( 0);163 return(testStatus); 165 164 } 166 165 … … 177 176 } 178 177 178 /****************************************************************************** 179 test01(): we simply call pmReadoutCombine() with a variety of erroneous input 180 parameter combinations and verify that it behaves properly. 181 *****************************************************************************/ 179 182 int test01() 180 183 { 184 int testStatus = true; 181 185 int i; 182 186 int r; … … 203 207 psVector *scaleBig = psVectorAlloc(NUM_READOUTS*2, PS_TYPE_F32); 204 208 psVector *scaleF64 = psVectorAlloc(NUM_READOUTS, PS_TYPE_F64); 205 int testStatus = true;206 209 for (i=0;i<NUM_READOUTS;i++) { 207 210 zero->data.F32[i] = 3.0; … … 236 239 *(int *) (& (tmpImage->row0)) = baseRows[r]; 237 240 *(int *) (& (tmpImage->col0)) = baseCols[r]; 238 /*239 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r],240 baseRowsReadout[r],241 tmpImage);242 */243 241 pmReadout *tmpReadout = pmReadoutAlloc(NULL); 242 tmpReadout->row0 = 0; 243 tmpReadout->col0 = 0; 244 244 tmpReadout->image = tmpImage; 245 245 minOutRow = PS_MIN(minOutRow, (baseRowsReadout[r] + baseRows[r])); … … 449 449 450 450 printFooter(stdout, "pmReadoutCombine", "Testing bad input parameter conditions", true); 451 return( !testStatus);451 return(testStatus); 452 452 }
Note:
See TracChangeset
for help on using the changeset viewer.
