Changeset 3026 for trunk/psLib/src/dataManip/psMatrix.c
- Timestamp:
- Jan 17, 2005, 12:17:29 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataManip/psMatrix.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psMatrix.c
r2697 r3026 20 20 * @author Ross Harman, MHPCC 21 21 * 22 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $23 * @date $Date: 200 4-12-11 00:16:38$22 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2005-01-17 22:17:29 $ 24 24 * 25 25 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 175 175 /*****************************************************************************/ 176 176 177 psImage* psMatrixLUD(psImage* outImage, psVector* outPerm, psImage* inImage)177 psImage* psMatrixLUD(psImage* outImage, psVector** outPerm, psImage* inImage) 178 178 { 179 179 psS32 signum = 0; … … 190 190 PS_CHECK_POINTERS(inImage, outImage, outImage); 191 191 PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, outImage); 192 PS_VECTOR_CHECK_NULL_GENERAL(outPerm, psMatrixLUD_EXIT); 193 PS_CHECK_DIMEN_AND_TYPE(outPerm, PS_DIMEN_VECTOR, outImage); 192 PS_PTR_CHECK_NULL_GENERAL(outPerm, psMatrixLUD_EXIT); 194 193 psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type); 195 psVectorRecycle(outPerm, inImage->numRows, inImage->type.type);196 194 PS_CHECK_SQUARE(inImage, outImage); 197 195 PS_CHECK_SQUARE(outImage, outImage); … … 203 201 // Initialize GSL data 204 202 perm.size = numCols; 205 outPerm->n = numCols; 206 perm.data = outPerm->data.V; 203 if (sizeof(size_t) == 4) { 204 *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S32); 205 } else if (sizeof(size_t) == 8) { 206 *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S64); 207 } else { 208 psError(PS_ERR_UNKNOWN, true, 209 "Failed to allocate the permutation vector; " 210 "could not determine the cooresponding data type."); 211 psMatrixLUD_EXIT; 212 } 213 214 (*outPerm)->n = numCols; 215 perm.data = (*outPerm)->data.V; 207 216 lu = gsl_matrix_alloc(numRows, numCols); 208 217 … … 244 253 PS_CHECK_DIMEN_AND_TYPE(inVector, PS_DIMEN_VECTOR, outVector); 245 254 PS_VECTOR_CHECK_NULL(inPerm, outVector); 246 PS_CHECK_DIMEN_AND_TYPE(inPerm, PS_DIMEN_VECTOR, outVector);247 255 psVectorRecycle(outVector, inImage->numRows, inImage->type.type); 248 256
Note:
See TracChangeset
for help on using the changeset viewer.
