IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 4, 2004, 1:12:10 PM (22 years ago)
Author:
evanalst
Message:

Add additional check for output vector size equal to input vector size for
the psVectorFFT function.

File:
1 edited

Legend:

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

    r2273 r2284  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2004-11-04 01:05:00 $
     8*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2004-11-04 23:12:10 $
    1010*
    1111*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8787        psError(PS_ERR_UNKNOWN,true, "FFT didn't produce complex values?" );
    8888        return 1;
     89    }
     90
     91    // 2a. verify output vector is same size as input
     92    if ( vec2->n != vec->n ) {
     93        psError(PS_ERR_UNKNOWN,true, "FFT didn't return vector with same size as input");
     94        return 10;
    8995    }
    9096
     
    110116        psError(PS_ERR_UNKNOWN,true, "FFT didn't produce complex values?" );
    111117        return 4;
     118    }
     119    if ( vec3->n != vec2->n ) {
     120        psError(PS_ERR_UNKNOWN,true, "FFT didn't return vector with same size as input");
     121        return 40;
    112122    }
    113123    for ( psU32 n = 0; n < 100; n++ ) {
     
    351361    }
    352362
     363    // 3a. verify result is the same size a input
     364    // Awaiting IfA direction on bug #228
     365    //    if ( vec2->n != vec->n ) {
     366    //       psError(PS_ERR_UNKNOWN,true, "Output vector size different(%d) than input vector(%d)",vec2->n, vec->n);
     367    //       return 10;
     368    //    }
     369
    353370    // 4. verify the values are the square of the absolute values of the original
    354371    //   (ADD specifies something else)
Note: See TracChangeset for help on using the changeset viewer.