IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 20, 2005, 5:01:37 PM (21 years ago)
Author:
drobbin
Message:

* empty log message *

Location:
trunk/psLib/src/mathtypes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psImage.c

    r4316 r4330  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-18 03:13:02 $
     11 *  @version $Revision: 1.70 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-21 03:01:37 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    106106}
    107107
    108 psRegion psRegionFromString(char* region)
     108psRegion psRegionFromString(const char* region)
    109109{
    110110    psS32 col0;
  • trunk/psLib/src/mathtypes/psImage.h

    r4316 r4330  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-18 03:13:02 $
     13 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-21 03:01:37 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    127127 */
    128128psRegion psRegionFromString(
    129     char* region                       ///< image rectangular region in the form '[x0:x1,y0:y1]'
     129    const char* region                 ///< image rectangular region in the form '[x0:x1,y0:y1]'
    130130);
    131131
     
    163163/** Frees all children of a psImage.
    164164 *
    165  *  @return psS32      Number of children freed.
     165 *  @return int      Number of children freed.
    166166 *
    167167 */
  • trunk/psLib/src/mathtypes/psScalar.c

    r3264 r4330  
    88 *  @author Ross Harman, MHPCC
    99 *
    10  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-02-17 19:26:23 $
     10 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-21 03:01:37 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8080}
    8181
    82 psScalar* psScalarCopy(psScalar *scalar)
     82psScalar* psScalarCopy(const psScalar *value)
    8383{
    8484    psElemType dataType;
    8585    psScalar *newScalar = NULL;
    8686
    87     if (scalar == NULL) {
     87    if (value == NULL) {
    8888        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    8989                PS_ERRORTEXT_psScalar_COPY_NULL);
     
    9191    }
    9292
    93     dataType = scalar->type.type;
     93    dataType = value->type.type;
    9494    switch (dataType) {
    9595    case PS_TYPE_S8:
    96         newScalar =  psScalarAlloc(scalar->data.S8, dataType);
     96        newScalar =  psScalarAlloc(value->data.S8, dataType);
    9797        break;
    9898    case PS_TYPE_U8:
    99         newScalar =  psScalarAlloc(scalar->data.U8, dataType);
     99        newScalar =  psScalarAlloc(value->data.U8, dataType);
    100100        break;
    101101    case PS_TYPE_S16:
    102         newScalar =  psScalarAlloc(scalar->data.S16, dataType);
     102        newScalar =  psScalarAlloc(value->data.S16, dataType);
    103103        break;
    104104    case PS_TYPE_U16:
    105         newScalar =  psScalarAlloc(scalar->data.U16, dataType);
     105        newScalar =  psScalarAlloc(value->data.U16, dataType);
    106106        break;
    107107    case PS_TYPE_S32:
    108         newScalar =  psScalarAlloc(scalar->data.S32, dataType);
     108        newScalar =  psScalarAlloc(value->data.S32, dataType);
    109109        break;
    110110    case PS_TYPE_U32:
    111         newScalar =  psScalarAlloc(scalar->data.U32, dataType);
     111        newScalar =  psScalarAlloc(value->data.U32, dataType);
    112112        break;
    113113    case PS_TYPE_S64:
    114         newScalar =  psScalarAlloc(scalar->data.S64, dataType);
     114        newScalar =  psScalarAlloc(value->data.S64, dataType);
    115115        break;
    116116    case PS_TYPE_U64:
    117         newScalar =  psScalarAlloc(scalar->data.U64, dataType);
     117        newScalar =  psScalarAlloc(value->data.U64, dataType);
    118118        break;
    119119    case PS_TYPE_F32:
    120         newScalar =  psScalarAlloc(scalar->data.F32, dataType);
     120        newScalar =  psScalarAlloc(value->data.F32, dataType);
    121121        break;
    122122    case PS_TYPE_F64:
    123         newScalar =  psScalarAlloc(scalar->data.F64, dataType);
     123        newScalar =  psScalarAlloc(value->data.F64, dataType);
    124124        break;
    125125    case PS_TYPE_C32:
    126         newScalar =  psScalarAlloc(scalar->data.C32, dataType);
     126        newScalar =  psScalarAlloc(value->data.C32, dataType);
    127127        break;
    128128    case PS_TYPE_C64:
    129         newScalar =  psScalarAlloc(scalar->data.C64, dataType);
     129        newScalar =  psScalarAlloc(value->data.C64, dataType);
    130130        break;
    131131    default:
  • trunk/psLib/src/mathtypes/psScalar.h

    r4162 r4330  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-08 23:40:45 $
     13 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-21 03:01:37 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777 */
    7878psScalar* psScalarCopy(
    79     psScalar *scalar                   ///< Scalar to copy.
     79    const psScalar *value              ///< Scalar to copy.
    8080);
    8181
  • trunk/psLib/src/mathtypes/psVector.c

    r4212 r4330  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-06-10 21:46:46 $
     11*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-06-21 03:01:37 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    129129}
    130130
    131 psVector *psVectorExtend(psVector *vector, int delta, int nExtend)
     131psVector *psVectorExtend(psVector *vector, long delta, long nExtend)
    132132{
    133133    // can't handle a NULL vector (don't know the data type to allocate)
     
    166166}
    167167
    168 psVector* psVectorCopy(psVector* out, const psVector* in, psElemType type)
    169 {
    170     if (in == NULL) {
     168psVector* psVectorCopy(psVector* output, const psVector* input, psElemType type)
     169{
     170    if (input == NULL) {
    171171        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    172172                PS_ERRORTEXT_psVector_SORT_NULL);
    173         psFree(out);
    174         return NULL;
    175     }
    176 
    177     psS32 nElements = in->n;
    178 
    179     out = psVectorRecycle(out, nElements, type);
     173        psFree(output);
     174        return NULL;
     175    }
     176
     177    psS32 nElements = input->n;
     178
     179    output = psVectorRecycle(output, nElements, type);
    180180
    181181    #define PSVECTOR_COPY(INTYPE,OUTTYPE) { \
    182         ps##INTYPE *inVec = in->data.INTYPE; \
    183         ps##OUTTYPE *outVec = out->data.OUTTYPE; \
     182        ps##INTYPE *inVec = input->data.INTYPE; \
     183        ps##OUTTYPE *outVec = output->data.OUTTYPE; \
    184184        for (psS32 col=0;col<nElements;col++) { \
    185185            *(outVec++) = *(inVec++); \
     
    189189    #define PSVECTOR_COPY_CASE(OUTTYPE) \
    190190case PS_TYPE_##OUTTYPE: { \
    191         switch (in->type.type) { \
     191        switch (input->type.type) { \
    192192        case PS_TYPE_S8: \
    193193            PSVECTOR_COPY(S8,OUTTYPE); \
     
    232232                        PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, \
    233233                        typeStr); \
    234                 psFree(out); \
     234                psFree(output); \
    235235            } \
    236236        } \
     
    257257                    PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
    258258                    typeStr);
    259             psFree(out);
     259            psFree(output);
    260260
    261261            break;
    262262        }
    263263    }
    264     return out;
     264    return output;
    265265
    266266
  • trunk/psLib/src/mathtypes/psVector.h

    r4212 r4330  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-06-10 21:46:46 $
     13 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-06-21 03:01:37 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    101101psVector *psVectorExtend(
    102102    psVector *vector,                  ///< Vector to extend
    103     int delta,                         ///< Amount to expand allocation, if necessary
    104     int nExtend                        ///< Number of elements to add to vector length
     103    long delta,                        ///< Amount to expand allocation, if necessary
     104    long nExtend                       ///< Number of elements to add to vector length
    105105);
    106106
     
    132132 */
    133133psVector* psVectorCopy(
    134     psVector* out,                     ///< if non-NULL, a psVector to recycle
    135     const psVector* in,                ///< the vector to copy.
     134    psVector* output,                  ///< if non-NULL, a psVector to recycle
     135    const psVector* input,             ///< the vector to copy.
    136136    psElemType type                    ///< the data type of the resulting psVector
    137137);
Note: See TracChangeset for help on using the changeset viewer.