IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 13, 2007, 2:39:51 PM (19 years ago)
Author:
Paul Price
Message:

Removing complex number support. No-one was using it, and it prevents compilation on Solaris.

File:
1 edited

Legend:

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

    r10999 r12431  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2007-01-09 22:38:52 $
     32 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2007-03-14 00:39:50 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    323323    DIM1##_##DIM2(OUT,IN1,OP,IN2,F64);                                                                       \
    324324    break;                                                                                                   \
    325 case PS_TYPE_C32:                                                                                            \
    326     DIM1##_##DIM2(OUT,IN1,OP,IN2,C32);                                                                       \
    327     break;                                                                                                   \
    328 case PS_TYPE_C64:                                                                                            \
    329     DIM1##_##DIM2(OUT,IN1,OP,IN2,C64);                                                                       \
    330     break;                                                                                                   \
    331 default:                                                                                                     \
    332     /* char* strType;                                                                                        \
    333     PS_TYPE_NAME(strType,IN1->type);                                                                         \
    334     psError(PS_ERR_BAD_PARAMETER_TYPE, true,                                                                 \
    335             _("Specified data type, %s, is not supported."),                                                             \
    336             strType);  */                                                                                    \
    337     if (OUT != IN1 && OUT != IN2) {                                                                          \
    338         psFree(OUT);                                                                                         \
     325default: {                                                                                                   \
     326        char* strType;                                                                                       \
     327        PS_TYPE_NAME(strType,IN1->type);                                                                     \
     328        psError(PS_ERR_BAD_PARAMETER_TYPE, true,                                                             \
     329                _("Specified data type, %s, is not supported."),                                             \
     330                strType);                                                                                    \
     331        if (OUT != IN1 && OUT != IN2) {                                                                      \
     332            psFree(OUT);                                                                                     \
     333        }                                                                                                    \
     334        return NULL;                                                                                         \
    339335    }                                                                                                        \
    340     return NULL;                                                                                             \
    341336}
    342337
     
    364359    } else {                                                                                                 \
    365360        psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
    366                 "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type);               \
     361                "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type);                \
    367362        return NULL;                                                                                         \
    368363    }                                                                                                        \
    369364} else if (!strncmp(OP, "^", 1)) {                                                                           \
    370     if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                               \
    371         BINARY_TYPE(DIM1,DIM2,OUT,IN1,cpow(*i1,*i2),IN2);                                                    \
    372     } else {                                                                                                 \
    373         BINARY_TYPE(DIM1,DIM2,OUT,IN1,pow(*i1,*i2),IN2);                                                     \
    374     }                                                                                                        \
     365    BINARY_TYPE(DIM1,DIM2,OUT,IN1,pow(*i1,*i2),IN2);                                                         \
    375366} else if (!strncmp(OP, "min", 3)) {                                                                         \
    376     if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                               \
    377         psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
    378                 _("The minimum operation is not supported with complex data."));                                                  \
    379         if (OUT != IN1 && OUT != IN2) {                                                                      \
    380             psFree(OUT);                                                                                     \
    381         }                                                                                                    \
    382         return NULL;                                                                                         \
    383     } else {                                                                                                 \
    384         BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmin(*i1,*i2),IN2);                                                    \
    385     }                                                                                                        \
     367    BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmin(*i1,*i2),IN2);                                                        \
    386368} else if (!strncmp(OP, "max", 3)) {                                                                         \
    387     if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                               \
    388         psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
    389                 _("The maximum operation is not supported with complex data."));                                                  \
    390         if (OUT != IN1 && OUT != IN2) {                                                                      \
    391             psFree(OUT);                                                                                     \
    392         }                                                                                                    \
    393         return NULL;                                                                                         \
    394     } else {                                                                                                 \
    395         BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmax(*i1,*i2),IN2);                                                    \
    396     }                                                                                                        \
     369    BINARY_TYPE(DIM1,DIM2,OUT,IN1,fmax(*i1,*i2),IN2);                                                        \
    397370} else {                                                                                                     \
    398371    psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                                \
    399             _("Specified operation, %s, is not supported."),                                                     \
     372            _("Specified operation, %s, is not supported."),                                                 \
    400373            OP);                                                                                             \
    401374    if (OUT != IN1 && OUT != IN2) {                                                                          \
Note: See TracChangeset for help on using the changeset viewer.