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.

Location:
trunk/psLib/test/dataManip
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/tst_psFunc00.c

    r1985 r2204  
    2222#define CN 6
    2323#define DN 8
    24 int main()
     24psS32 main()
    2525{
    2626    psPolynomial1D *my1DPoly = NULL;
     
    3232    psDPolynomial3D *my3DPolyD = NULL;
    3333    psDPolynomial4D *my4DPolyD = NULL;
    34     int testStatus      = true;
    35     int memLeaks        = 0;
    36     int a               = 0;
    37     int b               = 0;
    38     int c               = 0;
    39     int d               = 0;
    40     int currentId       = 0;
     34    psS32 testStatus      = true;
     35    psS32 memLeaks        = 0;
     36    psS32 a               = 0;
     37    psS32 b               = 0;
     38    psS32 c               = 0;
     39    psS32 d               = 0;
     40    psS32 currentId       = 0;
    4141
    4242    currentId       = psMemGetId();
  • trunk/psLib/test/dataManip/tst_psFunc01.c

    r1811 r2204  
    1313#define MY_STDEV 2.0
    1414#define N 30
    15 int main()
     15psS32 main()
    1616{
    17     int testStatus = true;
     17    psS32 testStatus = true;
    1818    float x = 0.0;
    19     int  memLeaks;
    20     int  currentId = psMemGetId();
     19    psS32  memLeaks;
     20    psS32  currentId = psMemGetId();
    2121    psVector *myGaussData = NULL;
    2222    printPositiveTestHeader(stdout,
     
    5252
    5353    myGaussData = psGaussianDev(MY_MEAN, MY_STDEV, N);
    54     for (int i = 0; i < N ; i++) {
     54    for (psS32 i = 0; i < N ; i++) {
    5555        printf("Gaussian Deviate [%d] is %f\n", i, myGaussData->data.F32[i]);
    5656    }
  • trunk/psLib/test/dataManip/tst_psFunc02.c

    r1946 r2204  
    1414#define CUBIC 3
    1515
    16 int main()
     16psS32 main()
    1717{
    18     int testStatus = true;
    19     int memLeaks=0;
    20     int i;
    21     int  currentId = psMemGetId();
     18    psS32 testStatus = true;
     19    psS32 memLeaks=0;
     20    psS32 i;
     21    psS32  currentId = psMemGetId();
    2222    psSpline1D *tmpSpline;
    2323
  • trunk/psLib/test/dataManip/tst_psFunc03.c

    r1946 r2204  
    1515#define CUBIC 3
    1616
    17 int main()
     17psS32 main()
    1818{
    19     int testStatus = true;
    20     int memLeaks=0;
    21     int i;
    22     int  currentId = psMemGetId();
     19    psS32 testStatus = true;
     20    psS32 memLeaks=0;
     21    psS32 i;
     22    psS32  currentId = psMemGetId();
    2323    psSpline1D *tmpSpline;
    2424    psVector *bounds;
  • trunk/psLib/test/dataManip/tst_psFunc04.c

    r1982 r2204  
    1717#define N 8
    1818
    19 int t00()
     19psS32 t00()
    2020{
    21     int testStatus = true;
    22     int memLeaks=0;
    23     int i;
     21    psS32 testStatus = true;
     22    psS32 memLeaks=0;
     23    psS32 i;
    2424    float x;
    2525    float y;
    26     int  currentId = psMemGetId();
     26    psS32  currentId = psMemGetId();
    2727    psSpline1D *tmpSpline;
    2828    psVector *data;
     
    6969}
    7070
    71 int t01()
     71psS32 t01()
    7272{
    73     int testStatus = true;
    74     int memLeaks=0;
    75     int i;
     73    psS32 testStatus = true;
     74    psS32 memLeaks=0;
     75    psS32 i;
    7676    float x;
    7777    float y;
    78     int  currentId = psMemGetId();
     78    psS32  currentId = psMemGetId();
    7979    psSpline1D *tmpSpline;
    8080    psVector *data;
     
    121121}
    122122
    123 int main()
     123psS32 main()
    124124{
    125125    t00();
  • trunk/psLib/test/dataManip/tst_psFunc05.c

    r1991 r2204  
    1818#define SPLINE_ORDER 1
    1919
    20 int main()
     20psS32 main()
    2121{
    22     int testStatus = true;
    23     int memLeaks=0;
    24     int i;
    25     int  currentId = psMemGetId();
     22    psS32 testStatus = true;
     23    psS32 memLeaks=0;
     24    psS32 i;
     25    psS32  currentId = psMemGetId();
    2626    psSpline1D *tmpSpline;
    2727    psVector *data;
  • trunk/psLib/test/dataManip/tst_psFunc07.c

    r1985 r2204  
    3232}
    3333
    34 int t00()
     34psS32 t00()
    3535{
    36     int testStatus = true;
    37     int memLeaks=0;
    38     int  currentId = psMemGetId();
    39     int i;
     36    psS32 testStatus = true;
     37    psS32 memLeaks=0;
     38    psS32  currentId = psMemGetId();
     39    psS32 i;
    4040    psSpline1D *tmpSpline = NULL;
    4141    psVector *x = NULL;
     
    101101
    102102// This is the F64 version of the above test code.
    103 int t01()
     103psS32 t01()
    104104{
    105     int testStatus = true;
    106     int memLeaks=0;
    107     int  currentId = psMemGetId();
    108     int i;
     105    psS32 testStatus = true;
     106    psS32 memLeaks=0;
     107    psS32  currentId = psMemGetId();
     108    psS32 i;
    109109    psSpline1D *tmpSpline = NULL;
    110110    psVector *x = NULL;
     
    169169}
    170170
    171 int main()
     171psS32 main()
    172172{
    173173    t00();
  • trunk/psLib/test/dataManip/tst_psHist00.c

    r1811 r2204  
    1010#define UPPER 30.0
    1111
    12 int main()
     12psS32 main()
    1313{
    1414    psHistogram *myHist = NULL;
    15     int testStatus      = true;
    16     int memLeaks        = 0;
    17     int i               = 0;
    18     int nb              = 0;
    19     int numBins         = 0;
    20     int currentId       = 0;
     15    psS32 testStatus      = true;
     16    psS32 memLeaks        = 0;
     17    psS32 i               = 0;
     18    psS32 nb              = 0;
     19    psS32 numBins         = 0;
     20    psS32 currentId       = 0;
    2121
    2222    currentId       = psMemGetId();
  • trunk/psLib/test/dataManip/tst_psHist01.c

    r1811 r2204  
    1010#define UPPER 30.0
    1111
    12 int main()
     12psS32 main()
    1313{
    1414    psHistogram *myHist = NULL;
    1515    psVector *myBounds  = NULL;
    16     int testStatus      = true;
    17     int memLeaks        = 0;
    18     int i               = 0;
    19     int nb              = 0;
    20     int numBins         = 0;
    21     int currentId       = 0;
     16    psS32 testStatus      = true;
     17    psS32 memLeaks        = 0;
     18    psS32 i               = 0;
     19    psS32 nb              = 0;
     20    psS32 numBins         = 0;
     21    psS32 currentId       = 0;
    2222
    2323    currentId       = psMemGetId();
  • trunk/psLib/test/dataManip/tst_psHist02.c

    r1811 r2204  
    1414#define NUM_DATA 10000
    1515
    16 int main()
     16psS32 main()
    1717{
    1818    psHistogram * myHist = NULL;
     
    2020    psVector *myData = NULL;
    2121    psVector *myMask = NULL;
    22     int testStatus = true;
    23     int memLeaks = 0;
    24     int nb = 0;
    25     int numBins = 0;
    26     int i = 0;
    27     int currentId = 0;
     22    psS32 testStatus = true;
     23    psS32 memLeaks = 0;
     24    psS32 nb = 0;
     25    psS32 numBins = 0;
     26    psS32 i = 0;
     27    psS32 currentId = 0;
    2828
    2929    currentId = psMemGetId();
  • trunk/psLib/test/dataManip/tst_psHist03.c

    r1824 r2204  
    1212#define NUM_DATA 20
    1313
    14 int main()
     14psS32 main()
    1515{
    1616    psHistogram *myHist = NULL;
    1717    psVector *myBounds  = NULL;
    1818    psVector *myData = psVectorAlloc( NUM_DATA, PS_TYPE_F32 );
    19     int testStatus      = true;
    20     int memLeaks        = 0;
    21     int i               = 0;
    22     int nb              = 0;
    23     int numBins         = 0;
    24     int currentId       = 0;
     19    psS32 testStatus      = true;
     20    psS32 memLeaks        = 0;
     21    psS32 i               = 0;
     22    psS32 nb              = 0;
     23    psS32 numBins         = 0;
     24    psS32 currentId       = 0;
    2525
    2626    currentId       = psMemGetId();
  • trunk/psLib/test/dataManip/tst_psMatrix01.c

    r1406 r2204  
    1111*  @author  Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
    14 *  @date  $Date: 2004-08-06 22:34:06 $
     13*  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
     14*  @date  $Date: 2004-10-27 00:57:33 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222
    2323#define PRINT_MATRIX(IMAGE)                         \
    24 for(int i=IMAGE->numRows-1; i>-1; i--) {        \
    25     for(int j=0; j<IMAGE->numCols; j++) {       \
     24for(psS32 i=IMAGE->numRows-1; i>-1; i--) {        \
     25    for(psS32 j=0; j<IMAGE->numCols; j++) {       \
    2626        printf("%f ", IMAGE->data.F64[i][j]);   \
    2727    }                                          \
     
    2929}
    3030
    31 int main( int argc,
    32           char* argv[] )
     31psS32 main( psS32 argc,
     32            char* argv[] )
    3333{
    3434    psImage * tempImage = NULL;
     
    7979    psFree( outImage );
    8080    psFree( outImageNull );
    81     int nLeaks = psMemCheckLeaks( 0, NULL, stdout );
     81    psS32 nLeaks = psMemCheckLeaks( 0, NULL, stdout );
    8282    if ( nLeaks != 0 ) {
    8383        printf( "ERROR: Found %d memory leaks\n", nLeaks );
    8484    }
    85     int nBad = psMemCheckCorruption( 0 );
     85    psS32 nBad = psMemCheckCorruption( 0 );
    8686    if ( nBad ) {
    8787        printf( "ERROR: Found %d bad memory blocks\n", nBad );
  • trunk/psLib/test/dataManip/tst_psMatrix02.c

    r1406 r2204  
    1313 *  @author  Ross Harman, MHPCC
    1414 *
    15  *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
    16  *  @date  $Date: 2004-08-06 22:34:06 $
     15 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
     16 *  @date  $Date: 2004-10-27 00:57:33 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323#include "psTest.h"
    2424
    25 int main(int argc,
    26          char* argv[])
     25psS32 main(psS32 argc,
     26           char* argv[])
    2727{
    2828    psImage *nullImage = NULL;
  • trunk/psLib/test/dataManip/tst_psMatrix03.c

    r1406 r2204  
    1414 *  @author  Ross Harman, MHPCC
    1515 *
    16  *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
    17  *  @date  $Date: 2004-08-06 22:34:06 $
     16 *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
     17 *  @date  $Date: 2004-10-27 00:57:33 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2525
    2626#define PRINT_MATRIX(IMAGE)                     \
    27 for(int i=IMAGE->numRows-1; i>-1; i--) {        \
    28     for(int j=0; j<IMAGE->numCols; j++) {       \
     27for(psS32 i=IMAGE->numRows-1; i>-1; i--) {        \
     28    for(psS32 j=0; j<IMAGE->numCols; j++) {       \
    2929        printf("%f ", IMAGE->data.F64[i][j]);   \
    3030    }                                           \
     
    3333\
    3434#define PRINT_VECTOR(VECTOR)                    \
    35 for(int i=0; i<VECTOR->n; i++) {                \
     35for(psS32 i=0; i<VECTOR->n; i++) {                \
    3636    printf("%f\n", VECTOR->data.F64[i]);        \
    3737}
    3838
    3939
    40 int main(int argc,
    41          char* argv[])
     40psS32 main(psS32 argc,
     41           char* argv[])
    4242{
    4343    psImage *luImage = NULL;
     
    112112    psFree(inVector);
    113113    psMemCheckLeaks(0, NULL, stdout);
    114     int nBad = psMemCheckCorruption(0);
     114    psS32 nBad = psMemCheckCorruption(0);
    115115    if(nBad) {
    116116        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/dataManip/tst_psMatrix04.c

    r1406 r2204  
    1313 *  @author  Ross Harman, MHPCC
    1414 *
    15  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    16  *  @date  $Date: 2004-08-06 22:34:06 $
     15 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     16 *  @date  $Date: 2004-10-27 00:57:33 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2424
    2525#define PRINT_MATRIX(IMAGE)                         \
    26 for(int i=IMAGE->numRows-1; i>-1; i--) {            \
    27     for(int j=0; j<IMAGE->numCols; j++) {           \
     26for(psS32 i=IMAGE->numRows-1; i>-1; i--) {            \
     27    for(psS32 j=0; j<IMAGE->numCols; j++) {           \
    2828        printf("%f ", IMAGE->data.F64[i][j]);       \
    2929    }                                               \
     
    3232
    3333
    34 int main(int argc,
    35          char* argv[])
     34psS32 main(psS32 argc,
     35           char* argv[])
    3636{
    3737    float det = 0.0f;
     
    8787    psFree(det2);
    8888    psMemCheckLeaks(0, NULL, stdout);
    89     int nBad = psMemCheckCorruption(0);
     89    psS32 nBad = psMemCheckCorruption(0);
    9090    if(nBad) {
    9191        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/dataManip/tst_psMatrix05.c

    r1406 r2204  
    1010*  @author  Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    13 *  @date  $Date: 2004-08-06 22:34:06 $
     12*  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     13*  @date  $Date: 2004-10-27 00:57:33 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2121
    2222#define PRINT_MATRIX(IMAGE)                         \
    23 for(int i=0; i<IMAGE->numRows; i++) {           \
    24     for(int j=0; j<IMAGE->numCols; j++) {       \
     23for(psS32 i=0; i<IMAGE->numRows; i++) {           \
     24    for(psS32 j=0; j<IMAGE->numCols; j++) {       \
    2525        printf("%f ", IMAGE->data.F64[i][j]);   \
    2626    }                                          \
     
    2929
    3030
    31 int main( int argc,
    32           char* argv[] )
     31psS32 main( psS32 argc,
     32            char* argv[] )
    3333{
    3434    psImage * outImage = NULL;
     
    6868    psFree( inImage1 );
    6969    psFree( inImage2 );
    70     int nLeaks = psMemCheckLeaks( 0, NULL, stdout );
     70    psS32 nLeaks = psMemCheckLeaks( 0, NULL, stdout );
    7171    if ( nLeaks != 0 ) {
    7272        printf( "ERROR: Found %d memory leaks\n", nLeaks );
    7373    }
    74     int nBad = psMemCheckCorruption( 0 );
     74    psS32 nBad = psMemCheckCorruption( 0 );
    7575    if ( nBad ) {
    7676        printf( "ERROR: Found %d bad memory blocks\n", nBad );
  • trunk/psLib/test/dataManip/tst_psMatrix06.c

    r1406 r2204  
    1010*  @author  Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    13 *  @date  $Date: 2004-08-06 22:34:06 $
     12*  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     13*  @date  $Date: 2004-10-27 00:57:33 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2121
    2222#define PRINT_MATRIX(IMAGE)                         \
    23 for(int i=0; i<IMAGE->numRows; i++) {           \
    24     for(int j=0; j<IMAGE->numCols; j++) {       \
     23for(psS32 i=0; i<IMAGE->numRows; i++) {           \
     24    for(psS32 j=0; j<IMAGE->numCols; j++) {       \
    2525        printf("%f ", IMAGE->data.F64[i][j]);   \
    2626    }                                          \
     
    2929
    3030
    31 int main( int argc,
    32           char* argv[] )
     31psS32 main( psS32 argc,
     32            char* argv[] )
    3333{
    3434    psImage * outImage = NULL;
     
    7676    psFree( outImage );
    7777    psFree( inImage );
    78     int nLeaks = psMemCheckLeaks( 0, NULL, stdout );
     78    psS32 nLeaks = psMemCheckLeaks( 0, NULL, stdout );
    7979    if ( nLeaks != 0 ) {
    8080        printf( "ERROR: Found %d memory leaks\n", nLeaks );
    8181    }
    82     int nBad = psMemCheckCorruption( 0 );
     82    psS32 nBad = psMemCheckCorruption( 0 );
    8383    if ( nBad ) {
    8484        printf( "ERROR: Found %d bad memory blocks\n", nBad );
  • trunk/psLib/test/dataManip/tst_psMatrix07.c

    r1406 r2204  
    1616 *  @author  Ross Harman, MHPCC
    1717 *
    18  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    19  *  @date  $Date: 2004-08-06 22:34:06 $
     18 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     19 *  @date  $Date: 2004-10-27 00:57:33 $
    2020 *
    2121 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2727
    2828#define PRINT_MATRIX(IMAGE)                         \
    29 for(int i=0; i<IMAGE->numRows; i++) {               \
    30     for(int j=0; j<IMAGE->numCols; j++) {           \
     29for(psS32 i=0; i<IMAGE->numRows; i++) {               \
     30    for(psS32 j=0; j<IMAGE->numCols; j++) {           \
    3131        printf("%f ", IMAGE->data.F64[i][j]);       \
    3232    }                                               \
     
    3535
    3636#define PRINT_VECTOR(VECTOR)                        \
    37 for(int i=0; i<VECTOR->n; i++) {                    \
     37for(psS32 i=0; i<VECTOR->n; i++) {                    \
    3838    printf("%f\n", VECTOR->data.F64[i]);            \
    3939}
    4040
    4141
    42 int main(int argc,
    43          char* argv[])
     42psS32 main(psS32 argc,
     43           char* argv[])
    4444{
    4545    psVector *v1 = NULL;
     
    169169    psFree(badImage);
    170170    psMemCheckLeaks(0, NULL, stdout);
    171     int nBad = psMemCheckCorruption(0);
     171    psS32 nBad = psMemCheckCorruption(0);
    172172    if(nBad) {
    173173        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic01.c

    r1648 r2204  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-08-27 23:31:22 $
     12 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2004-10-27 00:57:33 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2424    printf("%f+%fi ", creal(SCALAR->data.TYPE), cimag(SCALAR->data.TYPE));                               \
    2525} else if(PS_IS_PSELEMTYPE_INT(SCALAR->type.type)) {                                                     \
    26     printf("%d ", (int)SCALAR->data.TYPE);                                                               \
     26    printf("%d ", (psS32)SCALAR->data.TYPE);                                                               \
    2727} else {                                                                                                 \
    2828    printf("%f ", (double)SCALAR->data.TYPE);                                                            \
     
    3131
    3232#define PRINT_VECTOR(VECTOR,TYPE)                                                                            \
    33 for(int i=0; i<VECTOR->n; i++) {                                                                         \
     33for(psS32 i=0; i<VECTOR->n; i++) {                                                                         \
    3434    if(PS_IS_PSELEMTYPE_COMPLEX(VECTOR->type.type)) {                                                    \
    3535        printf("%f+%fi ", creal(VECTOR->data.TYPE[i]), cimag(VECTOR->data.TYPE[i]));                     \
    3636    } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                 \
    37         printf("%d ", (int)VECTOR->data.TYPE[i]);                                                        \
     37        printf("%d ", (psS32)VECTOR->data.TYPE[i]);                                                        \
    3838    } else {                                                                                             \
    3939        printf("%f ", (double)VECTOR->data.TYPE[i]);                                                     \
     
    4444
    4545#define PRINT_MATRIX(IMAGE,TYPE)                                                                             \
    46 for(int i=IMAGE->numRows-1; i>-1; i--) {                                                                 \
    47     for(int j=0; j<IMAGE->numCols; j++) {                                                                \
     46for(psS32 i=IMAGE->numRows-1; i>-1; i--) {                                                                 \
     47    for(psS32 j=0; j<IMAGE->numCols; j++) {                                                                \
    4848        if(PS_IS_PSELEMTYPE_COMPLEX(IMAGE->type.type)) {                                                 \
    4949            printf("%f+%fi ", creal(IMAGE->data.TYPE[i][j]), cimag(IMAGE->data.TYPE[i][j]));             \
    5050        } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                              \
    51             printf("%d ", (int)IMAGE->data.TYPE[i][j]);                                                  \
     51            printf("%d ", (psS32)IMAGE->data.TYPE[i][j]);                                                  \
    5252        } else {                                                                                         \
    5353            printf("%f ", (double)IMAGE->data.TYPE[i][j]);                                               \
     
    6161#define CREATE_AND_SET_VECTOR(NAME,TYPE,VALUE,SIZE)                                                          \
    6262psVector *NAME = (psVector*)psVectorAlloc(SIZE, PS_TYPE_##TYPE);                                         \
    63 for(int i=0; i<SIZE; i++) {                                                                              \
     63for(psS32 i=0; i<SIZE; i++) {                                                                              \
    6464    NAME->data.TYPE[i] = VALUE;                                                                          \
    6565}                                                                                                        \
     
    6969#define CREATE_AND_SET_IMAGE(NAME,TYPE,VALUE,NROWS,NCOLS)                                                    \
    7070psImage *NAME = (psImage*)psImageAlloc(NCOLS,NROWS,PS_TYPE_##TYPE);                                      \
    71 for(int i=0; i<NAME->numRows; i++) {                                                                     \
    72     for(int j=0; j<NAME->numCols; j++) {                                                                 \
     71for(psS32 i=0; i<NAME->numRows; i++) {                                                                     \
     72    for(psS32 j=0; j<NAME->numCols; j++) {                                                                 \
    7373        NAME->data.TYPE[i][j] = VALUE;                                                                   \
    7474    }                                                                                                    \
     
    7878#define CHECK_MEMORY                                                                                         \
    7979psMemCheckLeaks(0, NULL, stdout);                                                                        \
    80 int nBad = psMemCheckCorruption(0);                                                                      \
     80psS32 nBad = psMemCheckCorruption(0);                                                                      \
    8181if(nBad) {                                                                                               \
    8282    printf("ERROR: Found %d bad memory blocks\n", nBad);                                                 \
     
    8484
    8585
    86 int main(int argc, char* argv[])
     86psS32 main(psS32 argc, char* argv[])
    8787{
    8888
  • trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c

    r2057 r2204  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-10-12 20:50:40 $
     12 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2004-10-27 00:57:33 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2424
    2525#define CHECK_VECTOR(VECTOR,TYPE,TRUTH)                                                                      \
    26 for(int i=0; i<VECTOR->n; i++) {                                                                             \
     26for(psS32 i=0; i<VECTOR->n; i++) {                                                                             \
    2727    if(cabs(VECTOR->data.TYPE[i])-cabs(TRUTH) > FLT_EPSILON){                                                \
    2828        printf("ERROR:Truth and calculated values don't match for vector operation:\n");                     \
     
    3131            printf("Calculated: %.2f%+.2fi\n", creal(TRUTH), cimag(TRUTH));                                  \
    3232        } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                 \
    33             printf("Truth: %d\n", (int)(VECTOR->data.TYPE[i]));                                              \
    34             printf("Calculated: %d\n", (int)(TRUTH));                                                        \
     33            printf("Truth: %d\n", (psS32)(VECTOR->data.TYPE[i]));                                              \
     34            printf("Calculated: %d\n", (psS32)(TRUTH));                                                        \
    3535        } else {                                                                                             \
    3636            printf("Truth: %.2f\n", (double)(VECTOR->data.TYPE[i]));                                         \
     
    4343
    4444#define CHECK_MATRIX(IMAGE,TYPE,TRUTH)                                                                       \
    45 for(int i=IMAGE->numRows-1; i>-1; i--) {                                                                     \
    46     for(int j=0; j<IMAGE->numCols; j++) {                                                                    \
     45for(psS32 i=IMAGE->numRows-1; i>-1; i--) {                                                                     \
     46    for(psS32 j=0; j<IMAGE->numCols; j++) {                                                                    \
    4747        if(cabs(IMAGE->data.TYPE[i][j])-cabs(TRUTH) > FLT_EPSILON){                                          \
    4848            printf("ERROR:Truth and calculated values don't match for matrix operation:\n");                 \
     
    5151                printf("Calculated: %.2f%+.2fi\n", creal(TRUTH), cimag(TRUTH));                              \
    5252            } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                              \
    53                 printf("Truth: %d\n", (int)(IMAGE->data.TYPE[i][j]));                                        \
    54                 printf("Calculated: %d\n", (int)(TRUTH));                                                    \
     53                printf("Truth: %d\n", (psS32)(IMAGE->data.TYPE[i][j]));                                        \
     54                printf("Calculated: %d\n", (psS32)(TRUTH));                                                    \
    5555            } else {                                                                                         \
    5656                printf("Truth: %.2f\n", (double)(IMAGE->data.TYPE[i][j]));                                   \
     
    6666#define CREATE_AND_SET_VECTOR(NAME,TYPE,VALUE,SIZE)                                                          \
    6767psVector *NAME = (psVector*)psVectorAlloc(SIZE, PS_TYPE_##TYPE);                                             \
    68 for(int i=0; i<SIZE; i++) {                                                                                  \
     68for(psS32 i=0; i<SIZE; i++) {                                                                                  \
    6969    NAME->data.TYPE[i] = VALUE;                                                                              \
    7070}                                                                                                            \
     
    7474#define CREATE_AND_SET_IMAGE(NAME,TYPE,VALUE,NROWS,NCOLS)                                                    \
    7575psImage *NAME = (psImage*)psImageAlloc(NCOLS,NROWS,PS_TYPE_##TYPE);                                          \
    76 for(int i=0; i<NAME->numRows; i++) {                                                                         \
    77     for(int j=0; j<NAME->numCols; j++) {                                                                     \
     76for(psS32 i=0; i<NAME->numRows; i++) {                                                                         \
     77    for(psS32 j=0; j<NAME->numCols; j++) {                                                                     \
    7878        NAME->data.TYPE[i][j] = VALUE;                                                                       \
    7979    }                                                                                                        \
     
    8686    return 50; \
    8787} \
    88 int nBad = psMemCheckCorruption(0); \
     88psS32 nBad = psMemCheckCorruption(0); \
    8989if(nBad) { \
    9090    psError(__func__,"ERROR: Found %d bad memory blocks\n", nBad); \
     
    9393
    9494
    95 int main( int argc, char* argv[] )
     95psS32 main( psS32 argc, char* argv[] )
    9696{
    9797
  • trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c

    r2053 r2204  
    1515 *  @author  Ross Harman, MHPCC
    1616 *
    17  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    18  *  @date  $Date: 2004-10-12 19:18:20 $
     17 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     18 *  @date  $Date: 2004-10-27 00:57:33 $
    1919 *
    2020 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2727
    2828#define PRINT_VECTOR(VECTOR,TYPE)                                                                            \
    29 for(int i=0; i<VECTOR->n; i++) {                                                                         \
     29for(psS32 i=0; i<VECTOR->n; i++) {                                                                         \
    3030    if(PS_IS_PSELEMTYPE_COMPLEX(VECTOR->type.type)) {                                                    \
    3131        printf("%f+%fi ", creal(VECTOR->data.TYPE[i]), cimag(VECTOR->data.TYPE[i]));                     \
    3232    } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                 \
    33         printf("%d ", (int)VECTOR->data.TYPE[i]);                                                        \
     33        printf("%d ", (psS32)VECTOR->data.TYPE[i]);                                                        \
    3434    } else {                                                                                             \
    3535        printf("%f ", (double)VECTOR->data.TYPE[i]);                                                     \
     
    4040
    4141#define PRINT_MATRIX(IMAGE,TYPE)                                                                             \
    42 for(int i=IMAGE->numRows-1; i>-1; i--) {                                                                 \
    43     for(int j=0; j<IMAGE->numCols; j++) {                                                                \
     42for(psS32 i=IMAGE->numRows-1; i>-1; i--) {                                                                 \
     43    for(psS32 j=0; j<IMAGE->numCols; j++) {                                                                \
    4444        if(PS_IS_PSELEMTYPE_COMPLEX(IMAGE->type.type)) {                                                 \
    4545            printf("%f+%fi ", creal(IMAGE->data.TYPE[i][j]), cimag(IMAGE->data.TYPE[i][j]));             \
    4646        } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                              \
    47             printf("%d ", (int)IMAGE->data.TYPE[i][j]);                                                  \
     47            printf("%d ", (psS32)IMAGE->data.TYPE[i][j]);                                                  \
    4848        } else {                                                                                         \
    4949            printf("%f ", (double)IMAGE->data.TYPE[i][j]);                                               \
     
    5757#define CREATE_AND_SET_VECTOR(NAME,TYPE,VALUE,SIZE)                                                          \
    5858psVector *NAME = (psVector*)psVectorAlloc(SIZE, PS_TYPE_##TYPE);                                         \
    59 for(int i=0; i<SIZE; i++) {                                                                              \
     59for(psS32 i=0; i<SIZE; i++) {                                                                              \
    6060    NAME->data.TYPE[i] = VALUE;                                                                          \
    6161}                                                                                                        \
     
    6565#define CREATE_AND_SET_IMAGE(NAME,TYPE,VALUE,NROWS,NCOLS)                                                    \
    6666psImage *NAME = (psImage*)psImageAlloc(NCOLS,NROWS,PS_TYPE_##TYPE);                                      \
    67 for(int i=0; i<NAME->numRows; i++) {                                                                     \
    68     for(int j=0; j<NAME->numCols; j++) {                                                                 \
     67for(psS32 i=0; i<NAME->numRows; i++) {                                                                     \
     68    for(psS32 j=0; j<NAME->numCols; j++) {                                                                 \
    6969        NAME->data.TYPE[i][j] = VALUE;                                                                   \
    7070    }                                                                                                    \
     
    7272
    7373
    74 int main(int argc, char* argv[])
     74psS32 main(psS32 argc, char* argv[])
    7575{
    7676    CREATE_AND_SET_IMAGE(image1,F64,0,3,3);
  • trunk/psLib/test/dataManip/tst_psMinimize00.c

    r1811 r2204  
    3636float myFuncDeriv(const psVector *restrict myData,
    3737                  const psVector *restrict myParams,
    38                   int whichParamDeriv)
     38                  psS32 whichParamDeriv)
    3939{
    4040    float x = myData->data.F32[0];
     
    6565
    6666
    67 int main()
     67psS32 main()
    6868{
    6969    psImage *domain = NULL;
     
    7474    psVector *tmpVecPtr = NULL;
    7575    float chiSq = 0.0;
    76     int i = 0;
    77     int j = 0;
    78     int currentId = psMemGetId();
    79     int testStatus = true;
    80     int memLeaks = 0;
     76    psS32 i = 0;
     77    psS32 j = 0;
     78    psS32 currentId = psMemGetId();
     79    psS32 testStatus = true;
     80    psS32 memLeaks = 0;
    8181    psVector *theParams = NULL;
    8282
  • trunk/psLib/test/dataManip/tst_psMinimize01.c

    r1811 r2204  
    3535float myFuncDeriv(const psVector *restrict myData,
    3636                  const psVector *restrict myParams,
    37                   int whichParamDeriv)
     37                  psS32 whichParamDeriv)
    3838{
    3939    float x = myData->data.F32[0];
     
    5858}
    5959
    60 int main()
     60psS32 main()
    6161{
    6262    psImage *domain = NULL;
     
    6767    psVector *tmpVecPtr = NULL;
    6868    float chiSq = 0.0;
    69     int i = 0;
     69    psS32 i = 0;
    7070    psVector *theParams = NULL;
    71     int currentId = psMemGetId();
    72     int testStatus = true;
    73     int memLeaks = 0;
     71    psS32 currentId = psMemGetId();
     72    psS32 testStatus = true;
     73    psS32 memLeaks = 0;
    7474
    7575    domain = psImageAlloc(DATA_WIDTH, NUM_DATA, PS_TYPE_F32);
  • trunk/psLib/test/dataManip/tst_psMinimize02.c

    r1811 r2204  
    3434float myFuncDeriv0(const psVector *restrict myParams,
    3535                   const psVector *restrict myCoords,
    36                    int whichParamDeriv)
     36                   psS32 whichParamDeriv)
    3737{
    3838    float P0 = myCoords->data.F32[0];
     
    7575float myFuncDeriv(const psVector *restrict myParams,
    7676                  const psVector *restrict myCoords,
    77                   int whichParamDeriv)
     77                  psS32 whichParamDeriv)
    7878{
    7979    float x = myCoords->data.F32[0];
     
    104104
    105105
    106 int main()
     106psS32 main()
    107107{
    108108    psVector *initialGuess = NULL;
    109109    psVector *paramMask = NULL;
    110110    psVector *coord = NULL;
    111     int i = 0;
    112     int currentId = psMemGetId();
    113     int testStatus = true;
    114     int memLeaks = 0;
     111    psS32 i = 0;
     112    psS32 currentId = psMemGetId();
     113    psS32 testStatus = true;
     114    psS32 memLeaks = 0;
    115115    psVector *theParams = NULL;
    116116
  • trunk/psLib/test/dataManip/tst_psMinimize03.c

    r1811 r2204  
    3434float myFuncDeriv0(const psVector *restrict myParams,
    3535                   const psVector *restrict myCoords,
    36                    int whichParamDeriv)
     36                   psS32 whichParamDeriv)
    3737{
    3838    float P0 = myCoords->data.F32[0];
     
    7575float myFuncDeriv(const psVector *restrict myParams,
    7676                  const psVector *restrict myCoords,
    77                   int whichParamDeriv)
     77                  psS32 whichParamDeriv)
    7878{
    7979    float x = myCoords->data.F32[0];
     
    104104
    105105
    106 int main()
     106psS32 main()
    107107{
    108108    psVector *initialGuess = NULL;
    109109    psVector *paramMask = NULL;
    110110    psVector *coord = NULL;
    111     int i = 0;
    112     int currentId = psMemGetId();
    113     int testStatus = true;
    114     int memLeaks = 0;
     111    psS32 i = 0;
     112    psS32 currentId = psMemGetId();
     113    psS32 testStatus = true;
     114    psS32 memLeaks = 0;
    115115    psVector *theParams = NULL;
    116116
  • trunk/psLib/test/dataManip/tst_psMinimize04.c

    r2090 r2204  
    3333}
    3434
    35 int t00()
     35psS32 t00()
    3636{
    3737    psPolynomial1D *myPoly = NULL;
     
    3939    psVector *y = NULL;
    4040    psVector *yErr = NULL;
    41     int i = 0;
    42     int currentId = psMemGetId();
    43     int testStatus = true;
    44     int memLeaks = 0;
     41    psS32 i = 0;
     42    psS32 currentId = psMemGetId();
     43    psS32 testStatus = true;
     44    psS32 memLeaks = 0;
    4545    double expectData;
    4646    double actualData;
     
    101101}
    102102
    103 int t01()
     103psS32 t01()
    104104{
    105105    psPolynomial1D *myPoly = NULL;
    106106    psVector *x = NULL;
    107107    psVector *y = NULL;
    108     int i = 0;
    109     int currentId = psMemGetId();
    110     int testStatus = true;
    111     int memLeaks = 0;
     108    psS32 i = 0;
     109    psS32 currentId = psMemGetId();
     110    psS32 testStatus = true;
     111    psS32 memLeaks = 0;
    112112    double expectData;
    113113    double actualData;
     
    164164}
    165165
    166 int t02()
     166psS32 t02()
    167167{
    168168    psPolynomial1D *myPoly = NULL;
    169169    psVector *y = NULL;
    170     int i = 0;
    171     int currentId = psMemGetId();
    172     int testStatus = true;
    173     int memLeaks = 0;
     170    psS32 i = 0;
     171    psS32 currentId = psMemGetId();
     172    psS32 testStatus = true;
     173    psS32 memLeaks = 0;
    174174    double expectData;
    175175    double actualData;
     
    223223}
    224224
    225 int t03()
    226 {
    227     int currentId = psMemGetId();
    228     int testStatus = true;
    229     int memLeaks = 0;
     225psS32 t03()
     226{
     227    psS32 currentId = psMemGetId();
     228    psS32 testStatus = true;
     229    psS32 memLeaks = 0;
    230230    psPolynomial1D *myPoly = NULL;
    231231
     
    257257
    258258
    259 int main()
     259psS32 main()
    260260{
    261261    t00();
  • trunk/psLib/test/dataManip/tst_psMinimize04_F32.c

    r2091 r2204  
    3333}
    3434
    35 int t00()
     35psS32 t00()
    3636{
    3737    psPolynomial1D *myPoly = NULL;
     
    3939    psVector *y = NULL;
    4040    psVector *yErr = NULL;
    41     int i = 0;
    42     int currentId = psMemGetId();
    43     int testStatus = true;
    44     int memLeaks = 0;
     41    psS32 i = 0;
     42    psS32 currentId = psMemGetId();
     43    psS32 testStatus = true;
     44    psS32 memLeaks = 0;
    4545    float expectData;
    4646    float actualData;
     
    100100}
    101101
    102 int t01()
     102psS32 t01()
    103103{
    104104    psPolynomial1D *myPoly = NULL;
    105105    psVector *x = NULL;
    106106    psVector *y = NULL;
    107     int i = 0;
    108     int currentId = psMemGetId();
    109     int testStatus = true;
    110     int memLeaks = 0;
     107    psS32 i = 0;
     108    psS32 currentId = psMemGetId();
     109    psS32 testStatus = true;
     110    psS32 memLeaks = 0;
    111111    float expectData;
    112112    float actualData;
     
    163163}
    164164
    165 int t02()
     165psS32 t02()
    166166{
    167167    psPolynomial1D *myPoly = NULL;
    168168    psVector *y = NULL;
    169     int i = 0;
    170     int currentId = psMemGetId();
    171     int testStatus = true;
    172     int memLeaks = 0;
     169    psS32 i = 0;
     170    psS32 currentId = psMemGetId();
     171    psS32 testStatus = true;
     172    psS32 memLeaks = 0;
    173173    float expectData;
    174174    float actualData;
     
    222222}
    223223
    224 int t03()
    225 {
    226     int currentId = psMemGetId();
    227     int testStatus = true;
    228     int memLeaks = 0;
     224psS32 t03()
     225{
     226    psS32 currentId = psMemGetId();
     227    psS32 testStatus = true;
     228    psS32 memLeaks = 0;
    229229
    230230    printPositiveTestHeader(stdout,
     
    251251
    252252
    253 int main()
     253psS32 main()
    254254{
    255255    t00();
  • trunk/psLib/test/dataManip/tst_psMinimize04b.c

    r2089 r2204  
    2626}
    2727
    28 int t00()
     28psS32 t00()
    2929{
    3030    psPolynomial1D *myPoly = NULL;
     
    3232    psVector *y = NULL;
    3333    psVector *yErr = NULL;
    34     int i = 0;
    35     int currentId = psMemGetId();
    36     int testStatus = true;
    37     int memLeaks = 0;
     34    psS32 i = 0;
     35    psS32 currentId = psMemGetId();
     36    psS32 testStatus = true;
     37    psS32 memLeaks = 0;
    3838
    3939    myPoly = psPolynomial1DAlloc(POLY_ORDER+1, PS_POLYNOMIAL_CHEB);
     
    9595
    9696
    97 int t01()
     97psS32 t01()
    9898{
    9999    psPolynomial1D *myPoly = NULL;
    100100    psVector *x = NULL;
    101101    psVector *y = NULL;
    102     int i = 0;
    103     int currentId = psMemGetId();
    104     int testStatus = true;
    105     int memLeaks = 0;
     102    psS32 i = 0;
     103    psS32 currentId = psMemGetId();
     104    psS32 testStatus = true;
     105    psS32 memLeaks = 0;
    106106
    107107    myPoly = psPolynomial1DAlloc(POLY_ORDER+1, PS_POLYNOMIAL_CHEB);
     
    155155
    156156
    157 int t02()
     157psS32 t02()
    158158{
    159159    psPolynomial1D *myPoly = NULL;
    160160    psVector *x = NULL;
    161161    psVector *y = NULL;
    162     int i = 0;
    163     int currentId = psMemGetId();
    164     int testStatus = true;
    165     int memLeaks = 0;
     162    psS32 i = 0;
     163    psS32 currentId = psMemGetId();
     164    psS32 testStatus = true;
     165    psS32 memLeaks = 0;
    166166
    167167    myPoly = psPolynomial1DAlloc(POLY_ORDER+1, PS_POLYNOMIAL_CHEB);
     
    214214}
    215215
    216 int t03()
    217 {
    218     psPolynomial1D *myPoly = NULL;
    219     int currentId = psMemGetId();
    220     int testStatus = true;
    221     int memLeaks = 0;
     216psS32 t03()
     217{
     218    psPolynomial1D *myPoly = NULL;
     219    psS32 currentId = psMemGetId();
     220    psS32 testStatus = true;
     221    psS32 memLeaks = 0;
    222222
    223223    printPositiveTestHeader(stdout,
     
    244244}
    245245
    246 int main()
     246psS32 main()
    247247{
    248248    t00();
  • trunk/psLib/test/dataManip/tst_psMinimize04b_F32.c

    r2086 r2204  
    2626}
    2727
    28 int t00()
     28psS32 t00()
    2929{
    3030    psPolynomial1D *myPoly = NULL;
     
    3232    psVector *y = NULL;
    3333    psVector *yErr = NULL;
    34     int i = 0;
    35     int currentId = psMemGetId();
    36     int testStatus = true;
    37     int memLeaks = 0;
     34    psS32 i = 0;
     35    psS32 currentId = psMemGetId();
     36    psS32 testStatus = true;
     37    psS32 memLeaks = 0;
    3838
    3939    myPoly = psPolynomial1DAlloc(POLY_ORDER+1, PS_POLYNOMIAL_CHEB);
     
    9595
    9696
    97 int t01()
     97psS32 t01()
    9898{
    9999    psPolynomial1D *myPoly = NULL;
    100100    psVector *x = NULL;
    101101    psVector *y = NULL;
    102     int i = 0;
    103     int currentId = psMemGetId();
    104     int testStatus = true;
    105     int memLeaks = 0;
     102    psS32 i = 0;
     103    psS32 currentId = psMemGetId();
     104    psS32 testStatus = true;
     105    psS32 memLeaks = 0;
    106106
    107107    myPoly = psPolynomial1DAlloc(POLY_ORDER+1, PS_POLYNOMIAL_CHEB);
     
    155155
    156156
    157 int t02()
     157psS32 t02()
    158158{
    159159    psPolynomial1D *myPoly = NULL;
    160160    psVector *x = NULL;
    161161    psVector *y = NULL;
    162     int i = 0;
    163     int currentId = psMemGetId();
    164     int testStatus = true;
    165     int memLeaks = 0;
     162    psS32 i = 0;
     163    psS32 currentId = psMemGetId();
     164    psS32 testStatus = true;
     165    psS32 memLeaks = 0;
    166166
    167167    myPoly = psPolynomial1DAlloc(POLY_ORDER+1, PS_POLYNOMIAL_CHEB);
     
    214214}
    215215
    216 int t03()
    217 {
    218     psPolynomial1D *myPoly = NULL;
    219     int currentId = psMemGetId();
    220     int testStatus = true;
    221     int memLeaks = 0;
     216psS32 t03()
     217{
     218    psPolynomial1D *myPoly = NULL;
     219    psS32 currentId = psMemGetId();
     220    psS32 testStatus = true;
     221    psS32 memLeaks = 0;
    222222
    223223    printPositiveTestHeader(stdout,
     
    244244}
    245245
    246 int main()
     246psS32 main()
    247247{
    248248    t00();
  • trunk/psLib/test/dataManip/tst_psMinimize05.c

    r2081 r2204  
    1515#define ERROR_TOLERANCE 0.10
    1616float expectedParm[NUM_PARAMS];
    17 int testStatus = true;
     17psS32 testStatus = true;
    1818
    1919/*****************************************************************************
     
    3232    float coordData = 0.0;
    3333    float expData = 0.0;
    34     int i;
     34    psS32 i;
    3535
    3636    for (i=0;i<N;i++) {
     
    6262
    6363
    64 int t00()
    65 {
    66     int currentId = psMemGetId();
    67     int memLeaks = 0;
    68     int i = 0;
     64psS32 t00()
     65{
     66    psS32 currentId = psMemGetId();
     67    psS32 memLeaks = 0;
     68    psS32 i = 0;
    6969    psArray *myCoords;
    7070    psVector *myParams;
     
    8181    myCoords = psArrayAlloc(N);
    8282    for (i=0;i<N;i++) {
    83         myCoords->data[i] = (psPTR *) psVectorAlloc(2, PS_TYPE_F32);
     83        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
    8484        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
    8585        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
     
    137137}
    138138
    139 int t01()
    140 {
    141     int currentId = psMemGetId();
    142     int memLeaks = 0;
    143     int i = 0;
     139psS32 t01()
     140{
     141    psS32 currentId = psMemGetId();
     142    psS32 memLeaks = 0;
     143    psS32 i = 0;
    144144    psArray *myCoords;
    145145    psVector *myParams;
     
    154154    myCoords = psArrayAlloc(N);
    155155    for (i=0;i<N;i++) {
    156         myCoords->data[i] = (psPTR *) psVectorAlloc(2, PS_TYPE_F32);
     156        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
    157157        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
    158158        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
     
    208208}
    209209
    210 int t02()
    211 {
    212     int currentId = psMemGetId();
    213     int memLeaks = 0;
    214     int i = 0;
     210psS32 t02()
     211{
     212    psS32 currentId = psMemGetId();
     213    psS32 memLeaks = 0;
     214    psS32 i = 0;
    215215    psArray *myCoords;
    216216    psVector *myParams;
     
    227227    myCoords = psArrayAlloc(N);
    228228    for (i=0;i<N;i++) {
    229         myCoords->data[i] = (psPTR *) psVectorAlloc(2, PS_TYPE_F32);
     229        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
    230230        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
    231231        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
     
    269269}
    270270
    271 int main()
     271psS32 main()
    272272{
    273273    t00();
  • trunk/psLib/test/dataManip/tst_psMinimize06.c

    r2202 r2204  
    1212#define NUM_PARAMS 3
    1313float expectedParm[NUM_PARAMS];
    14 int testStatus = true;
     14psS32 testStatus = true;
    1515
    1616/*****************************************************************************
     
    2929{
    3030    psVector *sum = psVectorAlloc(myCoords->n, PS_TYPE_F32);
    31     int i;
    32     int j;
     31    psS32 i;
     32    psS32 j;
    3333
    3434
     
    5252}
    5353
    54 int t01()
     54psS32 t01()
    5555{
    56     int currentId = psMemGetId();
    57     int memLeaks = 0;
    58     int i = 0;
     56    psS32 currentId = psMemGetId();
     57    psS32 memLeaks = 0;
     58    psS32 i = 0;
    5959    psArray *myCoords;
    6060    psVector *myParams;
     
    7373
    7474    for (i=0;i<N;i++) {
    75         myCoords->data[i] = (psPTR *) psVectorAlloc(2, PS_TYPE_F32);
     75        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
    7676        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
    7777        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
     
    115115}
    116116
    117 int main()
     117psS32 main()
    118118{
    119119    t01();
  • trunk/psLib/test/dataManip/tst_psStats00.c

    r1811 r2204  
    88#define N 10
    99
    10 int main()
     10psS32 main()
    1111{
    1212    psStats *myStats    = NULL;
    1313    psStats *myStats2    = NULL;
    14     int testStatus      = true;
    15     int globalTestStatus = true;
    16     int i               = 0;
     14    psS32 testStatus      = true;
     15    psS32 globalTestStatus = true;
     16    psS32 i               = 0;
    1717    psVector *myVector  = NULL;
    1818    psVector *maskVector= NULL;
     
    2020    float realMeanNoMask   = 0.0;
    2121    float realMeanWithMask = 0.0;
    22     int count           = 0;
    23     int currentId       = psMemGetId();
    24     int memLeaks        = 0;
     22    psS32 count           = 0;
     23    psS32 currentId       = psMemGetId();
     24    psS32 memLeaks        = 0;
    2525
    2626    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats01.c

    r1811 r2204  
    88#define N 10
    99
    10 int main()
     10psS32 main()
    1111{
    1212    psStats *myStats    = NULL;
    13     int testStatus      = true;
    14     int globalTestStatus = true;
    15     int i               = 0;
     13    psS32 testStatus      = true;
     14    psS32 globalTestStatus = true;
     15    psS32 i               = 0;
    1616    psVector *myVector  = NULL;
    1717    psVector *maskVector= NULL;
     
    1919    float realMaxNoMask   = 0.0;
    2020    float realMaxWithMask = 0.0;
    21     int currentId       = psMemGetId();
    22     int memLeaks        = 0;
     21    psS32 currentId       = psMemGetId();
     22    psS32 memLeaks        = 0;
    2323
    2424    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats02.c

    r1811 r2204  
    88#define N 10
    99
    10 int main()
     10psS32 main()
    1111{
    1212    psStats *myStats    = NULL;
    13     int testStatus      = true;
    14     int globalTestStatus = true;
    15     int i               = 0;
     13    psS32 testStatus      = true;
     14    psS32 globalTestStatus = true;
     15    psS32 i               = 0;
    1616    psVector *myVector  = NULL;
    1717    psVector *maskVector= NULL;
     
    1919    float realMinNoMask   = 1e99;
    2020    float realMinWithMask = 1e99;
    21     int currentId       = psMemGetId();
    22     int memLeaks        = 0;
     21    psS32 currentId       = psMemGetId();
     22    psS32 memLeaks        = 0;
    2323
    2424    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats03.c

    r1811 r2204  
    99#define N ((4 * N1) + 1)
    1010
    11 int main()
     11psS32 main()
    1212{
    1313    psStats *myStats    = NULL;
    14     int testStatus      = true;
    15     int globalTestStatus = true;
    16     int i               = 0;
     14    psS32 testStatus      = true;
     15    psS32 globalTestStatus = true;
     16    psS32 i               = 0;
    1717    psVector *myVector  = NULL;
    1818    psVector *maskVector= NULL;
     
    2020    float realMedianWithMask = (float) (N-3)/4;
    2121    float realMedianNoMask = (float) (N-1)/2;
    22     int currentId       = psMemGetId();
    23     int memLeaks        = 0;
     22    psS32 currentId       = psMemGetId();
     23    psS32 memLeaks        = 0;
    2424
    2525    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats04.c

    r1406 r2204  
    1212#define N ((4 * N1) + 1)
    1313
    14 int main()
     14psS32 main()
    1515{
    1616    psStats *myStats    = NULL;
    17     int testStatus      = true;
    18     int i               = 0;
     17    psS32 testStatus      = true;
     18    psS32 i               = 0;
    1919    psVector *myVector  = NULL;
    2020    psVector *maskVector= NULL;
  • trunk/psLib/test/dataManip/tst_psStats05.c

    r1900 r2204  
    88#define MISC_FLOAT_NUMBER 345.0
    99
    10 int main()
     10psS32 main()
    1111{
    1212    psStats *myStats    = NULL;
    13     int testStatus      = true;
    14     int currentId       = psMemGetId();
    15     int memLeaks        = 0;
     13    psS32 testStatus      = true;
     14    psS32 currentId       = psMemGetId();
     15    psS32 memLeaks        = 0;
    1616
    1717    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats06.c

    r1811 r2204  
    1212#define N 15
    1313
    14 int main()
     14psS32 main()
    1515{
    1616    psStats *myStats    = NULL;
    17     int testStatus      = true;
    18     int globalTestStatus = true;
    19     int i               = 0;
     17    psS32 testStatus      = true;
     18    psS32 globalTestStatus = true;
     19    psS32 i               = 0;
    2020    psVector *myVector  = NULL;
    2121    psVector *maskVector= NULL;
     
    2626    float realStdevNoMask   = 4.472136;
    2727    float realStdevWithMask = 2.160247;
    28     int count           = 0;
    29     int currentId       = psMemGetId();
    30     int memLeaks        = 0;
     28    psS32 count           = 0;
     29    psS32 currentId       = psMemGetId();
     30    psS32 memLeaks        = 0;
    3131
    3232    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats07.c

    r2198 r2204  
    1515#define ERROR_TOLERANCE 0.10
    1616
    17 int t00()
     17psS32 t00()
    1818{
    1919    psStats * myStats = NULL;
    20     int testStatus = true;
    21     int globalTestStatus = true;
    22     int i = 0;
     20    psS32 testStatus = true;
     21    psS32 globalTestStatus = true;
     22    psS32 i = 0;
    2323    psVector *myVector = NULL;
    2424    psVector *maskVector = NULL;
     
    2626    // They must be changed if we adjust the number of data points.
    2727    // We don't really know that they are correct.
    28     int count = 0;
    29     int currentId = psMemGetId();
    30     int memLeaks = 0;
     28    psS32 count = 0;
     29    psS32 currentId = psMemGetId();
     30    psS32 memLeaks = 0;
    3131    float realMeanNoMask = MEAN;
    3232    float realMedianNoMask = MEAN;
     
    3535    float realLQNoMask = MEAN - ( 0.6 * STDEV );
    3636    float realUQNoMask = MEAN + ( 0.6 * STDEV );
    37     int realN50NoMask = N / 4;
    38     int realNfitNoMask = N / 4;
     37    psS32 realN50NoMask = N / 4;
     38    psS32 realNfitNoMask = N / 4;
    3939
    4040    psTraceSetLevel(".psLib.dataManip.psStats", 10);
     
    253253
    254254
    255 int t01()
     255psS32 t01()
    256256{
    257257    psStats * myStats = NULL;
    258     int testStatus = true;
    259     int globalTestStatus = true;
    260     int i = 0;
     258    psS32 testStatus = true;
     259    psS32 globalTestStatus = true;
     260    psS32 i = 0;
    261261    psVector *myVector = NULL;
    262262    psVector *maskVector = NULL;
     
    264264    // A: They must be changed if we adjust the number of data points.
    265265    // B: We don't really know that they are correct.
    266     int count = 0;
    267     int currentId = psMemGetId();
    268     int memLeaks = 0;
     266    psS32 count = 0;
     267    psS32 currentId = psMemGetId();
     268    psS32 memLeaks = 0;
    269269    float realMeanWithMask = MEAN;
    270270    float realMedianWithMask = MEAN;
     
    273273    float realLQWithMask = MEAN;
    274274    float realUQWithMask = MEAN;
    275     int realN50WithMask = N / 4;
    276     int realNfitWithMask = N / 4;
     275    psS32 realN50WithMask = N / 4;
     276    psS32 realNfitWithMask = N / 4;
    277277
    278278    psTraceSetLevel(".psLib.dataManip.psStats", 10);
     
    487487}
    488488
    489 int main()
     489psS32 main()
    490490{
    491491    t00();
  • trunk/psLib/test/dataManip/tst_psStats08.c

    r1811 r2204  
    1313#define N (8 * N1) // Don't change this (N must be a multiple of 8)
    1414
    15 int main()
     15psS32 main()
    1616{
    1717    psStats *myStats    = NULL;
    18     int testStatus      = true;
    19     int globalTestStatus = true;
    20     int i               = 0;
     18    psS32 testStatus      = true;
     19    psS32 globalTestStatus = true;
     20    psS32 i               = 0;
    2121    psVector *myVector  = NULL;
    2222    psVector *maskVector= NULL;
     
    2828    float realLQWithMask   = N/8.0;
    2929    float realUQWithMask   = 3.0 * (N/8.0);
    30     int count           = 0;
    31     int currentId       = psMemGetId();
    32     int memLeaks        = 0;
     30    psS32 count           = 0;
     31    psS32 currentId       = psMemGetId();
     32    psS32 memLeaks        = 0;
    3333
    3434    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psStats09.c

    r1811 r2204  
    1616#define MY_RANGE 2.0
    1717
    18 int main()
     18psS32 main()
    1919{
    2020    psStats *myStats    = NULL;
    21     int testStatus      = true;
    22     int globalTestStatus = true;
    23     int i               = 0;
     21    psS32 testStatus      = true;
     22    psS32 globalTestStatus = true;
     23    psS32 i               = 0;
    2424    psVector *maskVector= NULL;
    2525    psVector *myGaussData  = NULL;
     
    3131    //    float realclippedMeanWithMask  = 0.0;
    3232    //    float realclippedStdevWithMask = 0.0;
    33     int count           = 0;
    34     int currentId       = psMemGetId();
    35     int memLeaks        = 0;
     33    psS32 count           = 0;
     34    psS32 currentId       = psMemGetId();
     35    psS32 memLeaks        = 0;
    3636
    3737    /*************************************************************************/
  • trunk/psLib/test/dataManip/tst_psVectorFFT.c

    r1406 r2204  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2004-08-06 22:34:06 $
     8*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2004-10-27 00:57:33 $
    1010*
    1111*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2020#define GENIMAGE(img,c,r,TYP, valueFcn) \
    2121img = psImageAlloc(c,r,PS_TYPE_##TYP); \
    22 for (unsigned int row=0;row<r;row++) { \
     22for (psU32 row=0;row<r;row++) { \
    2323    ps##TYP* imgRow = img->data.TYP[row]; \
    24     for (unsigned int col=0;col<c;col++) { \
     24    for (psU32 col=0;col<c;col++) { \
    2525        imgRow[col] = (ps##TYP)(valueFcn); \
    2626    } \
    2727}
    2828
    29 static int testVectorFFT( void );
    30 static int testVectorRealImaginary( void );
    31 static int testVectorComplex( void );
    32 static int testVectorConjugate( void );
    33 static int testVectorPowerSpectrum( void );
     29static psS32 testVectorFFT( void );
     30static psS32 testVectorRealImaginary( void );
     31static psS32 testVectorComplex( void );
     32static psS32 testVectorConjugate( void );
     33static psS32 testVectorPowerSpectrum( void );
    3434
    3535testDescription tests[] = {
     
    5454                          };
    5555
    56 int main( int argc, char* argv[] )
     56psS32 main( psS32 argc, char* argv[] )
    5757{
    5858    psLogSetLevel( PS_LOG_INFO );
     
    6161}
    6262
    63 int testVectorFFT( void )
     63psS32 testVectorFFT( void )
    6464{
    6565    psVector * vec = NULL;
     
    7878    vec = psVectorAlloc( 100, PS_TYPE_F32 );
    7979    vec->n = vec->nalloc;
    80     for ( unsigned int n = 0; n < 100; n++ ) {
     80    for ( psU32 n = 0; n < 100; n++ ) {
    8181        vec->data.F32[ n ] = sinf( ( psF32 ) n / 50.0f * M_PI );
    8282    }
     
    9191
    9292    // 3. verify that the only significant component cooresponds to the freqency of the input in step 1.
    93     for ( unsigned int n = 0; n < 100; n++ ) {
     93    for ( psU32 n = 0; n < 100; n++ ) {
    9494        if ( n == 1 || n == 99 ) {
    9595            if ( fabsf( cabsf( vec2->data.C32[ n ] ) - 50.0f ) > 0.1f ) {
     
    111111        return 4;
    112112    }
    113     for ( unsigned int n = 0; n < 100; n++ ) {
     113    for ( psU32 n = 0; n < 100; n++ ) {
    114114        psF32 val = sinf( ( psF32 ) n / 50.0f * M_PI );
    115115        psF32 vecVal = crealf( vec3->data.C32[ n ] ) / 100;
     
    128128}
    129129
    130 int testVectorRealImaginary( void )
     130psS32 testVectorRealImaginary( void )
    131131{
    132132    psVector * vec = NULL;
     
    143143    vec = psVectorAlloc( 100, PS_TYPE_C32 );
    144144    vec->n = vec->nalloc;
    145     for ( unsigned int n = 0; n < 100; n++ ) {
     145    for ( psU32 n = 0; n < 100; n++ ) {
    146146        vec->data.C32[ n ] = n + I * ( n * 2 );
    147147    }
     
    171171
    172172    // 3. compare results to the real/imaginary components of input
    173     for ( unsigned int n = 0; n < 100; n++ ) {
     173    for ( psU32 n = 0; n < 100; n++ ) {
    174174        psF32 r = n;
    175175        psF32 i = ( n * 2 );
     
    193193}
    194194
    195 int testVectorComplex( void )
     195psS32 testVectorComplex( void )
    196196{
    197197    psVector * vec = NULL;
     
    220220    vec->n = vec->nalloc;
    221221    vec2->n = vec2->nalloc;
    222     for ( unsigned int n = 0; n < 100; n++ ) {
     222    for ( psU32 n = 0; n < 100; n++ ) {
    223223        vec->data.F32[ n ] = n;
    224224        vec2->data.F32[ n ] = ( n * 2 );
     
    237237    // 4. call psVectorReal and psVectorImaginary on step 2 results (not needed, just use crealf/cimagf)
    238238    // 5. compare step 4 results to input.
    239     for ( unsigned int n = 0; n < 100; n++ ) {
     239    for ( psU32 n = 0; n < 100; n++ ) {
    240240        if ( fabsf( crealf( vec3->data.C32[ n ] ) - n ) > FLT_EPSILON ||
    241241                fabsf( cimagf( vec3->data.C32[ n ] ) - ( n * 2 ) ) > FLT_EPSILON ) {
     
    278278}
    279279
    280 int testVectorConjugate( void )
     280psS32 testVectorConjugate( void )
    281281{
    282282    psVector * vec = NULL;
     
    293293    vec = psVectorAlloc( 100, PS_TYPE_C32 );
    294294    vec->n = vec->nalloc;
    295     for ( unsigned int n = 0; n < 100; n++ ) {
     295    for ( psU32 n = 0; n < 100; n++ ) {
    296296        vec->data.C32[ n ] = n + I * ( n * 2 );
    297297    }
     
    307307
    308308    // 4. verify each value is conjugate of input (a+bi -> a-bi)
    309     for ( unsigned int n = 0; n < 100; n++ ) {
     309    for ( psU32 n = 0; n < 100; n++ ) {
    310310        if ( fabsf( crealf( vec->data.C32[ n ] ) - crealf( vec2->data.C32[ n ] ) ) > FLT_EPSILON ||
    311311                fabsf( cimagf( vec->data.C32[ n ] ) + cimagf( vec2->data.C32[ n ] ) ) > FLT_EPSILON ) {
     
    322322}
    323323
    324 int testVectorPowerSpectrum( void )
     324psS32 testVectorPowerSpectrum( void )
    325325{
    326326    psVector * vec = NULL;
     
    338338    vec = psVectorAlloc( 100, PS_TYPE_C32 );
    339339    vec->n = vec->nalloc;
    340     for ( unsigned int n = 0; n < 100; n++ ) {
     340    for ( psU32 n = 0; n < 100; n++ ) {
    341341        vec->data.C32[ n ] = n + I * sinf( ( ( psF32 ) n ) / 50.f * M_PI );
    342342    }
     
    365365    };
    366366
    367     for ( unsigned int n = 1; n < 50; n++ ) {
     367    for ( psU32 n = 1; n < 50; n++ ) {
    368368        val = ( cabsf( vec->data.C32[ n ] ) * cabsf( vec->data.C32[ n ] ) +
    369369                cabsf( vec->data.C32[ 100 - n ] ) * cabsf( vec->data.C32[ 100 - n ] ) ) / 100 / 100;
Note: See TracChangeset for help on using the changeset viewer.