cxLatDataNew - create a lattice with data and no coordinates
#include <cx/DataAccess.h>

typedef enum {
} cxPrimType;

cxLattice *cxLatDataNew(long nDim, long dims[],
   long nDataVar, cxPrimType primType)
integer cx_prim_byte
integer cx_prim_short
integer cx_prim_long
integer cx_prim_float
integer cx_prim_double

parameter (cx_prim_byte = 0) parameter (cx_prim_short = 1) parameter (cx_prim_long = 2) parameter (cx_prim_float = 3) parameter (cx_prim_double = 4)
integer function cxLatDataNew(nDim, dims, nDataVar, primType) integer nDim, dims(nDim) integer nDataVar, primType
Number of lattice dimensions.
Array specifying length in each dimension.
Number of data elements at each node.
Primitive data type.
Returns a pointer to a new lattice structure with data, but no coordinates. cxLatDataNew creates a cxLattice structure in data memory and returns a pointer to it. The lattice created will have nDim dimensions; the length of each dimension is specified in the array dims. Each node of the lattice will have space for nDataVar elements; the type of each element is specified by primType. No space for coordinates will be allocated.

Refer to the IRIS Explorer Module Writer's Guide for more information on the structure of cxLattice and its contents.

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.

cxDataManAbortOnError, cxLatNew, cxLatRootNew, cxLatCoordNew, cxCoordNew, cxCoordDefaultNew, cxLatPtrSet

Many modules assume that a lattice has data. Modules built with the IRIS Explorer module builder utility (mbuilder(1)) also require that coordinates be present. It is strongly recommended that you lattices be created with both data and coordinates for compatibility. cxLatDataNew, used in conjunction with cxCoordNew or cxCoordDefaultNew and cxLatPtrSet, allows the lattice, data and coordinates to be created separately.

[ Documentation Home ]