One of the parameters to CPathMakeArray is a ``mapping function'', which maps array elements to processors. Mapping functions must be registered. The integer index returned by the registration process is the number which is passed to CPathMakeArray. Mapping functions receive the array descriptor as a parameter, and may use it to determine the dimensions of the array.
unsigned int MapFn(CPath *path, int *indices)
This is a prototype map function, all mapping functions must have this
parameter list. It accepts an array descriptor and a set of indices.
It returns the processor number of the specified element.
int CPathRegisterMapper(void *mapfn)
Accepts a pointer to a mapping function, and returns an integer
index for the function. This number can be used as a parameter to
CPathMakeArray.
int CPathArrayDimensions(CPath *path)
Returns the number of dimensions in the specified array.
int CPathArrayDimension(CPath *path, int n)
Returns the nth dimension of the specified array.
September 22, 2008
Charm Homepage