IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3737


Ignore:
Timestamp:
Apr 21, 2005, 11:18:23 AM (21 years ago)
Author:
desonia
Message:

added psPixels functions and rewrote psVectorSortIndex.

Location:
trunk/psLib
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/pslib.kdevses

    r3682 r3737  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="0" />
     4 <DocsAndViews NumberOfDocuments="3" >
     5  <Doc0 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/image/psImageManip.h" >
     6   <View0 line="22" Type="Source" />
     7  </Doc0>
     8  <Doc1 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/image/psImageManip.c" >
     9   <View0 line="1173" Type="Source" />
     10  </Doc1>
     11  <Doc2 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psLib/src/image/psImage.h" >
     12   <View0 line="159" Type="Source" />
     13  </Doc2>
     14 </DocsAndViews>
    515 <pluginList>
    616  <kdevdebugger>
  • trunk/psLib/src/collections/psCollectionsErrors.dat

    r3165 r3737  
    1515psVector_NOT_A_VECTOR                  The input psVector must have a vector dimension type.
    1616psVector_SORT_NULL                     psVectorSort can not sort a NULL psVector.
    17 psVector_UNSUPPORTED_TYPE              Input psVector is an unsupported type (%d).
     17psVector_UNSUPPORTED_TYPE              Input psVector is an unsupported type (0x%x).
    1818#
    1919psBitSet_ALLOC_NEG_SIZE                The number of bit in a psBitSet (%d) must be greater than zero.
  • trunk/psLib/src/collections/psCollectionsErrors.h

    r3264 r3737  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-17 19:26:23 $
     9 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-04-21 21:18:23 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3636#define PS_ERRORTEXT_psVector_NOT_A_VECTOR "The input psVector must have a vector dimension type."
    3737#define PS_ERRORTEXT_psVector_SORT_NULL "psVectorSort can not sort a NULL psVector."
    38 #define PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE "Input psVector is an unsupported type (%d)."
     38#define PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE "Input psVector is an unsupported type (0x%x)."
    3939#define PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE "The number of bit in a psBitSet (%d) must be greater than zero."
    4040#define PS_ERRORTEXT_psBitSet_SET_NULL "Can not operate on a NULL psBitSet."
  • trunk/psLib/src/collections/psVector.c

    r3684 r3737  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-04-08 17:58:57 $
     11*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-04-21 21:18:23 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include "psCollectionsErrors.h"
    2929
     30typedef struct
     31{
     32    p_psVectorData data; // need this first for psVectorSortIndex to work.
     33    int index;
     34}
     35indexedVector;
     36
    3037static void vectorFree(psVector* psVec);
    31 
    3238
    3339static void vectorFree(psVector* psVec)
     
    297303                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
    298304                inType);
     305        psFree(outVector);
     306        return NULL;
    299307    }
    300308
     
    305313{
    306314    psS32 N = 0;
    307     psVector* tmpVector = NULL;
    308     psVector* checkVector = NULL;
    309315    psElemType inType = 0;
    310     psU32* outVec;
    311316
    312317    if (inVector == NULL) {
     
    320325    N = inVector->n;
    321326
    322     if (outVector == NULL) {
    323         outVector = psVectorAlloc(N, PS_TYPE_U32);
    324     }
    325 
    326     // check to see if output vector needs to be resized/retyped
    327     if ( (N > outVector->nalloc) ||
    328             (outVector->type.type != PS_TYPE_U32) ) {
    329         // reshape the output vector to match the input vector's size/type.
    330         outVector = psVectorRecycle(outVector,N,PS_TYPE_U32);
    331     }
    332     outVector->n = N;
    333     outVec = outVector->data.U32;
    334 
    335327    if (N == 0) {
    336328        // no need to sort anything, as there are no elements in input vector.
     
    338330    }
    339331
    340     tmpVector = psVectorSort(tmpVector, inVector);
    341 
    342     checkVector = psVectorAlloc(N,PS_TYPE_U8);
    343     for(psS32 k=0; k<N; k++) {
    344         checkVector->data.U8[k] = 0;
    345     }
    346 
    347     #define SORT_INDICES(TYPE,absfcn,maxError) {                              \
    348         ps##TYPE* inVec = inVector->data.TYPE;                                \
    349         ps##TYPE* tmpVec = tmpVector->data.TYPE;                              \
    350         ps##TYPE  diff;                                                       \
    351         for(psS32 i=0; i<N; i++) {                                              \
    352             for(psS32 j=0; j<N; j++) {                                          \
    353                 if(checkVector->data.U8[j] == 0 ) {                                    \
    354                     diff = absfcn(tmpVec[i] - inVec[j]);                          \
    355                     if(diff < maxError) {                                         \
    356                         outVec[i] = j;                                            \
    357                         checkVector->data.U8[j] = 1; \
    358                         break;                                                    \
    359                     }                                                             \
    360                 } \
    361             }                                                                 \
    362         }                                                                     \
    363     }
    364 
    365     // Sort output vector
     332    // ok, let's create a temporary indexed vector
     333    indexedVector* idxVector = psAlloc(sizeof(indexedVector)*N);
     334    int elSize = PSELEMTYPE_SIZEOF(inType);
     335    for (int i = 0; i < N; i++) {
     336        idxVector[i].data.U8 = inVector->data.U8+i*elSize;
     337        idxVector[i].index = i;
     338    }
     339
     340    // Sort indexed vector
     341    // n.b., since first element in indexedVector is a pointer to the data,
     342    // we can use the 'Ptr' version of the standard compare functions
    366343    switch (inType) {
    367344    case PS_TYPE_U8:
    368         SORT_INDICES(U8,abs,1);
     345        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU8Ptr);
    369346        break;
    370347    case PS_TYPE_U16:
    371         SORT_INDICES(U16,abs,1);
     348        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU16Ptr);
    372349        break;
    373350    case PS_TYPE_U32:
    374         SORT_INDICES(U32,abs,1);
     351        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU32Ptr);
    375352        break;
    376353    case PS_TYPE_U64:
    377         SORT_INDICES(U64,abs,1);
     354        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU64Ptr);
    378355        break;
    379356    case PS_TYPE_S8:
    380         SORT_INDICES(S8,abs,1);
     357        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS8Ptr);
    381358        break;
    382359    case PS_TYPE_S16:
    383         SORT_INDICES(S16,abs,1);
     360        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS16Ptr);
    384361        break;
    385362    case PS_TYPE_S32:
    386         SORT_INDICES(S32,abs,1);
     363        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS32Ptr);
    387364        break;
    388365    case PS_TYPE_S64:
    389         SORT_INDICES(S64,abs,1);
     366        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS64Ptr);
    390367        break;
    391368    case PS_TYPE_F32:
    392         SORT_INDICES(F32,fabsf,FLT_EPSILON);
     369        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareF32Ptr);
    393370        break;
    394371    case PS_TYPE_F64:
    395         SORT_INDICES(F64,fabs,DBL_EPSILON);
     372        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareF64Ptr);
    396373        break;
    397374    default:
     
    399376                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
    400377                inType);
     378        psFree(idxVector);
     379        psFree(outVector);
     380        return NULL;
     381    }
     382
     383    // extract the indices to the output vector
     384    outVector = psVectorRecycle(outVector, N, PS_TYPE_U32);
     385    psU32* outData = outVector->data.U32;
     386    for (int i = 0; i < N; i++) {
     387        outData[i] = idxVector[i].index;
    401388    }
    402389
    403390    // Free temp memory
    404     psFree(tmpVector);
    405     psFree(checkVector);
     391    psFree(idxVector);
    406392
    407393    return outVector;
  • trunk/psLib/src/collections/psVector.h

    r3684 r3737  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-04-08 17:58:57 $
     13 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-04-21 21:18:23 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525/// @{
    2626
     27///< Union of psVector data types.
     28typedef union {
     29    psU8* U8;               ///< Unsigned 8-bit integer data.
     30    psU16* U16;             ///< Unsigned 16-bit integer data.
     31    psU32* U32;             ///< Unsigned 32-bit integer data.
     32    psU64* U64;             ///< Unsigned 64-bit integer data.
     33    psS8* S8;               ///< Signed 8-bit integer data.
     34    psS16* S16;             ///< Signed 16-bit integer data.
     35    psS32* S32;             ///< Signed 32-bit integer data.
     36    psS64* S64;             ///< Signed 64-bit integer data.
     37    psF32* F32;             ///< Single-precision float data.
     38    psF64* F64;             ///< Double-precision float data.
     39    psC32* C32;             ///< Single-precision complex data.
     40    psC64* C64;             ///< Double-precision complex data.
     41} p_psVectorData;
     42
    2743/** An vector to support primitive types.
    2844 *
     
    3551    int n;                      ///< Number of elements in use.
    3652    const int nalloc;           ///< Total number of elements available.
    37 
    38     union {
    39         psU8* U8;               ///< Unsigned 8-bit integer data.
    40         psU16* U16;             ///< Unsigned 16-bit integer data.
    41         psU32* U32;             ///< Unsigned 32-bit integer data.
    42         psU64* U64;             ///< Unsigned 64-bit integer data.
    43         psS8* S8;               ///< Signed 8-bit integer data.
    44         psS16* S16;             ///< Signed 16-bit integer data.
    45         psS32* S32;             ///< Signed 32-bit integer data.
    46         psS64* S64;             ///< Signed 64-bit integer data.
    47         psF32* F32;             ///< Single-precision float data.
    48         psF64* F64;             ///< Double-precision float data.
    49         psC32* C32;             ///< Single-precision complex data.
    50         psC64* C64;             ///< Double-precision complex data.
    51     } data;                     ///< Union for data types.
     53    p_psVectorData data;        ///< Union for data types.
    5254}
    5355psVector;
  • trunk/psLib/src/image/Makefile.am

    r3684 r3737  
    1818        psImageStats.c \
    1919        psImageFFT.c \
    20         psImageConvolve.c
     20        psImageConvolve.c \
     21        psPixels.c
    2122
    2223BUILT_SOURCES = psImageErrors.h
  • trunk/psLib/src/image/psImageManip.c

    r3476 r3737  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-03-22 21:52:49 $
     12 *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-04-21 21:18:23 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1919#include <stdlib.h>
    2020#include <string.h>                        // for memcpy, etc.
     21
     22#include "psImageManip.h"
    2123
    2224#include "psError.h"
     
    10821084    return NULL;
    10831085}
     1086
  • trunk/psLib/src/image/psImageManip.h

    r3476 r3737  
    1 
    21/** @file  psImageManip.h
    32 *
     
    1110 *  @author Ross Harman, MHPCC
    1211 *
    13  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-03-22 21:52:49 $
     12 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-04-21 21:18:23 $
    1514 *
    1615 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2120#include "psImage.h"
    2221#include "psCoord.h"
     22#include "psStats.h"
    2323
    2424/// @addtogroup Image
  • trunk/psLib/src/mathtypes/psVector.c

    r3684 r3737  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-04-08 17:58:57 $
     11*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-04-21 21:18:23 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include "psCollectionsErrors.h"
    2929
     30typedef struct
     31{
     32    p_psVectorData data; // need this first for psVectorSortIndex to work.
     33    int index;
     34}
     35indexedVector;
     36
    3037static void vectorFree(psVector* psVec);
    31 
    3238
    3339static void vectorFree(psVector* psVec)
     
    297303                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
    298304                inType);
     305        psFree(outVector);
     306        return NULL;
    299307    }
    300308
     
    305313{
    306314    psS32 N = 0;
    307     psVector* tmpVector = NULL;
    308     psVector* checkVector = NULL;
    309315    psElemType inType = 0;
    310     psU32* outVec;
    311316
    312317    if (inVector == NULL) {
     
    320325    N = inVector->n;
    321326
    322     if (outVector == NULL) {
    323         outVector = psVectorAlloc(N, PS_TYPE_U32);
    324     }
    325 
    326     // check to see if output vector needs to be resized/retyped
    327     if ( (N > outVector->nalloc) ||
    328             (outVector->type.type != PS_TYPE_U32) ) {
    329         // reshape the output vector to match the input vector's size/type.
    330         outVector = psVectorRecycle(outVector,N,PS_TYPE_U32);
    331     }
    332     outVector->n = N;
    333     outVec = outVector->data.U32;
    334 
    335327    if (N == 0) {
    336328        // no need to sort anything, as there are no elements in input vector.
     
    338330    }
    339331
    340     tmpVector = psVectorSort(tmpVector, inVector);
    341 
    342     checkVector = psVectorAlloc(N,PS_TYPE_U8);
    343     for(psS32 k=0; k<N; k++) {
    344         checkVector->data.U8[k] = 0;
    345     }
    346 
    347     #define SORT_INDICES(TYPE,absfcn,maxError) {                              \
    348         ps##TYPE* inVec = inVector->data.TYPE;                                \
    349         ps##TYPE* tmpVec = tmpVector->data.TYPE;                              \
    350         ps##TYPE  diff;                                                       \
    351         for(psS32 i=0; i<N; i++) {                                              \
    352             for(psS32 j=0; j<N; j++) {                                          \
    353                 if(checkVector->data.U8[j] == 0 ) {                                    \
    354                     diff = absfcn(tmpVec[i] - inVec[j]);                          \
    355                     if(diff < maxError) {                                         \
    356                         outVec[i] = j;                                            \
    357                         checkVector->data.U8[j] = 1; \
    358                         break;                                                    \
    359                     }                                                             \
    360                 } \
    361             }                                                                 \
    362         }                                                                     \
    363     }
    364 
    365     // Sort output vector
     332    // ok, let's create a temporary indexed vector
     333    indexedVector* idxVector = psAlloc(sizeof(indexedVector)*N);
     334    int elSize = PSELEMTYPE_SIZEOF(inType);
     335    for (int i = 0; i < N; i++) {
     336        idxVector[i].data.U8 = inVector->data.U8+i*elSize;
     337        idxVector[i].index = i;
     338    }
     339
     340    // Sort indexed vector
     341    // n.b., since first element in indexedVector is a pointer to the data,
     342    // we can use the 'Ptr' version of the standard compare functions
    366343    switch (inType) {
    367344    case PS_TYPE_U8:
    368         SORT_INDICES(U8,abs,1);
     345        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU8Ptr);
    369346        break;
    370347    case PS_TYPE_U16:
    371         SORT_INDICES(U16,abs,1);
     348        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU16Ptr);
    372349        break;
    373350    case PS_TYPE_U32:
    374         SORT_INDICES(U32,abs,1);
     351        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU32Ptr);
    375352        break;
    376353    case PS_TYPE_U64:
    377         SORT_INDICES(U64,abs,1);
     354        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareU64Ptr);
    378355        break;
    379356    case PS_TYPE_S8:
    380         SORT_INDICES(S8,abs,1);
     357        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS8Ptr);
    381358        break;
    382359    case PS_TYPE_S16:
    383         SORT_INDICES(S16,abs,1);
     360        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS16Ptr);
    384361        break;
    385362    case PS_TYPE_S32:
    386         SORT_INDICES(S32,abs,1);
     363        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS32Ptr);
    387364        break;
    388365    case PS_TYPE_S64:
    389         SORT_INDICES(S64,abs,1);
     366        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareS64Ptr);
    390367        break;
    391368    case PS_TYPE_F32:
    392         SORT_INDICES(F32,fabsf,FLT_EPSILON);
     369        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareF32Ptr);
    393370        break;
    394371    case PS_TYPE_F64:
    395         SORT_INDICES(F64,fabs,DBL_EPSILON);
     372        qsort(idxVector, N, sizeof(indexedVector), (psCompareFcn)psCompareF64Ptr);
    396373        break;
    397374    default:
     
    399376                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
    400377                inType);
     378        psFree(idxVector);
     379        psFree(outVector);
     380        return NULL;
     381    }
     382
     383    // extract the indices to the output vector
     384    outVector = psVectorRecycle(outVector, N, PS_TYPE_U32);
     385    psU32* outData = outVector->data.U32;
     386    for (int i = 0; i < N; i++) {
     387        outData[i] = idxVector[i].index;
    401388    }
    402389
    403390    // Free temp memory
    404     psFree(tmpVector);
    405     psFree(checkVector);
     391    psFree(idxVector);
    406392
    407393    return outVector;
  • trunk/psLib/src/mathtypes/psVector.h

    r3684 r3737  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-04-08 17:58:57 $
     13 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-04-21 21:18:23 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525/// @{
    2626
     27///< Union of psVector data types.
     28typedef union {
     29    psU8* U8;               ///< Unsigned 8-bit integer data.
     30    psU16* U16;             ///< Unsigned 16-bit integer data.
     31    psU32* U32;             ///< Unsigned 32-bit integer data.
     32    psU64* U64;             ///< Unsigned 64-bit integer data.
     33    psS8* S8;               ///< Signed 8-bit integer data.
     34    psS16* S16;             ///< Signed 16-bit integer data.
     35    psS32* S32;             ///< Signed 32-bit integer data.
     36    psS64* S64;             ///< Signed 64-bit integer data.
     37    psF32* F32;             ///< Single-precision float data.
     38    psF64* F64;             ///< Double-precision float data.
     39    psC32* C32;             ///< Single-precision complex data.
     40    psC64* C64;             ///< Double-precision complex data.
     41} p_psVectorData;
     42
    2743/** An vector to support primitive types.
    2844 *
     
    3551    int n;                      ///< Number of elements in use.
    3652    const int nalloc;           ///< Total number of elements available.
    37 
    38     union {
    39         psU8* U8;               ///< Unsigned 8-bit integer data.
    40         psU16* U16;             ///< Unsigned 16-bit integer data.
    41         psU32* U32;             ///< Unsigned 32-bit integer data.
    42         psU64* U64;             ///< Unsigned 64-bit integer data.
    43         psS8* S8;               ///< Signed 8-bit integer data.
    44         psS16* S16;             ///< Signed 16-bit integer data.
    45         psS32* S32;             ///< Signed 32-bit integer data.
    46         psS64* S64;             ///< Signed 64-bit integer data.
    47         psF32* F32;             ///< Single-precision float data.
    48         psF64* F64;             ///< Double-precision float data.
    49         psC32* C32;             ///< Single-precision complex data.
    50         psC64* C64;             ///< Double-precision complex data.
    51     } data;                     ///< Union for data types.
     53    p_psVectorData data;        ///< Union for data types.
    5254}
    5355psVector;
  • trunk/psLib/test/collections/tst_psVectorSort_01.c

    r3682 r3737  
    77 *     B)  Sort input float vector into itself
    88 *     C)  Attempt to sort vector with invalid type (i.e. PS_TYPE_BOOL)
    9  *     D)  Sort input vector with zero items 
     9 *     D)  Sort input vector with zero items
    1010 *     C)  Free float vectors
    1111 *
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2005-04-07 20:27:41 $
     14 *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2005-04-21 21:18:23 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    142142    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error messgae");
    143143    tempVec = psVectorSort(out,in);
    144     if(tempVec != out) {
    145         psError(PS_ERR_UNKNOWN,true,"Did not return the specified output vector");
     144    if(tempVec != NULL) {
     145        psError(PS_ERR_UNKNOWN,true,"Did not return NULL on error or didn't error?");
    146146        return 33;
    147147    }
    148     psFree(out);
    149148    printFooter(stdout,"psVectorSort","Invalid vector type",true);
    150149
  • trunk/psLib/test/collections/tst_psVectorSort_02.c

    r3682 r3737  
    1414 *  @author  Ross Harman, MHPCC
    1515 *
    16  *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
    17  *  @date  $Date: 2005-04-07 20:27:41 $
     16 *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
     17 *  @date  $Date: 2005-04-21 21:18:23 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    155155    psLogMsg(__func__,PS_LOG_INFO,"Following should generate two error messages(psVectorSort,psVectorSortIndex)");
    156156    out = psVectorSortIndex(out,in);
    157     if( out != tempVect) {
    158         psError(PS_ERR_UNKNOWN,true,"Did not return the same output vector");
     157    if( out != NULL) {
     158        psError(PS_ERR_UNKNOWN,true,"Did not return NULL on error or didn't error?");
    159159        return 119;
    160160    }
    161161    in->type.type = PS_TYPE_U8;
    162162    psFree(in);
    163     psFree(out);
    164163    printFooter(stdout,"psVectorSortIndex","Attempt to sort with invalid type",true);
    165164
  • trunk/psLib/test/collections/verified/tst_psVectorSort_01.stderr

    r3127 r3737  
    22    Following should generate an error messgae
    33<DATE><TIME>|<HOST>|E|psVectorSort (FILE:LINENO)
    4     Input psVector is an unsupported type (4865).
     4    Input psVector is an unsupported type (0x1301).
  • trunk/psLib/test/collections/verified/tst_psVectorSort_02.stderr

    r3127 r3737  
    55<DATE><TIME>|<HOST>|I|main
    66    Following should generate two error messages(psVectorSort,psVectorSortIndex)
    7 <DATE><TIME>|<HOST>|E|psVectorSort (FILE:LINENO)
    8     Input psVector is an unsupported type (4865).
    97<DATE><TIME>|<HOST>|E|psVectorSortIndex (FILE:LINENO)
    10     Input psVector is an unsupported type (4865).
     8    Input psVector is an unsupported type (0x1301).
Note: See TracChangeset for help on using the changeset viewer.