cxLatDup - duplicate a lattice, optionally duplicating data and coordinates
#include <cx/DataAccess.h>

cxLattice *cxLatDup(cxLattice *src, int dataCopy, int coordCopy)
integer function cxLatDup(src, dataCopy, coordCopy)
integer src, dataCopy, coordCopy
Lattice to be duplicated.
Causes the data in src to be copied if non-zero.
Causes the coordinates in src to be copied if non-zero.
Returns a pointer to a duplicate of src. 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. This shared memory is a limited resource, so it is possible for the memory to be exhausted, causing the allocation routine to fail.

See cxDataManAbortOnError for more details on writing portable module code that copes well with limited memory.


[ Documentation Home ]