IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2005, 1:44:22 PM (21 years ago)
Author:
desonia
Message:

added enhancement to psFree so that it sets the reference being freed to
NULL (thanks Gus).

File:
1 edited

Legend:

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

    r3884 r4308  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-05-11 22:02:16 $
     8*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2005-06-17 23:44:22 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    474474
    475475    psFree( vec );
    476     psFree( vec2 );
    477476
    478477    // Perform conjugate for non-complex number
     
    509508    for ( psU32 n = 0; n < 100; n++ ) {
    510509        if ( fabsf( crealf(vec->data.C64[n]) - crealf(vec2->data.C64[n])) > FLT_EPSILON ||
    511                 fabsf( cimagf(vec->data.C64[n]) - cimagf(vec2->data.C64[n])) > FLT_EPSILON ) {
     510                fabsf( cimagf(vec->data.C64[n]) + cimagf(vec2->data.C64[n])) > FLT_EPSILON ) {
    512511            psError(PS_ERR_UNKNOWN,true,"psVectorConjugate result is invalid (n=%d)",n);
    513512            return 13;
     
    516515    psFree(vec);
    517516
    518     // Perform vector conjugate with null input
    519     if ( psVectorConjugate(NULL,NULL) != NULL) {
     517    // Perform vector conjugate with null input (vec2 should be freed too)
     518    if ( psVectorConjugate(vec2,NULL) != NULL) {
    520519        psError(PS_ERR_UNKNOWN,true,"Did not return NULL with null input vector");
    521520        return 61;
Note: See TracChangeset for help on using the changeset viewer.