IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psVector.c

    r2006 r2204  
    1010*  @author Robert DeSonia, MHPCC
    1111*
    12 *  @version $Revision: 1.28 $ $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 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242// FUNCTION IMPLEMENTATION - PUBLIC
    4343
    44 psVector* psVectorAlloc(unsigned int nalloc, psElemType elemType)
     44psVector* psVectorAlloc(psU32 nalloc, psElemType elemType)
    4545{
    4646    psVector* psVec = NULL;
    47     int elementSize = 0;
     47    psS32 elementSize = 0;
    4848
    4949    elementSize = PSELEMTYPE_SIZEOF(elemType);
     
    6464}
    6565
    66 psVector* psVectorRealloc(psVector* restrict in, unsigned int nalloc)
    67 {
    68     int elementSize = 0;
     66psVector* psVectorRealloc(psVector* restrict in, psU32 nalloc)
     67{
     68    psS32 elementSize = 0;
    6969    psElemType elemType;
    7070
     
    8888}
    8989
    90 psVector* psVectorRecycle(psVector* restrict in, unsigned int n, psElemType type)
    91 {
    92     int byteSize;
     90psVector* psVectorRecycle(psVector* restrict in, psU32 n, psElemType type)
     91{
     92    psS32 byteSize;
    9393
    9494    if (in == NULL) {
     
    129129    }
    130130
    131     int nElements = in->n;
     131    psS32 nElements = in->n;
    132132
    133133    out = psVectorRecycle(out, nElements, type);
     
    136136        ps##INTYPE *inVec = in->data.INTYPE; \
    137137        ps##OUTTYPE *outVec = out->data.OUTTYPE; \
    138         for (int col=0;col<nElements;col++) { \
     138        for (psS32 col=0;col<nElements;col++) { \
    139139            *(outVec++) = *(inVec++); \
    140140        } \
     
    225225psVector* psVectorSort(psVector* restrict outVector, const psVector* restrict inVector)
    226226{
    227     int N = 0;
    228     int elSize = 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;
    231231    psElemType inType = 0;
    232232
     
    311311psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector)
    312312{
    313     int N = 0;
     313    psS32 N = 0;
    314314    psVector* tmpVector = NULL;
    315315    psElemType inType = 0;
     
    350350        ps##TYPE* tmpVec = tmpVector->data.TYPE;                              \
    351351        ps##TYPE  diff;                                                       \
    352         for(int i=0; i<N; i++) {                                              \
    353             for(int j=0; j<N; j++) {                                          \
     352        for(psS32 i=0; i<N; i++) {                                              \
     353            for(psS32 j=0; j<N; j++) {                                          \
    354354                diff = absfcn(tmpVec[i] - inVec[j]);                          \
    355355                if(diff < maxError) {                                         \
Note: See TracChangeset for help on using the changeset viewer.