IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2004, 9:27:56 AM (22 years ago)
Author:
harman
Message:

Added scalar copy function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psScalar.c

    r1440 r1453  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-08-09 23:34:57 $
     11 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-08-10 19:27:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    128128}
    129129
     130psScalar* psScalarCopy(psScalar *scalar)
     131{
     132    psScalar *newScalar = NULL;
     133
     134    if (scalar == NULL) {
     135        psError(__func__, "Null scalar not allowed");
     136    }
     137
     138    newScalar =  psScalarAlloc(scalar->data.C64, scalar->type.type);
     139    if (newScalar == NULL) {
     140        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
     141    }
     142
     143    return newScalar;
     144}
     145
    130146void psScalarFree(psScalar* restrict scalar)
    131147{
Note: See TracChangeset for help on using the changeset viewer.