IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2021


Ignore:
Timestamp:
Oct 7, 2004, 4:48:01 PM (22 years ago)
Author:
desonia
Message:

fixed psBinaryOp/psUnaryOp to handle the out parameter in a manner like
other functions. Also expanded the types supported to all numeric types.

Location:
trunk/psLib
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/psLib.kdevses

    r1984 r2021  
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    4  <DocsAndViews NumberOfDocuments="6" >
     4 <DocsAndViews NumberOfDocuments="15" >
    55  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageConvolve.c" >
    66   <View0 line="412" Type="???" >
     
    1010  <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageFFT.c" >
    1111   <View0 line="36" Type="???" >
    12     <AdditionalSettings Top="2" Width="1181" Attach="1" Height="701" Left="2" MinMaxMode="0" />
     12    <AdditionalSettings Top="2" Width="1526" Attach="1" Height="1007" Left="2" MinMaxMode="0" />
    1313   </View0>
    1414  </Doc1>
     
    2929  </Doc4>
    3030  <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psVector.c" >
    31    <View0 line="86" Type="???" >
    32     <AdditionalSettings Top="2" Width="1181" Attach="1" Height="701" Left="2" MinMaxMode="0" />
     31   <View0 line="100" Type="???" >
     32    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="809" Left="2" MinMaxMode="0" />
    3333   </View0>
    3434  </Doc5>
     35  <Doc6 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psMatrix.c" >
     36   <View0 line="212" Type="???" >
     37    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="809" Left="2" MinMaxMode="0" />
     38   </View0>
     39  </Doc6>
     40  <Doc7 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psFunctions.c" >
     41   <View0 line="0" Type="???" >
     42    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="809" Left="2" MinMaxMode="0" />
     43   </View0>
     44  </Doc7>
     45  <Doc8 NumberOfViews="1" URL="file:/home/desonia/psLib/src/dataManip/psMatrixVectorArithmetic.c" >
     46   <View0 line="684" Type="???" >
     47    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="538" Left="2" MinMaxMode="0" />
     48   </View0>
     49  </Doc8>
     50  <Doc9 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psScalar.c" >
     51   <View0 line="0" Type="???" >
     52    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="809" Left="2" MinMaxMode="0" />
     53   </View0>
     54  </Doc9>
     55  <Doc10 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psScalar.h" >
     56   <View0 line="0" Type="???" >
     57    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="807" Left="2" MinMaxMode="0" />
     58   </View0>
     59  </Doc10>
     60  <Doc11 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/psType.h" >
     61   <View0 line="196" Type="???" >
     62    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="771" Left="2" MinMaxMode="0" />
     63   </View0>
     64  </Doc11>
     65  <Doc12 NumberOfViews="1" URL="file:/home/desonia/psLib/test/dataManip/tst_psMatrixVectorArithmetic01.c" >
     66   <View0 line="202" Type="???" >
     67    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="538" Left="2" MinMaxMode="0" />
     68   </View0>
     69  </Doc12>
     70  <Doc13 NumberOfViews="1" URL="file:/home/desonia/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c" >
     71   <View0 line="265" Type="???" >
     72    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="538" Left="2" MinMaxMode="0" />
     73   </View0>
     74  </Doc13>
     75  <Doc14 NumberOfViews="1" URL="file:/home/desonia/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c" >
     76   <View0 line="199" Type="???" >
     77    <AdditionalSettings Top="2" Width="1212" Attach="1" Height="538" Left="2" MinMaxMode="0" />
     78   </View0>
     79  </Doc14>
    3580 </DocsAndViews>
    3681 <pluginList>
     
    4186     <mark line="652" />
    4287     <mark line="593" />
     88    </bookmark>
     89    <bookmark url="/home/desonia/psLib/src/dataManip/psMatrixVectorArithmetic.c" >
     90     <mark line="60" />
    4391    </bookmark>
    4492    <bookmark url="/home/desonia/psLib/src/collections/psBitSet.c" >
  • trunk/psLib/src/dataManip/psMatrix.c

    r1845 r2021  
    1 
    21/** @file  psMatrix.c
    32 *
     
    2120 *  @author Ross Harman, MHPCC
    2221 *   
    23  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2004-09-21 23:44:10 $
     22 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     23 *  @date $Date: 2004-10-08 02:48:01 $
    2524 *
    2625 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2827
    2928/******************************************************************************/
    30 
    3129/*  INCLUDE FILES                                                             */
    32 
    3330/******************************************************************************/
    3431#include <string.h>
     
    4441#include "psMatrix.h"
    4542
    46 /******************************************************************************/
    47 
    48 /*  DEFINE STATEMENTS                                                         */
    49 
    50 /******************************************************************************/
    51 
    52 // None
    53 
    54 /******************************************************************************/
    55 
    56 /*  TYPE DEFINITIONS                                                          */
    57 
    58 /******************************************************************************/
    59 
    60 // None
    61 
    62 /*****************************************************************************/
    63 
    64 /*  GLOBAL VARIABLES                                                         */
    65 
    66 /*****************************************************************************/
    67 
    68 // None
    69 
    70 /*****************************************************************************/
    71 
    72 /*  FILE STATIC VARIABLES                                                    */
    73 
    74 /*****************************************************************************/
    75 
    76 // None
    77 
    78 /*****************************************************************************/
    79 
    80 /*  FUNCTION IMPLEMENTATION - LOCAL                                          */
    81 
    82 /*****************************************************************************/
    83 
    8443/** Preprocessor macro to generate error a NULL image */
    8544#define PS_CHECK_NULL_VECTOR(NAME, RETURN)                                                          \
     
    155114
    156115/*****************************************************************************/
    157 
    158116/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
    159 
    160117/*****************************************************************************/
    161118
  • trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c

    r1648 r2021  
    1 
    21/** @file  psMatrixVectorArithmetic.c
    32 *
     
    3029 *  @author Ross Harman, MHPCC
    3130 *
    32  *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2004-08-27 23:33:31 $
     31 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     32 *  @date $Date: 2004-10-08 02:48:01 $
    3433 *
    3534 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    3635 */
    3736
    38 /******************************************************************************/
    39 
    40 /*  INCLUDE FILES                                                             */
    41 
    42 /******************************************************************************/
     37/******************************************************************************
     38 *  INCLUDE FILES                                                             *
     39 ******************************************************************************/
    4340#include <string.h>
    4441#include <math.h>
     
    5047#include "psVector.h"
    5148#include "psScalar.h"
    52 
    53 /******************************************************************************/
    54 
    55 /*  DEFINE STATEMENTS                                                         */
    56 
    57 /******************************************************************************/
    58 
    59 // None
    60 
    61 /******************************************************************************/
    62 
    63 /*  TYPE DEFINITIONS                                                          */
    64 
    65 /******************************************************************************/
    66 
    67 // None
    68 
    69 /*****************************************************************************/
    70 
    71 /*  GLOBAL VARIABLES                                                         */
    72 
    73 /*****************************************************************************/
    74 
    75 // None
    76 
    77 /*****************************************************************************/
    78 
    79 /*  FILE STATIC VARIABLES                                                    */
    80 
    81 /*****************************************************************************/
    82 
    83 // None
    84 
    85 /*****************************************************************************/
    86 
    87 /*  FUNCTION IMPLEMENTATION - LOCAL                                          */
    88 
    89 /*****************************************************************************/
     49#include "psLogMsg.h"
     50
     51/*****************************************************************************
     52 *  FUNCTION IMPLEMENTATION - LOCAL                                          *
     53 *****************************************************************************/
    9054
    9155// Conversion for degrees to radians
     
    9559#define R2D 57.29577950924861   /* 180.0/PI */
    9660
     61/* IEEE Standards on floating-point makes this function pointless, really.
    9762// Division with NAN checking
    9863static complex double psNanDiv(complex double a, complex double b)
    9964{
    10065    complex double out = 0 + 0i;
    101 
     66 
    10267    out = a / b;
    10368    if (isnan(creal(out)) || isnan(cimag(out))) {
    10469        psError(__func__, ": Divide by zero");
    10570    }
    106 
     71 
    10772    return out;
    10873}
     74*/
    10975
    11076// Binary SCALAR_XXXX operations
     
    186152    if(n1 != n2) {                                                                                           \
    187153        psError(__func__, ": Inconsistent element count: %d vs %d", n1, n2);                                 \
    188         return OUT;                                                                                          \
     154        if (OUT != IN1 && OUT != IN2) {                                                                      \
     155            psFree(OUT);                                                                                     \
     156        }                                                                                                    \
     157        return NULL;                                                                                         \
    189158    }                                                                                                        \
    190159    o  = ((psVector* )OUT)->data.TYPE;                                                                       \
     
    215184        if(n1!=numRows2) {                                                                                   \
    216185            psError(__func__, ": Inconsistent element count: %d vs %d", n1, numRows2);                       \
    217             return OUT;                                                                                      \
     186            if (OUT != IN1 && OUT != IN2) {                                                                  \
     187                psFree(OUT);                                                                                 \
     188            }                                                                                                \
     189            return NULL;                                                                                     \
    218190        }                                                                                                    \
    219191        \
     
    229201        if(n1!=numCols2) {                                                                                   \
    230202            psError(__func__, ": Inconsistent element count: %d vs %d", n1, numCols2);                       \
    231             return OUT;                                                                                      \
     203            if (OUT != IN1 && OUT != IN2) {                                                                  \
     204                psFree(OUT);                                                                                 \
     205            }                                                                                                \
     206            return NULL;                                                                                     \
    232207        }                                                                                                    \
    233208        \
     
    284259        if(n2!=numRows1) {                                                                                   \
    285260            psError(__func__, ": Inconsistent element count: %d vs %d", n2, numRows1);                       \
    286             return OUT;                                                                                      \
     261            if (OUT != IN1 && OUT != IN2) {                                                                  \
     262                psFree(OUT);                                                                                 \
     263            }                                                                                                \
     264            return NULL;                                                                                     \
    287265        }                                                                                                    \
    288266        \
     
    298276        if(n2!=numCols1) {                                                                                   \
    299277            psError(__func__, ": Inconsistent element count: %d vs %d", n2, numCols1);                       \
    300             return OUT;                                                                                      \
     278            if (OUT != IN1) {                                                                                \
     279                psFree(OUT);                                                                                 \
     280            }                                                                                                \
     281            return NULL;                                                                                     \
    301282        }                                                                                                    \
    302283        \
     
    330311        psError(__func__, ": Inconsistent element count: numRows: %d vs %d numCols: %d vs %d", numRows1,     \
    331312                numRows2, numCols1, numCols2);                                                               \
    332         return OUT;                                                                                          \
     313        if (OUT != IN1 && OUT != IN2) {                                                                      \
     314            psFree(OUT);                                                                                     \
     315        }                                                                                                    \
     316        return NULL;                                                                                         \
    333317    }                                                                                                        \
    334318    for(j = 0; j < numRows1; j++) {                                                                          \
     
    345329#define BINARY_TYPE(DIM1,DIM2,OUT,IN1,OP,IN2)                                                                \
    346330switch (IN1->type) {                                                                                         \
     331case PS_TYPE_U8:                                                                                             \
     332    DIM1##_##DIM2(OUT,IN1,OP,IN2,U8);                                                                        \
     333    break;                                                                                                   \
     334case PS_TYPE_U16:                                                                                            \
     335    DIM1##_##DIM2(OUT,IN1,OP,IN2,U16);                                                                       \
     336    break;                                                                                                   \
     337case PS_TYPE_U32:                                                                                            \
     338    DIM1##_##DIM2(OUT,IN1,OP,IN2,U32);                                                                       \
     339    break;                                                                                                   \
     340case PS_TYPE_U64:                                                                                            \
     341    DIM1##_##DIM2(OUT,IN1,OP,IN2,U64);                                                                       \
     342    break;                                                                                                   \
     343case PS_TYPE_S8:                                                                                             \
     344    DIM1##_##DIM2(OUT,IN1,OP,IN2,S8);                                                                        \
     345    break;                                                                                                   \
     346case PS_TYPE_S16:                                                                                            \
     347    DIM1##_##DIM2(OUT,IN1,OP,IN2,S16);                                                                       \
     348    break;                                                                                                   \
    347349case PS_TYPE_S32:                                                                                            \
    348350    DIM1##_##DIM2(OUT,IN1,OP,IN2,S32);                                                                       \
    349351    break;                                                                                                   \
     352case PS_TYPE_S64:                                                                                            \
     353    DIM1##_##DIM2(OUT,IN1,OP,IN2,S64);                                                                       \
     354    break;                                                                                                   \
    350355case PS_TYPE_F32:                                                                                            \
    351356    DIM1##_##DIM2(OUT,IN1,OP,IN2,F32);                                                                       \
     
    357362    DIM1##_##DIM2(OUT,IN1,OP,IN2,C32);                                                                       \
    358363    break;                                                                                                   \
     364case PS_TYPE_C64:                                                                                            \
     365    DIM1##_##DIM2(OUT,IN1,OP,IN2,C64);                                                                       \
     366    break;                                                                                                   \
    359367default:                                                                                                     \
    360 case PS_TYPE_S8:                                                                                             \
    361 case PS_TYPE_U8:                                                                                             \
    362 case PS_TYPE_S16:                                                                                            \
    363 case PS_TYPE_U16:                                                                                            \
    364 case PS_TYPE_U32:                                                                                            \
    365 case PS_TYPE_S64:                                                                                            \
    366 case PS_TYPE_U64:                                                                                            \
    367 case PS_TYPE_C64:                                                                                            \
    368368    psError(__func__, ": Invalid PS_TYPE: %d", IN1->type);                                                   \
     369    if (OUT != IN1 && OUT != IN2) {                                                                          \
     370        psFree(OUT);                                                                                         \
     371    }                                                                                                        \
     372    return NULL;                                                                                             \
    369373}
    370374
     
    378382    BINARY_TYPE(DIM1,DIM2,OUT,IN1,*i1 * *i2,IN2);                                                            \
    379383} else if(!strncmp(OP, "/", 1)) {                                                                            \
    380     BINARY_TYPE(DIM1,DIM2,OUT,IN1,psNanDiv(*i1,*i2),IN2);                                                    \
     384    BINARY_TYPE(DIM1,DIM2,OUT,IN1,*i1 / *i2,IN2);                                                    \
    381385} else if(!strncmp(OP, "^", 1)) {                                                                            \
    382386    if(PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                                \
     
    388392    if(PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                                \
    389393        psError(__func__, ": Minimum operation not supported for complex numbers");                          \
     394        if (OUT != IN1 && OUT != IN2) {                                                                      \
     395            psFree(OUT);                                                                                     \
     396        }                                                                                                    \
     397        return NULL;                                                                                         \
    390398    } else {                                                                                                 \
    391399        BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmin(*i1,*i2),IN2);                                                    \
     
    394402    if(PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                                \
    395403        psError(__func__, ": Maximum operation not supported for complex numbers");                          \
     404        if (OUT != IN1 && OUT != IN2) {                                                                      \
     405            psFree(OUT);                                                                                     \
     406        }                                                                                                    \
     407        return NULL;                                                                                         \
    396408    } else {                                                                                                 \
    397409        BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmax(*i1,*i2),IN2);                                                    \
     
    399411} else {                                                                                                     \
    400412    psError(__func__, ": Invalid operation: %s", OP);                                                        \
     413    if (OUT != IN1 && OUT != IN2) {                                                                          \
     414        psFree(OUT);                                                                                         \
     415    }                                                                                                        \
     416    return NULL;                                                                                             \
    401417}
    402418
     
    405421    psDimen dim1 = 0;
    406422    psDimen dim2 = 0;
    407     psDimen dimOut = 0;
    408423    psElemType elType1 = 0;
    409424    psElemType elType2 = 0;
    410     psElemType elTypeOut = 0;
    411425    psType* psType1 = NULL;
    412426    psType* psType2 = NULL;
    413     psType* psTypeOut = NULL;
    414 
    415     psTypeOut = (psType* ) out;
    416     if (psTypeOut == NULL) {
    417         psError(__func__, ": Line %d - Null out argument", __LINE__);
    418         return out;
    419     }
    420427
    421428    psType1 = (psType* ) in1;
    422429    if (psType1 == NULL) {
    423430        psError(__func__, ": Line %d - Null in1 argument", __LINE__);
    424         return out;
     431        if (out != in1 && out != in2) {
     432            psFree(out);
     433        }
     434        return NULL;
    425435    }
    426436
     
    428438    if (psType2 == NULL) {
    429439        psError(__func__, ": Line %d - Null in2 argument", __LINE__);
    430         return out;
     440        if (out != in1 && out != in2) {
     441            psFree(out);
     442        }
     443        return NULL;
    431444    }
    432445
    433446    if (op == NULL) {
    434447        psError(__func__, ": Line %d - Null op argument", __LINE__);
    435         return out;
     448        if (out != in1 && out != in2) {
     449            psFree(out);
     450        }
     451        return NULL;
    436452    }
    437453
    438454    dim1 = psType1->dimen;
    439455    dim2 = psType2->dimen;
    440     dimOut = psTypeOut->dimen;
    441456    elType1 = psType1->type;
    442457    elType2 = psType2->type;
    443     elTypeOut = psTypeOut->type;
    444 
    445     if (elType1 != elType2 && elType1 != elTypeOut) {
    446         psError(__func__, ": Line %d - Element types for arguments inconsistent: (%d, %d, %d)", __LINE__,
    447                 elType1, elType2, elTypeOut);
    448         return out;
    449     }
    450 
    451     if (dim1 == PS_DIMEN_OTHER || dim2 == PS_DIMEN_OTHER || dimOut == PS_DIMEN_OTHER) {
    452         psError(__func__, ": Line %d - PS_DIMEN_OTHER not allowed for arguments: (%d, %d, %d)", __LINE__,
    453                 dim1, dim2, dimOut);
    454         return out;
    455     }
    456 
    457     if (dim1 == PS_DIMEN_VECTOR) {
     458
     459    if (elType1 != elType2) {
     460        psError(__func__, ": Line %d - Element types for arguments inconsistent: (%d, %d)", __LINE__,
     461                elType1, elType2);
     462        if (out != in1 && out != in2) {
     463            psFree(out);
     464        }
     465        return NULL;
     466    }
     467
     468    if (dim1 == PS_DIMEN_OTHER || dim2 == PS_DIMEN_OTHER) {
     469        psError(__func__, ": Line %d - PS_DIMEN_OTHER not allowed for arguments: (%d, %d)", __LINE__,
     470                dim1, dim2);
     471        if (out != in1 && out != in2) {
     472            psFree(out);
     473        }
     474        return NULL;
     475    }
     476
     477    if (dim1 == PS_DIMEN_VECTOR || dim1 == PS_DIMEN_TRANSV) {
    458478        if (((psVector* ) in1)->n == 0) {
    459             psError(__func__, ": Line %d - Vector contains zero elements");
     479            psLogMsg(__func__, PS_LOG_WARN, ": Line %d - Vector contains zero elements");
    460480        }
    461481    } else if (dim1 == PS_DIMEN_IMAGE) {
    462482        if (((psImage* ) in1)->numCols == 0 || ((psImage* ) in1)->numRows == 0) {
    463             psError(__func__, ": Line %d - Image contains zero length row or cols");
    464         }
    465     }
    466 
    467     if (dim2 == PS_DIMEN_VECTOR) {
     483            psLogMsg(__func__, PS_LOG_WARN, ": Line %d - Image contains zero length row or cols");
     484        }
     485    }
     486
     487    if (dim2 == PS_DIMEN_VECTOR || dim2 == PS_DIMEN_TRANSV) {
    468488        if (((psVector* ) in2)->n == 0) {
    469             psError(__func__, ": Line %d - Vector contains zero elements");
     489            psLogMsg(__func__, PS_LOG_WARN, ": Line %d - Vector contains zero elements");
    470490        }
    471491    } else if (dim2 == PS_DIMEN_IMAGE) {
    472492        if (((psImage* ) in2)->numCols == 0 || ((psImage* ) in2)->numRows == 0) {
    473             psError(__func__, ": Line %d - Image contains zero length row or cols");
     493            psLogMsg(__func__, PS_LOG_WARN, ": Line %d - Image contains zero length row or cols");
    474494        }
    475495    }
    476496
    477497    if (dim1 == PS_DIMEN_SCALAR) {
     498        if ( out != NULL && ((psType*)out)->dimen != dim2) {
     499            if (out != in1 && out != in2) {
     500                psFree(out);
     501            }
     502            out = NULL;
     503        }
    478504        if (dim2 == PS_DIMEN_SCALAR) {
     505            if (out == NULL || ((psScalar*)out)->type.type != elType1) {
     506                if (out != in1 && out != in2) {
     507                    psFree(out);
     508                }
     509                out = psScalarAlloc(0.0,elType1);
     510            }
    479511            BINARY_OP(SCALAR, SCALAR, out, psType1, op, psType2);       // scalar op scalar
    480512        } else if (dim2 == PS_DIMEN_VECTOR || dim2 == PS_DIMEN_TRANSV) {
     513            out = psVectorRecycle(out,((psVector*)in2)->n,elType1);
     514            if (out == NULL) {
     515                psError(__func__, "Couldn't create a proper output psVector.");
     516                return NULL;
     517            }
    481518            BINARY_OP(SCALAR, VECTOR, out, psType1, op, psType2);       // scalar op vector
    482519        } else if (dim2 == PS_DIMEN_IMAGE) {
     520            out = psImageRecycle(out, ((psImage* ) in2)->numCols, ((psImage* ) in2)->numRows,elType1);
     521            if (out == NULL) {
     522                psError(__func__, "Couldn't create a proper output psImage.");
     523                return NULL;
     524            }
    483525            BINARY_OP(SCALAR, IMAGE, out, psType1, op, psType2);        // scalar op image
    484526        } else {
     
    487529    } else if (dim1 == PS_DIMEN_VECTOR || dim1 == PS_DIMEN_TRANSV) {
    488530        if (dim2 == PS_DIMEN_SCALAR) {
     531            out = psVectorRecycle(out,((psVector*)in1)->n,elType1);
     532            if (out == NULL) {
     533                psError(__func__, "Couldn't create a proper output psVector.");
     534                return NULL;
     535            }
    489536            BINARY_OP(VECTOR, SCALAR, out, psType1, op, psType2);       // vector op scalar
    490537        } else if (dim2 == PS_DIMEN_VECTOR || dim2 == PS_DIMEN_TRANSV) {
     538            out = psVectorRecycle(out,((psVector*)in2)->n,elType2);
     539            if (out == NULL) {
     540                psError(__func__, "Couldn't create a proper output psVector.");
     541                return NULL;
     542            }
    491543            BINARY_OP(VECTOR, VECTOR, out, psType1, op, psType2);       // vector op vector
    492544        } else if (dim2 == PS_DIMEN_IMAGE) {
     545            out = psImageRecycle(out, ((psImage* ) in2)->numCols, ((psImage* ) in2)->numRows, elType2);
     546            if (out == NULL) {
     547                psError(__func__, "Couldn't create a proper output psImage.");
     548                return NULL;
     549            }
    493550            BINARY_OP(VECTOR, IMAGE, out, psType1, op, psType2);        // vector op image
    494551        } else {
     
    496553        }
    497554    } else if (dim1 == PS_DIMEN_IMAGE) {
     555        out = psImageRecycle(out, ((psImage*)in1)->numCols, ((psImage*)in1)->numRows, elType1);
     556        if (out == NULL) {
     557            psError(__func__, "Couldn't create a proper output psImage.");
     558            return NULL;
     559        }
    498560        if (dim2 == PS_DIMEN_SCALAR) {
    499561            BINARY_OP(IMAGE, SCALAR, out, psType1, op, psType2);        // image op scalar
     
    503565            BINARY_OP(IMAGE, IMAGE, out, psType1, op, psType2); // image op image
    504566        } else {
     567            if (out != in1 && out != in2) {
     568                psFree(out);
     569            }
    505570            psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
     571            return NULL;
    506572        }
    507573    } else {
     574        if (out != in1 && out != in2) {
     575            psFree(out);
     576        }
    508577        psError(__func__, ": Line %d - Invalid dimensionality for in1 arg: %d", __LINE__, dim1);
     578        return NULL;
    509579    }
    510580
     
    544614    if(nIn != nOut) {                                                                                        \
    545615        psError(__func__, ": Inconsistent element count: %d vs %d", nIn, nOut);                              \
    546         return OUT;                                                                                          \
     616        if (OUT != IN) {                                                                                     \
     617            psFree(OUT);                                                                                     \
     618        }                                                                                                    \
     619        return NULL;                                                                                         \
    547620    }                                                                                                        \
    548621    o  = ((psVector* )OUT)->data.TYPE;                                                                       \
     
    571644        psError(__func__, ": Inconsistent element count: numRows: %d vs %d numCols: %d vs %d", numRowsIn,    \
    572645                numRowsOut, numColsIn, numColsOut);                                                          \
    573         return OUT;                                                                                          \
     646        if (OUT != IN) {                                                                                     \
     647            psFree(OUT);                                                                                     \
     648        }                                                                                                    \
     649        return NULL;                                                                                         \
    574650    }                                                                                                        \
    575651    for(j = 0; j < numRowsIn; j++) {                                                                         \
     
    597673    DIM(OUT,IN,OP,C32);                                                                                      \
    598674    break;                                                                                                   \
     675case PS_TYPE_S8:                                                                                             \
     676    DIM(OUT,IN,OP,C32);                                                                                      \
     677    break;                                                                                                   \
     678case PS_TYPE_U8:                                                                                             \
     679    DIM(OUT,IN,OP,C32);                                                                                      \
     680    break;                                                                                                   \
     681case PS_TYPE_S16:                                                                                            \
     682    DIM(OUT,IN,OP,C32);                                                                                      \
     683    break;                                                                                                   \
     684case PS_TYPE_U16:                                                                                            \
     685    DIM(OUT,IN,OP,C32);                                                                                      \
     686    break;                                                                                                   \
     687case PS_TYPE_U32:                                                                                            \
     688    DIM(OUT,IN,OP,C32);                                                                                      \
     689    break;                                                                                                   \
     690case PS_TYPE_S64:                                                                                            \
     691    DIM(OUT,IN,OP,C32);                                                                                      \
     692    break;                                                                                                   \
     693case PS_TYPE_U64:                                                                                            \
     694    DIM(OUT,IN,OP,C32);                                                                                      \
     695    break;                                                                                                   \
     696case PS_TYPE_C64:                                                                                            \
     697    DIM(OUT,IN,OP,C32);                                                                                      \
     698    break;                                                                                                   \
    599699default:                                                                                                     \
    600 case PS_TYPE_S8:                                                                                             \
    601 case PS_TYPE_U8:                                                                                             \
    602 case PS_TYPE_S16:                                                                                            \
    603 case PS_TYPE_U16:                                                                                            \
    604 case PS_TYPE_U32:                                                                                            \
    605 case PS_TYPE_S64:                                                                                            \
    606 case PS_TYPE_U64:                                                                                            \
    607 case PS_TYPE_C64:                                                                                            \
    608700    psError(__func__, ": Invalid PS_TYPE: %d", IN->type);                                                    \
     701    if (OUT != IN) {                                                                                         \
     702        psFree(OUT);                                                                                         \
     703    }                                                                                                        \
     704    return NULL;                                                                                             \
    609705}
    610706
     
    725821{
    726822    psDimen dimIn = 0;
    727     psDimen dimOut = 0;
    728823    psElemType elTypeIn = 0;
    729     psElemType elTypeOut = 0;
    730824    psType* psTypeIn = NULL;
    731     psType* psTypeOut = NULL;
    732 
    733     psTypeOut = (psType* ) out;
    734     if (psTypeOut == NULL) {
    735         psError(__func__, ": Line %d - Null out argument", __LINE__);
    736         return out;
    737     }
    738825
    739826    psTypeIn = (psType* ) in;
    740827    if (psTypeIn == NULL) {
    741828        psError(__func__, ": Line %d - Null in argument", __LINE__);
    742         return out;
     829        if (out != in) {
     830            psFree(out);
     831        }
     832        return NULL;
    743833    }
    744834
    745835    if (op == NULL) {
    746836        psError(__func__, ": Line %d - Null op argument", __LINE__);
    747         return out;
     837        if (out != in) {
     838            psFree(out);
     839        }
     840        return NULL;
    748841    }
    749842
    750843    dimIn = psTypeIn->dimen;
    751     dimOut = psTypeOut->dimen;
    752844    elTypeIn = psTypeIn->type;
    753     elTypeOut = psTypeOut->type;
    754 
    755     if (elTypeIn != elTypeOut) {
    756         psError(__func__, ": Line %d - Element types for arguments inconsistent: (%d, %d)", __LINE__,
    757                 elTypeIn, elTypeOut);
    758         return out;
    759     }
    760 
    761     if (dimIn != dimOut) {
    762         psError(__func__, ": Line %d - Dimensionality for arguments inconsistent: (%d, %d)", __LINE__,
    763                 dimIn, dimOut);
    764         return out;
    765     }
    766 
    767     if (dimIn == PS_DIMEN_OTHER || dimOut == PS_DIMEN_OTHER) {
    768         psError(__func__, ": Line %d - PS_DIMEN_OTHER not allowed for arguments: (%d, %d)", __LINE__,
    769                 dimIn, dimOut);
    770         return out;
    771     }
    772 
    773     if (dimIn == PS_DIMEN_VECTOR) {
    774         if (((psVector* ) in)->n == 0) {
     845
     846    switch (dimIn) {
     847    case PS_DIMEN_SCALAR:
     848        if (out == NULL ||
     849                ((psType*)out)->dimen != PS_DIMEN_SCALAR ||
     850                ((psScalar*)out)->type.type != elTypeIn) {
     851            psFree(out);
     852            out = psScalarAlloc(0.0,elTypeIn);
     853        }
     854        UNARY_OP(SCALAR, out, psTypeIn, op);    // scalar
     855        break;
     856    case PS_DIMEN_VECTOR:
     857    case PS_DIMEN_TRANSV:
     858        if (((psVector*)in)->n == 0) {
     859            if (out != in) {
     860                psFree(out);
     861            }
    775862            psError(__func__, ": Line %d - Vector contains zero elements");
    776         }
    777     } else if (dimIn == PS_DIMEN_IMAGE) {
     863            return NULL;
     864        }
     865
     866        out = psVectorRecycle(out,
     867                              ((psVector*)in)->n,
     868                              elTypeIn);
     869        if (out == NULL) {
     870            psError(__func__, "Couldn't create a proper output psVector.");
     871            return NULL;
     872        }
     873
     874        UNARY_OP(VECTOR, out, psTypeIn, op);    // vector
     875        break;
     876    case PS_DIMEN_IMAGE:
    778877        if (((psImage* ) in)->numCols == 0 || ((psImage* ) in)->numRows == 0) {
     878            if (out != in) {
     879                psFree(out);
     880            }
    779881            psError(__func__, ": Line %d - Image contains zero length row or cols");
    780         }
    781     }
    782 
    783     if (dimOut == PS_DIMEN_VECTOR) {
    784         if (((psVector* ) out)->n == 0) {
    785             psError(__func__, ": Line %d - Vector contains zero elements");
    786         }
    787     } else if (dimOut == PS_DIMEN_IMAGE) {
    788         if (((psImage* ) out)->numCols == 0 || ((psImage* ) out)->numRows == 0) {
    789             psError(__func__, ": Line %d - Image contains zero length row or cols");
    790         }
    791     }
    792 
    793     if (dimIn == PS_DIMEN_SCALAR) {
    794         UNARY_OP(SCALAR, out, psTypeIn, op);    // scalar
    795     } else if (dimIn == PS_DIMEN_VECTOR || dimIn == PS_DIMEN_TRANSV) {
    796         UNARY_OP(VECTOR, out, psTypeIn, op);    // vector
    797     } else if (dimIn == PS_DIMEN_IMAGE) {
     882            return NULL;
     883        }
     884
     885        out = psImageRecycle(out,
     886                             ((psImage*)in)->numCols,
     887                             ((psImage*)in)->numRows,
     888                             elTypeIn);
     889        if (out == NULL) {
     890            psError(__func__, "Couldn't create a proper output psImage.");
     891            return NULL;
     892        }
     893
    798894        UNARY_OP(IMAGE, out, psTypeIn, op);     // image
    799     } else {
     895        break;
     896    default:
     897        if (out != in) {
     898            psFree(out);
     899        }
    800900        psError(__func__, ": Line %d - Invalid dimensionality for in arg: %d", __LINE__, dimIn);
     901        return NULL;
    801902    }
    802903
  • trunk/psLib/src/math/psMatrix.c

    r1845 r2021  
    1 
    21/** @file  psMatrix.c
    32 *
     
    2120 *  @author Ross Harman, MHPCC
    2221 *   
    23  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2004-09-21 23:44:10 $
     22 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     23 *  @date $Date: 2004-10-08 02:48:01 $
    2524 *
    2625 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2827
    2928/******************************************************************************/
    30 
    3129/*  INCLUDE FILES                                                             */
    32 
    3330/******************************************************************************/
    3431#include <string.h>
     
    4441#include "psMatrix.h"
    4542
    46 /******************************************************************************/
    47 
    48 /*  DEFINE STATEMENTS                                                         */
    49 
    50 /******************************************************************************/
    51 
    52 // None
    53 
    54 /******************************************************************************/
    55 
    56 /*  TYPE DEFINITIONS                                                          */
    57 
    58 /******************************************************************************/
    59 
    60 // None
    61 
    62 /*****************************************************************************/
    63 
    64 /*  GLOBAL VARIABLES                                                         */
    65 
    66 /*****************************************************************************/
    67 
    68 // None
    69 
    70 /*****************************************************************************/
    71 
    72 /*  FILE STATIC VARIABLES                                                    */
    73 
    74 /*****************************************************************************/
    75 
    76 // None
    77 
    78 /*****************************************************************************/
    79 
    80 /*  FUNCTION IMPLEMENTATION - LOCAL                                          */
    81 
    82 /*****************************************************************************/
    83 
    8443/** Preprocessor macro to generate error a NULL image */
    8544#define PS_CHECK_NULL_VECTOR(NAME, RETURN)                                                          \
     
    155114
    156115/*****************************************************************************/
    157 
    158116/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
    159 
    160117/*****************************************************************************/
    161118
  • trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c

    r1648 r2021  
    1515 *  @author  Ross Harman, MHPCC
    1616 *
    17  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    18  *  @date  $Date: 2004-08-27 23:31:35 $
     17 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     18 *  @date  $Date: 2004-10-08 02:48:01 $
    1919 *
    2020 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8686    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Check for NULL arguments",
    8787                            "Null XXX argument", 0);
    88     psBinaryOp(NULL, image1, "+", image2);
    89     psBinaryOp(image2, NULL, "+", image2);
    90     psBinaryOp(image2, image1, "+", NULL);
    91     psBinaryOp(image2, image1, NULL, image2);
    92     psUnaryOp(NULL, image1, "sin");
    93     psUnaryOp(image2, NULL, "sin");
    94     psUnaryOp(image2, image1, NULL);
    95     printFooter(stdout, "psBitSet", "Check for NULL arguments", true);
    96 
     88    psImage* image6 = (psImage*)psBinaryOp(NULL, image1, "+", image2);
     89    if (image6 == NULL) {
     90        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp failed to make an image given no output to recycle.");
     91        return 1;
     92    }
     93
     94    image6 = (psImage*)psBinaryOp(image6, NULL, "+", image2);
     95    if (image6 != NULL) {
     96        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given a NULL first operand.");
     97        return 2;
     98    }
     99
     100    image6 = (psImage*)psBinaryOp(image6, image1, "+", NULL);
     101    if (image6 != NULL) {
     102        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given a NULL second operand.");
     103        return 3;
     104    }
     105    image6 = (psImage*)psBinaryOp(image6, image1, NULL, image2);
     106    if (image6 != NULL) {
     107        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given a NULL operator.");
     108        return 4;
     109    }
     110
     111    image6 = (psImage*)psUnaryOp(NULL, image1, "sin");
     112    if (image6 == NULL) {
     113        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp failed to make an image given no output to recycle.");
     114        return 5;
     115    }
     116
     117    image6 = (psImage*)psUnaryOp(image6, NULL, "sin");
     118    if (image6 != NULL) {
     119        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp returned a result given a NULL operand.");
     120        return 6;
     121    }
     122
     123    image6 = (psImage*)psUnaryOp(image6, image1, NULL);
     124    if (image6 != NULL) {
     125        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp returned a result given a NULL operator.");
     126        return 7;
     127    }
     128
     129    printFooter(stdout, "psMatrixVectorArithmetic", "Check for NULL arguments", true);
    97130
    98131    // Inconsistent element types
    99132    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Inconsistent element types",
    100133                            "Element types for arguments inconsistent", 0);
    101     psBinaryOp(image2, image3, "+", image2);
    102     psUnaryOp(image2, image3, "sin");
    103     printFooter(stdout, "psBitSet", "Inconsistent element types", true);
     134    image6 = (psImage*)psBinaryOp(image6, image3, "+", image2);
     135    if (image6 != NULL) {
     136        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different types.");
     137        return 8;
     138    }
     139
     140    image6 = psImageCopy(image6,image2,PS_TYPE_F64);
     141    image6 = (psImage*)psUnaryOp(image6, image3, "sin");
     142    if (image6 == NULL || image6->type.type != PS_TYPE_F32) {
     143        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp failed to convert the type of the output.");
     144        return 9;
     145    }
     146
     147    printFooter(stdout, "psMatrixVectorArithmetic", "Inconsistent element types", true);
    104148
    105149
     
    107151    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Inconsistent element count",
    108152                            "Inconsistent element count", 0);
    109     psBinaryOp(image2, image4, "+", image2);
    110     psUnaryOp(image2, image4, "sin");
    111     psBinaryOp(image2, vector1, "+", image2);
     153    image6 = (psImage*)psBinaryOp(image6, image4, "+", image2);
     154    if (image6 != NULL) {
     155        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different sizes.");
     156        return 10;
     157    }
     158
     159    image6 = psImageCopy(image6,image2,PS_TYPE_F64);
     160    image6 = (psImage*)psUnaryOp(image6, image4, "sin");
     161    if (image6 == NULL ||
     162            image6->numCols != image6->numCols ||
     163            image6->numRows != image6->numRows) {
     164        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp failed to resize the output.");
     165        return 11;
     166    }
     167
     168    image6 = (psImage*)psBinaryOp(image6, vector1, "+", image2);
     169    if (image6 != NULL) {
     170        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different sizes.");
     171        return 12;
     172    }
     173
    112174    vector1->type.dimen = PS_DIMEN_TRANSV;
    113     psBinaryOp(image2, vector1, "+", image2);
    114     printFooter(stdout, "psBitSet", "Inconsistent element count", true);
     175    image6 = (psImage*)psBinaryOp(image6, vector1, "+", image2);
     176    if (image6 != NULL) {
     177        psLogMsg(__func__,PS_LOG_ERROR,"psBinaryOp returned a result given operands of different sizes.");
     178        return 13;
     179    }
     180    printFooter(stdout, "psMatrixVectorArithmetic", "Inconsistent element count", true);
    115181
    116182
     
    118184    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Inconsistent dimensionality",
    119185                            "Dimensionality for arguments inconsistent", 0);
    120     psUnaryOp(image2, vector2, "sin");
    121     printFooter(stdout, "psBitSet", "Inconsistent dimensionality", true);
    122 
    123 
    124     // Division by zero
    125     printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Divide by zero",
    126                             "Divide by zero", 0);
    127     psBinaryOp(image1, image1, "/", image2);
    128     printFooter(stdout, "psBitSet", "Division by zero", true);
    129 
     186    image6 = psImageCopy(image6,image2,PS_TYPE_F64);
     187    image6 = (psImage*)psUnaryOp(image6, vector2, "sin");
     188    if (image6 != NULL) {
     189        psLogMsg(__func__,PS_LOG_ERROR,"psUnaryOp returned result given wrong type out parameter.");
     190        return 14;
     191    }
     192
     193    printFooter(stdout, "psMatrixVectorArithmetic", "Inconsistent dimensionality", true);
    130194
    131195    // Attempt to use min with complex numbers
    132196    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Use min with complex numbers",
    133197                            "Minimum operation not supported for complex numbers", 0);
    134     psBinaryOp(image5, image5, "min", image5);
    135     printFooter(stdout, "psBitSet", "Use min with complex numbers", true);
     198    image6 = (psImage*)psBinaryOp(image6, image5, "min", image5);
     199    printFooter(stdout, "psMatrixVectorArithmetic", "Use min with complex numbers", true);
    136200
    137201
     
    139203    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Use max with complex numbers",
    140204                            "Maximum operation not supported for complex numbers", 0);
    141     psBinaryOp(image5, image5, "max", image5);
    142     printFooter(stdout, "psBitSet", "Use max with complex numbers", true);
     205    image6 = (psImage*)psBinaryOp(image6, image5, "max", image5);
     206    printFooter(stdout, "psMatrixVectorArithmetic", "Use max with complex numbers", true);
    143207
    144208
     
    146210    printNegativeTestHeader(stdout,"psMatrixVectorArithmetic", "Invalid operation",
    147211                            "Invalid operation", 0);
    148     psBinaryOp(image1, image1, "yarg", image2);
    149     psUnaryOp(image2, image1, "yarg");
    150     printFooter(stdout, "psBitSet", "Invalid operation", true);
     212    image6 = (psImage*)psBinaryOp(image6, image1, "yarg", image2);
     213    image6 = (psImage*)psUnaryOp(image6, image1, "yarg");
     214    printFooter(stdout, "psMatrixVectorArithmetic", "Invalid operation", true);
    151215
    152216    return 0;
  • trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stderr

    r1761 r2021  
    1 <DATE><TIME>|<HOST>|E|psBinaryOp
    2     : Line <LINENO> - Null out argument
    31<DATE><TIME>|<HOST>|E|psBinaryOp
    42    : Line <LINENO> - Null in1 argument
     
    86    : Line <LINENO> - Null op argument
    97<DATE><TIME>|<HOST>|E|psUnaryOp
    10     : Line <LINENO> - Null out argument
    11 <DATE><TIME>|<HOST>|E|psUnaryOp
    128    : Line <LINENO> - Null in argument
    139<DATE><TIME>|<HOST>|E|psUnaryOp
    1410    : Line <LINENO> - Null op argument
    1511<DATE><TIME>|<HOST>|E|psBinaryOp
    16     : Line <LINENO> - Element types for arguments inconsistent: (1028, 1032, 1032)
    17 <DATE><TIME>|<HOST>|E|psUnaryOp
    1812    : Line <LINENO> - Element types for arguments inconsistent: (1028, 1032)
    1913<DATE><TIME>|<HOST>|E|psBinaryOp
    20     : Inconsistent element count: numRows: 2 vs 3 numCols: 2 vs 3
    21 <DATE><TIME>|<HOST>|E|psUnaryOp
    2214    : Inconsistent element count: numRows: 2 vs 3 numCols: 2 vs 3
    2315<DATE><TIME>|<HOST>|E|psBinaryOp
     
    2517<DATE><TIME>|<HOST>|E|psBinaryOp
    2618    : Inconsistent element count: 2 vs 3
     19<DATE><TIME>|<HOST>|E|psLib.collections.psVectorRecycle
     20    The input psVector must have a vector dimension type.
    2721<DATE><TIME>|<HOST>|E|psUnaryOp
    28     : Line <LINENO> - Dimensionality for arguments inconsistent: (1, 3)
    29 <DATE><TIME>|<HOST>|E|psNanDiv
    30     : Divide by zero
    31 <DATE><TIME>|<HOST>|E|psNanDiv
    32     : Divide by zero
    33 <DATE><TIME>|<HOST>|E|psNanDiv
    34     : Divide by zero
    35 <DATE><TIME>|<HOST>|E|psNanDiv
    36     : Divide by zero
    37 <DATE><TIME>|<HOST>|E|psNanDiv
    38     : Divide by zero
    39 <DATE><TIME>|<HOST>|E|psNanDiv
    40     : Divide by zero
    41 <DATE><TIME>|<HOST>|E|psNanDiv
    42     : Divide by zero
    43 <DATE><TIME>|<HOST>|E|psNanDiv
    44     : Divide by zero
    45 <DATE><TIME>|<HOST>|E|psNanDiv
    46     : Divide by zero
     22    Couldn't create a proper output psVector.
    4723<DATE><TIME>|<HOST>|E|psBinaryOp
    4824    : Minimum operation not supported for complex numbers
  • trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic03.stdout

    r1150 r2021  
    88
    99
    10 ---> TESTPOINT PASSED (psBitSet{Check for NULL arguments} | tst_psMatrixVectorArithmetic03.c)
     10---> TESTPOINT PASSED (psMatrixVectorArithmetic{Check for NULL arguments} | tst_psMatrixVectorArithmetic03.c)
    1111
    1212/***************************** TESTPOINT ******************************************\
     
    1919
    2020
    21 ---> TESTPOINT PASSED (psBitSet{Inconsistent element types} | tst_psMatrixVectorArithmetic03.c)
     21---> TESTPOINT PASSED (psMatrixVectorArithmetic{Inconsistent element types} | tst_psMatrixVectorArithmetic03.c)
    2222
    2323/***************************** TESTPOINT ******************************************\
     
    3030
    3131
    32 ---> TESTPOINT PASSED (psBitSet{Inconsistent element count} | tst_psMatrixVectorArithmetic03.c)
     32---> TESTPOINT PASSED (psMatrixVectorArithmetic{Inconsistent element count} | tst_psMatrixVectorArithmetic03.c)
    3333
    3434/***************************** TESTPOINT ******************************************\
     
    4141
    4242
    43 ---> TESTPOINT PASSED (psBitSet{Inconsistent dimensionality} | tst_psMatrixVectorArithmetic03.c)
    44 
    45 /***************************** TESTPOINT ******************************************\
    46 *             TestFile: tst_psMatrixVectorArithmetic03.c                           *
    47 *            TestPoint: psMatrixVectorArithmetic{Divide by zero}                   *
    48 *             TestType: Negative                                                   *
    49 *    ExpectedErrorText: Divide by zero                                             *
    50 *  ExpectedStatusValue: 0                                                          *
    51 \**********************************************************************************/
    52 
    53 
    54 ---> TESTPOINT PASSED (psBitSet{Division by zero} | tst_psMatrixVectorArithmetic03.c)
     43---> TESTPOINT PASSED (psMatrixVectorArithmetic{Inconsistent dimensionality} | tst_psMatrixVectorArithmetic03.c)
    5544
    5645/***************************** TESTPOINT ******************************************\
     
    6352
    6453
    65 ---> TESTPOINT PASSED (psBitSet{Use min with complex numbers} | tst_psMatrixVectorArithmetic03.c)
     54---> TESTPOINT PASSED (psMatrixVectorArithmetic{Use min with complex numbers} | tst_psMatrixVectorArithmetic03.c)
    6655
    6756/***************************** TESTPOINT ******************************************\
     
    7463
    7564
    76 ---> TESTPOINT PASSED (psBitSet{Use max with complex numbers} | tst_psMatrixVectorArithmetic03.c)
     65---> TESTPOINT PASSED (psMatrixVectorArithmetic{Use max with complex numbers} | tst_psMatrixVectorArithmetic03.c)
    7766
    7867/***************************** TESTPOINT ******************************************\
     
    8574
    8675
    87 ---> TESTPOINT PASSED (psBitSet{Invalid operation} | tst_psMatrixVectorArithmetic03.c)
     76---> TESTPOINT PASSED (psMatrixVectorArithmetic{Invalid operation} | tst_psMatrixVectorArithmetic03.c)
    8877
Note: See TracChangeset for help on using the changeset viewer.