Changeset 2204 for trunk/psLib/src/collections/psVector.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psVector.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psVector.c
r2006 r2204 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10- 07 19:51:30$12 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-27 00:57:31 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 42 42 // FUNCTION IMPLEMENTATION - PUBLIC 43 43 44 psVector* psVectorAlloc( unsigned intnalloc, psElemType elemType)44 psVector* psVectorAlloc(psU32 nalloc, psElemType elemType) 45 45 { 46 46 psVector* psVec = NULL; 47 intelementSize = 0;47 psS32 elementSize = 0; 48 48 49 49 elementSize = PSELEMTYPE_SIZEOF(elemType); … … 64 64 } 65 65 66 psVector* psVectorRealloc(psVector* restrict in, unsigned intnalloc)67 { 68 intelementSize = 0;66 psVector* psVectorRealloc(psVector* restrict in, psU32 nalloc) 67 { 68 psS32 elementSize = 0; 69 69 psElemType elemType; 70 70 … … 88 88 } 89 89 90 psVector* psVectorRecycle(psVector* restrict in, unsigned intn, psElemType type)91 { 92 intbyteSize;90 psVector* psVectorRecycle(psVector* restrict in, psU32 n, psElemType type) 91 { 92 psS32 byteSize; 93 93 94 94 if (in == NULL) { … … 129 129 } 130 130 131 intnElements = in->n;131 psS32 nElements = in->n; 132 132 133 133 out = psVectorRecycle(out, nElements, type); … … 136 136 ps##INTYPE *inVec = in->data.INTYPE; \ 137 137 ps##OUTTYPE *outVec = out->data.OUTTYPE; \ 138 for ( intcol=0;col<nElements;col++) { \138 for (psS32 col=0;col<nElements;col++) { \ 139 139 *(outVec++) = *(inVec++); \ 140 140 } \ … … 225 225 psVector* psVectorSort(psVector* restrict outVector, const psVector* restrict inVector) 226 226 { 227 intN = 0;228 intelSize = 0;229 void *inVec = NULL;230 void *outVec = NULL;227 psS32 N = 0; 228 psS32 elSize = 0; 229 psPtr inVec = NULL; 230 psPtr outVec = NULL; 231 231 psElemType inType = 0; 232 232 … … 311 311 psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector) 312 312 { 313 intN = 0;313 psS32 N = 0; 314 314 psVector* tmpVector = NULL; 315 315 psElemType inType = 0; … … 350 350 ps##TYPE* tmpVec = tmpVector->data.TYPE; \ 351 351 ps##TYPE diff; \ 352 for( inti=0; i<N; i++) { \353 for( intj=0; j<N; j++) { \352 for(psS32 i=0; i<N; i++) { \ 353 for(psS32 j=0; j<N; j++) { \ 354 354 diff = absfcn(tmpVec[i] - inVec[j]); \ 355 355 if(diff < maxError) { \
Note:
See TracChangeset
for help on using the changeset viewer.
