#include "gp.h" int copyvardata(invar, outvar, where) VARP invar; VARP outvar; int *where; int copydimvars(inset, outset) SETP inset; SETP outset;
copyvardata copies all data from invar into output variable outvar, beginning at the hypercube origin specified by where. where is an array of integers specifying where the data copying is to begin in the output data hypercube.
The two variables are assumed to have the same type, but not necessarily the same dimensions, or even the same number of dimensions. It is assumed that the number of dimensions of invar (N) is less than or equal to the number of dimensions of outvar (M; i.e. N<=M). If N<M, then the N dimensions of invar are assumed to be parallel to the last N dimensions of outvar.
copyvardata allocates memory dynamically to perform the copy, but not necessarily enough to hold an entire hypercube of input data at one time. The max memory to allocate is currently 2 Mbytes.
copydimvars copies all variables into outset that are associated with dimensions (i.e. dim-var) that are the same (by name and size) in both inset and outset. For example, if: 1) outset is a dataset that was processed from some of the dimensions and variables of inset, 2) outset "cloned" some of the dimensions of inset (in both size and name), and 3) these dimensions point to variables specifying the dimension values in inset, then these variables are copied into outset if they do not already exist in outset.
Returns 0 if successful. Returns -1 with error code in terrno for all other errors. copyvardata returns -1 with error code in errno if memory could not be allocated.
include/gp.h, lib/libapp.a
gpvar, gpgetvar, gpputvar, instantiate, gplink, assemble, subset, datasets
None.
Last Update: $Date: 1999/05/10 20:56:30 $