IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4493


Ignore:
Timestamp:
Jul 6, 2005, 4:17:54 PM (21 years ago)
Author:
drobbin
Message:

made revisions according to psLib SDRS rev 15

Location:
trunk/psLib
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/pslib.kdevses

    r4457 r4493  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="4" >
    5   <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psFunctions.h" >
    6    <View0 line="263" Type="Source" />
     4 <DocsAndViews NumberOfDocuments="5" >
     5  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/sysUtils/psType.h" >
     6   <View0 line="296" Type="Source" />
    77  </Doc0>
    8   <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psFunctions.c" >
    9    <View0 line="1597" Type="Source" />
     8  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psVector.h" >
     9   <View0 line="102" Type="Source" />
    1010  </Doc1>
    11   <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psVector.h" >
    12    <View0 line="53" Type="Source" />
     11  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psVector.c" >
     12   <View0 line="130" Type="Source" />
    1313  </Doc2>
    1414  <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.h" >
    15    <View0 line="79" Type="Source" />
     15   <View0 line="149" Type="Source" />
    1616  </Doc3>
     17  <Doc4 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.c" >
     18   <View0 line="151" Type="Source" />
     19  </Doc4>
    1720 </DocsAndViews>
    1821 <pluginList>
  • trunk/psLib/src/collections/psScalar.h

    r4409 r4493  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-28 20:17:52 $
     13 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-07-07 02:17:53 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3232typedef struct
    3333{
    34     psType type;                ///< Type of data.
     34    psMathType type;            ///< Type of data.
    3535
    3636    union {
  • trunk/psLib/src/collections/psVector.c

    r4409 r4493  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-06-28 20:17:52 $
     11*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-07-07 02:17:53 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4848// FUNCTION IMPLEMENTATION - PUBLIC
    4949
    50 psVector* psVectorAlloc(unsigned long nalloc, psElemType type)
     50psVector* psVectorAlloc( long nalloc, psElemType type)
    5151{
    5252    psVector* psVec = NULL;
     
    6767    psVec->type.dimen = PS_DIMEN_VECTOR;
    6868    psVec->type.type = type;
    69     *(int*)&psVec->nalloc = nalloc;
     69    *(long*)&psVec->nalloc = nalloc;
    7070    psVec->n = nalloc;
    7171
     
    7676}
    7777
    78 psVector* psVectorRealloc(psVector* vector, unsigned long nalloc)
     78psVector* psVectorRealloc(psVector* vector, long nalloc)
    7979{
    8080    psS32 elementSize = 0;
     
    9393        // Realloc after decrementation to avoid accessing freed array elements
    9494        vector->data.U8 = psRealloc(vector->data.U8, nalloc * elementSize);
    95         *(int*)&vector->nalloc = nalloc;
     95        *(long*)&vector->nalloc = nalloc;
    9696    }
    9797
     
    9999}
    100100
    101 psVector* psVectorRecycle(psVector* vector, unsigned long nalloc, psElemType type)
     101psVector* psVectorRecycle(psVector* vector, long nalloc, psElemType type)
    102102{
    103103    psS32 byteSize;
     
    120120    if (byteSize > vector->nalloc*PSELEMTYPE_SIZEOF(vector->type.type)) {
    121121        vector->data.U8 = psRealloc(vector->data.U8, byteSize);
    122         *(int*)&vector->nalloc = nalloc;
     122        *(long*)&vector->nalloc = nalloc;
    123123    }
    124124
  • trunk/psLib/src/collections/psVector.h

    r4409 r4493  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-28 20:17:52 $
     13 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-07-07 02:17:53 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151typedef struct
    5252{
    53     psType type;                       ///< Type of data.
    54     int n;                             ///< Number of elements in use.
    55     const int nalloc;                  ///< Total number of elements available.
     53    psMathType type;                       ///< Type of data.
     54    long n;                            ///< Number of elements in use.
     55    const long nalloc;                 ///< Total number of elements available.
    5656    p_psVectorData data;               ///< Union for data types.
     57    void *lock;                        ///< Optional lock for thread safety.
    5758}
    5859psVector;
     
    7374 */
    7475psVector* psVectorAlloc(
    75     unsigned long nalloc,              ///< Total number of elements to make available.
     76    long nalloc,                       ///< Total number of elements to make available.
    7677    psElemType type                    ///< Type of data to be held by vector.
    77 );
     78)
     79;
    7880
    7981/** Reallocate a vector.
     
    8890psVector* psVectorRealloc(
    8991    psVector* vector,                  ///< Vector to reallocate.
    90     unsigned long nalloc               ///< Total number of elements to make available.
     92    long nalloc                        ///< Total number of elements to make available.
    9193);
    9294
     
    120122    ///< taken to preserve the values.
    121123
    122     unsigned long nalloc,              ///< Total number of elements to make available.
     124    long nalloc,                       ///< Total number of elements to make available.
    123125    psElemType type                    ///< the datatype of the returned vector
    124126);
  • trunk/psLib/src/image/psImage.c

    r4409 r4493  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-28 20:17:52 $
     11 *  @version $Revision: 1.73 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-07-07 02:17:53 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9191}
    9292
    93 psRegion psRegionSet(psF32 x0,
    94                      psF32 x1,
    95                      psF32 y0,
    96                      psF32 y1)
     93psRegion psRegionSet(float x0,
     94                     float x1,
     95                     float y0,
     96                     float y1)
    9797{
    9898    psRegion out;
  • trunk/psLib/src/image/psImage.h

    r4409 r4493  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-28 20:17:52 $
     13 *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-07-07 02:17:53 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151typedef struct psImage
    5252{
    53     const psType type;                 ///< Image data type and dimension.
     53    const psMathType type;                 ///< Image data type and dimension.
    5454    const psU32 numCols;               ///< Number of columns in image
    5555    const psU32 numRows;               ///< Number of rows in image.
     
    8787typedef struct
    8888{
    89     psF32 x0;                         ///< the first column of the region.
    90     psF32 x1;                         ///< the last column of the region.
    91     psF32 y0;                         ///< the first row of the region.
    92     psF32 y1;                         ///< the last row of the region.
     89    float x0;                         ///< the first column of the region.
     90    float x1;                         ///< the last column of the region.
     91    float y0;                         ///< the first row of the region.
     92    float y1;                         ///< the last row of the region.
    9393}
    9494psRegion;
     
    113113 */
    114114psRegion psRegionSet(
    115     psF32 x0,                         ///< the first column of the region.
    116     psF32 x1,                         ///< the last column of the region + 1.
    117     psF32 y0,                         ///< the first row of the region.
    118     psF32 y1                          ///< the last row of the region + 1.
     115    float x0,                         ///< the first column of the region.
     116    float x1,                         ///< the last column of the region + 1.
     117    float y0,                         ///< the first row of the region.
     118    float y1                          ///< the last row of the region + 1.
    119119);
    120120
     
    152152
    153153/** Copy an image to a new buffer
    154  * 
     154 *
    155155 *  @return True if image copied or false if error
    156156 */
  • trunk/psLib/src/image/psImageStructManip.c

    r3977 r4493  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-05-19 05:18:20 $
     10 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-07-07 02:17:53 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9494
    9595    out->data.V = psRealloc(out->data.V,sizeof(psPtr)*numRows); // resize row pointer array
    96     *(psType*)&out->type = image->type;
     96    *(psMathType*)&out->type = image->type;
    9797    *(psU32*)&out->numCols = numCols;
    9898    *(psU32*)&out->numRows = numRows;
  • trunk/psLib/src/sysUtils/psType.h

    r4444 r4493  
    1010*  @author Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-07-01 03:57:39 $
     12*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-07-07 02:17:53 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    278278typedef struct
    279279{
    280     psElemType type;            ///< Primitive type.
    281     psDimen dimen;              ///< Dimensionality.
     280    psElemType type;                   ///< Primitive type.
     281    psDimen dimen;                     ///< Dimensionality.
    282282}
    283283psType;
     284
     285typedef struct
     286{
     287    psElemType type;                   ///< The type
     288    psDimen dimen;                     ///< The dimensionality.
     289    //    psElemType type;                   ///< The type
     290}
     291psMathType;
    284292
    285293/** The type of a basic data type
     
    291299typedef struct
    292300{
    293     psType type;              ///< Data type information
     301    psMathType type;              ///< Data type information
    294302}
    295303psMath;
  • trunk/psLib/test/collections/tst_psVector.c

    r4212 r4493  
    1414 *  @author  Ross Harman, MHPCC
    1515 *
    16  *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
    17  *  @date  $Date: 2005-06-10 21:46:46 $
     16 *  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
     17 *  @date  $Date: 2005-07-07 02:17:53 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5454    }
    5555    if (psVec->nalloc != 5) {
    56         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     56        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    5757        return 1;
    5858    }
    5959    if (psVec->n != psVec->nalloc) {
    60         fprintf(stderr,"Vector population = %d\n", psVec->n);
     60        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    6161        return 2;
    6262    }
     
    8282    }
    8383    if (vecZero->nalloc != 0) {
    84         fprintf(stderr,"Vector size = %d\n", vecZero->nalloc);
     84        fprintf(stderr,"Vector size = %ld\n", vecZero->nalloc);
    8585        return 6;
    8686    }
    8787    if (vecZero->n != vecZero->nalloc) {
    88         fprintf(stderr,"Vector population = %d\n", vecZero->n);
     88        fprintf(stderr,"Vector population = %ld\n", vecZero->n);
    8989        return 7;
    9090    }
     
    122122    }
    123123    if (psVec->nalloc != 10) {
    124         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     124        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    125125        return 1;
    126126    }
    127127    if (psVec->n != 5) {
    128         fprintf(stderr,"Vector population = %d\n", psVec->n);
     128        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    129129        return 2;
    130130    }
     
    158158    }
    159159    if (psVec->nalloc != 3) {
    160         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     160        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    161161        return 10;
    162162    }
    163163    if (psVec->n != 3) {
    164         fprintf(stderr,"Vector population = %d\n", psVec->n);
     164        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    165165        return 11;
    166166    }
     
    179179    }
    180180    if (psVec->nalloc != 0) {
    181         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     181        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    182182        return 21;
    183183    }
    184184    if (psVec->n != 0) {
    185         fprintf(stderr,"Vector population = %d\n", psVec->n);
     185        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    186186        return 22;
    187187    }
     
    216216    }
    217217    if (psVec->nalloc != 5) { // no growth should occur
    218         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     218        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    219219        return 3;
    220220    }
    221221    if (psVec->n != 2) {
    222         fprintf(stderr,"Vector population = %d\n", psVec->n);
     222        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    223223        return 4;
    224224    }
     
    230230    }
    231231    if (psVec->nalloc != 15) { // growth should occur
    232         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     232        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    233233        return 11;
    234234    }
    235235    if (psVec->n != 4) {
    236         fprintf(stderr,"Vector population = %d\n", psVec->n);
     236        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    237237        return 12;
    238238    }
     
    244244    }
    245245    if (psVec->nalloc != 15) { // no growth
    246         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     246        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    247247        return 21;
    248248    }
    249249    if (psVec->n != 2) {
    250         fprintf(stderr,"Vector population = %d\n", psVec->n);
     250        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    251251        return 22;
    252252    }
     
    258258    }
    259259    if (psVec->nalloc != 15) { // no growth
    260         fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
     260        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
    261261        return 31;
    262262    }
    263263    if (psVec->n != 0) {
    264         fprintf(stderr,"Vector population = %d\n", psVec->n);
     264        fprintf(stderr,"Vector population = %ld\n", psVec->n);
    265265        return 32;
    266266    }
  • trunk/psLib/test/dataManip/tst_psHist00.c

    r3682 r4493  
    4040
    4141        if (myHist->nums->n != numBins) {
    42             printf("ERROR: myHist->nums->n is wrong size (%d)\n", myHist->nums->n);
     42            printf("ERROR: myHist->nums->n is wrong size (%ld)\n", myHist->nums->n);
    4343            testStatus = false;
    4444        }
    4545
    4646        if (myHist->bounds->n != numBins+1) {
    47             printf("ERROR: myHist->bounds->n is wrong size (%d)\n", myHist->bounds->n);
     47            printf("ERROR: myHist->bounds->n is wrong size (%ld)\n", myHist->bounds->n);
    4848            testStatus = false;
    4949        }
  • trunk/psLib/test/dataManip/tst_psHist01.c

    r3682 r4493  
    4646
    4747        if (myHist->nums->n != numBins) {
    48             printf("ERROR: myHist->nums->n is wrong size (%d)\n", myHist->nums->n);
     48            printf("ERROR: myHist->nums->n is wrong size (%ld)\n", myHist->nums->n);
    4949            testStatus = false;
    5050        }
    5151
    5252        if (myHist->bounds->n != numBins+1) {
    53             printf("ERROR: myHist->bounds->n is wrong size (%d)\n", myHist->bounds->n);
     53            printf("ERROR: myHist->bounds->n is wrong size (%ld)\n", myHist->bounds->n);
    5454            testStatus = false;
    5555        }
  • trunk/psLib/test/dataManip/tst_psHist03.c

    r3682 r4493  
    5757
    5858        if (myHist->nums->n != numBins) {
    59             printf("ERROR: myHist->nums->n is wrong size (%d)\n", myHist->nums->n);
     59            printf("ERROR: myHist->nums->n is wrong size (%ld)\n", myHist->nums->n);
    6060            testStatus = false;
    6161        }
    6262
    6363        if (myHist->bounds->n != numBins+1) {
    64             printf("ERROR: myHist->bounds->n is wrong size (%d)\n", myHist->bounds->n);
     64            printf("ERROR: myHist->bounds->n is wrong size (%ld)\n", myHist->bounds->n);
    6565            testStatus = false;
    6666        }
Note: See TracChangeset for help on using the changeset viewer.