NAME

cxPyrDup - makes a copy of a pyramid structure

C SPECIFICATION

#include <cx/DataAccess.h>

cxPyramid *cxPyrDup(cxPyramid *src)

FORTRAN SPECIFICATION

integer function cxPyrDup(src)
integer src

PARAMETERS

src
Input pyramid data structure.

FUNCTION RETURN VALUE

The returned value for this function is a pointer to the newly created pyramid.

DESCRIPTION

cxPyrDup makes an exact copy of its input pyramid for return to the caller. The duplication extends to all the data contained within the pyramid, so that constituent cxLattice and cxConnection structures are duplicated as well. Two pyramids can share the same data without duplicating a lattice by storing lattice pointers and incrementing the lattice's reference count appropriately. When the lattice data change, both pyramids will be affected. cxPyrDup does not share lattices in this way; it copies the entire input. cxPyrDup returns a NULL if its input is malformed or if an allocation error occurs.

SEE ALSO

cxLatDup(3E), cxConnDup(3E), cxPyrNew(3E), cxDataRefInc(3E)
Last modified: Mon Nov 18 13:52:39 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996