NAME

cxConnPtrSet - set all contents of a connection list structure
#include <cx/DataAccess.h>

cxErrorCode cxConnPtrSet(cxConnection *src, long numElements, long numConnections, long *elements, long *connections)
integer function cxConnPtrSet(src, numelements, numconnections, elements, connections)
integer src
integer numelements
integer numconnections
integer elements(numelements)
integer connections(numconnections)
src
Input connection list data structure.
numElements
Input length of the elements array.
numConnections
Input length of the connections array.
elements
Input array holding the cumulative number of connections from all lattice elements at a given pyramid layer.
connections
Input array holding the concatenated list of all connections (represented by the index number of the connection's destination) for the lattice elements at a given pyramid layer.
The return value for this function is an integer error code enumeration. cxConnPtrSet sets all constants and arrays within a connection list data structure. It sets the elements and connections arrays by copying their pointers, rather than copying the values. cxConnPtrSet does not free the previous array contents, in case they are needed in another context. It is the user's responsibility to free the previous elements and connections arrays, if necessary.

cxConnPtrSet performs essentially the same function as repeated calls to the cxConnEleSet routine, but is many times faster since it avoids data copying and the overhead of multiple subroutine calls.

The connection list is a reference counted, shared memory structure and must therefore be constructed from shared memory arrays. The caller must provide elements and connections as pointers to arrays allocated using cxDataMalloc or a similar routine.

A return value of cx_err_none indicates success.

cxConnNew(3E), cxConnPtrGet(3E), cxConnEleSet(3E), cxDataMalloc(3E)
Last modified: Mon Nov 6 16:32:59 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996