IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1453


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

Added scalar copy function

Location:
trunk/psLib/src
Files:
4 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{
  • trunk/psLib/src/collections/psScalar.h

    r1441 r1453  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 23:40:55 $
     13 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-10 19:27:56 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7979                 );
    8080
     81/** Copy a scalar.
     82 *
     83 * Uses psLib memory allocation functions to copy a scalar.
     84 *
     85 * @return void.
     86 *
     87 */
     88psScalar* psScalarCopy(psScalar *scalar    ///< Scalar to copy.
     89                      );
     90
    8191/// @}
    8292
  • trunk/psLib/src/mathtypes/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{
  • trunk/psLib/src/mathtypes/psScalar.h

    r1441 r1453  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 23:40:55 $
     13 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-10 19:27:56 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7979                 );
    8080
     81/** Copy a scalar.
     82 *
     83 * Uses psLib memory allocation functions to copy a scalar.
     84 *
     85 * @return void.
     86 *
     87 */
     88psScalar* psScalarCopy(psScalar *scalar    ///< Scalar to copy.
     89                      );
     90
    8191/// @}
    8292
Note: See TracChangeset for help on using the changeset viewer.