IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 2, 2004, 1:29:39 PM (22 years ago)
Author:
harman
Message:

Changed psVector to be consistent with psImage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/collections/tst_psSort_02.c

    r717 r831  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-05-18 19:22:34 $
     12 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2004-06-02 23:29:29 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929    // Test A - Create float vectors
    3030    printPositiveTestHeader(stdout,"psSort", "Create vectors");
    31     in = psVectorAlloc(PS_TYPE_FLOAT, 5);
     31    in = psVectorAlloc(5, PS_TYPE_F32);
    3232    in->n = 5;
    33     out = psVectorAlloc(PS_TYPE_INT32, 5);
     33    out = psVectorAlloc(5, PS_TYPE_F32);
    3434    out->n = 5;
    35     in->vec.f[0] = 7.0f;
    36     in->vec.f[1] = 9.0f;
    37     in->vec.f[2] = 3.0f;
    38     in->vec.f[3] = 1.0f;
    39     in->vec.f[4] = 5.0f;
     35    in->data.F32[0] = 7.0f;
     36    in->data.F32[1] = 9.0f;
     37    in->data.F32[2] = 3.0f;
     38    in->data.F32[3] = 1.0f;
     39    in->data.F32[4] = 5.0f;
    4040    for(int i=0; i<5; i++) {
    41         printf("arr[%d] = %f\n", i, in->vec.f[i]);
     41        printf("arr[%d] = %f\n", i, in->data.F32[i]);
    4242    }
    4343    printFooter(stdout, "psSort", "Create vectors", true);
     
    4848    out = psSortIndex(out, in);
    4949    for(int i=0; i<5; i++) {
    50         printf("arr[%d] = %d\n", i, out->vec.i32[i]);
     50        printf("arr[%d] = %d\n", i, out->data.S32[i]);
    5151    }
    5252    printFooter(stdout, "psSort", "Create sorted index vector", true);
Note: See TracChangeset for help on using the changeset viewer.