[ HPF Home | Versions | Compilers | Projects | Publications | Applications | Benchmarks | Events | Contact ]



Next:
COPY_SUFFIX(ARRAYDIM, SEGMENT) Up: Specifications of Library Previous: COPY_PREFIX(ARRAYDIM, SEGMENT)

COPY_SCATTER(ARRAY,BASE,INDX1, ..., INDXn, MASK)

Optional Argument. MASK
Description. Scatters elements of ARRAY selected by MASK to positions of the result indicated by index arrays INDX1, ..., INDXn. Each element of the result is equal to one of the elements of ARRAY scattered to that position or, if there is none, to the corresponding element of BASE.
Class. Transformational function.
Arguments.

ARRAY may be of any type. It must not be scalar.

BASE must be of the same type and kind type parameter as ARRAY.

INDX1,...,INDXn must be of type integer and conformable with ARRAY. The number ofINDX arguments must be equal to the rank of BASE.

MASK (optional) must be of type logical and must be conformable with ARRAY.
Result Type, Type Parameter, and Shape. Same as BASE.
Result Value. Let be the set of elements of ARRAY associated with element of BASE as described in Secion .

If is empty, then the element of the result corresponding to the element of BASE has the same value as .

If is non-empty, then the element of the result corresponding to the element of BASE is the result of choosing one element from . HPF does not specify how the choice is to be made; the mechanism is implementation dependent.
. COPY_SCATTER((/1, 2, 3, 4/), (/7, 8, 9/), (/1, 1, 2, 2/)) is [, , 9], where is a member of the set and is a member of the set .



©2000-2006 Rice University [ Contact Us | HiPerSoft | Computer Science ]

paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994