IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6885


Ignore:
Timestamp:
Apr 18, 2006, 12:04:28 PM (20 years ago)
Author:
Paul Price
Message:

Fixing bug in number of elements in psBinaryOp and psUnaryOp: when the output vector is NULL, then the number of elements wasn't being set. See bug 737.

Location:
trunk/psLib/src/math
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psBinaryOp.c

    r4540 r6885  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-07-12 19:12:01 $
     32 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2006-04-18 22:04:28 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    497497                return NULL;
    498498            }
     499            ((psVector*)out)->n = ((psVector*)in2)->n;
    499500            BINARY_OP(SCALAR, VECTOR, out, psType1, op, psType2);       // scalar op vector
    500501        } else if (dim2 == PS_DIMEN_IMAGE) {
     
    520521                return NULL;
    521522            }
     523            ((psVector*)out)->n = ((psVector*)in1)->n;
    522524            BINARY_OP(VECTOR, SCALAR, out, psType1, op, psType2);       // vector op scalar
    523525        } else if (dim2 == PS_DIMEN_VECTOR || dim2 == PS_DIMEN_TRANSV) {
     
    528530                return NULL;
    529531            }
     532            ((psVector*)out)->n = ((psVector*)in2)->n;
    530533            BINARY_OP(VECTOR, VECTOR, out, psType1, op, psType2);       // vector op vector
    531534        } else if (dim2 == PS_DIMEN_IMAGE) {
  • trunk/psLib/src/math/psUnaryOp.c

    r4540 r6885  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-07-12 19:12:01 $
     32 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2006-04-18 22:04:28 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    347347            psUnaryOp_EXIT;
    348348        }
     349        ((psVector*)out)->n = ((psVector*)in)->n;
    349350
    350351        UNARY_OP(VECTOR, out, psTypeIn, op);    // vector
Note: See TracChangeset for help on using the changeset viewer.