Changeset 3682 for trunk/psLib/test/image/tst_psImage.c
- Timestamp:
- Apr 7, 2005, 10:27:42 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/image/tst_psImage.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImage.c
r3264 r3682 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 2-17 19:26:25$8 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 18 18 19 19 #include "psTest.h" 20 #include "pslib .h"20 #include "pslib_strict.h" 21 21 #include "psType.h" 22 22 … … 51 51 0,1,100,1,150,100 52 52 }; 53 psU32 types = 1 3;53 psU32 types = 12; 54 54 psElemType type[] = { PS_TYPE_S8, PS_TYPE_S16, PS_TYPE_S32, PS_TYPE_S64, 55 55 PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_U32, PS_TYPE_U64, 56 PS_TYPE_F32, PS_TYPE_F64, PS_TYPE_C32, PS_TYPE_C64, 57 PS_TYPE_PTR }; 56 PS_TYPE_F32, PS_TYPE_F64, PS_TYPE_C32, PS_TYPE_C64}; 58 57 59 58 psLogMsg(__func__,PS_LOG_INFO,"#546 - psImageAlloc shall allocate memory for a psImage structure"); … … 193 192 } 194 193 } 195 }196 break;197 case PS_TYPE_PTR: {198 psU32 rows = numRows[i];199 psU32 cols = numCols[i];200 psImage* temp = psImageAlloc(1,1,PS_TYPE_F32);201 202 for (psS32 r=0;r<rows;r++) {203 for (psS32 c=0;c<cols;c++) {204 image->data.PTR[r][c] = psMemIncrRefCounter(temp);205 }206 }207 for (psS32 r=0;r<rows;r++) {208 for (psS32 c=0;c<cols;c++) {209 if (image->data.PTR[r][c] != temp) {210 psError(PS_ERR_UNKNOWN, true, "Could not set pixel in pointer image at (%d,%d): %x %x",211 c,r,image->data.PTR[r][c],temp);212 psFree(image);213 psFree(temp);214 return 8;215 }216 }217 }218 psFree(temp);219 194 } 220 195 break;
Note:
See TracChangeset
for help on using the changeset viewer.
