NAME

cxLatDup - duplicate a lattice, optionally duplicating data and coordinates

C SPECIFICATION

#include <cx/DataAccess.h>

cxLattice *cxLatDup(cxLattice *src, int dataCopy, int coordCopy)

FORTRAN SPECIFICATION

integer function cxLatDup(src, dataCopy, coordCopy)
integer src, dataCopy, coordCopy

PARAMETERS

src
Lattice to be duplicated.
dataCopy
Causes the data in src to be copied if non-zero.
coordCopy
Causes the coordinates in src to be copied if non-zero.

FUNCTION RETURN VALUE

Returns a pointer to a duplicate of src.

DESCRIPTION

cxLatDup duplicates the lattice in src and returns a pointer to the duplicate. If dataCopy is non-zero, then all data stored in src is also copied. If coordCopy is non-zero, then all coordinates stored in src are also copied.

Lattice data structures are allocated from a shared memory arena on Silicon Graphics workstations running IRIX. This shared memory is a limited resource, so it is possible for the memory to be exhausted, causing the allocation routine to fail. If the allocation routine fails, any memory it has successfully allocated will be released, and a NULL pointer will be returned. The subroutine cxDataAllocErrorGet returns TRUE if the lattice could not be allocated. See cxDataAllocErrorGet for more details on writing portable module code that copes well with limited memory.

SEE ALSO

cxDataAllocErrorGet(3E)
Last modified: Mon Nov 18 13:50:20 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996